[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: 2501.js
"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[2501],{616:(e,t,o)=>{o.d(t,{A:()=>n});const n=Object.freeze({CASH_ON_DELIVERY:1,E_WALLET:2,PAYPAL:3})},2322:(e,t,o)=>{o.d(t,{A:()=>a});var n=o(6314),r=o.n(n)()(function(e){return e[1]});r.push([e.id,"@media print{.hidden-print[data-v-660eaa87]{display:none!important}}",""]);const a=r},2501:(e,t,o)=>{o.r(t),o.d(t,{default:()=>tr});var n=o(9726),r={class:"md:w-[calc(100%-340px)] lg:w-[calc(100%-320px)] xl:w-[calc(100%-377px)]"},a={class:"form-row"},i={class:"w-full flex items-center h-10 px-3 rounded-md border border-[#EFF0F6] bg-white"},s=["placeholder"],l={class:"db-field w-full"},c={class:"db-field w-full"},d={key:0,class:"form-col-12 sm:form-col-6 xl:form-col-2"},u={class:"db-pos-cartDiv fixed top-0 ltr:right-0 rtl:left-0 w-full h-dvh rounded-none z-50 md:z-10 md:top-[85px] ltr:md:right-5 rtl:md:left-5 md:w-[322px] lg:w-[305px] xl:w-[360px] md:h-[calc(100vh-85px)] md:rounded-lg overflow-y-auto thin-scrolling bg-white"},p={class:"p-4"},m={class:"db-field mb-3"},h={class:"flex gap-2 mb-3"},f={class:"capitalize text-sm font-bold"},g={key:0,class:"flex items-center justify-center"},y=["src"],b={key:1,class:"p-4"},v={class:"flex items-start gap-3 pb-4 mb-4 border-b last:mb-0 last:pb-0 last:border-none border-gray-100"},x=["src"],E={class:"relative w-full overflow-hidden"},C={class:"font-semibold capitalize whitespace-nowrap overflow-hidden text-ellipsis mb-1"},V={key:0,class:"flex flex-wrap mb-2"},k={class:"text-xs capitalize inline-flex items-center"},w={class:"flex flex-wrap gap-3 mb-3"},N={class:"font-semibold font-sans"},F={key:0,class:"font-semibold font-sans text-[#FF6262]"},P={class:"flex items-start justify-between gap-3"},A={class:"flex items-center gap-1 w-20 p-1 rounded-full bg-[#F7F7FC]"},B=["onClick"],S=["onKeyup","onUpdate:modelValue"],D=["onClick"],$=["onClick"],I={class:"text-xs font-medium capitalize hidden sm:block"},T={class:"p-4"},q={key:0,class:"flex h-[38px]"},M={class:"db-field-down-arrow"},L=["value"],z=["value"],H=["placeholder"],j={key:1,class:"text-xs db-field-alert m-0 mt-1"},O={class:"flex flex-col gap-1.5 mt-4 mb-4"},U={class:"flex items-center justify-between"},R={class:"text-sm font-client capitalize leading-6 text-[#2E2F38]"},Z={class:"text-sm font-client capitalize leading-6 text-[#2E2F38]"},K={class:"flex items-center justify-between"},W={class:"text-sm font-client capitalize leading-6"},G={class:"text-sm font-client capitalize leading-6"},Y={class:"flex items-center justify-between"},X={class:"text-sm font-client capitalize leading-6"},J={class:"text-sm font-client capitalize leading-6"},Q={class:"flex items-center justify-between"},ee={class:"text-sm font-medium font-client capitalize leading-6 text-[#2E2F38]"},te={class:"text-sm font-medium font-client capitalize leading-6 text-[#2E2F38]"},oe={key:2,class:"flex items-center justify-center gap-6"},ne={class:"db-pos-cartBtn fixed md:hidden bottom-0 left-0 z-10 w-full h-14 py-4 text-center flex items-center justify-center shadow-xl-top gap-3 bg-primary text-white"},re={class:"text-base font-medium"};var ae=o(5475),ie={class:"grid gap-3 sm:gap-[18px] grid-cols-[repeat(auto-fill,_minmax(140px,_1fr))] sm:grid-cols-[repeat(auto-fill,_minmax(185px,_1fr))] mb-8 md:mb-0"},se=["onClick"],le={class:"relative overflow-hidden rounded-xl isolate"},ce={key:0,class:"capitalize text-xs font-semibold rounded-xl py-1 px-2 shadow-badge absolute top-3 left-3 z-10 bg-secondary text-white"},de=["src"],ue={class:"px-1 sm:px-0 pt-4 pb-2"},pe={class:"capitalize text-base font-semibold whitespace-nowrap mb-1.5 transition-all duration-300 hover:text-primary overflow-hidden"},me={class:"flex flex-wrap items-center gap-2 mb-5"},he={class:"flex items-center gap-1"},fe={key:0,class:"flex items-center gap-1 mt-[5px]"},ge={class:"text-xs font-medium whitespace-nowrap text-text"},ye={class:"text-xs font-medium whitespace-nowrap text-text hover:text-primary"},be={key:0,class:"flex flex-wrap-reverse items-center gap-x-3 gap-y-1"},ve={class:"text-xl sm:text-[22px] font-bold"},xe={class:"text-sm sm:text-base font-semibold text-shopperz-red"},Ee={key:1,class:"text-xl sm:text-[22px] font-bold"},Ce={id:"variation-modal",class:"fixed inset-0 z-50 p-3 w-screen h-dvh overflow-y-auto bg-black/50 transition-all duration-500 opacity-0 invisible"},Ve={class:"w-full rounded-xl mx-auto bg-white transition-all duration-500 max-w-4xl"},_e={class:"flex items-center justify-between gap-2 py-4 px-4 border-b border-slate-100"},ke={class:"text-lg font-bold capitalize"};var we=o(4513),Ne=o.n(we),Fe={class:"row p-4"},Pe={key:0,class:"col-12 sm:col-6 lg:col-5"},Ae=["src"],Be=["src"],Se={key:1,class:"col-12 sm:col-6 lg:col-5"},De=["src"],$e={class:"col-12 sm:col-6 lg:col-7 lg:pl-10"},Ie={class:"text-3xl sm:text-4xl font-bold capitalize mb-5"},Te={class:"flex items-start gap-4 mb-5"},qe={class:"text-2xl font-bold"},Me={key:0,class:"text-lg font-bold text-shopperz-red"},Le={class:"flex flex-wrap items-center gap-2 border-b border-gray-100 mb-6 pb-6"},ze={key:0,class:"flex items-center gap-1"},He={class:"text-base font-medium whitespace-nowrap text-text"},je={class:"text-base font-medium whitespace-nowrap text-text hover:text-primary cursor-pointer"},Oe={class:"flex flex-wrap items-center gap-x-6 gap-y-3 mb-8"},Ue={class:"capitalize text-lg font-semibold"},Re={class:"flex items-center gap-6"},Ze={class:"flex items-center gap-1 w-20 p-1 rounded-full bg-[#F7F7FC]"},Ke={key:0},We={key:0,class:"capitalize"},Ge={key:1,class:"capitalize text-danger"},Ye={key:1,class:"flex flex-wrap items-center gap-x-6 gap-y-3 mb-8"},Xe={class:"capitalize text-lg font-semibold"},Je={class:"flex items-center gap-6 text-green-500 font-semibold text-lg"},Qe={class:"flex flex-wrap items-center gap-8 mb-10"},et=["disabled"],tt={class:"whitespace-nowrap font-bold"};var ot=o(434),nt=o(8943),rt=o(4233),at=o(8721),it={key:0,class:"flex flex-wrap items-center gap-x-6 gap-y-3 mb-6"},st={class:"flex flex-wrap items-center gap-3"},lt=["onClick"];const ct={name:"VariationComponent",props:{variations:{type:Object},method:{type:Function}},data:function(){return{selectedVariationId:null,selectedVariations:[],finalSelectedVariation:null}},methods:{selectVariation:function(e){var t=this;this.selectedVariationId=e.id,e.sku?(this.finalSelectedVariation=e,this.getFinalVariationId(this.finalSelectedVariation)):(this.finalSelectedVariation=null,this.getFinalVariationId(this.finalSelectedVariation)),this.$store.dispatch("posProductVariation/childrenVariation",this.selectedVariationId).then(function(e){t.selectedVariations=e.data.data}).catch(function(e){t.loading.isActive=!1})},getFinalVariationId:function(e){this.method(e)}}};var dt=o(6262);const ut=(0,dt.A)(ct,[["render",function(e,t,o,r,a,i){var s=(0,n.resolveComponent)("VariationComponent",!0);return(0,n.openBlock)(),(0,n.createElementBlock)(n.Fragment,null,[o.variations.length>0?((0,n.openBlock)(),(0,n.createElementBlock)("dl",it,[((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)(o.variations.slice(0,1),function(e){return(0,n.openBlock)(),(0,n.createElementBlock)("dt",{key:e,class:"capitalize text-lg font-semibold"},(0,n.toDisplayString)(e.product_attribute_name)+":",1)}),128)),(0,n.createElementVNode)("dd",st,[((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)(o.variations,function(e,t){return(0,n.openBlock)(),(0,n.createElementBlock)("button",{onClick:function(t){return i.selectVariation(e)},class:(0,n.normalizeClass)([a.selectedVariationId===e.id?"text-white bg-primary":"","px-3 h-8 leading-8 text-center rounded-full text-sm font-medium capitalize flex-shrink-0 cursor-pointer text-secondary bg-[#F7F7FC]"]),type:"button",key:t},(0,n.toDisplayString)(e.product_attribute_option_name),11,lt)}),128))])])):(0,n.createCommentVNode)("",!0),a.selectedVariations.length>0?((0,n.openBlock)(),(0,n.createBlock)(s,{method:i.getFinalVariationId,key:a.selectedVariations,variations:a.selectedVariations},null,8,["method","variations"])):(0,n.createCommentVNode)("",!0)],64)}]]);var pt=o(8655),mt=o(9856);const ht={name:"ProductDetailsComponent",components:{VariationComponent:ut,ProductListComponent:at.A,starRating:Ne(),Swiper:ot.RC,SwiperSlide:ot.qr,LoadingComponent:ae.A},setup:function(){var e=(0,n.ref)(null);return{thumbsSwiper:e,setThumbsSwiper:function(t){e.value=t},modules:[nt.U1,nt.Vx,nt.WO],slug:""}},props:{method:{type:Function},productId:{type:Number}},data:function(){return{loading:{isActive:!1},props:{search:{product_id:null,review_limit:3}},enableAddToCardButton:!0,selectedVariation:null,productArray:{},variationComponent:!1,initProduct:{isVariation:!1,variationId:null,sku:null,stock:0,quantity:1,discount:0,price:0,oldPrice:0,totalPrice:0},temp:{name:"",image:"",isVariation:!1,variationId:null,productId:0,sku:null,stock:0,taxes:{},quantity:1,discount:0,price:0,oldPrice:0,totalPrice:0}}},computed:{setting:function(){return this.$store.getters["frontendSetting/lists"]},categories:function(){return this.$store.getters["posProductCategory/ancestorsAndSelf"]},initialVariations:function(){return this.$store.getters["posProductVariation/initialVariation"]},product:function(){return this.$store.getters["posProduct/show"]},images:function(){return this.$store.getters["posProduct/showImages"]},reviews:function(){return this.$store.getters["posProduct/showReviews"]}},mounted:function(){this.modalShow(),this.show()},methods:{onlyNumber:function(e){return pt.A.onlyNumber(e)},currencyFormat:function(e,t,o,n){return pt.A.currencyFormat(e,t,o,n)},modalShow:function(){rt.A.showTarget("variation-modal","modal-active")},show:function(){var e=this;void 0!==this.$props.productId&&(this.loading.isActive=!0,this.props.search.product_id=this.$props.productId,this.$store.dispatch("posProduct/show",this.props.search).then(function(t){e.initProduct={isVariation:!1,variationId:null,sku:t.data.data.sku,stock:t.data.data.stock,quantity:1,discount:0,price:t.data.data.price,oldPrice:t.data.data.old_price,totalPrice:t.data.data.price},e.temp={name:t.data.data.name,image:t.data.data.image,isVariation:!1,variationId:null,productId:t.data.data.id,sku:t.data.data.sku,stock:t.data.data.stock,taxes:t.data.data.taxes,quantity:1,discount:0,price:t.data.data.price,oldPrice:t.data.data.old_price,totalPrice:t.data.data.price},e.$store.dispatch("posProductCategory/ancestorsAndSelf",t.data.data.category_slug).then(function(t){e.loading.isActive=!1}).catch(function(t){e.loading.isActive=!1}),e.$store.dispatch("posProductVariation/initialVariation",t.data.data.id).then(function(o){o.data.data.length>0&&(e.variationComponent=!0),!o.data.data.length&&t.data.data.stock>0&&(e.enableAddToCardButton=!1),e.loading.isActive=!1}).catch(function(t){e.loading.isActive=!1})}).catch(function(t){e.loading.isActive=!1}))},selectedVariationMethod:function(e){this.enableAddToCardButton=!0,this.selectedVariation=null,this.temp.isVariation=this.initProduct.isVariation,this.temp.variationId=this.initProduct.variationId,this.temp.sku=this.initProduct.sku,this.temp.stock=this.initProduct.stock,this.temp.quantity=this.initProduct.quantity,this.temp.discount=this.initProduct.discount,this.temp.price=this.initProduct.price,this.temp.oldPrice=this.initProduct.oldPrice,this.temp.totalPrice=this.initProduct.price,e&&(this.selectedVariation=e,this.temp.isVariation=!0,this.temp.variationId=e.id,this.temp.sku=e.sku,this.temp.stock=e.stock,this.temp.quantity=1,this.temp.discount=0,this.temp.price=e.price,this.temp.oldPrice=e.old_price,this.temp.totalPrice=e.price,e.stock>0&&(this.enableAddToCardButton=!1))},quantityUp:function(){(0===this.temp.quantity||this.temp.quantity<0)&&(this.temp.quantity=1),this.temp.quantity>this.temp.stock&&(this.temp.quantity=this.temp.stock),this.totalPriceSetup()},quantityIncrement:function(){this.temp.quantity++,this.temp.quantity<=0&&(this.temp.quantity=1),this.temp.quantity>this.temp.stock&&this.temp.quantity--,this.totalPriceSetup()},quantityDecrement:function(){this.temp.quantity--,this.temp.quantity<=0&&(this.temp.quantity=1),this.totalPriceSetup()},totalPriceSetup:function(){this.temp.totalPrice=this.temp.price*this.temp.quantity},addToCart:function(){var e=this;this.enableAddToCardButton=!0,this.productArray={name:this.temp.name,product_id:this.temp.productId,image:this.temp.image,variation_names:"",variation_id:this.temp.variationId,sku:this.temp.sku,stock:this.temp.stock,taxes:this.temp.taxes,quantity:this.temp.quantity,discount:this.temp.discount,price:this.temp.price,old_price:this.temp.oldPrice,total_price:this.temp.totalPrice},this.selectedVariation?this.$store.dispatch("posProductVariation/ancestorsToString",this.selectedVariation.id).then(function(t){e.productArray.variation_names=t.data.data,e.variationComponent=!1,e.$store.dispatch("posCart/lists",e.productArray).then(function(t){rt.A.hideTarget("variation-modal","modal-active"),e.method(),mt.A.success(e.$t("message.add_to_cart")),e.variationComponent=!0,e.productArray={},e.selectedVariation=null,e.temp.isVariation=e.initProduct.isVariation,e.temp.variationId=e.initProduct.variationId,e.temp.sku=e.initProduct.sku,e.temp.stock=e.initProduct.stock,e.temp.quantity=e.initProduct.quantity,e.temp.discount=e.initProduct.discount,e.temp.price=e.initProduct.price,e.temp.oldPrice=e.initProduct.oldPrice,e.temp.totalPrice=e.initProduct.price}).catch(function(t){e.variationComponent=!0,e.selectedVariation=null,e.temp.stock=e.initProduct.stock,e.temp.quantity=e.initProduct.quantity})}).catch(function(e){}):this.$store.dispatch("posCart/lists",this.productArray).then(function(t){rt.A.hideTarget("variation-modal","modal-active"),e.method(),mt.A.success(e.$t("message.add_to_cart")),e.enableAddToCardButton=!1,e.productArray={},e.selectedVariation=null,e.temp.isVariation=e.initProduct.isVariation,e.temp.variationId=e.initProduct.variationId,e.temp.sku=e.initProduct.sku,e.temp.stock=e.initProduct.stock,e.temp.quantity=e.initProduct.quantity,e.temp.discount=e.initProduct.discount,e.temp.price=e.initProduct.price,e.temp.oldPrice=e.initProduct.oldPrice,e.temp.totalPrice=e.initProduct.price}).catch(function(t){e.enableAddToCardButton=!1,e.selectedVariation=null,e.temp.stock=e.initProduct.stock,e.temp.quantity=e.initProduct.quantity})}}},ft=(0,dt.A)(ht,[["render",function(e,t,o,r,a,i){var s=(0,n.resolveComponent)("LoadingComponent"),l=(0,n.resolveComponent)("SwiperSlide"),c=(0,n.resolveComponent)("Swiper"),d=(0,n.resolveComponent)("starRating"),u=(0,n.resolveComponent)("VariationComponent");return(0,n.openBlock)(),(0,n.createElementBlock)(n.Fragment,null,[(0,n.createVNode)(s,{props:a.loading},null,8,["props"]),(0,n.createElementVNode)("div",Fe,[i.images.length?((0,n.openBlock)(),(0,n.createElementBlock)("div",Pe,[(0,n.createVNode)(c,{dir:"ltr",spaceBetween:10,navigation:!0,thumbs:{swiper:r.thumbsSwiper},modules:r.modules,class:"gallery-swiper"},{default:(0,n.withCtx)(function(){return[((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)(i.images,function(e,t){return(0,n.openBlock)(),(0,n.createBlock)(l,{key:t,class:"w-full"},{default:(0,n.withCtx)(function(){return[(0,n.createElementVNode)("img",{class:"w-full rounded-2xl",src:e,alt:"gallery"},null,8,Ae)]}),_:2},1024)}),128))]}),_:1},8,["thumbs","modules"]),(0,n.createVNode)(c,{dir:"ltr",onSwiper:r.setThumbsSwiper,spaceBetween:12,slidesPerView:4,freeMode:!0,watchSlidesProgress:!0,modules:r.modules,class:"thumb-swiper"},{default:(0,n.withCtx)(function(){return[((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)(i.images,function(e,t){return(0,n.openBlock)(),(0,n.createBlock)(l,{key:t,class:"w-full cursor-pointer rounded-lg border border-gray-200 transition-all duration-500"},{default:(0,n.withCtx)(function(){return[(0,n.createElementVNode)("img",{class:"w-full rounded-lg border-2 border-gray-200 transition-all duration-500",src:e,alt:"gallery"},null,8,Be)]}),_:2},1024)}),128))]}),_:1},8,["onSwiper","modules"])])):((0,n.openBlock)(),(0,n.createElementBlock)("div",Se,[(0,n.createElementVNode)("img",{src:i.product.image,alt:"products",class:"w-full rounded-2xl"},null,8,De)])),(0,n.createElementVNode)("div",$e,[(0,n.createElementVNode)("h2",Ie,(0,n.toDisplayString)(i.product.name),1),(0,n.createElementVNode)("h3",Te,[(0,n.createElementVNode)("span",qe,(0,n.toDisplayString)(i.currencyFormat(a.temp.price,i.setting.site_digit_after_decimal_point,i.setting.site_default_currency_symbol,i.setting.site_currency_position)),1),i.product.is_offer?((0,n.openBlock)(),(0,n.createElementBlock)("del",Me,(0,n.toDisplayString)(i.currencyFormat(a.temp.oldPrice,i.setting.site_digit_after_decimal_point,i.setting.site_default_currency_symbol,i.setting.site_currency_position)),1)):(0,n.createCommentVNode)("",!0)]),(0,n.createElementVNode)("div",Le,[(0,n.createVNode)(d,{"border-color":"#FFBC1F","rounded-corners":!0,padding:2.5,"border-width":2.5,"star-size":11,class:"-mt-0.5","inactive-color":"#FFFFFF","active-color":"#FFBC1F","round-start-rating":!1,"show-rating":!1,"read-only":!0,"max-rating":5,rating:i.product.rating_star/i.product.rating_star_count},null,8,["rating"]),i.product.rating_star_count>0?((0,n.openBlock)(),(0,n.createElementBlock)("div",ze,[(0,n.createElementVNode)("span",He,(0,n.toDisplayString)((i.product.rating_star/i.product.rating_star_count).toFixed(1)),1),(0,n.createElementVNode)("span",je," ("+(0,n.toDisplayString)(i.product.rating_star_count)+" "+(0,n.toDisplayString)(i.product.rating_star_count>1?e.$t("label.reviews"):e.$t("label.review"))+") ",1)])):(0,n.createCommentVNode)("",!0)]),i.initialVariations.length>0&&a.variationComponent?((0,n.openBlock)(),(0,n.createBlock)(u,{key:0,method:i.selectedVariationMethod,variations:i.initialVariations},null,8,["method","variations"])):(0,n.createCommentVNode)("",!0),(0,n.createElementVNode)("dl",Oe,[(0,n.createElementVNode)("dt",Ue,(0,n.toDisplayString)(e.$t("label.quantity"))+":",1),(0,n.createElementVNode)("dd",Re,[(0,n.createElementVNode)("div",Ze,[(0,n.createElementVNode)("button",{onClick:t[0]||(t[0]=(0,n.withModifiers)(function(){return i.quantityDecrement&&i.quantityDecrement.apply(i,arguments)},["prevent"])),type:"button",class:(0,n.normalizeClass)([1===a.temp.quantity?"cursor-not-allowed":"","lab-fill-circle-minus text-lg leading-none transition-all duration-300 hover:text-primary"])},null,2),(0,n.withDirectives)((0,n.createElementVNode)("input",{type:"number","onUpdate:modelValue":t[1]||(t[1]=function(e){return a.temp.quantity=e}),onKeypress:t[2]||(t[2]=function(e){return i.onlyNumber(e)}),onKeyup:t[3]||(t[3]=function(){return i.quantityUp&&i.quantityUp.apply(i,arguments)}),class:"text-center w-full h-5 text-sm font-medium"},null,544),[[n.vModelText,a.temp.quantity]]),(0,n.createElementVNode)("button",{onClick:t[4]||(t[4]=(0,n.withModifiers)(function(){return i.quantityIncrement&&i.quantityIncrement.apply(i,arguments)},["prevent"])),type:"button",class:(0,n.normalizeClass)([a.temp.stock===a.temp.quantity?"cursor-not-allowed":"","lab-fill-circle-plus text-lg leading-none transition-all duration-300 hover:text-primary"])},null,2)]),i.initialVariations.length&&null==a.selectedVariation?(0,n.createCommentVNode)("",!0):((0,n.openBlock)(),(0,n.createElementBlock)("div",Ke,[a.temp.stock>0?((0,n.openBlock)(),(0,n.createElementBlock)("p",We,[(0,n.createTextVNode)((0,n.toDisplayString)(e.$t("label.available"))+": ",1),(0,n.createElementVNode)("b",null,"("+(0,n.toDisplayString)(a.temp.stock)+") ",1),(0,n.createTextVNode)(" "+(0,n.toDisplayString)(i.product.unit),1)])):((0,n.openBlock)(),(0,n.createElementBlock)("p",Ge,(0,n.toDisplayString)(e.$t("label.stock_out")),1))]))])]),a.temp.quantity>1?((0,n.openBlock)(),(0,n.createElementBlock)("dl",Ye,[(0,n.createElementVNode)("dt",Xe,(0,n.toDisplayString)(e.$t("label.total_price"))+":",1),(0,n.createElementVNode)("dd",Je,(0,n.toDisplayString)(i.currencyFormat(a.temp.totalPrice,i.setting.site_digit_after_decimal_point,i.setting.site_default_currency_symbol,i.setting.site_currency_position)),1)])):(0,n.createCommentVNode)("",!0),(0,n.createElementVNode)("div",Qe,[(0,n.createElementVNode)("button",{onClick:t[5]||(t[5]=(0,n.withModifiers)(function(){return i.addToCart&&i.addToCart.apply(i,arguments)},["prevent"])),disabled:a.enableAddToCardButton,type:"button",class:(0,n.normalizeClass)([!1===a.enableAddToCardButton?"shadow-btn-primary !bg-primary":"","flex items-center gap-3 px-8 h-12 leading-12 rounded-full transition-all duration-500 bg-slate-400 text-white"])},[t[6]||(t[6]=(0,n.createElementVNode)("i",{class:"lab-line-bag text-xl"},null,-1)),(0,n.createElementVNode)("span",tt,(0,n.toDisplayString)(e.$t("button.add_to_cart")),1)],10,et)])])])],64)}]]),gt={name:"ProductListComponent",components:{starRating:Ne(),ProductDetailsComponent:ft},props:{products:"object"},data:function(){return{rating:[],productId:""}},methods:{handleProductModal:function(e){this.productId=e.id},reset:function(){var e=this;rt.A.hideTarget("variation-modal","modal-active"),setTimeout(function(){e.productId=""},500)}}},yt=(0,dt.A)(gt,[["render",function(e,t,o,r,a,i){var s=(0,n.resolveComponent)("starRating"),l=(0,n.resolveComponent)("ProductDetailsComponent");return(0,n.openBlock)(),(0,n.createElementBlock)(n.Fragment,null,[(0,n.createElementVNode)("div",ie,[o.products.length>0?((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,{key:0},(0,n.renderList)(o.products,function(t){return(0,n.openBlock)(),(0,n.createElementBlock)("div",{onClick:(0,n.withModifiers)(function(e){return i.handleProductModal(t)},["prevent"]),"data-modal":"#modal",class:"sm:p-2 rounded-2xl sm:shadow-card transition-all duration-300 sm:hover:shadow-hover group bg-white cursor-pointer"},[(0,n.createElementVNode)("div",le,[t.is_offer&&t.flash_sale?((0,n.openBlock)(),(0,n.createElementBlock)("label",ce,(0,n.toDisplayString)(e.$t("label.flash_sale")),1)):(0,n.createCommentVNode)("",!0),(0,n.createElementVNode)("img",{src:t.cover,alt:"product",class:"w-full rounded-xl transition-all duration-300 group-hover:scale-105 group-hover:rotate-3"},null,8,de)]),(0,n.createElementVNode)("div",ue,[(0,n.createElementVNode)("h3",pe,(0,n.toDisplayString)(t.name),1),(0,n.createElementVNode)("div",me,[(0,n.createElementVNode)("div",he,[(0,n.createVNode)(s,{"border-color":"#FFBC1F","rounded-corners":!0,padding:2.5,"border-width":2.5,"star-size":9,class:"mt-[2px]","inactive-color":"#FFFFFF","active-color":"#FFBC1F","round-start-rating":!1,"show-rating":!1,"read-only":!0,"max-rating":5,rating:t.rating_star/t.rating_star_count},null,8,["rating"])]),t.rating_star_count>0?((0,n.openBlock)(),(0,n.createElementBlock)("div",fe,[(0,n.createElementVNode)("span",ge,(0,n.toDisplayString)((t.rating_star/t.rating_star_count).toFixed(1)),1),(0,n.createElementVNode)("span",ye,"("+(0,n.toDisplayString)(t.rating_star_count)+" "+(0,n.toDisplayString)(t.rating_star_count>1?e.$t("label.reviews"):e.$t("label.review"))+")",1)])):(0,n.createCommentVNode)("",!0)]),t.is_offer?((0,n.openBlock)(),(0,n.createElementBlock)("div",be,[(0,n.createElementVNode)("h3",ve,[(0,n.createElementVNode)("span",null,(0,n.toDisplayString)(t.discounted_price),1)]),(0,n.createElementVNode)("h4",xe,[(0,n.createElementVNode)("del",null,(0,n.toDisplayString)(t.currency_price),1)])])):((0,n.openBlock)(),(0,n.createElementBlock)("h4",Ee,[(0,n.createElementVNode)("span",null,(0,n.toDisplayString)(t.currency_price),1)]))])],8,se)}),256)):(0,n.createCommentVNode)("",!0)]),(0,n.createElementVNode)("div",Ce,[(0,n.createElementVNode)("div",Ve,[(0,n.createElementVNode)("div",_e,[(0,n.createElementVNode)("h3",ke,(0,n.toDisplayString)(e.$t("label.product_variation")),1),(0,n.createElementVNode)("button",{onClick:t[0]||(t[0]=function(){return i.reset&&i.reset.apply(i,arguments)}),type:"button",class:"lab-line-circle-cross text-lg text-[#E93C3C]"})]),a.productId?((0,n.openBlock)(),(0,n.createBlock)(l,{key:0,method:i.reset,productId:a.productId},null,8,["method","productId"])):(0,n.createCommentVNode)("",!0)])])],64)}]]);var bt=o(4331),vt=o(1978),xt=o(6884),Et=o(616),Ct=o(2634);const Vt=Object.freeze({FIXED:5,PERCENTAGE:10});var _t={id:"posReceiptModal",class:"modal"},kt={class:"modal-dialog max-w-[340px] rounded-none",id:"print"},wt={class:"modal-header hidden-print"},Nt={class:"text-xs leading-5 capitalize text-white"},Ft={type:"button",class:"flex items-center justify-center gap-1.5 py-2 px-4 rounded bg-[#1AB759]"},Pt={class:"text-xs leading-5 capitalize text-white"},At={class:"modal-body"},Bt={class:"text-center pb-3.5 border-b border-dashed border-gray-400"},St={class:"text-2xl font-bold mb-1"},Dt={class:"text-sm font-normal"},$t={class:"text-sm font-normal"},It={class:"w-full my-1.5"},Tt={class:"text-xs text-left py-0.5 text-heading"},qt={class:"text-xs text-left py-0.5 text-heading"},Mt={class:"text-xs text-right py-0.5 text-heading"},Lt={class:"w-full"},zt={class:"border-t border-b border-dashed border-gray-400"},Ht={scope:"col",class:"py-1 font-normal text-xs capitalize text-left text-heading w-8"},jt={scope:"col",class:"py-1 font-normal text-xs capitalize flex items-center justify-between text-heading"},Ot={class:"border-b border-dashed border-gray-400"},Ut={class:"text-left font-normal align-top py-1"},Rt={class:"text-xs leading-5 text-heading"},Zt={class:"text-left font-normal align-top py-1"},Kt={class:"flex items-center justify-between"},Wt={class:"text-xs leading-5 text-heading"},Gt={class:"text-xs leading-5 text-heading"},Yt={key:0,class:"text-xs leading-5 text-heading max-w-[200px]"},Xt={class:"py-2 pl-7"},Jt={class:"w-full"},Qt={class:"text-xs text-left py-0.5 uppercase text-heading"},eo={class:"text-xs text-right py-0.5 text-heading"},to={class:"text-xs text-left py-0.5 uppercase text-heading"},oo={class:"text-xs text-right py-0.5 text-heading"},no={class:"text-xs text-left py-0.5 uppercase text-heading"},ro={class:"text-xs text-right py-0.5 text-heading"},ao={class:"text-xs text-left py-0.5 font-bold uppercase text-heading"},io={class:"text-xs text-right py-0.5 font-bold text-heading"},so={class:"text-xs py-2 border-t border-b border-dashed border-gray-400 text-heading"},lo={class:"w-full"},co={class:"pt-1 pb-1 pr-1 align-top text-start"},uo={key:0,class:"pt-1 pb-1 text-end"},po={class:"text-center pt-2 pb-4"},mo={class:"text-[11px] leading-[14px] capitalize text-heading"},ho={class:"text-[11px] leading-[14px] capitalize text-heading"},fo={class:"flex flex-col items-end"},go={class:"text-[8px] font-normal text-left w-[46px] leading-[10px]"},yo={class:"text-xs font-normal leading-4"};var bo=o(5316);const vo={name:"ReceiptComponent",props:{order:Object},data:function(){return{printObj:{id:"print",popTitle:this.$t("menu.order_receipt")}}},computed:{company:function(){return this.$store.getters["company/lists"]},orderProducts:function(){return this.$store.getters["posOrder/orderProducts"]}},mounted:function(){this.$store.dispatch("company/lists").then().catch()},methods:{reset:function(){pt.A.modalHide()}},directives:{print:bo.A}};var xo=o(5072),Eo=o.n(xo),Co=o(2322),Vo={insert:"head",singleton:!1};Eo()(Co.A,Vo);Co.A.locals;const _o=(0,dt.A)(vo,[["render",function(e,t,o,r,a,i){var s=(0,n.resolveDirective)("print");return(0,n.openBlock)(),(0,n.createElementBlock)("div",_t,[(0,n.createElementVNode)("div",kt,[(0,n.createElementVNode)("div",wt,[(0,n.createElementVNode)("button",{type:"button",onClick:t[0]||(t[0]=function(){return i.reset&&i.reset.apply(i,arguments)}),class:"modal-close flex items-center justify-center gap-1.5 py-2 px-4 rounded bg-[#FB4E4E]"},[t[1]||(t[1]=(0,n.createElementVNode)("i",{class:"lab lab-fill-close-circle lab-font-size-16 text-white"},null,-1)),(0,n.createElementVNode)("span",Nt,(0,n.toDisplayString)(e.$t("button.close")),1)]),(0,n.withDirectives)(((0,n.openBlock)(),(0,n.createElementBlock)("button",Ft,[t[2]||(t[2]=(0,n.createElementVNode)("i",{class:"lab lab-fill-printer lab-font-size-16 text-white"},null,-1)),(0,n.createElementVNode)("span",Pt,(0,n.toDisplayString)(e.$t("button.print_invoice")),1)])),[[s,a.printObj]])]),(0,n.createElementVNode)("div",At,[(0,n.createElementVNode)("div",Bt,[(0,n.createElementVNode)("h3",St,(0,n.toDisplayString)(i.company.company_name),1),(0,n.createElementVNode)("h4",Dt,(0,n.toDisplayString)(i.company.company_address),1),(0,n.createElementVNode)("h5",$t,(0,n.toDisplayString)(e.$t("label.tel"))+": "+(0,n.toDisplayString)(i.company.company_calling_code)+" "+(0,n.toDisplayString)(i.company.company_phone),1)]),(0,n.createElementVNode)("table",It,[(0,n.createElementVNode)("tbody",null,[(0,n.createElementVNode)("tr",null,[(0,n.createElementVNode)("td",Tt,(0,n.toDisplayString)(e.$t("label.order_id"))+" #"+(0,n.toDisplayString)(o.order.order_serial_no),1)]),(0,n.createElementVNode)("tr",null,[(0,n.createElementVNode)("td",qt,(0,n.toDisplayString)(o.order.order_date),1),(0,n.createElementVNode)("td",Mt,(0,n.toDisplayString)(o.order.order_time),1)])])]),(0,n.createElementVNode)("table",Lt,[(0,n.createElementVNode)("thead",zt,[(0,n.createElementVNode)("tr",null,[(0,n.createElementVNode)("th",Ht,(0,n.toDisplayString)(e.$t("label.qty")),1),(0,n.createElementVNode)("th",jt,[(0,n.createElementVNode)("span",null,(0,n.toDisplayString)(e.$t("label.product_description")),1),(0,n.createElementVNode)("span",null,(0,n.toDisplayString)(e.$t("label.price")),1)])])]),(0,n.createElementVNode)("tbody",Ot,[i.orderProducts.length>0?((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,{key:0},(0,n.renderList)(i.orderProducts,function(e){return(0,n.openBlock)(),(0,n.createElementBlock)("tr",{key:e},[(0,n.createElementVNode)("td",Ut,[(0,n.createElementVNode)("p",Rt,(0,n.toDisplayString)(e.quantity),1)]),(0,n.createElementVNode)("td",Zt,[(0,n.createElementVNode)("div",Kt,[(0,n.createElementVNode)("p",Wt,(0,n.toDisplayString)(e.product_name),1),(0,n.createElementVNode)("p",Gt,(0,n.toDisplayString)(e.subtotal_currency_price),1)]),e.variation_names?((0,n.openBlock)(),(0,n.createElementBlock)("p",Yt,(0,n.toDisplayString)(e.variation_names),1)):(0,n.createCommentVNode)("",!0)])])}),128)):(0,n.createCommentVNode)("",!0)])]),(0,n.createElementVNode)("div",Xt,[(0,n.createElementVNode)("table",Jt,[(0,n.createElementVNode)("tbody",null,[(0,n.createElementVNode)("tr",null,[(0,n.createElementVNode)("td",Qt,(0,n.toDisplayString)(e.$t("label.subtotal"))+": ",1),(0,n.createElementVNode)("td",eo,(0,n.toDisplayString)(o.order.subtotal_currency_price),1)]),(0,n.createElementVNode)("tr",null,[(0,n.createElementVNode)("td",to,(0,n.toDisplayString)(e.$t("label.tax_fee"))+": ",1),(0,n.createElementVNode)("td",oo,(0,n.toDisplayString)(o.order.tax_currency_price),1)]),(0,n.createElementVNode)("tr",null,[(0,n.createElementVNode)("td",no,(0,n.toDisplayString)(e.$t("label.discount"))+": ",1),(0,n.createElementVNode)("td",ro,(0,n.toDisplayString)(o.order.discount_currency_price),1)]),(0,n.createElementVNode)("tr",null,[(0,n.createElementVNode)("td",ao,(0,n.toDisplayString)(e.$t("label.total"))+": ",1),(0,n.createElementVNode)("td",io,(0,n.toDisplayString)(o.order.total_currency_price),1)])])])]),(0,n.createElementVNode)("div",so,[(0,n.createElementVNode)("table",lo,[(0,n.createElementVNode)("tbody",null,[(0,n.createElementVNode)("tr",null,[(0,n.createElementVNode)("td",co,(0,n.toDisplayString)(e.$t("label.payment_type"))+": "+(0,n.toDisplayString)(o.order.pos_payment_method_name),1),o.order.pos_received_amount>0?((0,n.openBlock)(),(0,n.createElementBlock)("td",uo,[(0,n.createElementVNode)("div",null,(0,n.toDisplayString)(e.$t("label.cash"))+": "+(0,n.toDisplayString)(o.order.pos_currency_received_amount),1),(0,n.createElementVNode)("span",null,(0,n.toDisplayString)(e.$t("label.change"))+" : "+(0,n.toDisplayString)(o.order.change_currency_amount),1)])):(0,n.createCommentVNode)("",!0)])])])]),(0,n.createElementVNode)("div",po,[(0,n.createElementVNode)("p",mo,(0,n.toDisplayString)(e.$t("message.thank_you")),1),(0,n.createElementVNode)("p",ho,(0,n.toDisplayString)(e.$t("message.please_come_again")),1)]),(0,n.createElementVNode)("div",fo,[(0,n.createElementVNode)("h5",go,(0,n.toDisplayString)(e.$t("label.powered_by")),1),(0,n.createElementVNode)("h6",yo,(0,n.toDisplayString)(i.company.company_name),1)])])])])}],["__scopeId","data-v-660eaa87"]]);var ko={id:"orderPayment",class:"modal"},wo={class:"modal-dialog max-w-[428px] w-full"},No={class:"modal-header pb-3 border-b border-[#D9DBE9]"},Fo={class:"capitalize font-medium"},Po={class:"modal-body"},Ao={class:"mb-4"},Bo={class:"flex justify-between items-center h-12 w-full rounded-lg py-1.5 px-2 placeholder:text-[10px] placeholder:text-[#6E7191] bg-[#F7F7FC]"},So={class:"text-sm font-normal text-[#2E2F38]"},Do={class:"text-primary text-base font-medium"},$o={class:"mb-4"},Io={class:"capitalize font-medium mb-2"},To={class:"flex flex-wrap gap-4 active-group"},qo={class:"text-xs font-normal leading-none text-heading"},Mo={class:"text-xs font-normal leading-none text-heading"},Lo={class:"text-xs font-normal leading-none text-heading"},zo={class:"text-xs font-normal leading-none text-heading"},Ho={class:"mb-4"},jo={class:"capitalize font-medium mb-2"},Oo={class:"grid grid-cols-4 gap-x-4 gap-y-3.5 mb-6"},Uo={class:"mb-4"},Ro={class:"capitalize font-medium mb-2"},Zo={class:"grid grid-cols-4 gap-x-4 gap-y-3.5 mb-6"},Ko={class:"mb-4"},Wo={class:"capitalize font-medium mb-2"},Go={class:"mb-4"},Yo={class:"capitalize font-medium mb-2"};var Xo=o(3695);function Jo(e){return Jo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Jo(e)}function Qo(e,t,o){return(t=function(e){var t=function(e,t){if("object"!=Jo(e)||!e)return e;var o=e[Symbol.toPrimitive];if(void 0!==o){var n=o.call(e,t||"default");if("object"!=Jo(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Jo(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}const en={name:"PaymentComponent",props:{total:String},data:function(){return{changesht:[1,2,3,4,5,6,7,8,9,0,"q","w","e","r","t","y","u","i","o","p","⇧","a","s","d","f","g","h","j","k","↩","l","z","x","c","v","b","n","m"],originalsht:[1,2,3,4,5,6,7,8,9,0,"Q","W","E","R","T","Y","U","I","O","P","⇧","A","S","D","F","G","H","J","K","↩","L","Z","X","C","V","B","N","M"],posPaymentMethodEnum:Xo.A,pos_payment_method:Xo.A.CASH,pos_payment_note:"",pos_received_amount:null,keyboard:!1}},computed:{company:function(){return this.$store.getters["company/lists"]},orderProducts:function(){return this.$store.getters["posOrder/orderProducts"]}},mounted:function(){this.$store.dispatch("company/lists").then().catch()},methods:Qo(Qo(Qo(Qo({reset:function(){this.pos_payment_note="",this.pos_received_amount=null,["cashInput","cardInput","mfs-trans","other-trans"].forEach(function(e){var t=document.getElementById(e);t&&(t.value="")})},updatePaymentMethod:function(e){this.pos_payment_method=e,this.pos_payment_note="",this.pos_received_amount=null,["cashInput","cardInput","mfs-trans","other-trans"].forEach(function(e){var t=document.getElementById(e);t&&(t.value="")}),[Xo.A.MOBILE_BANKING,Xo.A.OTHER].includes(e)&&!this.keyboard&&(this.initializeKeyboard(),this.keyboard=!0)},solve:function(e,t){var o=document.getElementById(t);o.value+=e,this.pos_payment_method===Xo.A.CASH?this.pos_received_amount=o.value:this.pos_payment_note=o.value},clear:function(e){document.getElementById(e).value=""},back:function(e){"cashInput"===e?this.pos_received_amount=this.pos_received_amount.slice(0,-1):"cardInput"===e&&(this.pos_payment_note=this.pos_payment_note.slice(0,-1))},backspace:function(e){var t=document.getElementById(e);t.value=t.value.slice(0,t.value.length-1)},evaluateClick:function(e){var t=e.target.classList[0];if("board"!==t&&"rows"!==t){var o=e.target.innerText,n=e.target.parentElement.parentElement.querySelector("input").getAttribute("id");this.action(o,n)}},shift:function(e){var t=document.getElementById(e).parentElement.parentElement.querySelector(".shifter");null!=t&&t.classList.contains("noshift")?this.shifton(this.changesht,e):this.shifton(this.originalsht,e)},shifton:function(e,t){var o=document.getElementById(t).parentElement.parentElement.querySelector(".shifter");null==o||o.classList.toggle("noshift");var n=document.getElementById(t).parentElement.parentElement.querySelectorAll(".cng");Array.from(n).forEach(function(t,o){t.innerText=e[o]})},action:function(e,t){switch(e){case"↩":this.backspace(t);break;case"⇧":this.shift(t);break;default:this.setText(e,t)}}},"clear",function(e){this.pos_received_amount="",this.pos_payment_note=""}),"setText",function(e,t){var o=document.getElementById(t),n=o.selectionStart,r=o.value;o.value=r.substring(0,n)+e+r.substring(n),o.selectionStart=o.selectionEnd=n+e.length,o.focus(),this.pos_payment_method!==Xo.A.MOBILE_BANKING&&this.pos_payment_method!==Xo.A.OTHER||(this.pos_payment_note=o.value)}),"initializeKeyboard",function(){var e=this;this.keyboard||document.querySelectorAll(".board").forEach(function(t){t.addEventListener("click",e.evaluateClick),e.originalsht.forEach(function(e){var o=document.createElement("div");o.classList.add("btnr","cng"),"⇧"===e?(o.classList.add("noshift","row-span-2","col-span-1","shifter"),o.textContent=e):"↩"===e?(o.classList.add("row-span-2","col-span-1"),o.textContent=e):o.textContent=e,t.appendChild(o)})})}),"closeModal",function(){pt.A.modalHide("#orderPayment")})},tn=(0,dt.A)(en,[["render",function(e,t,o,r,a,i){return(0,n.openBlock)(),(0,n.createElementBlock)("div",ko,[(0,n.createElementVNode)("div",wo,[(0,n.createElementVNode)("div",No,[(0,n.createElementVNode)("h3",Fo,(0,n.toDisplayString)(e.$t("label.order_payment")),1),(0,n.createElementVNode)("button",{onClick:t[0]||(t[0]=function(){return i.closeModal&&i.closeModal.apply(i,arguments)}),class:"modal-close fa-regular fa-circle-xmark"})]),(0,n.createElementVNode)("div",Po,[(0,n.createElementVNode)("div",Ao,[(0,n.createElementVNode)("div",Bo,[(0,n.createElementVNode)("span",So,(0,n.toDisplayString)(e.$t("label.total_amount")),1),(0,n.createElementVNode)("span",Do,(0,n.toDisplayString)(o.total),1)])]),(0,n.createElementVNode)("div",$o,[(0,n.createElementVNode)("h3",Io,(0,n.toDisplayString)(e.$t("label.select_payment_method")),1),(0,n.createElementVNode)("nav",To,[(0,n.createElementVNode)("button",{onClick:t[1]||(t[1]=(0,n.withModifiers)(function(e){return i.updatePaymentMethod(a.posPaymentMethodEnum.CASH)},["prevent"])),"data-tab":"#cash",type:"button",class:(0,n.normalizeClass)([a.pos_payment_method===a.posPaymentMethodEnum.CASH?"active":"","db-tab-btn w-fit flex flex-col items-center gap-2 rounded-lg py-3 px-7 border bg-[#F7F7FC] border-[#F7F7FC]"])},[t[38]||(t[38]=(0,n.createElementVNode)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},[(0,n.createElementVNode)("path",{d:"M19.1709 6.64002C18.7409 4.47002 17.1309 3.52002 14.8909 3.52002H6.11094C3.47094 3.52002 1.71094 4.84002 1.71094 7.92002V13.07C1.71094 15.29 2.62094 16.59 4.12094 17.15C4.34094 17.23 4.58094 17.3 4.83094 17.34C5.23094 17.43 5.66094 17.47 6.11094 17.47H14.9009C17.5409 17.47 19.3009 16.15 19.3009 13.07V7.92002C19.3009 7.45002 19.2609 7.03002 19.1709 6.64002ZM5.53094 12C5.53094 12.41 5.19094 12.75 4.78094 12.75C4.37094 12.75 4.03094 12.41 4.03094 12V9.00002C4.03094 8.59002 4.37094 8.25002 4.78094 8.25002C5.19094 8.25002 5.53094 8.59002 5.53094 9.00002V12ZM10.5009 13.14C9.04094 13.14 7.86094 11.96 7.86094 10.5C7.86094 9.04002 9.04094 7.86002 10.5009 7.86002C11.9609 7.86002 13.1409 9.04002 13.1409 10.5C13.1409 11.96 11.9609 13.14 10.5009 13.14ZM16.9609 12C16.9609 12.41 16.6209 12.75 16.2109 12.75C15.8009 12.75 15.4609 12.41 15.4609 12V9.00002C15.4609 8.59002 15.8009 8.25002 16.2109 8.25002C16.6209 8.25002 16.9609 8.59002 16.9609 9.00002V12Z",fill:"#6E7191"}),(0,n.createElementVNode)("path",{d:"M22.2998 10.92V16.07C22.2998 19.15 20.5398 20.48 17.8898 20.48H9.10977C8.35977 20.48 7.68977 20.37 7.10977 20.15C6.63977 19.98 6.22977 19.73 5.89977 19.41C5.71977 19.24 5.85977 18.97 6.10977 18.97H14.8898C18.5898 18.97 20.7898 16.77 20.7898 13.08V7.92003C20.7898 7.68003 21.0598 7.53003 21.2298 7.71003C21.9098 8.43003 22.2998 9.48003 22.2998 10.92Z",fill:"#6E7191"})],-1)),(0,n.createElementVNode)("span",qo,(0,n.toDisplayString)(e.$t("label.cash")),1)],2),(0,n.createElementVNode)("button",{onClick:t[2]||(t[2]=(0,n.withModifiers)(function(e){return i.updatePaymentMethod(a.posPaymentMethodEnum.CARD)},["prevent"])),"data-tab":"#card",type:"button",class:(0,n.normalizeClass)([a.pos_payment_method===a.posPaymentMethodEnum.CARD?"active":"","db-tab-btn w-fit flex flex-col items-center gap-2 rounded-lg py-3 px-7 border bg-[#F7F7FC] border-[#F7F7FC]"])},[t[39]||(t[39]=(0,n.createElementVNode)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},[(0,n.createElementVNode)("path",{d:"M22 7.5499C22 8.2099 21.46 8.7499 20.8 8.7499H3.2C2.54 8.7499 2 8.2099 2 7.5499V7.5399C2 5.2499 3.85 3.3999 6.14 3.3999H17.85C20.14 3.3999 22 5.2599 22 7.5499Z",fill:"#6E7191"}),(0,n.createElementVNode)("path",{d:"M2 11.45V16.46C2 18.75 3.85 20.6 6.14 20.6H17.85C20.14 20.6 22 18.74 22 16.45V11.45C22 10.79 21.46 10.25 20.8 10.25H3.2C2.54 10.25 2 10.79 2 11.45ZM8 17.25H6C5.59 17.25 5.25 16.91 5.25 16.5C5.25 16.09 5.59 15.75 6 15.75H8C8.41 15.75 8.75 16.09 8.75 16.5C8.75 16.91 8.41 17.25 8 17.25ZM14.5 17.25H10.5C10.09 17.25 9.75 16.91 9.75 16.5C9.75 16.09 10.09 15.75 10.5 15.75H14.5C14.91 15.75 15.25 16.09 15.25 16.5C15.25 16.91 14.91 17.25 14.5 17.25Z",fill:"#6E7191"})],-1)),(0,n.createElementVNode)("span",Mo,(0,n.toDisplayString)(e.$t("label.card")),1)],2),(0,n.createElementVNode)("button",{onClick:t[3]||(t[3]=(0,n.withModifiers)(function(e){return i.updatePaymentMethod(a.posPaymentMethodEnum.MOBILE_BANKING)},["prevent"])),"data-tab":"#mfs",type:"button",class:(0,n.normalizeClass)([a.pos_payment_method===a.posPaymentMethodEnum.MOBILE_BANKING?"active":"","db-tab-btn w-fit flex flex-col items-center gap-2 rounded-lg py-3 px-7 border bg-[#F7F7FC] border-[#F7F7FC]"])},[t[40]||(t[40]=(0,n.createElementVNode)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},[(0,n.createElementVNode)("path",{d:"M16.24 2H7.76C5 2 4 3 4 5.81V18.19C4 21 5 22 7.76 22H16.23C19 22 20 21 20 18.19V5.81C20 3 19 2 16.24 2ZM12 19.3C11.04 19.3 10.25 18.51 10.25 17.55C10.25 16.59 11.04 15.8 12 15.8C12.96 15.8 13.75 16.59 13.75 17.55C13.75 18.51 12.96 19.3 12 19.3ZM14 6.25H10C9.59 6.25 9.25 5.91 9.25 5.5C9.25 5.09 9.59 4.75 10 4.75H14C14.41 4.75 14.75 5.09 14.75 5.5C14.75 5.91 14.41 6.25 14 6.25Z",fill:"#6E7191"})],-1)),(0,n.createElementVNode)("span",Lo,(0,n.toDisplayString)(e.$t("label.mfs")),1)],2),(0,n.createElementVNode)("button",{onClick:t[4]||(t[4]=(0,n.withModifiers)(function(e){return i.updatePaymentMethod(a.posPaymentMethodEnum.OTHER)},["prevent"])),"data-tab":"#otherpay",type:"button",class:(0,n.normalizeClass)([a.pos_payment_method===a.posPaymentMethodEnum.OTHER?"active":"","db-tab-btn w-fit flex flex-col items-center gap-2 rounded-lg py-3 px-7 border bg-[#F7F7FC] border-[#F7F7FC]"])},[t[41]||(t[41]=(0,n.createElementVNode)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},[(0,n.createElementVNode)("path",{d:"M15.78 2H8.22C4.44 2 3.5 3.01 3.5 7.04V18.3C3.5 20.96 4.96 21.59 6.73 19.69L6.74 19.68C7.56 18.81 8.81 18.88 9.52 19.83L10.53 21.18C11.34 22.25 12.65 22.25 13.46 21.18L14.47 19.83C15.19 18.87 16.44 18.8 17.26 19.68C19.04 21.58 20.49 20.95 20.49 18.29V7.04C20.5 3.01 19.56 2 15.78 2ZM15 11.75H9C8.59 11.75 8.25 11.41 8.25 11C8.25 10.59 8.59 10.25 9 10.25H15C15.41 10.25 15.75 10.59 15.75 11C15.75 11.41 15.41 11.75 15 11.75ZM16 7.75H8C7.59 7.75 7.25 7.41 7.25 7C7.25 6.59 7.59 6.25 8 6.25H16C16.41 6.25 16.75 6.59 16.75 7C16.75 7.41 16.41 7.75 16 7.75Z",fill:"#6E7191"})],-1)),(0,n.createElementVNode)("span",zo,(0,n.toDisplayString)(e.$t("label.other")),1)],2)])]),(0,n.createElementVNode)("div",{id:"cash",class:(0,n.normalizeClass)([a.pos_payment_method===a.posPaymentMethodEnum.CASH?"active":"","db-tab-div"])},[(0,n.createElementVNode)("div",Ho,[(0,n.createElementVNode)("h3",jo,(0,n.toDisplayString)(e.$t("label.input_amount")),1),(0,n.withDirectives)((0,n.createElementVNode)("input",{ref:"pos_received_amount","onUpdate:modelValue":t[5]||(t[5]=function(e){return a.pos_received_amount=e}),id:"cashInput",type:"float",class:"h-12 w-full rounded-lg border py-1.5 px-4 placeholder:text-xs border-[#D9DBE9] text-black"},null,512),[[n.vModelText,a.pos_received_amount]])]),(0,n.createElementVNode)("div",Oo,[(0,n.createElementVNode)("button",{onClick:t[6]||(t[6]=function(e){return i.solve("1","cashInput")}),value:"1",class:"num bg-[#F7F7FC] rounded-lg p-2.5 flex items-center justify-center text-base font-medium text-[#1F1F39]"},"1"),(0,n.createElementVNode)("button",{onClick:t[7]||(t[7]=function(e){return i.solve("2","cashInput")}),value:"2",class:"num bg-[#F7F7FC] rounded-lg p-2.5 flex items-center justify-center text-base font-medium text-[#1F1F39]"},"2"),(0,n.createElementVNode)("button",{onClick:t[8]||(t[8]=function(e){return i.solve("3","cashInput")}),value:"3",class:"num bg-[#F7F7FC] rounded-lg p-2.5 flex items-center justify-center text-base font-medium text-[#1F1F39]"},"3"),(0,n.createElementVNode)("button",{onClick:t[9]||(t[9]=function(e){return i.back("cashInput")}),value:"cut",class:"num bg-[#F7F7FC] rounded-lg p-2.5 flex items-center justify-center text-base font-medium text-[#1F1F39] row-span-2"},t[42]||(t[42]=[(0,n.createElementVNode)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},[(0,n.createElementVNode)("path",{d:"M16.9997 3.75H10.2797C8.86969 3.75 7.52969 4.34 6.57969 5.39L3.04969 9.27C1.63969 10.82 1.63969 13.18 3.04969 14.73L6.57969 18.61C7.52969 19.65 8.86969 20.25 10.2797 20.25H16.9997C19.7597 20.25 21.9997 18.01 21.9997 15.25V8.75C21.9997 5.99 19.7597 3.75 16.9997 3.75ZM16.5297 13.94C16.8197 14.23 16.8197 14.71 16.5297 15C16.3797 15.15 16.1897 15.22 15.9997 15.22C15.8097 15.22 15.6197 15.15 15.4697 15L13.5297 13.06L11.5897 15C11.4397 15.15 11.2497 15.22 11.0597 15.22C10.8697 15.22 10.6797 15.15 10.5297 15C10.2397 14.71 10.2397 14.23 10.5297 13.94L12.4697 12L10.5297 10.06C10.2397 9.77 10.2397 9.29 10.5297 9C10.8197 8.71 11.2997 8.71 11.5897 9L13.5297 10.94L15.4697 9C15.7597 8.71 16.2397 8.71 16.5297 9C16.8197 9.29 16.8197 9.77 16.5297 10.06L14.5897 12L16.5297 13.94Z",fill:"#1F1F39"})],-1)])),(0,n.createElementVNode)("button",{onClick:t[10]||(t[10]=function(e){return i.solve("4","cashInput")}),value:"4",class:"num bg-[#F7F7FC] rounded-lg p-2.5 flex items-center justify-center text-base font-medium text-[#1F1F39]"},"4"),(0,n.createElementVNode)("button",{onClick:t[11]||(t[11]=function(e){return i.solve("5","cashInput")}),value:"5",class:"num bg-[#F7F7FC] rounded-lg p-2.5 flex items-center justify-center text-base font-medium text-[#1F1F39]"},"5"),(0,n.createElementVNode)("button",{onClick:t[12]||(t[12]=function(e){return i.solve("6","cashInput")}),value:"6",class:"num bg-[#F7F7FC] rounded-lg p-2.5 flex items-center justify-center text-base font-medium text-[#1F1F39]"},"6"),(0,n.createElementVNode)("button",{onClick:t[13]||(t[13]=function(e){return i.solve("7","cashInput")}),value:"7",class:"num bg-[#F7F7FC] rounded-lg p-2.5 flex items-center justify-center text-base font-medium text-[#1F1F39]"},"7"),(0,n.createElementVNode)("button",{onClick:t[14]||(t[14]=function(e){return i.solve("8","cashInput")}),value:"8",class:"num bg-[#F7F7FC] rounded-lg p-2.5 flex items-center justify-center text-base font-medium text-[#1F1F39]"},"8"),(0,n.createElementVNode)("button",{onClick:t[15]||(t[15]=function(e){return i.solve("9","cashInput")}),value:"9",class:"num bg-[#F7F7FC] rounded-lg p-2.5 flex items-center justify-center text-base font-medium text-[#1F1F39]"},"9"),(0,n.createElementVNode)("button",{onClick:t[16]||(t[16]=function(e){return i.clear("cashInput")}),type:"reset",class:"num bg-[#F7F7FC] rounded-lg p-2.5 flex items-center justify-center text-base font-medium text-[#1F1F39] row-span-2"}," Clear "),(0,n.createElementVNode)("button",{onClick:t[17]||(t[17]=function(e){return i.solve("00","cashInput")}),value:"00",class:"num bg-[#F7F7FC] rounded-lg p-2.5 flex items-center justify-center text-base font-medium text-[#1F1F39]"},"00"),(0,n.createElementVNode)("button",{onClick:t[18]||(t[18]=function(e){return i.solve("0","cashInput")}),value:"0",class:"num bg-[#F7F7FC] rounded-lg p-2.5 flex items-center justify-center text-base font-medium text-[#1F1F39]"},"0"),t[43]||(t[43]=(0,n.createElementVNode)("button",{value:"point",class:"num bg-[#F7F7FC] rounded-lg p-2.5 flex items-center justify-center text-base font-medium text-[#1F1F39]"},".",-1))])],2),(0,n.createElementVNode)("div",{id:"card",class:(0,n.normalizeClass)([a.pos_payment_method===a.posPaymentMethodEnum.CARD?"active":"","db-tab-div"])},[(0,n.createElementVNode)("div",Uo,[(0,n.createElementVNode)("h3",Ro,(0,n.toDisplayString)(e.$t("label.enter_card_last_4_digits")),1),(0,n.withDirectives)((0,n.createElementVNode)("input",{ref:"pos_payment_note","onUpdate:modelValue":t[19]||(t[19]=function(e){return a.pos_payment_note=e}),id:"cardInput",max:"4",type:"number",class:"h-12 w-full rounded-lg border py-1.5 px-4 placeholder:text-xs border-[#D9DBE9] text-black",required:""},null,512),[[n.vModelText,a.pos_payment_note]])]),(0,n.createElementVNode)("div",Zo,[(0,n.createElementVNode)("button",{onClick:t[20]||(t[20]=function(e){return i.solve("1","cardInput")}),class:"num bg-[#F7F7FC] rounded-lg p-2.5 flex items-center justify-center text-base font-medium text-[#1F1F39]"},"1"),(0,n.createElementVNode)("button",{onClick:t[21]||(t[21]=function(e){return i.solve("2","cardInput")}),value:"2",class:"num bg-[#F7F7FC] rounded-lg p-2.5 flex items-center justify-center text-base font-medium text-[#1F1F39]"},"2"),(0,n.createElementVNode)("button",{onClick:t[22]||(t[22]=function(e){return i.solve("3","cardInput")}),value:"3",class:"num bg-[#F7F7FC] rounded-lg p-2.5 flex items-center justify-center text-base font-medium text-[#1F1F39]"},"3"),(0,n.createElementVNode)("button",{onClick:t[23]||(t[23]=function(e){return i.back("cardInput")}),value:"cut",class:"num bg-[#F7F7FC] rounded-lg p-2.5 flex items-center justify-center text-base font-medium text-[#1F1F39] row-span-2"},t[44]||(t[44]=[(0,n.createElementVNode)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},[(0,n.createElementVNode)("path",{d:"M16.9997 3.75H10.2797C8.86969 3.75 7.52969 4.34 6.57969 5.39L3.04969 9.27C1.63969 10.82 1.63969 13.18 3.04969 14.73L6.57969 18.61C7.52969 19.65 8.86969 20.25 10.2797 20.25H16.9997C19.7597 20.25 21.9997 18.01 21.9997 15.25V8.75C21.9997 5.99 19.7597 3.75 16.9997 3.75ZM16.5297 13.94C16.8197 14.23 16.8197 14.71 16.5297 15C16.3797 15.15 16.1897 15.22 15.9997 15.22C15.8097 15.22 15.6197 15.15 15.4697 15L13.5297 13.06L11.5897 15C11.4397 15.15 11.2497 15.22 11.0597 15.22C10.8697 15.22 10.6797 15.15 10.5297 15C10.2397 14.71 10.2397 14.23 10.5297 13.94L12.4697 12L10.5297 10.06C10.2397 9.77 10.2397 9.29 10.5297 9C10.8197 8.71 11.2997 8.71 11.5897 9L13.5297 10.94L15.4697 9C15.7597 8.71 16.2397 8.71 16.5297 9C16.8197 9.29 16.8197 9.77 16.5297 10.06L14.5897 12L16.5297 13.94Z",fill:"#1F1F39"})],-1)])),(0,n.createElementVNode)("button",{onClick:t[24]||(t[24]=function(e){return i.solve("4","cardInput")}),value:"4",class:"num bg-[#F7F7FC] rounded-lg p-2.5 flex items-center justify-center text-base font-medium text-[#1F1F39]"},"4"),(0,n.createElementVNode)("button",{onClick:t[25]||(t[25]=function(e){return i.solve("5","cardInput")}),value:"5",class:"num bg-[#F7F7FC] rounded-lg p-2.5 flex items-center justify-center text-base font-medium text-[#1F1F39]"},"5"),(0,n.createElementVNode)("button",{onClick:t[26]||(t[26]=function(e){return i.solve("6","cardInput")}),value:"6",class:"num bg-[#F7F7FC] rounded-lg p-2.5 flex items-center justify-center text-base font-medium text-[#1F1F39]"},"6"),(0,n.createElementVNode)("button",{onClick:t[27]||(t[27]=function(e){return i.solve("7","cardInput")}),value:"7",class:"num bg-[#F7F7FC] rounded-lg p-2.5 flex items-center justify-center text-base font-medium text-[#1F1F39]"},"7"),(0,n.createElementVNode)("button",{onClick:t[28]||(t[28]=function(e){return i.solve("8","cardInput")}),value:"8",class:"num bg-[#F7F7FC] rounded-lg p-2.5 flex items-center justify-center text-base font-medium text-[#1F1F39]"},"8"),(0,n.createElementVNode)("button",{onClick:t[29]||(t[29]=function(e){return i.solve("9","cardInput")}),value:"9",class:"num bg-[#F7F7FC] rounded-lg p-2.5 flex items-center justify-center text-base font-medium text-[#1F1F39]"},"9"),(0,n.createElementVNode)("button",{onClick:t[30]||(t[30]=function(e){return i.clear("cardInput")}),value:"clear",type:"reset",class:"num bg-[#F7F7FC] rounded-lg p-2.5 flex items-center justify-center text-base font-medium text-[#1F1F39] row-span-2"}," Clear "),(0,n.createElementVNode)("button",{onClick:t[31]||(t[31]=function(e){return i.solve("00","cardInput")}),value:"00",class:"num bg-[#F7F7FC] rounded-lg p-2.5 flex items-center justify-center text-base font-medium text-[#1F1F39]"},"00"),(0,n.createElementVNode)("button",{onClick:t[32]||(t[32]=function(e){return i.solve("0","cardInput")}),value:"0",class:"num bg-[#F7F7FC] rounded-lg p-2.5 flex items-center justify-center text-base font-medium text-[#1F1F39]"},"0"),(0,n.createElementVNode)("button",{onClick:t[33]||(t[33]=function(e){return i.solve(".","cardInput")}),value:"point",class:"num bg-[#F7F7FC] rounded-lg p-2.5 flex items-center justify-center text-base font-medium text-[#1F1F39]"},".")])],2),(0,n.createElementVNode)("div",{id:"mfs",class:(0,n.normalizeClass)([a.pos_payment_method===a.posPaymentMethodEnum.MOBILE_BANKING?"active":"","db-tab-div"])},[(0,n.createElementVNode)("div",Ko,[(0,n.createElementVNode)("h3",Wo,(0,n.toDisplayString)(e.$t("label.enter_transaction_id")),1),(0,n.withDirectives)((0,n.createElementVNode)("input",{ref:"pos_payment_note","onUpdate:modelValue":t[34]||(t[34]=function(e){return a.pos_payment_note=e}),id:"mfs-trans",type:"text",class:"h-12 w-full rounded-lg border py-1.5 px-4 placeholder:text-xs border-[#D9DBE9]"},null,512),[[n.vModelText,a.pos_payment_note]])]),t[45]||(t[45]=(0,n.createElementVNode)("div",{class:"board grid grid-cols-10 justify-between gap-1.5 mb-6"},null,-1))],2),(0,n.createElementVNode)("div",{id:"otherpay",class:(0,n.normalizeClass)([a.pos_payment_method===a.posPaymentMethodEnum.OTHER?"active":"","db-tab-div"])},[(0,n.createElementVNode)("div",Go,[(0,n.createElementVNode)("h3",Yo,(0,n.toDisplayString)(e.$t("label.enter_note")),1),(0,n.withDirectives)((0,n.createElementVNode)("input",{ref:"pos_payment_note",onChange:t[35]||(t[35]=function(){return e.getData&&e.getData.apply(e,arguments)}),"onUpdate:modelValue":t[36]||(t[36]=function(e){return a.pos_payment_note=e}),id:"other-trans",type:"text",class:"h-12 w-full rounded-lg border py-1.5 px-4 placeholder:text-xs border-[#D9DBE9]"},null,544),[[n.vModelText,a.pos_payment_note]])]),t[46]||(t[46]=(0,n.createElementVNode)("div",{class:"board grid grid-cols-10 justify-between gap-1.5 mb-6"},null,-1))],2),(0,n.createElementVNode)("button",{onClick:t[37]||(t[37]=(0,n.withModifiers)(function(t){e.$emit("orderSubmit",{pos_payment_note:a.pos_payment_note,pos_payment_method:a.pos_payment_method,pos_received_amount:a.pos_received_amount}),i.reset()},["prevent"])),"data-modal":"#receipt",class:"rounded-3xl text-base py-2 px-3 font-medium w-full text-white bg-primary"},(0,n.toDisplayString)(e.$t("button.confirm_and_print_receipt")),1)])])])}]]);var on={id:"customerModal",class:"modal"},nn={class:"modal-dialog max-w-[840px]"},rn={class:"modal-header hidden-print"},an={class:"drawer-title"},sn={class:"modal-body"},ln={class:"form-row"},cn={class:"form-col-12 sm:form-col-6"},dn={for:"name",class:"db-field-title required"},un={key:0,class:"db-field-alert"},pn={class:"form-col-12 sm:form-col-6"},mn={for:"email",class:"db-field-title required"},hn={key:0,class:"db-field-alert"},fn={class:"form-col-12 sm:form-col-6"},gn={for:"phone",class:"text-xs uppercase mb-1 text-heading"},yn={class:"w-fit flex-shrink-0 dropdown-group"},bn={type:"button",class:"flex items-center gap-1 dropdown-btn"},vn={class:"whitespace-nowrap flex-shrink-0 text-xs"},xn={class:"p-1.5 w-24 rounded-lg shadow-xl absolute top-8 -left-4 z-10 border border-gray-200 bg-white scale-y-0 origin-top dropdown-list !h-52 !overflow-x-hidden !overflow-y-auto thin-scrolling"},En=["onClick"],Cn={class:"whitespace-nowrap text-xs"},Vn={key:0,class:"db-field-alert"},_n={class:"form-col-12 sm:form-col-6"},kn={class:"db-field-title required",for:"active"},wn={class:"db-field-radio-group"},Nn={class:"db-field-radio"},Fn={class:"custom-radio"},Pn=["value"],An={for:"active",class:"db-field-label"},Bn={class:"db-field-radio"},Sn={class:"custom-radio"},Dn=["value"],$n={for:"inactive",class:"db-field-label"},In={key:0,class:"db-field-alert"},Tn={class:"form-col-12 sm:form-col-6"},qn={for:"password",class:"db-field-title required"},Mn={key:0,class:"db-field-alert"},Ln={class:"form-col-12 sm:form-col-6"},zn={for:"password_confirmation",class:"db-field-title required"},Hn={key:0,class:"db-field-alert"},jn={class:"form-col-12"},On={class:"flex flex-wrap gap-3 mt-4"},Un={type:"submit",class:"db-btn py-2 text-white bg-primary"};function Rn(e){return Rn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Rn(e)}function Zn(e,t,o){return(t=function(e){var t=function(e,t){if("object"!=Rn(e)||!e)return e;var o=e[Symbol.toPrimitive];if(void 0!==o){var n=o.call(e,t||"default");if("object"!=Rn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Rn(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}const Kn={name:"PoscustomerComponent",components:{LoadingComponent:ae.A},data:function(){return{loading:{isActive:!1},enums:{statusEnum:xt.A,statusEnumArray:Zn(Zn({},xt.A.ACTIVE,this.$t("label.active")),xt.A.INACTIVE,this.$t("label.inactive"))},props:{form:{name:"",email:"",phone:"",password:"",password_confirmation:"",country_code:"",status:xt.A.ACTIVE}},errors:{},flag:"",country_code:""}},computed:{countryCodes:function(){return this.$store.getters["countryCode/lists"]}},mounted:function(){var e=this;this.loading.isActive=!0,this.$store.dispatch("countryCode/lists"),this.$store.dispatch("company/lists").then(function(t){e.$store.dispatch("countryCode/show",t.data.data.company_country_code).then(function(t){""===e.props.form.country_code&&(e.props.form.country_code=t.data.data.calling_code,e.country_code=t.data.data.calling_code),e.flag=t.data.data.flag_emoji,e.loading.isActive=!1}).catch(function(t){e.loading.isActive=!1})}).catch(function(t){e.loading.isActive=!1})},methods:{phoneNumber:function(e){return pt.A.phoneNumber(e)},change:function(e){this.flag=e.flag_emoji,this.props.form.country_code=e.calling_code},reset:function(){pt.A.modalHide(),this.errors={},this.props.form={name:"",email:"",phone:"",password:"",password_confirmation:"",status:xt.A.ACTIVE,country_code:this.country_code}},save:function(){var e=this;try{this.loading.isActive=!0,this.$store.dispatch("posOrder/saveCustomer",this.props).then(function(t){pt.A.sideDrawerHide(),e.loading.isActive=!1,mt.A.successFlip(0,e.$t("menu.customers")),e.props.form={name:"",email:"",phone:"",password:"",password_confirmation:"",status:xt.A.ACTIVE,country_code:e.country_code},e.errors={},e.$emit("onCustomverCreate",t.data.data.id)}).catch(function(t){e.loading.isActive=!1,e.errors=t.response.data.errors})}catch(e){this.loading.isActive=!1,mt.A.error(e)}}}},Wn=(0,dt.A)(Kn,[["render",function(e,t,o,r,a,i){return(0,n.openBlock)(),(0,n.createElementBlock)("div",on,[(0,n.createElementVNode)("div",nn,[(0,n.createElementVNode)("div",rn,[(0,n.createElementVNode)("h3",an,(0,n.toDisplayString)(e.$t("menu.customers")),1),(0,n.createElementVNode)("button",{class:"fa-solid fa-xmark close-btn",onClick:t[0]||(t[0]=function(){return i.reset&&i.reset.apply(i,arguments)})})]),(0,n.createElementVNode)("div",sn,[(0,n.createElementVNode)("form",{onSubmit:t[10]||(t[10]=(0,n.withModifiers)(function(){return i.save&&i.save.apply(i,arguments)},["prevent"]))},[(0,n.createElementVNode)("div",ln,[(0,n.createElementVNode)("div",cn,[(0,n.createElementVNode)("label",dn,(0,n.toDisplayString)(e.$t("label.name")),1),(0,n.withDirectives)((0,n.createElementVNode)("input",{"onUpdate:modelValue":t[1]||(t[1]=function(e){return a.props.form.name=e}),class:(0,n.normalizeClass)([a.errors.name?"invalid":"","db-field-control"]),type:"text",id:"name"},null,2),[[n.vModelText,a.props.form.name]]),a.errors.name?((0,n.openBlock)(),(0,n.createElementBlock)("small",un,(0,n.toDisplayString)(a.errors.name[0]),1)):(0,n.createCommentVNode)("",!0)]),(0,n.createElementVNode)("div",pn,[(0,n.createElementVNode)("label",mn,(0,n.toDisplayString)(e.$t("label.email")),1),(0,n.withDirectives)((0,n.createElementVNode)("input",{"onUpdate:modelValue":t[2]||(t[2]=function(e){return a.props.form.email=e}),class:(0,n.normalizeClass)([a.errors.email?"invalid":"","db-field-control"]),type:"text",id:"email"},null,2),[[n.vModelText,a.props.form.email]]),a.errors.email?((0,n.openBlock)(),(0,n.createElementBlock)("small",hn,(0,n.toDisplayString)(a.errors.email[0]),1)):(0,n.createCommentVNode)("",!0)]),(0,n.createElementVNode)("div",fn,[(0,n.createElementVNode)("label",gn,(0,n.toDisplayString)(e.$t("label.phone")),1),(0,n.createElementVNode)("div",{class:(0,n.normalizeClass)([a.errors.phone?"invalid":"","db-field-control flex items-center"])},[(0,n.createElementVNode)("div",yn,[(0,n.createElementVNode)("button",bn,[(0,n.createTextVNode)((0,n.toDisplayString)(a.flag)+" ",1),(0,n.createElementVNode)("span",vn,(0,n.toDisplayString)(a.props.form.country_code),1),t[11]||(t[11]=(0,n.createElementVNode)("i",{class:"fa-solid fa-caret-down text-xs"},null,-1))]),(0,n.createElementVNode)("ul",xn,[((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)(i.countryCodes,function(e){return(0,n.openBlock)(),(0,n.createElementBlock)("li",{onClick:function(t){return i.change(e)},class:"flex items-center gap-2 p-1.5 rounded-md cursor-pointer hover:bg-gray-100"},[(0,n.createTextVNode)((0,n.toDisplayString)(e.flag_emoji)+" ",1),(0,n.createElementVNode)("span",Cn,(0,n.toDisplayString)(e.calling_code),1)],8,En)}),256))])]),(0,n.withDirectives)((0,n.createElementVNode)("input",{"onUpdate:modelValue":t[3]||(t[3]=function(e){return a.props.form.phone=e}),onKeypress:t[4]||(t[4]=function(e){return i.phoneNumber(e)}),class:(0,n.normalizeClass)([a.errors.phone?"invalid":"","pl-2 text-sm w-full h-full"]),type:"text",id:"phone"},null,34),[[n.vModelText,a.props.form.phone]])],2),a.errors.phone?((0,n.openBlock)(),(0,n.createElementBlock)("small",Vn,(0,n.toDisplayString)(a.errors.phone[0]),1)):(0,n.createCommentVNode)("",!0)]),(0,n.createElementVNode)("div",_n,[(0,n.createElementVNode)("label",kn,(0,n.toDisplayString)(e.$t("label.status")),1),(0,n.createElementVNode)("div",wn,[(0,n.createElementVNode)("div",Nn,[(0,n.createElementVNode)("div",Fn,[(0,n.withDirectives)((0,n.createElementVNode)("input",{value:a.enums.statusEnum.ACTIVE,"onUpdate:modelValue":t[5]||(t[5]=function(e){return a.props.form.status=e}),id:"active",type:"radio",class:"custom-radio-field"},null,8,Pn),[[n.vModelRadio,a.props.form.status]]),t[12]||(t[12]=(0,n.createElementVNode)("span",{class:"custom-radio-span"},null,-1))]),(0,n.createElementVNode)("label",An,(0,n.toDisplayString)(e.$t("label.active")),1)]),(0,n.createElementVNode)("div",Bn,[(0,n.createElementVNode)("div",Sn,[(0,n.withDirectives)((0,n.createElementVNode)("input",{value:a.enums.statusEnum.INACTIVE,"onUpdate:modelValue":t[6]||(t[6]=function(e){return a.props.form.status=e}),type:"radio",id:"inactive",class:"custom-radio-field"},null,8,Dn),[[n.vModelRadio,a.props.form.status]]),t[13]||(t[13]=(0,n.createElementVNode)("span",{class:"custom-radio-span"},null,-1))]),(0,n.createElementVNode)("label",$n,(0,n.toDisplayString)(e.$t("label.inactive")),1)])]),a.errors.status?((0,n.openBlock)(),(0,n.createElementBlock)("small",In,(0,n.toDisplayString)(a.errors.status[0]),1)):(0,n.createCommentVNode)("",!0)]),(0,n.createElementVNode)("div",Tn,[(0,n.createElementVNode)("label",qn,(0,n.toDisplayString)(e.$t("label.password")),1),(0,n.withDirectives)((0,n.createElementVNode)("input",{"onUpdate:modelValue":t[7]||(t[7]=function(e){return a.props.form.password=e}),class:(0,n.normalizeClass)([a.errors.password?"invalid":"","db-field-control"]),type:"password",id:"password",autocomplete:"off"},null,2),[[n.vModelText,a.props.form.password]]),a.errors.password?((0,n.openBlock)(),(0,n.createElementBlock)("small",Mn,(0,n.toDisplayString)(a.errors.password[0]),1)):(0,n.createCommentVNode)("",!0)]),(0,n.createElementVNode)("div",Ln,[(0,n.createElementVNode)("label",zn,(0,n.toDisplayString)(e.$t("label.confirm_password")),1),(0,n.withDirectives)((0,n.createElementVNode)("input",{"onUpdate:modelValue":t[8]||(t[8]=function(e){return a.props.form.password_confirmation=e}),class:(0,n.normalizeClass)([a.errors.password_confirmation?"invalid":"","db-field-control"]),type:"password",id:"password_confirmation",autocomplete:"off"},null,2),[[n.vModelText,a.props.form.password_confirmation]]),a.errors.password_confirmation?((0,n.openBlock)(),(0,n.createElementBlock)("small",Hn,(0,n.toDisplayString)(a.errors.password_confirmation[0]),1)):(0,n.createCommentVNode)("",!0)]),(0,n.createElementVNode)("div",jn,[(0,n.createElementVNode)("div",On,[(0,n.createElementVNode)("button",Un,[t[14]||(t[14]=(0,n.createElementVNode)("i",{class:"lab lab-fill-save"},null,-1)),(0,n.createElementVNode)("span",null,(0,n.toDisplayString)(e.$t("label.save")),1)]),(0,n.createElementVNode)("button",{type:"button",class:"modal-btn-outline modal-close",onClick:t[9]||(t[9]=function(){return i.reset&&i.reset.apply(i,arguments)})},[t[15]||(t[15]=(0,n.createElementVNode)("i",{class:"lab lab-fill-close-circle"},null,-1)),(0,n.createElementVNode)("span",null,(0,n.toDisplayString)(e.$t("button.close")),1)])])])])],32)])])])}]]);var Gn={class:"db-group-field"},Yn=["placeholder"];const Xn={name:"BarcodeProductComponent",components:{VariationComponent:ut,ProductListComponent:at.A,LoadingComponent:ae.A},data:function(){return{loading:{isActive:!1},props:{search:{product_id:null}},barcode:null,selectedVariation:null,productArray:{},initProduct:{isVariation:!1,variationId:null,sku:null,stock:0,quantity:1,discount:0,price:0,oldPrice:0,totalPrice:0},temp:{name:"",image:"",isVariation:!1,variationId:null,productId:0,sku:null,stock:0,taxes:{},quantity:1,discount:0,price:0,oldPrice:0,totalPrice:0}}},computed:{setting:function(){return this.$store.getters["frontendSetting/lists"]},product:function(){return this.$store.getters["posProduct/show"]},images:function(){return this.$store.getters["posProduct/showImages"]}},mounted:function(){this.$refs.posBarcodeScan.focus()},methods:{onlyNumber:function(e){return pt.A.onlyNumber(e)},currencyFormat:function(e,t,o,n){return pt.A.currencyFormat(e,t,o,n)},getProduct:function(){var e=this;this.barcode&&((this.barcode.toString().length>8||this.barcode.toString().length>7)&&(this.barcode=this.barcode.toString().slice(0,-1)),this.barcode=parseInt(this.barcode),this.$store.dispatch("product/barcodeProduct",this.barcode).then(function(t){e.props.search.product_id=t.data.data.product_id,e.$store.dispatch("posProduct/show",e.props.search).then(function(o){e.initProduct={isVariation:!1,variationId:null,sku:o.data.data.sku,stock:o.data.data.stock,quantity:1,discount:0,price:o.data.data.price,oldPrice:o.data.data.old_price,totalPrice:o.data.data.price},e.temp={name:o.data.data.name,image:o.data.data.image,isVariation:!1,variationId:null,productId:o.data.data.id,sku:o.data.data.sku,stock:o.data.data.stock,taxes:o.data.data.taxes,quantity:1,discount:0,price:o.data.data.price,oldPrice:o.data.data.old_price,totalPrice:o.data.data.price},t.data.data.variation_id?(e.selectedVariation=t.data.data.variation_id,e.$store.dispatch("posProductVariation/barcodeVariationProduct",t.data.data.variation_id).then(function(t){e.temp.isVariation=!0,e.temp.variationId=t.data.data.id,e.temp.sku=t.data.data.sku,e.temp.stock=t.data.data.stock,e.temp.quantity=1,e.temp.discount=0,e.temp.price=t.data.data.price,e.temp.oldPrice=t.data.data.old_price,e.temp.totalPrice=t.data.data.price,e.temp.stock>0?e.addToCart():(mt.A.error(e.$t("label.stock_out")),e.barcode=null)}).catch(function(t){e.loading.isActive=!1})):e.temp.stock>0?e.addToCart():(mt.A.error(e.$t("label.stock_out")),e.barcode=null)}).catch(function(t){e.loading.isActive=!1})}).catch(function(t){e.loading.isActive=!1,mt.A.error(t.response.data.message),e.barcode=null}))},addToCart:function(){var e=this;this.productArray={name:this.temp.name,product_id:this.temp.productId,image:this.temp.image,variation_names:"",variation_id:this.temp.variationId,sku:this.temp.sku,stock:this.temp.stock,taxes:this.temp.taxes,quantity:this.temp.quantity,discount:this.temp.discount,price:this.temp.price,old_price:this.temp.oldPrice,total_price:this.temp.totalPrice},this.selectedVariation?this.$store.dispatch("posProductVariation/ancestorsToString",this.selectedVariation).then(function(t){e.productArray.variation_names=t.data.data,e.$store.dispatch("posCart/lists",e.productArray).then(function(t){mt.A.success(e.$t("message.add_to_cart")),e.barcode=null,e.productArray={},e.selectedVariation=null,e.temp.isVariation=e.initProduct.isVariation,e.temp.variationId=e.initProduct.variationId,e.temp.sku=e.initProduct.sku,e.temp.stock=e.initProduct.stock,e.temp.quantity=e.initProduct.quantity,e.temp.discount=e.initProduct.discount,e.temp.price=e.initProduct.price,e.temp.oldPrice=e.initProduct.oldPrice,e.temp.totalPrice=e.initProduct.price}).catch(function(t){mt.A.error(e.$t("message.maximum_quantity")),e.barcode=null,e.variationComponent=!0,e.selectedVariation=null,e.temp.stock=e.initProduct.stock,e.temp.quantity=e.initProduct.quantity})}).catch(function(e){}):this.$store.dispatch("posCart/lists",this.productArray).then(function(t){mt.A.success(e.$t("message.add_to_cart")),e.barcode=null,e.productArray={},e.selectedVariation=null,e.temp.isVariation=e.initProduct.isVariation,e.temp.variationId=e.initProduct.variationId,e.temp.sku=e.initProduct.sku,e.temp.stock=e.initProduct.stock,e.temp.quantity=e.initProduct.quantity,e.temp.discount=e.initProduct.discount,e.temp.price=e.initProduct.price,e.temp.oldPrice=e.initProduct.oldPrice,e.temp.totalPrice=e.initProduct.price}).catch(function(t){mt.A.error(e.$t("message.maximum_quantity")),e.barcode=null,e.selectedVariation=null,e.temp.stock=e.initProduct.stock,e.temp.quantity=e.initProduct.quantity})}}},Jn=(0,dt.A)(Xn,[["render",function(e,t,o,r,a,i){var s=(0,n.resolveComponent)("LoadingComponent");return(0,n.openBlock)(),(0,n.createElementBlock)(n.Fragment,null,[(0,n.createVNode)(s,{props:a.loading},null,8,["props"]),(0,n.createElementVNode)("div",Gn,[(0,n.withDirectives)((0,n.createElementVNode)("input",{onKeypress:t[0]||(t[0]=function(e){return i.onlyNumber(e)}),"onUpdate:modelValue":t[1]||(t[1]=function(e){return a.barcode=e}),type:"number",id:"barcode",ref:"posBarcodeScan",placeholder:e.$t("label.barcode"),onKeyup:t[2]||(t[2]=(0,n.withKeys)(function(){return i.getProduct&&i.getProduct.apply(i,arguments)},["enter"]))},null,40,Yn),[[n.vModelText,a.barcode]]),(0,n.createElementVNode)("button",{type:"button",onClick:t[3]||(t[3]=function(){return i.getProduct&&i.getProduct.apply(i,arguments)}),class:"lab lab-line-enter"})])],64)}]]);function Qn(e){return Qn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Qn(e)}const er={name:"PosComponent",components:{ReceiptComponent:_o,LoadingComponent:ae.A,ProductListComponent:yt,PoscustomerComponent:Wn,BarcodeProductComponent:Jn,PaymentComponent:tn},data:function(){return{loading:{isActive:!1},order:{},discount:null,checkoutProps:{form:{customer_id:null,category:null,brand:null,discount:0,total:0,pos_payment_method:Xo.A.CASH,pos_payment_note:"",pos_payment_receive_amount:0}},props:{search:{paginate:0,order_column:"id",order_type:"asc",name:"",product_category_id:"",product_brand_id:"",status:xt.A.ACTIVE}},searchProps:{paginate:0,order_column:"id",order_type:"asc",status:xt.A.ACTIVE},settings:{itemsToShow:6.2,wrapAround:!1,snapAlign:"start"},statusEnum:xt.A,discountTypeEnum:Vt,posPaymentMethodEnum:Xo.A,discountType:Vt.PERCENTAGE,discountErrorMessage:"",form:{}}},computed:{setting:function(){return this.$store.getters["frontendSetting/lists"]},categories:function(){return this.$store.getters["productCategory/depthTrees"]},brands:function(){return this.$store.getters["productBrand/lists"]},products:function(){return this.$store.getters["product/lists"]},customers:function(){return this.$store.getters["user/lists"]},carts:function(){return this.$store.getters["posCart/lists"]},subtotal:function(){return this.$store.getters["posCart/subtotal"]},total:function(){return this.$store.getters["posCart/total"]},posCartDiscount:function(){return this.$store.getters["posCart/discount"]},totalTax:function(){return this.$store.getters["posCart/totalTax"]},posCartProducts:function(){return this.$store.getters["posCart/lists"]},posDiscount:function(){return this.$store.getters["posCart/discount"]}},mounted:function(){var e=this;this.productCategories(),this.productBrands(),this.productList();try{this.customerList(),this.loading.isActive=!0,this.$store.dispatch("company/lists").then(function(t){e.company.name=t.data.data.company_name,e.company.email=t.data.data.company_email,e.company.phone=t.data.data.company_phone,e.company.address=t.data.data.company_address,e.loading.isActive=!1}).catch(function(t){e.loading.isActive=!1})}catch(e){this.loading.isActive=!1}},methods:{hideTarget:function(e,t){rt.A.hideTarget(e,t)},onlyNumber:function(e){return pt.A.onlyNumber(e)},floatNumber:function(e){return pt.A.floatNumber(e)},currencyFormat:function(e,t,o,n){return pt.A.currencyFormat(e,t,o,n)},floatFormat:function(e,t){return pt.A.floatFormat(e,t)},reset:function(){this.props.search.name="",this.checkoutProps.form.category=null,this.props.search.product_category_id="",this.checkoutProps.form.brand=null,this.props.search.product_brand_id="",this.productList()},search:function(){this.productList()},addCustomer:function(){pt.A.modalShow("#customerModal")},productCategories:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;this.loading.isActive=!0,this.props.search.page=t,this.$store.dispatch("productCategory/depthTrees",this.searchProps).then(function(t){e.loading.isActive=!1}).catch(function(t){e.loading.isActive=!1})},productBrands:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;this.loading.isActive=!0,this.props.search.page=t,this.$store.dispatch("productBrand/lists",this.searchProps).then(function(t){e.loading.isActive=!1}).catch(function(t){e.loading.isActive=!1})},customerList:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this.loading.isActive=!0,this.$store.dispatch("user/lists",{order_column:"id",order_type:"asc",status:xt.A.ACTIVE,role_id:Ct.A.CUSTOMER}).then(function(o){e.checkoutProps.form.customer_id=null===t?o.data.data[0].id:t,e.loading.isActive=!1}).catch(function(t){e.loading.isActive=!1})},productList:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;this.loading.isActive=!0,this.props.search.page=t,this.$store.dispatch("product/lists",this.props.search).then(function(t){e.loading.isActive=!1}).catch(function(t){e.loading.isActive=!1})},setCategory:function(e){this.props.search.product_category_id=e,this.productList()},setBrand:function(e){this.props.search.product_brand_id=e,this.productList()},quantityUp:function(e,t,o){var n=o.target.value;(0===n||n<0||"0"===n)&&(n=1),n>t.stock&&(n=t.stock),this.$store.dispatch("posCart/quantity",{id:e,status:n}).then().catch(),this.checkoutProps.form.discount=0,this.$store.dispatch("posCart/discount",this.checkoutProps.form.discount).then().catch()},quantityIncrement:function(e,t){var o=t.quantity;++o<=0&&(o=1),o>t.stock&&o--,this.$store.dispatch("posCart/quantity",{id:e,status:o}).then().catch(),this.checkoutProps.form.discount=0,this.$store.dispatch("posCart/discount",this.checkoutProps.form.discount).then().catch()},quantityDecrement:function(e,t){var o=t.quantity;--o<=0&&(o=1),this.$store.dispatch("posCart/quantity",{id:e,status:o}).then().catch(),this.checkoutProps.form.discount=0,this.$store.dispatch("posCart/discount",this.checkoutProps.form.discount).then().catch()},removeProduct:function(e){this.$store.dispatch("posCart/remove",{id:e}).then().catch(),this.checkoutProps.form.discount=0,this.$store.dispatch("posCart/discount",this.checkoutProps.form.discount).then().catch(),0===this.carts.length&&(this.checkoutProps.form.pos_payment_method=Xo.A.CASH,this.checkoutProps.form.pos_payment_note="",this.discountErrorMessage="")},applyDiscount:function(){this.discountErrorMessage="",this.discountType===Vt.FIXED?this.subtotal<this.discount?(this.discountErrorMessage=this.$t("message.discount_fixed_error_message"),this.checkoutProps.form.discount=0,this.$store.dispatch("posCart/discount",this.checkoutProps.form.discount).then().catch()):(this.discountErrorMessage="",this.checkoutProps.form.discount=parseFloat(+this.discount).toFixed(this.setting.site_digit_after_decimal_point),this.$store.dispatch("posCart/discount",this.checkoutProps.form.discount).then().catch()):this.discount>100?(this.discountErrorMessage=this.$t("message.discount_error_message"),this.checkoutProps.form.discount=0,this.$store.dispatch("posCart/discount",this.checkoutProps.form.discount).then().catch()):(this.discountErrorMessage="",this.checkoutProps.form.discount=parseFloat(this.subtotal*this.discount/100).toFixed(this.setting.site_digit_after_decimal_point),this.$store.dispatch("posCart/discount",this.checkoutProps.form.discount).then().catch())},resetCart:function(){this.$store.dispatch("posCart/resetCart").then(function(e){}).catch(),0===this.carts.length&&(this.checkoutProps.form.pos_payment_method=Xo.A.CASH,this.checkoutProps.form.pos_payment_note="",this.discountErrorMessage="")},orderSubmit:function(e){var t=this;this.loading.isActive=!0,this.form={customer_id:this.checkoutProps.form.customer_id,subtotal:this.subtotal,discount:parseFloat(this.posCartDiscount),tax:this.totalTax,total:this.total,order_type:vt.A.POS,source:bt.A.POS,payment_method:Et.A.CASH_ON_DELIVERY,pos_payment_method:e.pos_payment_method,pos_payment_note:e.pos_payment_method===Xo.A.CASH?"":e.pos_payment_note,pos_received_amount:e.pos_received_amount,products:JSON.stringify(this.posCartProducts)},this.$store.dispatch("posOrder/save",this.form).then(function(e){t.$store.dispatch("posCart/resetCart").then(function(e){t.checkoutProps.form.pos_payment_method=Xo.A.CASH,t.checkoutProps.form.pos_payment_note="",t.discount=null,t.discountErrorMessage="",t.loading.isActive=!1}).catch(),mt.A.success(t.$t("message.pos_order")),t.$store.dispatch("posOrder/show",e.data.data.id).then(function(e){t.order=e.data.data,t.loading.isActive=!1}).catch(function(e){t.loading.isActive=!1,mt.A.error(e.response.data.message)}),pt.A.modalHide("#orderPayment"),pt.A.modalShow("#posReceiptModal")}).catch(function(e){t.loading.isActive=!1,"object"===Qn(e.response.data.errors)&&_.forEach(e.response.data.errors,function(e){mt.A.error(e[0])})})},orderPayment:function(){pt.A.modalShow("#orderPayment")},totalProducts:function(){if(this.carts.length>0){var e=0;return this.carts.forEach(function(t){e+=t.quantity}),e}},onCustomverCreate:function(e){pt.A.modalHide(),this.customerList(e)},resetName:function(){this.props.search.name=""}}},tr=(0,dt.A)(er,[["render",function(e,t,o,_,ae,ie){var se=(0,n.resolveComponent)("LoadingComponent"),le=(0,n.resolveComponent)("PoscustomerComponent"),ce=(0,n.resolveComponent)("vue-select"),de=(0,n.resolveComponent)("ProductListComponent"),ue=(0,n.resolveComponent)("BarcodeProductComponent"),pe=(0,n.resolveComponent)("ReceiptComponent"),me=(0,n.resolveComponent)("PaymentComponent");return(0,n.openBlock)(),(0,n.createElementBlock)(n.Fragment,null,[(0,n.createVNode)(se,{props:ae.loading},null,8,["props"]),(0,n.createVNode)(le,{onOnCustomverCreate:ie.onCustomverCreate},null,8,["onOnCustomverCreate"]),(0,n.createElementVNode)("div",r,[(0,n.createElementVNode)("form",{class:"w-full mb-4",onSubmit:t[7]||(t[7]=(0,n.withModifiers)(function(){return ie.search&&ie.search.apply(ie,arguments)},["prevent"]))},[(0,n.createElementVNode)("div",a,[(0,n.createElementVNode)("div",{class:(0,n.normalizeClass)(["form-col-12 sm:form-col-6",(ae.checkoutProps.form.category||ae.checkoutProps.form.brand,"xl:form-col-4")])},[(0,n.createElementVNode)("div",i,[t[17]||(t[17]=(0,n.createElementVNode)("button",{type:"submit",class:"lab-line-search ltr:mr-2 rtl:ml-2"},null,-1)),(0,n.withDirectives)((0,n.createElementVNode)("input",{type:"search","onUpdate:modelValue":t[0]||(t[0]=function(e){return ae.props.search.name=e}),placeholder:e.$t("label.search_here"),class:"w-full"},null,8,s),[[n.vModelText,ae.props.search.name]]),ae.props.search.name?((0,n.openBlock)(),(0,n.createElementBlock)("button",{key:0,onClick:t[1]||(t[1]=function(){return ie.resetName&&ie.resetName.apply(ie,arguments)}),type:"button",class:"text-sm text-red-500 fa-regular fa-circle-xmark"})):(0,n.createCommentVNode)("",!0)])],2),(0,n.createElementVNode)("div",{class:(0,n.normalizeClass)(["form-col-12 sm:form-col-6",ae.checkoutProps.form.category||ae.checkoutProps.form.brand?"xl:form-col-3":"xl:form-col-4"])},[(0,n.createElementVNode)("div",l,[(0,n.createVNode)(ce,{modelValue:ae.checkoutProps.form.category,"onUpdate:modelValue":[t[2]||(t[2]=function(e){return ae.checkoutProps.form.category=e}),t[3]||(t[3]=function(e){return ie.setCategory(e)})],class:"db-field-control appearance-none cursor-pointer f-b-custom-select",id:"customer",options:ie.categories,"label-by":"option","value-by":"id",closeOnSelect:!0,searchable:!0,clearOnClose:!0,placeholder:e.$t("label.select_category"),"search-placeholder":e.$t("label.search_category")},null,8,["modelValue","options","placeholder","search-placeholder"])])],2),(0,n.createElementVNode)("div",{class:(0,n.normalizeClass)(["form-col-12 sm:form-col-6",ae.checkoutProps.form.category||ae.checkoutProps.form.brand?"xl:form-col-3":"xl:form-col-4"])},[(0,n.createElementVNode)("div",c,[(0,n.createVNode)(ce,{modelValue:ae.checkoutProps.form.brand,"onUpdate:modelValue":[t[4]||(t[4]=function(e){return ae.checkoutProps.form.brand=e}),t[5]||(t[5]=function(e){return ie.setBrand(e)})],class:"db-field-control appearance-none cursor-pointer",id:"customer",options:ie.brands,"label-by":"name","value-by":"id",closeOnSelect:!0,searchable:!0,clearOnClose:!0,placeholder:e.$t("label.select_brand"),"search-placeholder":e.$t("label.search_brand")},null,8,["modelValue","options","placeholder","search-placeholder"])])],2),ae.checkoutProps.form.category||ae.checkoutProps.form.brand?((0,n.openBlock)(),(0,n.createElementBlock)("div",d,[(0,n.createElementVNode)("button",{class:"db-btn-outline h-[38px] w-full flex-shrink-0 !text-[#FB4E4E] !bg-white !border-[#FB4E4E]",onClick:t[6]||(t[6]=function(){return ie.reset&&ie.reset.apply(ie,arguments)})},[t[18]||(t[18]=(0,n.createElementVNode)("i",{class:"lab lab-line-reset"},null,-1)),(0,n.createElementVNode)("span",null,(0,n.toDisplayString)(e.$t("button.reset")),1)])])):(0,n.createCommentVNode)("",!0)])],32),ie.products.length>0?((0,n.openBlock)(),(0,n.createBlock)(de,{key:0,products:ie.products},null,8,["products"])):(0,n.createCommentVNode)("",!0)]),(0,n.createElementVNode)("div",u,[(0,n.createElementVNode)("div",p,[t[20]||(t[20]=(0,n.createElementVNode)("div",{class:"md:hidden text-right mb-3"},[(0,n.createElementVNode)("button",{class:"db-pos-cartCls"},[(0,n.createElementVNode)("i",{class:"lab-line-circle-cross text-lg text-[#E93C3C]"})])],-1)),(0,n.createElementVNode)("div",m,[(0,n.createVNode)(ue)]),(0,n.createElementVNode)("div",h,[(0,n.createVNode)(ce,{class:"db-field-control w-full flex-auto text-sm rounded-lg appearance-none cursor-pointer text-heading border-[#D9DBE9]",id:"customer",modelValue:ae.checkoutProps.form.customer_id,"onUpdate:modelValue":t[8]||(t[8]=function(e){return ae.checkoutProps.form.customer_id=e}),options:ie.customers,"label-by":"name","value-by":"id",closeOnSelect:!0,searchable:!0,clearOnClose:!0,placeholder:e.$t("label.select_customer"),"search-placeholder":e.$t("label.search_customer")},null,8,["modelValue","options","placeholder","search-placeholder"]),(0,n.createElementVNode)("button",{onClick:t[9]||(t[9]=function(){return ie.addCustomer&&ie.addCustomer.apply(ie,arguments)}),type:"button",class:"flex items-center justify-center gap-1.5 px-3 h-10 rounded-lg text-white bg-primary"},[t[19]||(t[19]=(0,n.createElementVNode)("i",{class:"lab lab-add-circle-line"},null,-1)),(0,n.createElementVNode)("span",f,(0,n.toDisplayString)(e.$t("button.add")),1)])])]),0===ie.carts.length?((0,n.openBlock)(),(0,n.createElementBlock)("div",g,[(0,n.createElementVNode)("img",{class:"w-52",src:ie.setting.image_cart,alt:"empty"},null,8,y)])):(0,n.createCommentVNode)("",!0),ie.carts.length>0?((0,n.openBlock)(),(0,n.createElementBlock)("ul",b,[((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)(ie.carts,function(o,r){return(0,n.openBlock)(),(0,n.createElementBlock)("li",v,[(0,n.createElementVNode)("img",{src:o.image,alt:"products",class:"w-28 rounded-lg flex-shrink-0"},null,8,x),(0,n.createElementVNode)("div",E,[(0,n.createElementVNode)("h4",C,(0,n.toDisplayString)(o.name),1),o.variation_id>0?((0,n.openBlock)(),(0,n.createElementBlock)("div",V,[(0,n.createElementVNode)("span",k,(0,n.toDisplayString)(o.variation_names),1)])):(0,n.createCommentVNode)("",!0),(0,n.createElementVNode)("div",w,[(0,n.createElementVNode)("span",N,(0,n.toDisplayString)(ie.currencyFormat(o.price,ie.setting.site_digit_after_decimal_point,ie.setting.site_default_currency_symbol,ie.setting.site_currency_position)),1),o.discount>0?((0,n.openBlock)(),(0,n.createElementBlock)("del",F,(0,n.toDisplayString)(ie.currencyFormat(o.old_price,ie.setting.site_digit_after_decimal_point,ie.setting.site_default_currency_symbol,ie.setting.site_currency_position)),1)):(0,n.createCommentVNode)("",!0)]),(0,n.createElementVNode)("div",P,[(0,n.createElementVNode)("div",A,[(0,n.createElementVNode)("button",{onClick:(0,n.withModifiers)(function(e){return ie.quantityDecrement(r,o)},["prevent"]),type:"button",class:(0,n.normalizeClass)([1===o.quantity?"cursor-not-allowed":"","lab-fill-circle-minus text-lg leading-none transition-all duration-300 hover:text-primary"])},null,10,B),(0,n.withDirectives)((0,n.createElementVNode)("input",{onKeypress:t[10]||(t[10]=function(e){return ie.onlyNumber(e)}),onKeyup:function(e){return ie.quantityUp(r,o,e)},type:"number","onUpdate:modelValue":function(e){return o.quantity=e},class:"text-center w-full h-5 text-sm font-medium"},null,40,S),[[n.vModelText,o.quantity]]),(0,n.createElementVNode)("button",{class:(0,n.normalizeClass)([o.quantity>=o.stock?"cursor-not-allowed":"","lab-fill-circle-plus text-lg leading-none transition-all duration-300 hover:text-primary"]),onClick:(0,n.withModifiers)(function(e){return ie.quantityIncrement(r,o)},["prevent"]),type:"button"},null,10,D)]),(0,n.createElementVNode)("button",{onClick:(0,n.withModifiers)(function(e){return ie.removeProduct(r)},["prevent"]),class:"flex items-center gap-1.5 px-2.5 py-1 rounded-full bg-[#FFF4F4] text-[#E93C3C] transition-all duration-300 hover:bg-[#E93C3C] hover:text-white"},[t[21]||(t[21]=(0,n.createElementVNode)("i",{class:"lab-line-trash text-sm"},null,-1)),(0,n.createElementVNode)("span",I,(0,n.toDisplayString)(e.$t("button.remove")),1)],8,$)])])])}),256))])):(0,n.createCommentVNode)("",!0),(0,n.createElementVNode)("div",T,[ie.carts.length>0?((0,n.openBlock)(),(0,n.createElementBlock)("div",q,[(0,n.createElementVNode)("div",M,[(0,n.withDirectives)((0,n.createElementVNode)("select",{"onUpdate:modelValue":t[11]||(t[11]=function(e){return ae.discountType=e}),class:"w-[120px] h-full cursor-pointer text-sm font-client ltr:rounded-tl ltr:rounded-bl rtl:rounded-tr rtl:rounded-br appearance-none border ltr:pl-3 rtl:pr-3 text-heading border-[#EFF0F6]"},[(0,n.createElementVNode)("option",{value:ae.discountTypeEnum.PERCENTAGE},(0,n.toDisplayString)(e.$t("label.percentage")),9,L),(0,n.createElementVNode)("option",{value:ae.discountTypeEnum.FIXED},(0,n.toDisplayString)(e.$t("label.fixed")),9,z)],512),[[n.vModelSelect,ae.discountType]])]),(0,n.withDirectives)((0,n.createElementVNode)("input",{"onUpdate:modelValue":t[12]||(t[12]=function(e){return ae.discount=e}),type:"text",onKeypress:t[13]||(t[13]=function(e){return ie.floatNumber(e)}),placeholder:e.$t("label.add_discount"),class:"w-full h-full border-t border-b px-3 border-[#EFF0F6]"},null,40,H),[[n.vModelText,ae.discount]]),(0,n.createElementVNode)("button",{onClick:t[14]||(t[14]=(0,n.withModifiers)(function(){return ie.applyDiscount&&ie.applyDiscount.apply(ie,arguments)},["prevent"])),type:"submit",class:"flex-shrink-0 w-16 h-full text-sm font-medium font-client capitalize ltr:rounded-tr ltr:rounded-br rtl:rounded-tl rtl:rounded-bl text-white bg-[#008BBA]"},(0,n.toDisplayString)(e.$t("button.apply")),1)])):(0,n.createCommentVNode)("",!0),ae.discountErrorMessage?((0,n.openBlock)(),(0,n.createElementBlock)("div",j,[(0,n.createElementVNode)("span",null,(0,n.toDisplayString)(ae.discountErrorMessage),1)])):(0,n.createCommentVNode)("",!0),(0,n.createElementVNode)("ul",O,[(0,n.createElementVNode)("li",U,[(0,n.createElementVNode)("span",R,(0,n.toDisplayString)(e.$t("label.sub_total")),1),(0,n.createElementVNode)("span",Z,(0,n.toDisplayString)(ie.currencyFormat(ie.subtotal,ie.setting.site_digit_after_decimal_point,ie.setting.site_default_currency_symbol,ie.setting.site_currency_position)),1)]),(0,n.createElementVNode)("li",K,[(0,n.createElementVNode)("span",W,(0,n.toDisplayString)(e.$t("label.tax")),1),(0,n.createElementVNode)("span",G,(0,n.toDisplayString)(ie.currencyFormat(ie.totalTax,ie.setting.site_digit_after_decimal_point,ie.setting.site_default_currency_symbol,ie.setting.site_currency_position)),1)]),(0,n.createElementVNode)("li",Y,[(0,n.createElementVNode)("span",X,(0,n.toDisplayString)(e.$t("label.discount")),1),(0,n.createElementVNode)("span",J,(0,n.toDisplayString)(ie.currencyFormat(ie.posDiscount,ie.setting.site_digit_after_decimal_point,ie.setting.site_default_currency_symbol,ie.setting.site_currency_position)),1)]),(0,n.createElementVNode)("li",Q,[(0,n.createElementVNode)("span",ee,(0,n.toDisplayString)(e.$t("label.total")),1),(0,n.createElementVNode)("span",te,(0,n.toDisplayString)(ie.currencyFormat(ie.subtotal+ie.totalTax-ie.posDiscount,ie.setting.site_digit_after_decimal_point,ie.setting.site_default_currency_symbol,ie.setting.site_currency_position)),1)])]),ie.carts.length>0?((0,n.openBlock)(),(0,n.createElementBlock)("div",oe,[(0,n.createElementVNode)("button",{onClick:t[15]||(t[15]=(0,n.withModifiers)(function(){return ie.resetCart&&ie.resetCart.apply(ie,arguments)},["prevent"])),class:"capitalize text-sm font-medium leading-6 font-client w-full text-center rounded-3xl py-2 text-white bg-[#FB4E4E]"},(0,n.toDisplayString)(e.$t("button.cancel")),1),(0,n.createElementVNode)("button",{onClick:t[16]||(t[16]=(0,n.withModifiers)(function(){return ie.orderPayment&&ie.orderPayment.apply(ie,arguments)},["prevent"])),class:"capitalize text-sm font-medium leading-6 font-client w-full text-center rounded-3xl py-2 text-white bg-[#1AB759]"},(0,n.toDisplayString)(e.$t("button.order")),1)])):(0,n.createCommentVNode)("",!0)])]),(0,n.createElementVNode)("button",ne,[t[22]||(t[22]=(0,n.createElementVNode)("i",{class:"lab-fill-bag text-xl"},null,-1)),(0,n.createElementVNode)("span",re,(0,n.toDisplayString)(ie.totalProducts())+" "+(0,n.toDisplayString)(e.$t("label.products"))+" - "+(0,n.toDisplayString)(ie.currencyFormat(ie.subtotal+ie.totalTax-ie.posDiscount,ie.setting.site_digit_after_decimal_point,ie.setting.site_default_currency_symbol,ie.setting.site_currency_position)),1)]),(0,n.createVNode)(pe,{order:ae.order},null,8,["order"]),(0,n.createVNode)(me,{onOrderSubmit:ie.orderSubmit,total:ie.currencyFormat(ie.subtotal+ie.totalTax-ie.posDiscount,ie.setting.site_digit_after_decimal_point,ie.setting.site_default_currency_symbol,ie.setting.site_currency_position)},null,8,["onOrderSubmit","total"])],64)}]])},3695:(e,t,o)=>{o.d(t,{A:()=>n});const n=Object.freeze({CASH:5,CARD:10,MOBILE_BANKING:15,OTHER:20})},4331:(e,t,o)=>{o.d(t,{A:()=>n});const n=Object.freeze({WEB:5,APP:10,POS:15})},5316:(e,t,o)=>{o.d(t,{A:()=>a});class n{constructor(e){this.standards={strict:"strict",loose:"loose",html5:"html5"},this.previewBody=null,this.close=null,this.previewBodyUtilPrintBtn=null,this.selectArray=[],this.counter=0,this.settings={standard:this.standards.html5},Object.assign(this.settings,e),this.init()}init(){this.counter++,this.settings.id=`printArea_${this.counter}`;let e="";this.settings.url&&!this.settings.asyncUrl&&(e=this.settings.url);let t=this;if(this.settings.asyncUrl)return void t.settings.asyncUrl(function(e){let o=t.getPrintWindow(e);t.settings.preview?t.previewIfrmaeLoad():t.print(o)},t.settings.vue);let o=this.getPrintWindow(e);this.settings.url||this.write(o.doc),this.settings.preview?this.previewIfrmaeLoad():this.print(o)}addEvent(e,t,o){e.addEventListener?e.addEventListener(t,o,!1):e.attachEvent?e.attachEvent("on"+t,o):e["on"+t]=o}previewIfrmaeLoad(){let e=document.getElementById("vue-pirnt-nb-previewBox");if(e){let t=this,o=e.querySelector("iframe");this.settings.previewBeforeOpenCallback(),this.addEvent(o,"load",function(){t.previewBoxShow(),t.removeCanvasImg(),t.settings.previewOpenCallback()}),this.addEvent(e.querySelector(".previewBodyUtilPrintBtn"),"click",function(){t.settings.beforeOpenCallback(),t.settings.openCallback(),o.contentWindow.print(),t.settings.closeCallback()})}}removeCanvasImg(){let e=this;try{if(e.elsdom){let t=e.elsdom.querySelectorAll(".canvasImg");for(let e=0;e<t.length;e++)t[e].remove()}}catch(e){console.log(e)}}print(e){var t=this;let o=document.getElementById(this.settings.id)||e.f,n=document.getElementById(this.settings.id).contentWindow||e.f.contentWindow;t.settings.beforeOpenCallback(),t.addEvent(o,"load",function(){n.focus(),t.settings.openCallback(),n.print(),o.remove(),t.settings.closeCallback(),t.removeCanvasImg()})}write(e){e.open(),e.write(`${this.docType()}<html>${this.getHead()}${this.getBody()}</html>`),e.close()}docType(){return this.settings.standard===this.standards.html5?"<!DOCTYPE html>":`<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01${this.settings.standard===this.standards.loose?" Transitional":""}//EN" "http://www.w3.org/TR/html4/${this.settings.standard===this.standards.loose?"loose":"strict"}.dtd">`}getHead(){let e="",t="",o="";this.settings.extraHead&&this.settings.extraHead.replace(/([^,]+)/g,t=>{e+=t}),[].forEach.call(document.querySelectorAll("link"),function(e){e.href.indexOf(".css")>=0&&(t+=`<link type="text/css" rel="stylesheet" href="${e.href}" >`)});let n=document.styleSheets;if(n&&n.length>0)for(let e=0;e<n.length;e++)try{if(n[e].cssRules||n[e].rules){let t=n[e].cssRules||n[e].rules;for(let e=0;e<t.length;e++)o+=t[e].cssText}}catch(t){console.log(n[e].href+t)}return this.settings.extraCss&&this.settings.extraCss.replace(/([^,\s]+)/g,e=>{t+=`<link type="text/css" rel="stylesheet" href="${e}">`}),`<head><title>${this.settings.popTitle}</title>${e}${t}<style type="text/css">${o}</style></head>`}getBody(){let e=this.settings.ids;return e=e.replace(new RegExp("#","g"),""),this.elsdom=this.beforeHanler(document.getElementById(e)),"<body>"+this.getFormData(this.elsdom).outerHTML+"</body>"}beforeHanler(e){let t=e.querySelectorAll("canvas");for(let e=0;e<t.length;e++)if(!t[e].style.display){let o=t[e].parentNode,n=t[e].toDataURL("image/png"),r=new Image;r.className="canvasImg",r.style.display="none",r.src=n,o.appendChild(r)}return e}getFormData(e){let t=e.cloneNode(!0),o=t.querySelectorAll("input,select,textarea"),n=t.querySelectorAll(".canvasImg,canvas"),r=-1;for(let e=0;e<n.length;e++){let t=n[e].parentNode,o=n[e];"canvas"===o.tagName.toLowerCase()?t.removeChild(o):o.style.display="block"}for(let t=0;t<o.length;t++){let n=o[t],a=n.getAttribute("type"),i=o[t];if(a||(a="SELECT"===n.tagName?"select":"TEXTAREA"===n.tagName?"textarea":""),"INPUT"===n.tagName)"radio"===a||"checkbox"===a?n.checked&&i.setAttribute("checked",n.checked):(i.value=n.value,i.setAttribute("value",n.value));else if("select"===a){r++;for(let t=0;t<e.querySelectorAll("select").length;t++){let o=e.querySelectorAll("select")[t];if(!o.getAttribute("newbs")&&o.setAttribute("newbs",t),o.getAttribute("newbs")==r){let t=e.querySelectorAll("select")[r].selectedIndex;n.options[t].setAttribute("selected",!0)}}}else i.innerHTML=n.value,i.setAttribute("html",n.value)}return t}getPrintWindow(e){var t=this.Iframe(e);return{f:t,win:t.contentWindow||t,doc:t.doc}}previewBoxShow(){let e=document.getElementById("vue-pirnt-nb-previewBox");e&&(document.querySelector("html").setAttribute("style","overflow: hidden"),e.style.display="block")}previewBoxHide(){let e=document.getElementById("vue-pirnt-nb-previewBox");e&&(document.querySelector("html").setAttribute("style","overflow: visible;"),e.querySelector("iframe")&&e.querySelector("iframe").remove(),e.style.display="none")}previewBox(){let e=document.getElementById("vue-pirnt-nb-previewBox");if(e)return e.querySelector("iframe")&&e.querySelector("iframe").remove(),{close:e.querySelector(".previewClose"),previewBody:e.querySelector(".previewBody")};let t=document.createElement("div");t.setAttribute("id","vue-pirnt-nb-previewBox"),t.setAttribute("style","position: fixed;top: 0px;left: 0px;width: 100%;height: 100%;background: white;display:none"),t.style.zIndex=this.settings.zIndex;let o=document.createElement("div");o.setAttribute("class","previewHeader"),o.setAttribute("style","padding: 5px 20px;"),o.innerHTML=this.settings.previewTitle,t.appendChild(o),this.close=document.createElement("div");let n=this.close;n.setAttribute("class","previewClose"),n.setAttribute("style","position: absolute;top: 5px;right: 20px;width: 25px;height: 20px;cursor: pointer;");let r=document.createElement("div"),a=document.createElement("div");r.setAttribute("class","closeBefore"),r.setAttribute("style","position: absolute;width: 3px;height: 100%;background: #040404;transform: rotate(45deg); top: 0px;left: 50%;"),a.setAttribute("class","closeAfter"),a.setAttribute("style","position: absolute;width: 3px;height: 100%;background: #040404;transform: rotate(-45deg); top: 0px;left: 50%;"),n.appendChild(r),n.appendChild(a),o.appendChild(n),this.previewBody=document.createElement("div");let i=this.previewBody;i.setAttribute("class","previewBody"),i.setAttribute("style","display: flex;flex-direction: column; height: 100%;"),t.appendChild(i);let s=document.createElement("div");s.setAttribute("class","previewBodyUtil"),s.setAttribute("style","height: 32px;background: #474747;position: relative;"),i.appendChild(s),this.previewBodyUtilPrintBtn=document.createElement("div");let l=this.previewBodyUtilPrintBtn;return l.setAttribute("class","previewBodyUtilPrintBtn"),l.innerHTML=this.settings.previewPrintBtnLabel,l.setAttribute("style","position: absolute;padding: 2px 10px;margin-top: 3px;left: 24px;font-size: 14px;color: white;cursor: pointer;background-color: rgba(0,0,0,.12);background-image: linear-gradient(hsla(0,0%,100%,.05),hsla(0,0%,100%,0));background-clip: padding-box;border: 1px solid rgba(0,0,0,.35);border-color: rgba(0,0,0,.32) rgba(0,0,0,.38) rgba(0,0,0,.42);box-shadow: inset 0 1px 0 hsla(0,0%,100%,.05), inset 0 0 1px hsla(0,0%,100%,.15), 0 1px 0 hsla(0,0%,100%,.05);"),s.appendChild(l),document.body.appendChild(t),{close:this.close,previewBody:this.previewBody}}iframeBox(e,t){let o=document.createElement("iframe");return o.style.border="0px",o.style.position="absolute",o.style.width="0px",o.style.height="0px",o.style.right="0px",o.style.top="0px",o.setAttribute("id",e),o.setAttribute("src",t),o}Iframe(e){let t=this.settings.id;e=e||(new Date).getTime();let o=this,n=this.iframeBox(t,e);try{if(this.settings.preview){n.setAttribute("style","border: 0px;flex: 1;");let e=this.previewBox(),t=e.previewBody,r=e.close;t.appendChild(n),this.addEvent(r,"click",function(){o.previewBoxHide()})}else document.body.appendChild(n);n.doc=null,n.doc=n.contentDocument?n.contentDocument:n.contentWindow?n.contentWindow.document:n.document}catch(e){throw new Error(e+". iframes may not be supported in this browser.")}if(null==n.doc)throw new Error("Cannot find document.");return n}}var r={directiveName:"print",mounted(e,t,o){let r=t.instance,a="";var i,s,l;s="click",l=()=>{if("string"==typeof t.value)a=t.value;else{if("object"!=typeof t.value||!t.value.id)return void window.print();{a=t.value.id;let e=a.replace(new RegExp("#","g"),"");document.getElementById(e)||(console.log("id in Error"),a="")}}c()},(i=e).addEventListener?i.addEventListener(s,l,!1):i.attachEvent?i.attachEvent("on"+s,l):i["on"+s]=l;const c=()=>{new n({ids:a,vue:r,url:t.value.url,standard:"",extraHead:t.value.extraHead,extraCss:t.value.extraCss,zIndex:t.value.zIndex||20002,previewTitle:t.value.previewTitle||"打印预览",previewPrintBtnLabel:t.value.previewPrintBtnLabel||"打印",popTitle:t.value.popTitle,preview:t.value.preview||!1,asyncUrl:t.value.asyncUrl,previewBeforeOpenCallback(){t.value.previewBeforeOpenCallback&&t.value.previewBeforeOpenCallback(r)},previewOpenCallback(){t.value.previewOpenCallback&&t.value.previewOpenCallback(r)},openCallback(){t.value.openCallback&&t.value.openCallback(r)},closeCallback(){t.value.closeCallback&&t.value.closeCallback(r)},beforeOpenCallback(){t.value.beforeOpenCallback&&t.value.beforeOpenCallback(r)}})}},install:function(e){e.directive("print",r)}};const a=r}}]);
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: premium320.web-hosting.com
Server IP: 66.29.153.54
PHP Version: 8.2.29
Server Software: LiteSpeed
System: Linux premium320.web-hosting.com 4.18.0-553.50.1.lve.el8.x86_64 #1 SMP Thu Apr 17 19:10:24 UTC 2025 x86_64
HDD Total: 97.87 GB
HDD Free: 76.87 GB
Domains on IP: N/A (Requires external lookup)
System Features
Safe Mode:
Off
disable_functions:
None
allow_url_fopen:
On
allow_url_include:
Off
magic_quotes_gpc:
Off
register_globals:
Off
open_basedir:
None
cURL:
Enabled
ZipArchive:
Enabled
MySQLi:
Enabled
PDO:
Enabled
wget:
Yes
curl (cmd):
Yes
perl:
Yes
python:
Yes (py3)
gcc:
Yes
pkexec:
No
git:
Yes
User Info
Username: aoneqssk
User ID (UID): 1285
Group ID (GID): 1290
Script Owner UID: 1285
Current Dir Owner: 1285