diff --git a/README.md b/README.md index 4ccdaff1..a3ba8516 100644 --- a/README.md +++ b/README.md @@ -3,11 +3,11 @@ **Donate Link:** http://tareq.co/donate/ **Tags:** WooCommerce POS, point of sale, free pos, pos plugin, woocommerce point of sale **Requires at least:** 5.4 -**Tested up to:** 6.4.2 +**Tested up to:** 6.5.3 **WC requires at least:** 5.0.0 -**WC tested up to:** 8.4.0 -**Requires PHP:** 7.2 -**Stable tag:** 1.2.7 +**WC tested up to:** 8.9.2 +**Requires PHP:** 7.4 +**Stable tag:** 1.2.8 **License:** GPLv2 or later **License URI:** http://www.gnu.org/licenses/gpl-2.0.html @@ -60,6 +60,11 @@ No FAQ ## Changelog ## +### v1.2.8 -> 05 June, 2024 ### +- **Feature:** WooCommerce Coupon API integration for cart discount +- **Enhancement:** Added support for WooCommerce customised order numbers by third-party plugins +- **Fix:** Blurry numbers on print receipt + ### v1.2.7 -> 27 December, 2023 ### - **Enhancement:** Tax calculation implementation based on discounts and fees instead of base price of products diff --git a/assets/css/frontend.css b/assets/css/frontend.css index 2899d078..42bd6e76 100644 --- a/assets/css/frontend.css +++ b/assets/css/frontend.css @@ -24,7 +24,7 @@ /*!****************************************************************************************************************************************************************************************************************************************************************************************************************!*\ !*** css ./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/less-loader/dist/cjs.js!./node_modules/vue-loader/lib/index.js??vue-loader-options!./assets/src/frontend/components/PrintReceiptHtml.vue?vue&type=style&index=0&id=2db58d4b&lang=less& ***! - \****************************************************************************************************************************************************************************************************************************************************************************************************************/[v-cloak]{display:none}@media print{@page{margin:.5cm}.wepos-modal-content,body *{visibility:hidden}.wepos-checkout-print-wrapper{color:#000;display:inline-block!important;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.wepos-checkout-print-wrapper *{visibility:visible}.wepos-checkout-print-wrapper{left:0;position:absolute;top:0;width:100%}.wepos-checkout-print-wrapper .footer,.wepos-checkout-print-wrapper .header{padding:5px;text-align:center}.wepos-checkout-print-wrapper .order-info{border-bottom:1px dashed #b7b7b7;margin:10px 0;padding:10px 5px}.wepos-checkout-print-wrapper .content{padding:10px}.wepos-checkout-print-wrapper .content table.sale-summary{border-collapse:collapse;width:100%}.wepos-checkout-print-wrapper .content table.sale-summary tbody tr td{font-size:14px;padding:8px 10px}.wepos-checkout-print-wrapper .content table.sale-summary tbody tr td.name{font-weight:700;width:60%}.wepos-checkout-print-wrapper .content table.sale-summary tbody tr td.name .attribute{margin-top:2px}.wepos-checkout-print-wrapper .content table.sale-summary tbody tr td.name .attribute ul{list-style:none;margin:0;padding:0}.wepos-checkout-print-wrapper .content table.sale-summary tbody tr td.name .attribute ul li{display:inline-block;font-size:12px;font-weight:400;margin-right:5px}.wepos-checkout-print-wrapper .content table.sale-summary tbody tr td.name .attribute ul li .attr_name{color:#758598}.wepos-checkout-print-wrapper .content table.sale-summary tbody tr td.quantity{color:#758598;text-align:center;width:12%}.wepos-checkout-print-wrapper .content table.sale-summary tbody tr td.price{color:#758598;text-align:right}.wepos-checkout-print-wrapper .content table.sale-summary tbody tr td.price span{color:#758598}.wepos-checkout-print-wrapper .content table.sale-summary tbody tr td.price span.regular-price{color:#9095a5;font-size:12px;padding-right:3px;text-decoration:line-through}.wepos-checkout-print-wrapper .content table.sale-summary tbody tr.cart-meta-data td .metadata{color:#758598;font-size:13px;font-weight:400;margin-left:6px}.wepos-checkout-print-wrapper .content table.sale-summary tbody tr.divider{border-bottom:1px dashed #b7b7b7;color:#b5b5b5}} + \****************************************************************************************************************************************************************************************************************************************************************************************************************/[v-cloak]{display:none}@media print{@page{margin:.5cm}.wepos-modal-content,body *{visibility:hidden}.wepos-checkout-print-wrapper{color:#000;display:inline-block!important;font-family:Helvetica,Verdana,Calibri,Arial,Franklin Gothic,sans-serif!important}.wepos-checkout-print-wrapper *{visibility:visible}.wepos-checkout-print-wrapper{left:0;position:absolute;top:0;width:100%}.wepos-checkout-print-wrapper .footer,.wepos-checkout-print-wrapper .header{padding:5px;text-align:center}.wepos-checkout-print-wrapper .order-info{border-bottom:1px dashed #b7b7b7;margin:10px 0;padding:10px 5px}.wepos-checkout-print-wrapper .content{padding:10px}.wepos-checkout-print-wrapper .content table.sale-summary{border-collapse:collapse;width:100%}.wepos-checkout-print-wrapper .content table.sale-summary tbody tr td{font-size:14px;padding:8px 10px}.wepos-checkout-print-wrapper .content table.sale-summary tbody tr td.name{font-weight:700;width:60%}.wepos-checkout-print-wrapper .content table.sale-summary tbody tr td.name .tax-info{display:block;font-size:13px;font-weight:400}.wepos-checkout-print-wrapper .content table.sale-summary tbody tr td.name .attribute{margin-top:2px}.wepos-checkout-print-wrapper .content table.sale-summary tbody tr td.name .attribute ul{list-style:none;margin:0;padding:0}.wepos-checkout-print-wrapper .content table.sale-summary tbody tr td.name .attribute ul li{display:inline-block;font-size:12px;font-weight:400;margin-right:5px}.wepos-checkout-print-wrapper .content table.sale-summary tbody tr td.name .attribute ul li .attr_name{color:#758598}.wepos-checkout-print-wrapper .content table.sale-summary tbody tr td.quantity{color:#758598;text-align:center;width:12%}.wepos-checkout-print-wrapper .content table.sale-summary tbody tr td.price{color:#758598;text-align:right}.wepos-checkout-print-wrapper .content table.sale-summary tbody tr td.price span{color:#758598}.wepos-checkout-print-wrapper .content table.sale-summary tbody tr td.price span.regular-price{color:#9095a5;font-size:12px;padding-right:3px;text-decoration:line-through}.wepos-checkout-print-wrapper .content table.sale-summary tbody tr.cart-meta-data td .metadata{color:#758598;font-size:13px;font-weight:400;margin-left:6px}.wepos-checkout-print-wrapper .content table.sale-summary tbody tr.divider{border-bottom:1px dashed #b7b7b7;color:#b5b5b5}} /*!************************************************************************************************************************************************************************************************************************************************************************************************************!*\ !*** css ./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/less-loader/dist/cjs.js!./node_modules/vue-loader/lib/index.js??vue-loader-options!./assets/src/frontend/components/CustomerNote.vue?vue&type=style&index=0&id=4073e2a5&lang=less& ***! diff --git a/assets/css/frontend.min.css b/assets/css/frontend.min.css index fa21faef..c88216ae 100644 --- a/assets/css/frontend.min.css +++ b/assets/css/frontend.min.css @@ -1 +1 @@ -.overlay{background:#000;background-color:#000;filter:alpha(opacity=20);height:100%;left:0;opacity:.25;position:fixed;top:0;width:100%;z-index:99}.variation-attribute-wrapper{padding:10px 20px 0}.variation-attribute-wrapper .attribute{margin-bottom:15px}.variation-attribute-wrapper .attribute p{font-size:14px;font-weight:700;margin:0 0 5px;padding:0;text-align:left}.variation-attribute-wrapper .attribute .options{text-align:left}.variation-attribute-wrapper .attribute .options label{display:inline-block}.variation-attribute-wrapper .attribute .options label input[type=radio]{-webkit-appearance:none;display:none}.variation-attribute-wrapper .attribute .options label input[type=radio]:checked+.box{background:#1abc9c;border:1px solid #1abc9c;color:#fff}.variation-attribute-wrapper .attribute .options label .box{border:1px solid #e0e5ea;border-radius:3px;cursor:pointer;font-size:13px;margin-bottom:5px;margin-right:5px;padding:6px 10px}.add-variation-btn{background:#3b80f4;border:none;border-radius:3px;color:#fff;cursor:pointer;font-size:14px;padding:10px;width:150px}.add-variation-btn:active,.add-variation-btn:focus{outline:none}.add-variation-btn:disabled{background:#76a2ed}.wepos-new-customer-form{padding:20px}.wepos-new-customer-form .customer-country.multiselect--active .multiselect__input,.wepos-new-customer-form .customer-state.multiselect--active .multiselect__input{padding:0 3px!important}.wepos-new-customer-form button.add-new-customer-btn:disabled{background:#76a2ed;border:1px solid #76a2ed;cursor:no-drop!important}aside.vue-keyboard .vue-keyboard-row[data-keys="3"]{border-bottom:1px solid #eceef0}aside.vue-keyboard .vue-keyboard-row[data-keys="3"] button{border:none;border-right:1px solid #eceef0;color:#212121;cursor:pointer;display:inline-block;font-size:24px;height:60px;padding:5px 20px;text-align:center;width:80px}aside.vue-keyboard .vue-keyboard-row[data-keys="3"] button:last-child{border-right:none}aside.vue-keyboard .vue-keyboard-row[data-keys="3"] button span.keypord-icon:before{font-weight:700}aside.vue-keyboard .vue-keyboard-row[data-keys="3"]:first-child{border-top:1px solid #eceef0}aside.vue-keyboard .vue-keyboard-row[data-keys="2"] button{background:#3b80f4;border:none;border-right:1px solid #fff;color:#fff;font-size:14px;padding:15px;width:50%}aside.vue-keyboard .vue-keyboard-row[data-keys="2"] button:last-child{border-right:none}aside.vue-keyboard .vue-keyboard-row[data-keys="2"] button span.keypord-icon:before{font-weight:700}.wepos-fee-keypad-wrap{display:inline-block;float:left}.fee-keypad .tooltip-inner input{border:none;font-size:20px;height:25px;padding:13px;width:87%}.fee-keypad .tooltip-inner button[data-action=flat],.fee-keypad .tooltip-inner button[data-action=percent]{cursor:pointer}#wepos-print-receipt{display:inline}[v-cloak]{display:none}@media print{@page{margin:.5cm}.wepos-modal-content,body *{visibility:hidden}.wepos-checkout-print-wrapper{color:#000;display:inline-block!important;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.wepos-checkout-print-wrapper *{visibility:visible}.wepos-checkout-print-wrapper{left:0;position:absolute;top:0;width:100%}.wepos-checkout-print-wrapper .footer,.wepos-checkout-print-wrapper .header{padding:5px;text-align:center}.wepos-checkout-print-wrapper .order-info{border-bottom:1px dashed #b7b7b7;margin:10px 0;padding:10px 5px}.wepos-checkout-print-wrapper .content{padding:10px}.wepos-checkout-print-wrapper .content table.sale-summary{border-collapse:collapse;width:100%}.wepos-checkout-print-wrapper .content table.sale-summary tbody tr td{font-size:14px;padding:8px 10px}.wepos-checkout-print-wrapper .content table.sale-summary tbody tr td.name{font-weight:700;width:60%}.wepos-checkout-print-wrapper .content table.sale-summary tbody tr td.name .attribute{margin-top:2px}.wepos-checkout-print-wrapper .content table.sale-summary tbody tr td.name .attribute ul{list-style:none;margin:0;padding:0}.wepos-checkout-print-wrapper .content table.sale-summary tbody tr td.name .attribute ul li{display:inline-block;font-size:12px;font-weight:400;margin-right:5px}.wepos-checkout-print-wrapper .content table.sale-summary tbody tr td.name .attribute ul li .attr_name{color:#758598}.wepos-checkout-print-wrapper .content table.sale-summary tbody tr td.quantity{color:#758598;text-align:center;width:12%}.wepos-checkout-print-wrapper .content table.sale-summary tbody tr td.price{color:#758598;text-align:right}.wepos-checkout-print-wrapper .content table.sale-summary tbody tr td.price span{color:#758598}.wepos-checkout-print-wrapper .content table.sale-summary tbody tr td.price span.regular-price{color:#9095a5;font-size:12px;padding-right:3px;text-decoration:line-through}.wepos-checkout-print-wrapper .content table.sale-summary tbody tr.cart-meta-data td .metadata{color:#758598;font-size:13px;font-weight:400;margin-left:6px}.wepos-checkout-print-wrapper .content table.sale-summary tbody tr.divider{border-bottom:1px dashed #b7b7b7;color:#b5b5b5}}.wepos-custom-note-wrap{display:inline-block;float:left}.customer-note .tooltip-inner{box-sizing:border-box;padding:10px;width:500px}.customer-note .tooltip-inner form{text-align:right}.customer-note .tooltip-inner form textarea{border:1px solid #e9edf0;border-radius:3px;box-shadow:0 3px 15px 0 rgba(0,0,0,.02);box-sizing:border-box;font-size:13px;height:100px;line-height:10px;margin-bottom:10px;padding:10px;width:100%}.customer-note .tooltip-inner form textarea:focus{outline:none}.customer-note .tooltip-inner form button.add-note-btn{background:#3b80f4;border:1px solid #3b80f4;border-radius:3px;color:#fff;cursor:pointer;font-size:14px;padding:6px 25px}.customer-note .tooltip-inner form button.add-note-btn:disabled{background:#76a2ed;border-color:#76a2ed;cursor:no-drop}#wepos-main{display:flex;padding:20px}#wepos-main .content-product{flex:2;margin-right:20px}#wepos-main .content-product .top-panel{margin-bottom:20px}#wepos-main .content-product .top-panel .search-bar{float:left;margin-right:2%;width:56%}#wepos-main .content-product .top-panel .search-bar .search-box{position:relative}#wepos-main .content-product .top-panel .search-bar .search-box input#product-search{border:1px solid #e9edf0;border-radius:3px;box-shadow:0 3px 15px 0 rgba(0,0,0,.02);box-sizing:border-box;font-size:14px;height:35px;line-height:10px;padding-left:32px;padding-right:120px;width:100%}#wepos-main .content-product .top-panel .search-bar .search-box input#product-search::placeholder{color:#999dac;font-size:13px}#wepos-main .content-product .top-panel .search-bar .search-box input#product-search:-ms-input-placeholder{color:#999dac;font-size:13px}#wepos-main .content-product .top-panel .search-bar .search-box input#product-search::-ms-input-placeholder{color:#999dac;font-size:13px}#wepos-main .content-product .top-panel .search-bar .search-box input#product-search:focus{outline:none}#wepos-main .content-product .top-panel .search-bar .search-box span.search-icon{color:#3b80f4;height:10px;left:10px;position:absolute;top:8px}#wepos-main .content-product .top-panel .search-bar .search-box span.search-icon:before{font-size:14px}#wepos-main .content-product .top-panel .search-bar .search-box .search-type{position:absolute;right:0;top:0}#wepos-main .content-product .top-panel .search-bar .search-box .search-type a{box-sizing:border-box;color:#bdc0c9;display:inline-block;font-size:13px;height:35px;line-height:14px;margin-left:-2px;padding:10px;text-decoration:none}#wepos-main .content-product .top-panel .search-bar .search-box .search-type a.active{background:#3b80f4;color:#fff}#wepos-main .content-product .top-panel .search-bar .search-box .search-type a:first-child{border-left:1px solid #e9ebed}#wepos-main .content-product .top-panel .search-bar .search-box .search-type a:last-child{border-bottom-right-radius:3px;border-top-right-radius:3px}#wepos-main .content-product .top-panel .search-bar .search-box .search-result{background:#fff;border:1px solid #e9edf0;border-bottom-left-radius:3px;border-bottom-right-radius:3px;border-top:none;box-shadow:0 30px 45px -10px rgba(0,0,0,.2);box-sizing:border-box;position:absolute;width:100%;z-index:999}#wepos-main .content-product .top-panel .search-bar .search-box .search-result .no-data-found{color:#758598;padding:20px;text-align:center}#wepos-main .content-product .top-panel .search-bar .search-box .search-result ul{list-style-type:none;margin:0;max-height:300px;overflow:scroll;padding:0}#wepos-main .content-product .top-panel .search-bar .search-box .search-result ul li a{border-bottom:1px solid #e9edf0;color:#212121;display:block;padding:8px 10px;text-decoration:none}#wepos-main .content-product .top-panel .search-bar .search-box .search-result ul li a span{color:#758598;font-size:11px;margin-left:10px}#wepos-main .content-product .top-panel .search-bar .search-box .search-result ul li a span.action{visibility:hidden}#wepos-main .content-product .top-panel .search-bar .search-box .search-result ul li a span.action:before{font-size:12px}#wepos-main .content-product .top-panel .search-bar .search-box .search-result ul li a:hover span.action{visibility:visible}#wepos-main .content-product .top-panel .search-bar .search-box .search-result ul li:last-child a{border-bottom:none}#wepos-main .content-product .top-panel .search-bar .search-box .search-result ul li.selected{background:#f6f7fb}#wepos-main .content-product .top-panel .search-bar .search-box .search-result ul li.selected a span.action{visibility:visible}#wepos-main .content-product .top-panel .search-bar .search-box .search-result .suggession{background:#f6f7fb;border-top:1px solid #eceef0;color:#999dac;font-size:11px;padding:12px}#wepos-main .content-product .top-panel .search-bar .search-box .search-result .suggession span.term{margin-right:15px}#wepos-main .content-product .top-panel .search-bar .search-box .search-result .suggession span.term span:before{color:#5d5d5d;font-size:9px;margin-right:2px}#wepos-main .content-product .top-panel .search-bar .search-box .search-result .suggession span.term strong{color:#5d5d5d;margin-right:2px}#wepos-main .content-product .top-panel .category{float:left;margin-right:2%;position:relative;width:26%}#wepos-main .content-product .top-panel .category select#product-category{-moz-appearance:none;-webkit-appearance:none;appearance:none;background:#fff;border:1px solid #e9edf0;border-radius:3px;box-shadow:0 3px 15px 0 rgba(0,0,0,.02);box-sizing:border-box;color:#758598;font-size:13px;padding:9px;width:100%}#wepos-main .content-product .top-panel .category select#product-category:focus{outline:none}#wepos-main .content-product .top-panel .category span.select-arrow{position:absolute;right:9px;top:9px}#wepos-main .content-product .top-panel .category span.select-arrow:before{color:#758598;font-size:13px;margin-left:0}#wepos-main .content-product .top-panel .toggle-view{float:left;text-align:right;width:14%}#wepos-main .content-product .top-panel .toggle-view .toggle-icon{background:#fff;border:1px solid #e9edf0;box-shadow:0 3px 15px 0 rgba(0,0,0,.02);color:#bdc0c9;cursor:pointer;display:inline-block;padding:8px 10px}#wepos-main .content-product .top-panel .toggle-view .toggle-icon.active{color:#3b80f4}#wepos-main .content-product .top-panel .toggle-view .toggle-icon:before{font-size:13px;margin-left:0}#wepos-main .content-product .top-panel .toggle-view .toggle-icon.list-view{border-right:none;margin-right:-4px}#wepos-main .content-product .breadcrumb{background:#fff;box-shadow:0 3px 15px 0 rgba(0,0,0,.02);margin-bottom:20px;padding:8px 12px;position:relative}#wepos-main .content-product .breadcrumb span.close-breadcrumb{color:#9b59b6;cursor:pointer;position:absolute;right:15px;top:5px}#wepos-main .content-product .breadcrumb span.close-breadcrumb:before{font-size:9px}#wepos-main .content-product .breadcrumb ul{line-height:16px;margin:0;padding:0}#wepos-main .content-product .breadcrumb ul li{display:inline-block}#wepos-main .content-product .breadcrumb ul li:after{color:#758598;content:"\f10b";font-family:Flaticon;font-size:9px;margin-left:7px;margin-right:4px}#wepos-main .content-product .breadcrumb ul li:last-child:after{content:""}#wepos-main .content-product .breadcrumb ul li a{color:#9b59b6;font-size:13px;text-decoration:none}#wepos-main .content-product .items-wrapper.grid{display:flex;flex-flow:row wrap;height:84.9vh;justify-content:flex-start;margin:0 -10px;overflow:auto}#wepos-main .content-product .items-wrapper.grid .item{box-sizing:border-box;flex-basis:20%;-ms-flex:auto;margin-bottom:20px;padding:0 10px;text-align:center}#wepos-main .content-product .items-wrapper.grid .item:focus{outline:none}#wepos-main .content-product .items-wrapper.grid .item .item-wrap{background:#fff;cursor:pointer;margin-bottom:-2px;position:relative}#wepos-main .content-product .items-wrapper.grid .item .item-wrap:focus{-webkit-appearance:none;outline:none}#wepos-main .content-product .items-wrapper.grid .item .item-wrap img{width:100%}#wepos-main .content-product .items-wrapper.grid .item .item-wrap .title{border-top:1px solid #e9edf0;color:#212121;font-size:13px;margin-top:-3px;padding:10px 5px}#wepos-main .content-product .items-wrapper.grid .item .item-wrap .add-product-icon{background:rgba(0,0,0,.3);height:100%;position:absolute;right:0;top:0;visibility:hidden;width:100%}#wepos-main .content-product .items-wrapper.grid .item .item-wrap .add-product-icon:before{color:#fff;display:inline-block;font-size:35px;font-weight:400;margin-top:40%;text-shadow:1px 1px 1px rgba(0,0,0,.5)}#wepos-main .content-product .items-wrapper.grid .item .item-wrap:hover .add-product-icon{visibility:visible}#wepos-main .content-product .items-wrapper.grid .item .disabled{border:1px solid #ffcbcb;cursor:not-allowed;opacity:.4}#wepos-main .content-product .items-wrapper.list{height:84.9vh;overflow:auto}#wepos-main .content-product .items-wrapper.list .item .item-wrap{background:#fff;border-radius:3px;box-shadow:0 3px 15px 0 rgba(0,0,0,.02);cursor:pointer;margin-bottom:20px;overflow:hidden;position:relative}#wepos-main .content-product .items-wrapper.list .item .item-wrap .img{border-right:1px solid #f0f2f4;float:left;height:80px;margin-right:20px;width:80px}#wepos-main .content-product .items-wrapper.list .item .item-wrap .img img{height:100%;width:100%}#wepos-main .content-product .items-wrapper.list .item .item-wrap .title{float:left;font-size:14px;font-weight:700;height:100%;height:44px;left:100px;margin-top:-22px;max-width:78%;position:absolute;top:40px}#wepos-main .content-product .items-wrapper.list .item .item-wrap .title .product-name{margin-bottom:8px}#wepos-main .content-product .items-wrapper.list .item .item-wrap .title ul.meta{font-size:13px;font-weight:400;list-style:none;margin:0;padding:0}#wepos-main .content-product .items-wrapper.list .item .item-wrap .title ul.meta li{display:inline-block}#wepos-main .content-product .items-wrapper.list .item .item-wrap .title ul.meta li .label{color:#758598;margin-right:3px}#wepos-main .content-product .items-wrapper.list .item .item-wrap .title ul.meta li .value del{color:#9095a5;margin-right:3px}#wepos-main .content-product .items-wrapper.list .item .item-wrap .title ul.meta li:after{color:#e9ebed;content:"|";display:inline-block;margin:0 7px}#wepos-main .content-product .items-wrapper.list .item .item-wrap .title ul.meta li:last-child:after{content:""}#wepos-main .content-product .items-wrapper.list .item .item-wrap .add-product-icon{position:absolute;right:3%;top:35%}#wepos-main .content-product .items-wrapper.list .item .item-wrap .add-product-icon:before{color:#1a9ed4;font-weight:400}#wepos-main .content-product .items-wrapper .product-loading{color:#c6cace;display:block;font-size:16px;padding:10px;position:relative;text-align:center;width:100%}#wepos-main .content-product .items-wrapper .no-product-found{margin:auto 0;text-align:center;vertical-align:middle;width:100%}#wepos-main .content-product .items-wrapper .no-product-found p{color:#c6cace;font-size:18px}#wepos-main .content-cart{flex:1.3;height:94.5vh}#wepos-main .content-cart .top-panel{display:flex;margin-bottom:20px}#wepos-main .content-cart .top-panel .customer-search-box{flex:7;position:relative}#wepos-main .content-cart .top-panel .customer-search-box input#customer-search{border:1px solid #e9edf0;border-radius:3px;box-shadow:0 3px 15px 0 rgba(0,0,0,.02);box-sizing:border-box;font-size:14px;height:33px;height:35px;line-height:10px;padding:10px 10px 10px 35px;width:100%}#wepos-main .content-cart .top-panel .customer-search-box input#customer-search::placeholder{color:#999dac;font-size:13px}#wepos-main .content-cart .top-panel .customer-search-box input#customer-search:-ms-input-placeholder{color:#999dac;font-size:13px}#wepos-main .content-cart .top-panel .customer-search-box input#customer-search::-ms-input-placeholder{color:#999dac;font-size:13px}#wepos-main .content-cart .top-panel .customer-search-box input#customer-search:focus{outline:none}#wepos-main .content-cart .top-panel .customer-search-box span.add-new-customer{position:absolute;right:10px;top:9px}#wepos-main .content-cart .top-panel .customer-search-box span.add-new-customer:before{color:#bdc0c9;cursor:pointer;font-size:15px}#wepos-main .content-cart .top-panel .customer-search-box .search-result{background:#fff;border:1px solid #e9edf0;border-bottom-left-radius:3px;border-bottom-right-radius:3px;border-top:none;box-shadow:0 30px 45px -10px rgba(0,0,0,.2);box-sizing:border-box;position:absolute;width:100%;z-index:99}#wepos-main .content-cart .top-panel .customer-search-box .search-result .no-data-found{color:#758598;padding:20px;text-align:center}#wepos-main .content-cart .top-panel .customer-search-box .search-result ul{list-style-type:none;margin:0;max-height:300px;overflow:scroll;padding:0}#wepos-main .content-cart .top-panel .customer-search-box .search-result ul li a{border-bottom:1px solid #e9edf0;color:#212121;display:block;padding:8px 10px;text-decoration:none}#wepos-main .content-cart .top-panel .customer-search-box .search-result ul li a span{color:#758598;font-size:13px;margin-left:10px}#wepos-main .content-cart .top-panel .customer-search-box .search-result ul li a span.avatar img{border-radius:20px;width:20px}#wepos-main .content-cart .top-panel .customer-search-box .search-result ul li a span.name{color:#212121;font-size:14px;line-height:18px;margin-left:6px}#wepos-main .content-cart .top-panel .customer-search-box .search-result ul li a span.action{visibility:hidden}#wepos-main .content-cart .top-panel .customer-search-box .search-result ul li a span.action:before{font-size:12px}#wepos-main .content-cart .top-panel .customer-search-box .search-result ul li a:hover span.action{visibility:visible}#wepos-main .content-cart .top-panel .customer-search-box .search-result ul li:last-child a{border-bottom:none}#wepos-main .content-cart .top-panel .customer-search-box .search-result ul li.selected{background:#f6f7fb}#wepos-main .content-cart .top-panel .customer-search-box .search-result ul li.selected a span.action{visibility:visible}#wepos-main .content-cart .top-panel .customer-search-box .search-result .suggession{background:#f6f7fb;border-top:1px solid #eceef0;color:#999dac;font-size:11px;padding:12px}#wepos-main .content-cart .top-panel .customer-search-box .search-result .suggession span.term{margin-right:15px}#wepos-main .content-cart .top-panel .customer-search-box .search-result .suggession span.term span:before{color:#5d5d5d;font-size:9px;margin-right:2px}#wepos-main .content-cart .top-panel .customer-search-box .search-result .suggession span.term strong{color:#5d5d5d;margin-right:2px}#wepos-main .content-cart .top-panel .customer-search-box svg.customer-icon{left:10px;position:absolute;top:8px}#wepos-main .content-cart .top-panel .action{flex:1}#wepos-main .content-cart .top-panel .action .more-options{text-align:right}#wepos-main .content-cart .top-panel .action .more-options span.more-icon:before{color:#bdc0c9;font-size:16px}#wepos-main .content-cart .cart-panel{background:#fff;border-radius:3px;box-shadow:0 3px 15px 0 rgba(0,0,0,.02);display:flex;flex-flow:column wrap;height:90%;position:relative}#wepos-main .content-cart .cart-panel .cart-calculation{flex-grow:0;width:100%}#wepos-main .content-cart .cart-panel .cart-calculation table.cart-total-table{border-collapse:collapse;width:100%}#wepos-main .content-cart .cart-panel .cart-calculation table.cart-total-table tbody tr{border-bottom:1px solid #eceef0;display:table-row;height:35px;line-height:20px}#wepos-main .content-cart .cart-panel .cart-calculation table.cart-total-table tbody tr:first-child{border-top:1px solid #eceef0}#wepos-main .content-cart .cart-panel .cart-calculation table.cart-total-table tbody tr:last-child{border-bottom:none}#wepos-main .content-cart .cart-panel .cart-calculation table.cart-total-table tbody tr:nth-child(odd){background:#fafbfe}#wepos-main .content-cart .cart-panel .cart-calculation table.cart-total-table tbody tr td{font-weight:700;line-height:20px;padding:9px 12px}#wepos-main .content-cart .cart-panel .cart-calculation table.cart-total-table tbody tr td:last-child{text-align:right}#wepos-main .content-cart .cart-panel .cart-calculation table.cart-total-table tbody tr td.label{width:45%}#wepos-main .content-cart .cart-panel .cart-calculation table.cart-total-table tbody tr td.price{text-align:right;width:45%}#wepos-main .content-cart .cart-panel .cart-calculation table.cart-total-table tbody tr td.action{width:6%}#wepos-main .content-cart .cart-panel .cart-calculation table.cart-total-table tbody tr td.action span:before{background:#bdc0c9;border:none;border-radius:50px;color:#fff;cursor:pointer;font-size:7px;padding:5px}#wepos-main .content-cart .cart-panel .cart-calculation table.cart-total-table tbody tr td.action span:hover:before{background:#e9485e;border:none;color:#fff}#wepos-main .content-cart .cart-panel .cart-calculation table.cart-total-table tbody tr.cart-action td{text-align:left}#wepos-main .content-cart .cart-panel .cart-calculation table.cart-total-table tbody tr.cart-action td a{background:#fff;border:1px solid #e0e5ea;border-radius:3px;color:#3b80f4;font-size:12px;margin-right:5px;padding:5px 8px;text-decoration:none}#wepos-main .content-cart .cart-panel .cart-calculation table.cart-total-table tbody tr.cart-meta-data td.label span.name{color:#758598;font-size:12px;font-weight:400;margin-left:5px}#wepos-main .content-cart .cart-panel .cart-calculation table.cart-total-table tbody tr.cart-meta-data td.label label{font-weight:400;margin-right:5px}#wepos-main .content-cart .cart-panel .cart-calculation table.cart-total-table tbody tr.cart-meta-data td.label .fee-name{width:15%}#wepos-main .content-cart .cart-panel .cart-calculation table.cart-total-table tbody tr.cart-meta-data td.label .fee-amount{margin-right:5px;width:15%}#wepos-main .content-cart .cart-panel .cart-calculation table.cart-total-table tbody tr.cart-meta-data td.label select.fee-tax-class{background:#fff;border:1px solid #e9ebed;border-radius:3px;height:24px;padding:5px;width:22%}#wepos-main .content-cart .cart-panel .cart-calculation table.cart-total-table tbody tr.cart-meta-data td.label select.fee-tax-class:focus{outline:none}#wepos-main .content-cart .cart-panel .cart-calculation table.cart-total-table tbody tr.cart-meta-data td input[type=number],#wepos-main .content-cart .cart-panel .cart-calculation table.cart-total-table tbody tr.cart-meta-data td input[type=text]{border:1px solid #eceef0;border-radius:3px;padding:5px 8px;width:50%}#wepos-main .content-cart .cart-panel .cart-calculation table.cart-total-table tbody tr.cart-meta-data td input[type=number]:focus,#wepos-main .content-cart .cart-panel .cart-calculation table.cart-total-table tbody tr.cart-meta-data td input[type=text]:focus{-webkit-appearance:none;outline:none}#wepos-main .content-cart .cart-panel .cart-calculation table.cart-total-table tbody tr.cart-meta-data td input[type=number]::placeholder,#wepos-main .content-cart .cart-panel .cart-calculation table.cart-total-table tbody tr.cart-meta-data td input[type=text]::placeholder{color:#999dac;font-size:13px}#wepos-main .content-cart .cart-panel .cart-calculation table.cart-total-table tbody tr.cart-meta-data td input[type=number]:-ms-input-placeholder,#wepos-main .content-cart .cart-panel .cart-calculation table.cart-total-table tbody tr.cart-meta-data td input[type=text]:-ms-input-placeholder{color:#999dac;font-size:13px}#wepos-main .content-cart .cart-panel .cart-calculation table.cart-total-table tbody tr.cart-meta-data td input[type=number]::-ms-input-placeholder,#wepos-main .content-cart .cart-panel .cart-calculation table.cart-total-table tbody tr.cart-meta-data td input[type=text]::-ms-input-placeholder{color:#999dac;font-size:13px}#wepos-main .content-cart .cart-panel .cart-calculation table.cart-total-table tbody tr.cart-meta-data td button{background:#3b80f4;border:1px solid #3b80f4;border-radius:3px;color:#fff;cursor:pointer;margin-left:5px;padding:5px 8px}#wepos-main .content-cart .cart-panel .cart-calculation table.cart-total-table tbody tr.cart-meta-data td button.cancel{background:#fff;border:1px solid #afafaf;color:#222}#wepos-main .content-cart .cart-panel .cart-calculation table.cart-total-table tbody tr.cart-meta-data td button:disabled{background:#76a2ed;border-color:#76a2ed}#wepos-main .content-cart .cart-panel .cart-calculation table.cart-total-table tbody tr.note .note-text{font-weight:400}#wepos-main .content-cart .cart-panel .cart-calculation table.cart-total-table tbody tr.pay-now{background:#1abc9c;color:#fff;cursor:pointer;font-size:16px}#wepos-main .content-cart .cart-panel .cart-calculation table.cart-total-table tbody tr.pay-now td{padding:18px 10px 18px 12px}#wepos-main .content-cart .cart-panel .cart-calculation table.cart-total-table tbody tr.pay-now td.amount{text-align:right}#wepos-main .content-cart .cart-panel .cart-calculation table.cart-total-table tbody tr.pay-now td.icon{line-height:25px;padding:0 5px;text-align:left}#wepos-main .content-cart .cart-panel .cart-content{flex:5;overflow-x:scroll}#wepos-main .content-cart .cart-panel .cart-content table.cart-table{border-collapse:collapse;width:100%}#wepos-main .content-cart .cart-panel .cart-content table.cart-table thead tr{border-bottom:1px solid #eceef0;box-shadow:0 3px 15px 0 rgba(0,0,0,.04);color:#3b80f4;font-size:13px;text-align:left}#wepos-main .content-cart .cart-panel .cart-content table.cart-table thead tr th{line-height:19px;padding:8px 12px}#wepos-main .content-cart .cart-panel .cart-content table.cart-table tbody tr{border-bottom:1px solid #eceef0;display:table-row;height:35px;line-height:20px}#wepos-main .content-cart .cart-panel .cart-content table.cart-table tbody tr.no-item{border-bottom:none;height:55vh;text-align:center}#wepos-main .content-cart .cart-panel .cart-content table.cart-table tbody tr.no-item p{color:#c6cace;font-size:17px}#wepos-main .content-cart .cart-panel .cart-content table.cart-table tbody tr td{font-size:13px;padding:8px 12px}#wepos-main .content-cart .cart-panel .cart-content table.cart-table tbody tr td.name{font-weight:700}#wepos-main .content-cart .cart-panel .cart-content table.cart-table tbody tr td.name .attribute ul{list-style:none;margin:0;padding:0}#wepos-main .content-cart .cart-panel .cart-content table.cart-table tbody tr td.name .attribute ul li{display:inline-block;font-size:12px;font-weight:400;margin-right:5px}#wepos-main .content-cart .cart-panel .cart-content table.cart-table tbody tr td.name .attribute ul li .attr_name{color:#758598}#wepos-main .content-cart .cart-panel .cart-content table.cart-table tbody tr td.price span{display:block}#wepos-main .content-cart .cart-panel .cart-content table.cart-table tbody tr td.price span.regular-price{color:#9095a5;font-size:11px;padding-left:5px;text-decoration:line-through}#wepos-main .content-cart .cart-panel .cart-content table.cart-table tbody tr td.action span:before,#wepos-main .content-cart .cart-panel .cart-content table.cart-table tbody tr td.remove span:before{background:#bdc0c9;border:.84px solid #bdc0c9;border-radius:50px;color:#fff;cursor:pointer;display:inline-block;font-size:8px;text-align:center;width:20px}#wepos-main .content-cart .cart-panel .cart-content table.cart-table tbody tr td.action span.open:before,#wepos-main .content-cart .cart-panel .cart-content table.cart-table tbody tr td.remove span.open:before{background:#3b80f4;border:.84px solid #3b80f4;-webkit-transform:rotate(90deg);-moz-transform:rotate(90deg);-o-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(89deg)}#wepos-main .content-cart .cart-panel .cart-content table.cart-table tbody tr td.remove span:before{border:none;color:#fff}#wepos-main .content-cart .cart-panel .cart-content table.cart-table tbody tr td.remove span:hover:before{background:#e9485e;border:none;color:#fff}#wepos-main .content-cart .cart-panel .cart-content table.cart-table tbody tr.update-quantity-wrap td{background:#f6f7fb;padding:10px}#wepos-main .content-cart .cart-panel .cart-content table.cart-table tbody tr.update-quantity-wrap td span{margin-right:5px}#wepos-main .content-cart .cart-panel .cart-content table.cart-table tbody tr.update-quantity-wrap td span input[type=number]{-webkit-appearance:none;border:1px solid #eceef0;border-radius:3px;font-size:13px;margin-right:5px;outline:none;padding:5px;width:60px}#wepos-main .content-cart .cart-panel .cart-content table.cart-table tbody tr.update-quantity-wrap td span input[type=number]::-webkit-inner-spin-button,#wepos-main .content-cart .cart-panel .cart-content table.cart-table tbody tr.update-quantity-wrap td span input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}#wepos-main .content-cart .cart-panel .cart-content table.cart-table tbody tr.update-quantity-wrap td span.qty-action a{background:#fff;border:1px solid #eceef0;border-radius:3px;color:#999dac;display:inline-block;font-size:18px;font-weight:700;height:23px;margin-right:3px;text-align:center;text-decoration:none;width:25px}#wepos-main .content-cart .cart-panel .cart-content table.cart-table tbody tr.update-quantity-wrap td span.qty-action a.add{background:#3b80f4;color:#fff}#wepos-main .wepos-help-wrapper{margin-top:20px;padding:15px 20px}#wepos-main .wepos-help-wrapper h2{border-bottom:1px solid #eceef0;color:#c6cace;font-weight:400;margin:0 0 15px;padding:0 0 15px}#wepos-main .wepos-help-wrapper ul{list-style:none;margin:0;padding:0}#wepos-main .wepos-help-wrapper ul li{display:inline-block;margin-bottom:20px;margin-right:2%;width:48%}#wepos-main .wepos-help-wrapper ul li:nth-child(2n){margin-right:0}#wepos-main .wepos-help-wrapper ul li span{display:block}#wepos-main .wepos-help-wrapper ul li span.code{color:#758598;float:left;font-size:15px;width:40%}#wepos-main .wepos-help-wrapper ul li span.title{display:block;float:left;width:58%}@media screen and (max-width:768px){#wepos-main{display:table-row}#wepos-main .content-cart{min-height:200px}#wepos-main .content-cart .cart-panel .cart-content table.cart-table{height:fit-content}} \ No newline at end of file +.overlay{background:#000;background-color:#000;filter:alpha(opacity=20);height:100%;left:0;opacity:.25;position:fixed;top:0;width:100%;z-index:99}.variation-attribute-wrapper{padding:10px 20px 0}.variation-attribute-wrapper .attribute{margin-bottom:15px}.variation-attribute-wrapper .attribute p{font-size:14px;font-weight:700;margin:0 0 5px;padding:0;text-align:left}.variation-attribute-wrapper .attribute .options{text-align:left}.variation-attribute-wrapper .attribute .options label{display:inline-block}.variation-attribute-wrapper .attribute .options label input[type=radio]{-webkit-appearance:none;display:none}.variation-attribute-wrapper .attribute .options label input[type=radio]:checked+.box{background:#1abc9c;border:1px solid #1abc9c;color:#fff}.variation-attribute-wrapper .attribute .options label .box{border:1px solid #e0e5ea;border-radius:3px;cursor:pointer;font-size:13px;margin-bottom:5px;margin-right:5px;padding:6px 10px}.add-variation-btn{background:#3b80f4;border:none;border-radius:3px;color:#fff;cursor:pointer;font-size:14px;padding:10px;width:150px}.add-variation-btn:active,.add-variation-btn:focus{outline:none}.add-variation-btn:disabled{background:#76a2ed}.wepos-new-customer-form{padding:20px}.wepos-new-customer-form .customer-country.multiselect--active .multiselect__input,.wepos-new-customer-form .customer-state.multiselect--active .multiselect__input{padding:0 3px!important}.wepos-new-customer-form button.add-new-customer-btn:disabled{background:#76a2ed;border:1px solid #76a2ed;cursor:no-drop!important}aside.vue-keyboard .vue-keyboard-row[data-keys="3"]{border-bottom:1px solid #eceef0}aside.vue-keyboard .vue-keyboard-row[data-keys="3"] button{border:none;border-right:1px solid #eceef0;color:#212121;cursor:pointer;display:inline-block;font-size:24px;height:60px;padding:5px 20px;text-align:center;width:80px}aside.vue-keyboard .vue-keyboard-row[data-keys="3"] button:last-child{border-right:none}aside.vue-keyboard .vue-keyboard-row[data-keys="3"] button span.keypord-icon:before{font-weight:700}aside.vue-keyboard .vue-keyboard-row[data-keys="3"]:first-child{border-top:1px solid #eceef0}aside.vue-keyboard .vue-keyboard-row[data-keys="2"] button{background:#3b80f4;border:none;border-right:1px solid #fff;color:#fff;font-size:14px;padding:15px;width:50%}aside.vue-keyboard .vue-keyboard-row[data-keys="2"] button:last-child{border-right:none}aside.vue-keyboard .vue-keyboard-row[data-keys="2"] button span.keypord-icon:before{font-weight:700}.wepos-fee-keypad-wrap{display:inline-block;float:left}.fee-keypad .tooltip-inner input{border:none;font-size:20px;height:25px;padding:13px;width:87%}.fee-keypad .tooltip-inner button[data-action=flat],.fee-keypad .tooltip-inner button[data-action=percent]{cursor:pointer}#wepos-print-receipt{display:inline}[v-cloak]{display:none}@media print{@page{margin:.5cm}.wepos-modal-content,body *{visibility:hidden}.wepos-checkout-print-wrapper{color:#000;display:inline-block!important;font-family:Helvetica,Verdana,Calibri,Arial,Franklin Gothic,sans-serif!important}.wepos-checkout-print-wrapper *{visibility:visible}.wepos-checkout-print-wrapper{left:0;position:absolute;top:0;width:100%}.wepos-checkout-print-wrapper .footer,.wepos-checkout-print-wrapper .header{padding:5px;text-align:center}.wepos-checkout-print-wrapper .order-info{border-bottom:1px dashed #b7b7b7;margin:10px 0;padding:10px 5px}.wepos-checkout-print-wrapper .content{padding:10px}.wepos-checkout-print-wrapper .content table.sale-summary{border-collapse:collapse;width:100%}.wepos-checkout-print-wrapper .content table.sale-summary tbody tr td{font-size:14px;padding:8px 10px}.wepos-checkout-print-wrapper .content table.sale-summary tbody tr td.name{font-weight:700;width:60%}.wepos-checkout-print-wrapper .content table.sale-summary tbody tr td.name .tax-info{display:block;font-size:13px;font-weight:400}.wepos-checkout-print-wrapper .content table.sale-summary tbody tr td.name .attribute{margin-top:2px}.wepos-checkout-print-wrapper .content table.sale-summary tbody tr td.name .attribute ul{list-style:none;margin:0;padding:0}.wepos-checkout-print-wrapper .content table.sale-summary tbody tr td.name .attribute ul li{display:inline-block;font-size:12px;font-weight:400;margin-right:5px}.wepos-checkout-print-wrapper .content table.sale-summary tbody tr td.name .attribute ul li .attr_name{color:#758598}.wepos-checkout-print-wrapper .content table.sale-summary tbody tr td.quantity{color:#758598;text-align:center;width:12%}.wepos-checkout-print-wrapper .content table.sale-summary tbody tr td.price{color:#758598;text-align:right}.wepos-checkout-print-wrapper .content table.sale-summary tbody tr td.price span{color:#758598}.wepos-checkout-print-wrapper .content table.sale-summary tbody tr td.price span.regular-price{color:#9095a5;font-size:12px;padding-right:3px;text-decoration:line-through}.wepos-checkout-print-wrapper .content table.sale-summary tbody tr.cart-meta-data td .metadata{color:#758598;font-size:13px;font-weight:400;margin-left:6px}.wepos-checkout-print-wrapper .content table.sale-summary tbody tr.divider{border-bottom:1px dashed #b7b7b7;color:#b5b5b5}}.wepos-custom-note-wrap{display:inline-block;float:left}.customer-note .tooltip-inner{box-sizing:border-box;padding:10px;width:500px}.customer-note .tooltip-inner form{text-align:right}.customer-note .tooltip-inner form textarea{border:1px solid #e9edf0;border-radius:3px;box-shadow:0 3px 15px 0 rgba(0,0,0,.02);box-sizing:border-box;font-size:13px;height:100px;line-height:10px;margin-bottom:10px;padding:10px;width:100%}.customer-note .tooltip-inner form textarea:focus{outline:none}.customer-note .tooltip-inner form button.add-note-btn{background:#3b80f4;border:1px solid #3b80f4;border-radius:3px;color:#fff;cursor:pointer;font-size:14px;padding:6px 25px}.customer-note .tooltip-inner form button.add-note-btn:disabled{background:#76a2ed;border-color:#76a2ed;cursor:no-drop}#wepos-main{display:flex;padding:20px}#wepos-main .content-product{flex:2;margin-right:20px}#wepos-main .content-product .top-panel{margin-bottom:20px}#wepos-main .content-product .top-panel .search-bar{float:left;margin-right:2%;width:56%}#wepos-main .content-product .top-panel .search-bar .search-box{position:relative}#wepos-main .content-product .top-panel .search-bar .search-box input#product-search{border:1px solid #e9edf0;border-radius:3px;box-shadow:0 3px 15px 0 rgba(0,0,0,.02);box-sizing:border-box;font-size:14px;height:35px;line-height:10px;padding-left:32px;padding-right:120px;width:100%}#wepos-main .content-product .top-panel .search-bar .search-box input#product-search::placeholder{color:#999dac;font-size:13px}#wepos-main .content-product .top-panel .search-bar .search-box input#product-search:-ms-input-placeholder{color:#999dac;font-size:13px}#wepos-main .content-product .top-panel .search-bar .search-box input#product-search::-ms-input-placeholder{color:#999dac;font-size:13px}#wepos-main .content-product .top-panel .search-bar .search-box input#product-search:focus{outline:none}#wepos-main .content-product .top-panel .search-bar .search-box span.search-icon{color:#3b80f4;height:10px;left:10px;position:absolute;top:8px}#wepos-main .content-product .top-panel .search-bar .search-box span.search-icon:before{font-size:14px}#wepos-main .content-product .top-panel .search-bar .search-box .search-type{position:absolute;right:0;top:0}#wepos-main .content-product .top-panel .search-bar .search-box .search-type a{box-sizing:border-box;color:#bdc0c9;display:inline-block;font-size:13px;height:35px;line-height:14px;margin-left:-2px;padding:10px;text-decoration:none}#wepos-main .content-product .top-panel .search-bar .search-box .search-type a.active{background:#3b80f4;color:#fff}#wepos-main .content-product .top-panel .search-bar .search-box .search-type a:first-child{border-left:1px solid #e9ebed}#wepos-main .content-product .top-panel .search-bar .search-box .search-type a:last-child{border-bottom-right-radius:3px;border-top-right-radius:3px}#wepos-main .content-product .top-panel .search-bar .search-box .search-result{background:#fff;border:1px solid #e9edf0;border-bottom-left-radius:3px;border-bottom-right-radius:3px;border-top:none;box-shadow:0 30px 45px -10px rgba(0,0,0,.2);box-sizing:border-box;position:absolute;width:100%;z-index:999}#wepos-main .content-product .top-panel .search-bar .search-box .search-result .no-data-found{color:#758598;padding:20px;text-align:center}#wepos-main .content-product .top-panel .search-bar .search-box .search-result ul{list-style-type:none;margin:0;max-height:300px;overflow:scroll;padding:0}#wepos-main .content-product .top-panel .search-bar .search-box .search-result ul li a{border-bottom:1px solid #e9edf0;color:#212121;display:block;padding:8px 10px;text-decoration:none}#wepos-main .content-product .top-panel .search-bar .search-box .search-result ul li a span{color:#758598;font-size:11px;margin-left:10px}#wepos-main .content-product .top-panel .search-bar .search-box .search-result ul li a span.action{visibility:hidden}#wepos-main .content-product .top-panel .search-bar .search-box .search-result ul li a span.action:before{font-size:12px}#wepos-main .content-product .top-panel .search-bar .search-box .search-result ul li a:hover span.action{visibility:visible}#wepos-main .content-product .top-panel .search-bar .search-box .search-result ul li:last-child a{border-bottom:none}#wepos-main .content-product .top-panel .search-bar .search-box .search-result ul li.selected{background:#f6f7fb}#wepos-main .content-product .top-panel .search-bar .search-box .search-result ul li.selected a span.action{visibility:visible}#wepos-main .content-product .top-panel .search-bar .search-box .search-result .suggession{background:#f6f7fb;border-top:1px solid #eceef0;color:#999dac;font-size:11px;padding:12px}#wepos-main .content-product .top-panel .search-bar .search-box .search-result .suggession span.term{margin-right:15px}#wepos-main .content-product .top-panel .search-bar .search-box .search-result .suggession span.term span:before{color:#5d5d5d;font-size:9px;margin-right:2px}#wepos-main .content-product .top-panel .search-bar .search-box .search-result .suggession span.term strong{color:#5d5d5d;margin-right:2px}#wepos-main .content-product .top-panel .category{float:left;margin-right:2%;position:relative;width:26%}#wepos-main .content-product .top-panel .category select#product-category{-moz-appearance:none;-webkit-appearance:none;appearance:none;background:#fff;border:1px solid #e9edf0;border-radius:3px;box-shadow:0 3px 15px 0 rgba(0,0,0,.02);box-sizing:border-box;color:#758598;font-size:13px;padding:9px;width:100%}#wepos-main .content-product .top-panel .category select#product-category:focus{outline:none}#wepos-main .content-product .top-panel .category span.select-arrow{position:absolute;right:9px;top:9px}#wepos-main .content-product .top-panel .category span.select-arrow:before{color:#758598;font-size:13px;margin-left:0}#wepos-main .content-product .top-panel .toggle-view{float:left;text-align:right;width:14%}#wepos-main .content-product .top-panel .toggle-view .toggle-icon{background:#fff;border:1px solid #e9edf0;box-shadow:0 3px 15px 0 rgba(0,0,0,.02);color:#bdc0c9;cursor:pointer;display:inline-block;padding:8px 10px}#wepos-main .content-product .top-panel .toggle-view .toggle-icon.active{color:#3b80f4}#wepos-main .content-product .top-panel .toggle-view .toggle-icon:before{font-size:13px;margin-left:0}#wepos-main .content-product .top-panel .toggle-view .toggle-icon.list-view{border-right:none;margin-right:-4px}#wepos-main .content-product .breadcrumb{background:#fff;box-shadow:0 3px 15px 0 rgba(0,0,0,.02);margin-bottom:20px;padding:8px 12px;position:relative}#wepos-main .content-product .breadcrumb span.close-breadcrumb{color:#9b59b6;cursor:pointer;position:absolute;right:15px;top:5px}#wepos-main .content-product .breadcrumb span.close-breadcrumb:before{font-size:9px}#wepos-main .content-product .breadcrumb ul{line-height:16px;margin:0;padding:0}#wepos-main .content-product .breadcrumb ul li{display:inline-block}#wepos-main .content-product .breadcrumb ul li:after{color:#758598;content:"\f10b";font-family:Flaticon;font-size:9px;margin-left:7px;margin-right:4px}#wepos-main .content-product .breadcrumb ul li:last-child:after{content:""}#wepos-main .content-product .breadcrumb ul li a{color:#9b59b6;font-size:13px;text-decoration:none}#wepos-main .content-product .items-wrapper.grid{display:flex;flex-flow:row wrap;height:84.9vh;justify-content:flex-start;margin:0 -10px;overflow:auto}#wepos-main .content-product .items-wrapper.grid .item{box-sizing:border-box;flex-basis:20%;-ms-flex:auto;margin-bottom:20px;padding:0 10px;text-align:center}#wepos-main .content-product .items-wrapper.grid .item:focus{outline:none}#wepos-main .content-product .items-wrapper.grid .item .item-wrap{background:#fff;cursor:pointer;margin-bottom:-2px;position:relative}#wepos-main .content-product .items-wrapper.grid .item .item-wrap:focus{-webkit-appearance:none;outline:none}#wepos-main .content-product .items-wrapper.grid .item .item-wrap img{width:100%}#wepos-main .content-product .items-wrapper.grid .item .item-wrap .title{border-top:1px solid #e9edf0;color:#212121;font-size:13px;margin-top:-3px;padding:10px 5px}#wepos-main .content-product .items-wrapper.grid .item .item-wrap .add-product-icon{background:rgba(0,0,0,.3);height:100%;position:absolute;right:0;top:0;visibility:hidden;width:100%}#wepos-main .content-product .items-wrapper.grid .item .item-wrap .add-product-icon:before{color:#fff;display:inline-block;font-size:35px;font-weight:400;margin-top:40%;text-shadow:1px 1px 1px rgba(0,0,0,.5)}#wepos-main .content-product .items-wrapper.grid .item .item-wrap:hover .add-product-icon{visibility:visible}#wepos-main .content-product .items-wrapper.grid .item .disabled{border:1px solid #ffcbcb;cursor:not-allowed;opacity:.4}#wepos-main .content-product .items-wrapper.list{height:84.9vh;overflow:auto}#wepos-main .content-product .items-wrapper.list .item .item-wrap{background:#fff;border-radius:3px;box-shadow:0 3px 15px 0 rgba(0,0,0,.02);cursor:pointer;margin-bottom:20px;overflow:hidden;position:relative}#wepos-main .content-product .items-wrapper.list .item .item-wrap .img{border-right:1px solid #f0f2f4;float:left;height:80px;margin-right:20px;width:80px}#wepos-main .content-product .items-wrapper.list .item .item-wrap .img img{height:100%;width:100%}#wepos-main .content-product .items-wrapper.list .item .item-wrap .title{float:left;font-size:14px;font-weight:700;height:100%;height:44px;left:100px;margin-top:-22px;max-width:78%;position:absolute;top:40px}#wepos-main .content-product .items-wrapper.list .item .item-wrap .title .product-name{margin-bottom:8px}#wepos-main .content-product .items-wrapper.list .item .item-wrap .title ul.meta{font-size:13px;font-weight:400;list-style:none;margin:0;padding:0}#wepos-main .content-product .items-wrapper.list .item .item-wrap .title ul.meta li{display:inline-block}#wepos-main .content-product .items-wrapper.list .item .item-wrap .title ul.meta li .label{color:#758598;margin-right:3px}#wepos-main .content-product .items-wrapper.list .item .item-wrap .title ul.meta li .value del{color:#9095a5;margin-right:3px}#wepos-main .content-product .items-wrapper.list .item .item-wrap .title ul.meta li:after{color:#e9ebed;content:"|";display:inline-block;margin:0 7px}#wepos-main .content-product .items-wrapper.list .item .item-wrap .title ul.meta li:last-child:after{content:""}#wepos-main .content-product .items-wrapper.list .item .item-wrap .add-product-icon{position:absolute;right:3%;top:35%}#wepos-main .content-product .items-wrapper.list .item .item-wrap .add-product-icon:before{color:#1a9ed4;font-weight:400}#wepos-main .content-product .items-wrapper .product-loading{color:#c6cace;display:block;font-size:16px;padding:10px;position:relative;text-align:center;width:100%}#wepos-main .content-product .items-wrapper .no-product-found{margin:auto 0;text-align:center;vertical-align:middle;width:100%}#wepos-main .content-product .items-wrapper .no-product-found p{color:#c6cace;font-size:18px}#wepos-main .content-cart{flex:1.3;height:94.5vh}#wepos-main .content-cart .top-panel{display:flex;margin-bottom:20px}#wepos-main .content-cart .top-panel .customer-search-box{flex:7;position:relative}#wepos-main .content-cart .top-panel .customer-search-box input#customer-search{border:1px solid #e9edf0;border-radius:3px;box-shadow:0 3px 15px 0 rgba(0,0,0,.02);box-sizing:border-box;font-size:14px;height:33px;height:35px;line-height:10px;padding:10px 10px 10px 35px;width:100%}#wepos-main .content-cart .top-panel .customer-search-box input#customer-search::placeholder{color:#999dac;font-size:13px}#wepos-main .content-cart .top-panel .customer-search-box input#customer-search:-ms-input-placeholder{color:#999dac;font-size:13px}#wepos-main .content-cart .top-panel .customer-search-box input#customer-search::-ms-input-placeholder{color:#999dac;font-size:13px}#wepos-main .content-cart .top-panel .customer-search-box input#customer-search:focus{outline:none}#wepos-main .content-cart .top-panel .customer-search-box span.add-new-customer{position:absolute;right:10px;top:9px}#wepos-main .content-cart .top-panel .customer-search-box span.add-new-customer:before{color:#bdc0c9;cursor:pointer;font-size:15px}#wepos-main .content-cart .top-panel .customer-search-box .search-result{background:#fff;border:1px solid #e9edf0;border-bottom-left-radius:3px;border-bottom-right-radius:3px;border-top:none;box-shadow:0 30px 45px -10px rgba(0,0,0,.2);box-sizing:border-box;position:absolute;width:100%;z-index:99}#wepos-main .content-cart .top-panel .customer-search-box .search-result .no-data-found{color:#758598;padding:20px;text-align:center}#wepos-main .content-cart .top-panel .customer-search-box .search-result ul{list-style-type:none;margin:0;max-height:300px;overflow:scroll;padding:0}#wepos-main .content-cart .top-panel .customer-search-box .search-result ul li a{border-bottom:1px solid #e9edf0;color:#212121;display:block;padding:8px 10px;text-decoration:none}#wepos-main .content-cart .top-panel .customer-search-box .search-result ul li a span{color:#758598;font-size:13px;margin-left:10px}#wepos-main .content-cart .top-panel .customer-search-box .search-result ul li a span.avatar img{border-radius:20px;width:20px}#wepos-main .content-cart .top-panel .customer-search-box .search-result ul li a span.name{color:#212121;font-size:14px;line-height:18px;margin-left:6px}#wepos-main .content-cart .top-panel .customer-search-box .search-result ul li a span.action{visibility:hidden}#wepos-main .content-cart .top-panel .customer-search-box .search-result ul li a span.action:before{font-size:12px}#wepos-main .content-cart .top-panel .customer-search-box .search-result ul li a:hover span.action{visibility:visible}#wepos-main .content-cart .top-panel .customer-search-box .search-result ul li:last-child a{border-bottom:none}#wepos-main .content-cart .top-panel .customer-search-box .search-result ul li.selected{background:#f6f7fb}#wepos-main .content-cart .top-panel .customer-search-box .search-result ul li.selected a span.action{visibility:visible}#wepos-main .content-cart .top-panel .customer-search-box .search-result .suggession{background:#f6f7fb;border-top:1px solid #eceef0;color:#999dac;font-size:11px;padding:12px}#wepos-main .content-cart .top-panel .customer-search-box .search-result .suggession span.term{margin-right:15px}#wepos-main .content-cart .top-panel .customer-search-box .search-result .suggession span.term span:before{color:#5d5d5d;font-size:9px;margin-right:2px}#wepos-main .content-cart .top-panel .customer-search-box .search-result .suggession span.term strong{color:#5d5d5d;margin-right:2px}#wepos-main .content-cart .top-panel .customer-search-box svg.customer-icon{left:10px;position:absolute;top:8px}#wepos-main .content-cart .top-panel .action{flex:1}#wepos-main .content-cart .top-panel .action .more-options{text-align:right}#wepos-main .content-cart .top-panel .action .more-options span.more-icon:before{color:#bdc0c9;font-size:16px}#wepos-main .content-cart .cart-panel{background:#fff;border-radius:3px;box-shadow:0 3px 15px 0 rgba(0,0,0,.02);display:flex;flex-flow:column wrap;height:90%;position:relative}#wepos-main .content-cart .cart-panel .cart-calculation{flex-grow:0;width:100%}#wepos-main .content-cart .cart-panel .cart-calculation table.cart-total-table{border-collapse:collapse;width:100%}#wepos-main .content-cart .cart-panel .cart-calculation table.cart-total-table tbody tr{border-bottom:1px solid #eceef0;display:table-row;height:35px;line-height:20px}#wepos-main .content-cart .cart-panel .cart-calculation table.cart-total-table tbody tr:first-child{border-top:1px solid #eceef0}#wepos-main .content-cart .cart-panel .cart-calculation table.cart-total-table tbody tr:last-child{border-bottom:none}#wepos-main .content-cart .cart-panel .cart-calculation table.cart-total-table tbody tr:nth-child(odd){background:#fafbfe}#wepos-main .content-cart .cart-panel .cart-calculation table.cart-total-table tbody tr td{font-weight:700;line-height:20px;padding:9px 12px}#wepos-main .content-cart .cart-panel .cart-calculation table.cart-total-table tbody tr td:last-child{text-align:right}#wepos-main .content-cart .cart-panel .cart-calculation table.cart-total-table tbody tr td.label{width:45%}#wepos-main .content-cart .cart-panel .cart-calculation table.cart-total-table tbody tr td.price{text-align:right;width:45%}#wepos-main .content-cart .cart-panel .cart-calculation table.cart-total-table tbody tr td.action{width:6%}#wepos-main .content-cart .cart-panel .cart-calculation table.cart-total-table tbody tr td.action span:before{background:#bdc0c9;border:none;border-radius:50px;color:#fff;cursor:pointer;font-size:7px;padding:5px}#wepos-main .content-cart .cart-panel .cart-calculation table.cart-total-table tbody tr td.action span:hover:before{background:#e9485e;border:none;color:#fff}#wepos-main .content-cart .cart-panel .cart-calculation table.cart-total-table tbody tr.cart-action td{text-align:left}#wepos-main .content-cart .cart-panel .cart-calculation table.cart-total-table tbody tr.cart-action td a{background:#fff;border:1px solid #e0e5ea;border-radius:3px;color:#3b80f4;font-size:12px;margin-right:5px;padding:5px 8px;text-decoration:none}#wepos-main .content-cart .cart-panel .cart-calculation table.cart-total-table tbody tr.cart-meta-data td.label span.name{color:#758598;font-size:12px;font-weight:400;margin-left:5px}#wepos-main .content-cart .cart-panel .cart-calculation table.cart-total-table tbody tr.cart-meta-data td.label label{font-weight:400;margin-right:5px}#wepos-main .content-cart .cart-panel .cart-calculation table.cart-total-table tbody tr.cart-meta-data td.label .fee-name{width:15%}#wepos-main .content-cart .cart-panel .cart-calculation table.cart-total-table tbody tr.cart-meta-data td.label .fee-amount{margin-right:5px;width:15%}#wepos-main .content-cart .cart-panel .cart-calculation table.cart-total-table tbody tr.cart-meta-data td.label select.fee-tax-class{background:#fff;border:1px solid #e9ebed;border-radius:3px;height:24px;padding:5px;width:22%}#wepos-main .content-cart .cart-panel .cart-calculation table.cart-total-table tbody tr.cart-meta-data td.label select.fee-tax-class:focus{outline:none}#wepos-main .content-cart .cart-panel .cart-calculation table.cart-total-table tbody tr.cart-meta-data td input[type=number],#wepos-main .content-cart .cart-panel .cart-calculation table.cart-total-table tbody tr.cart-meta-data td input[type=text]{border:1px solid #eceef0;border-radius:3px;padding:5px 8px;width:50%}#wepos-main .content-cart .cart-panel .cart-calculation table.cart-total-table tbody tr.cart-meta-data td input[type=number]:focus,#wepos-main .content-cart .cart-panel .cart-calculation table.cart-total-table tbody tr.cart-meta-data td input[type=text]:focus{-webkit-appearance:none;outline:none}#wepos-main .content-cart .cart-panel .cart-calculation table.cart-total-table tbody tr.cart-meta-data td input[type=number]::placeholder,#wepos-main .content-cart .cart-panel .cart-calculation table.cart-total-table tbody tr.cart-meta-data td input[type=text]::placeholder{color:#999dac;font-size:13px}#wepos-main .content-cart .cart-panel .cart-calculation table.cart-total-table tbody tr.cart-meta-data td input[type=number]:-ms-input-placeholder,#wepos-main .content-cart .cart-panel .cart-calculation table.cart-total-table tbody tr.cart-meta-data td input[type=text]:-ms-input-placeholder{color:#999dac;font-size:13px}#wepos-main .content-cart .cart-panel .cart-calculation table.cart-total-table tbody tr.cart-meta-data td input[type=number]::-ms-input-placeholder,#wepos-main .content-cart .cart-panel .cart-calculation table.cart-total-table tbody tr.cart-meta-data td input[type=text]::-ms-input-placeholder{color:#999dac;font-size:13px}#wepos-main .content-cart .cart-panel .cart-calculation table.cart-total-table tbody tr.cart-meta-data td button{background:#3b80f4;border:1px solid #3b80f4;border-radius:3px;color:#fff;cursor:pointer;margin-left:5px;padding:5px 8px}#wepos-main .content-cart .cart-panel .cart-calculation table.cart-total-table tbody tr.cart-meta-data td button.cancel{background:#fff;border:1px solid #afafaf;color:#222}#wepos-main .content-cart .cart-panel .cart-calculation table.cart-total-table tbody tr.cart-meta-data td button:disabled{background:#76a2ed;border-color:#76a2ed}#wepos-main .content-cart .cart-panel .cart-calculation table.cart-total-table tbody tr.note .note-text{font-weight:400}#wepos-main .content-cart .cart-panel .cart-calculation table.cart-total-table tbody tr.pay-now{background:#1abc9c;color:#fff;cursor:pointer;font-size:16px}#wepos-main .content-cart .cart-panel .cart-calculation table.cart-total-table tbody tr.pay-now td{padding:18px 10px 18px 12px}#wepos-main .content-cart .cart-panel .cart-calculation table.cart-total-table tbody tr.pay-now td.amount{text-align:right}#wepos-main .content-cart .cart-panel .cart-calculation table.cart-total-table tbody tr.pay-now td.icon{line-height:25px;padding:0 5px;text-align:left}#wepos-main .content-cart .cart-panel .cart-content{flex:5;overflow-x:scroll}#wepos-main .content-cart .cart-panel .cart-content table.cart-table{border-collapse:collapse;width:100%}#wepos-main .content-cart .cart-panel .cart-content table.cart-table thead tr{border-bottom:1px solid #eceef0;box-shadow:0 3px 15px 0 rgba(0,0,0,.04);color:#3b80f4;font-size:13px;text-align:left}#wepos-main .content-cart .cart-panel .cart-content table.cart-table thead tr th{line-height:19px;padding:8px 12px}#wepos-main .content-cart .cart-panel .cart-content table.cart-table tbody tr{border-bottom:1px solid #eceef0;display:table-row;height:35px;line-height:20px}#wepos-main .content-cart .cart-panel .cart-content table.cart-table tbody tr.no-item{border-bottom:none;height:55vh;text-align:center}#wepos-main .content-cart .cart-panel .cart-content table.cart-table tbody tr.no-item p{color:#c6cace;font-size:17px}#wepos-main .content-cart .cart-panel .cart-content table.cart-table tbody tr td{font-size:13px;padding:8px 12px}#wepos-main .content-cart .cart-panel .cart-content table.cart-table tbody tr td.name{font-weight:700}#wepos-main .content-cart .cart-panel .cart-content table.cart-table tbody tr td.name .attribute ul{list-style:none;margin:0;padding:0}#wepos-main .content-cart .cart-panel .cart-content table.cart-table tbody tr td.name .attribute ul li{display:inline-block;font-size:12px;font-weight:400;margin-right:5px}#wepos-main .content-cart .cart-panel .cart-content table.cart-table tbody tr td.name .attribute ul li .attr_name{color:#758598}#wepos-main .content-cart .cart-panel .cart-content table.cart-table tbody tr td.price span{display:block}#wepos-main .content-cart .cart-panel .cart-content table.cart-table tbody tr td.price span.regular-price{color:#9095a5;font-size:11px;padding-left:5px;text-decoration:line-through}#wepos-main .content-cart .cart-panel .cart-content table.cart-table tbody tr td.action span:before,#wepos-main .content-cart .cart-panel .cart-content table.cart-table tbody tr td.remove span:before{background:#bdc0c9;border:.84px solid #bdc0c9;border-radius:50px;color:#fff;cursor:pointer;display:inline-block;font-size:8px;text-align:center;width:20px}#wepos-main .content-cart .cart-panel .cart-content table.cart-table tbody tr td.action span.open:before,#wepos-main .content-cart .cart-panel .cart-content table.cart-table tbody tr td.remove span.open:before{background:#3b80f4;border:.84px solid #3b80f4;-webkit-transform:rotate(90deg);-moz-transform:rotate(90deg);-o-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(89deg)}#wepos-main .content-cart .cart-panel .cart-content table.cart-table tbody tr td.remove span:before{border:none;color:#fff}#wepos-main .content-cart .cart-panel .cart-content table.cart-table tbody tr td.remove span:hover:before{background:#e9485e;border:none;color:#fff}#wepos-main .content-cart .cart-panel .cart-content table.cart-table tbody tr.update-quantity-wrap td{background:#f6f7fb;padding:10px}#wepos-main .content-cart .cart-panel .cart-content table.cart-table tbody tr.update-quantity-wrap td span{margin-right:5px}#wepos-main .content-cart .cart-panel .cart-content table.cart-table tbody tr.update-quantity-wrap td span input[type=number]{-webkit-appearance:none;border:1px solid #eceef0;border-radius:3px;font-size:13px;margin-right:5px;outline:none;padding:5px;width:60px}#wepos-main .content-cart .cart-panel .cart-content table.cart-table tbody tr.update-quantity-wrap td span input[type=number]::-webkit-inner-spin-button,#wepos-main .content-cart .cart-panel .cart-content table.cart-table tbody tr.update-quantity-wrap td span input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}#wepos-main .content-cart .cart-panel .cart-content table.cart-table tbody tr.update-quantity-wrap td span.qty-action a{background:#fff;border:1px solid #eceef0;border-radius:3px;color:#999dac;display:inline-block;font-size:18px;font-weight:700;height:23px;margin-right:3px;text-align:center;text-decoration:none;width:25px}#wepos-main .content-cart .cart-panel .cart-content table.cart-table tbody tr.update-quantity-wrap td span.qty-action a.add{background:#3b80f4;color:#fff}#wepos-main .wepos-help-wrapper{margin-top:20px;padding:15px 20px}#wepos-main .wepos-help-wrapper h2{border-bottom:1px solid #eceef0;color:#c6cace;font-weight:400;margin:0 0 15px;padding:0 0 15px}#wepos-main .wepos-help-wrapper ul{list-style:none;margin:0;padding:0}#wepos-main .wepos-help-wrapper ul li{display:inline-block;margin-bottom:20px;margin-right:2%;width:48%}#wepos-main .wepos-help-wrapper ul li:nth-child(2n){margin-right:0}#wepos-main .wepos-help-wrapper ul li span{display:block}#wepos-main .wepos-help-wrapper ul li span.code{color:#758598;float:left;font-size:15px;width:40%}#wepos-main .wepos-help-wrapper ul li span.title{display:block;float:left;width:58%}@media screen and (max-width:768px){#wepos-main{display:table-row}#wepos-main .content-cart{min-height:200px}#wepos-main .content-cart .cart-panel .cart-content table.cart-table{height:fit-content}} \ No newline at end of file diff --git a/assets/js/admin.js b/assets/js/admin.js index a5612110..c96126f8 100644 --- a/assets/js/admin.js +++ b/assets/js/admin.js @@ -16,7 +16,7 @@ \*****************************************/(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";eval('__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _modules_Cart_module__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./modules/Cart.module */ "./assets/src/utils/store/modules/Cart.module.js");\n/* harmony import */ var _modules_Order_module__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./modules/Order.module */ "./assets/src/utils/store/modules/Order.module.js");\nlet Vue = wepos_get_lib(\'Vue\');\nlet Vuex = wepos_get_lib(\'Vuex\');\nVue.use(Vuex);\n\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (new Vuex.Store({\n modules: {\n Cart: _modules_Cart_module__WEBPACK_IMPORTED_MODULE_0__["default"],\n Order: _modules_Order_module__WEBPACK_IMPORTED_MODULE_1__["default"]\n }\n}));\n\n//# sourceURL=webpack://wepos/./assets/src/utils/store/index.js?')},"./assets/src/utils/store/modules/Cart.module.js": /*!*******************************************************!*\ !*** ./assets/src/utils/store/modules/Cart.module.js ***! - \*******************************************************/(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _helper__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../helper */ \"./assets/src/utils/store/helper.js\");\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({\n namespaced: true,\n state: {\n settings: {},\n availableTax: {},\n cartdata: {\n line_items: [],\n fee_lines: []\n }\n },\n getters: {\n getSubtotal(state) {\n var subtotal = 0;\n weLo_.forEach(state.cartdata.line_items, function (item, key) {\n if (item.on_sale) {\n subtotal += item.quantity * item.sale_price;\n } else {\n subtotal += item.quantity * item.regular_price;\n }\n });\n return subtotal;\n },\n\n getTotalFee(state) {\n var fee = 0;\n weLo_.forEach(state.cartdata.fee_lines, function (item, key) {\n if (item.type == 'fee') {\n fee += Math.abs(item.total);\n }\n });\n return fee;\n },\n\n getTotalDiscount(state) {\n var discount = 0;\n weLo_.forEach(state.cartdata.fee_lines, function (item, key) {\n if (item.type == 'discount') {\n discount += Number(Math.abs(item.total));\n }\n });\n return discount;\n },\n\n getTotalLineTax(state) {\n var self = this,\n taxLineTotal = 0;\n weLo_.forEach(state.cartdata.line_items, function (item, key) {\n taxLineTotal += Math.abs(item.tax_amount * item.quantity);\n });\n return taxLineTotal;\n },\n\n getTotalTax(state) {\n let self = this,\n taxLineTotal = 0,\n taxFeeTotal = 0;\n weLo_.forEach(state.cartdata.line_items, function (item, key) {\n taxLineTotal += Math.abs(item.tax_amount * item.quantity);\n });\n\n if (state.settings.woo_tax != undefined && state.settings.woo_tax.wc_tax_display_cart == 'incl') {\n taxLineTotal = 0;\n }\n\n weLo_.forEach(state.cartdata.fee_lines, function (item, key) {\n if (item.tax_status !== 'taxable') {\n return;\n }\n\n let itemTaxClass = item.tax_class === '' ? 'standard' : item.tax_class;\n let taxClass = weLo_.find(state.availableTax, {\n 'class': itemTaxClass.toString()\n });\n\n if (!taxClass) {\n return;\n }\n\n if (item.type === 'discount') {\n taxLineTotal += item.total / taxClass.rate;\n }\n\n if (item.type === 'fee') {\n taxFeeTotal += Math.abs(item.total) * Math.abs(taxClass.rate) / 100;\n }\n });\n return taxLineTotal + taxFeeTotal;\n },\n\n getOrderTotal(state, getters) {\n return getters.getSubtotal + getters.getTotalFee + getters.getTotalTax;\n },\n\n getTotal(state, getters) {\n return getters.getOrderTotal - getters.getTotalDiscount;\n },\n\n getSettings(state, getters) {\n return state.settings;\n }\n\n },\n mutations: {\n setSettings(state, settings) {\n state.settings = settings;\n },\n\n setAvailableTax(state, availableTax) {\n state.availableTax = availableTax;\n },\n\n setCartData(state, cartdata) {\n if (weLo_.isEmpty(cartdata)) {\n state.cartdata = {\n line_items: [],\n fee_lines: []\n };\n } else {\n state.cartdata = Object.assign({}, cartdata);\n }\n },\n\n addToCartItem(state, product) {\n var cartObject = {};\n cartObject.product_id = product.parent_id === 0 ? product.id : product.parent_id;\n cartObject.name = product.name;\n cartObject.quantity = 1;\n cartObject.regular_price = product.regular_display_price;\n cartObject.sale_price = product.sales_display_price;\n cartObject.on_sale = product.on_sale;\n cartObject.attribute = product.attributes;\n cartObject.variation_id = product.parent_id !== 0 ? product.id : 0;\n cartObject.editQuantity = false;\n cartObject.type = product.type;\n cartObject.tax_amount = product.tax_amount;\n cartObject.manage_stock = product.manage_stock;\n cartObject.stock_status = product.stock_status;\n cartObject.backorders_allowed = product.backorders_allowed;\n cartObject.stock_quantity = product.stock_quantity;\n var index = weLo_.findIndex(state.cartdata.line_items, {\n product_id: cartObject.product_id,\n variation_id: cartObject.variation_id\n });\n\n if (index < 0) {\n if (_helper__WEBPACK_IMPORTED_MODULE_0__[\"default\"].hasStock(product)) {\n state.cartdata.line_items.push(cartObject);\n }\n } else {\n if (_helper__WEBPACK_IMPORTED_MODULE_0__[\"default\"].hasStock(product, state.cartdata.line_items[index].quantity)) {\n state.cartdata.line_items[index].quantity += 1;\n }\n }\n },\n\n removeCartItem(state, itemKey) {\n state.cartdata.line_items.splice(itemKey, 1);\n },\n\n addCartItemQuantity(state, itemKey) {\n var item = state.cartdata.line_items[itemKey];\n\n if (_helper__WEBPACK_IMPORTED_MODULE_0__[\"default\"].hasStock(item, item.quantity)) {\n state.cartdata.line_items[itemKey].quantity++;\n }\n },\n\n removeCartItemQuantity(state, itemKey) {\n var item = state.cartdata.line_items[itemKey];\n\n if (item.quantity <= 1) {\n state.cartdata.line_items[itemKey].quantity = 1;\n } else {\n state.cartdata.line_items[itemKey].quantity--;\n }\n },\n\n toggleEditQuantity(state, itemKey) {\n state.cartdata.line_items[itemKey].editQuantity = !state.cartdata.line_items[itemKey].editQuantity;\n },\n\n addDiscount(state, discountData) {\n state.cartdata.fee_lines.push({\n name: discountData.title,\n type: 'discount',\n value: discountData.value.toString(),\n isEdit: false,\n discount_type: discountData.type,\n tax_status: 'taxable',\n tax_class: '',\n total: 0\n });\n },\n\n addFee(state, feeData) {\n state.cartdata.fee_lines.push({\n name: feeData.title,\n type: 'fee',\n value: feeData.value.toString(),\n isEdit: false,\n fee_type: feeData.type,\n tax_status: 'taxable',\n tax_class: '',\n total: 0\n });\n },\n\n saveFeeValue(state, item) {\n state.cartdata.fee_lines.splice(item.key, 1, item.feeData);\n state.cartdata.fee_lines[item.key].isEdit = false;\n },\n\n editFeeValue(state, itemKey) {\n state.cartdata.fee_lines[itemKey].isEdit = true;\n },\n\n cancelSaveFeeValue(state, itemKey) {\n state.cartdata.fee_lines[itemKey].isEdit = false;\n },\n\n removeFeeLineItems(state, itemKey) {\n state.cartdata.fee_lines.splice(itemKey, 1);\n },\n\n emptyCart(state) {\n state.cartdata = {\n line_items: [],\n fee_lines: []\n };\n },\n\n calculateDiscount(state, payload) {\n if (state.cartdata.fee_lines.length > 0) {\n weLo_.forEach(state.cartdata.fee_lines, (item, key) => {\n if (item.type == \"discount\") {\n if (item.discount_type == 'percent') {\n state.cartdata.fee_lines[key].total = '-' + payload.getSubtotal * Math.abs(item.value) / 100;\n } else {\n state.cartdata.fee_lines[key].total = '-' + Math.abs(item.value);\n }\n }\n });\n }\n },\n\n calculateFee(state, payload) {\n if (state.cartdata.fee_lines.length > 0) {\n weLo_.forEach(state.cartdata.fee_lines, (item, key) => {\n if (item.type == 'fee') {\n if (item.fee_type == 'percent') {\n state.cartdata.fee_lines[key].total = (payload.getSubtotal * Math.abs(item.value) / 100).toString();\n } else {\n state.cartdata.fee_lines[key].total = Math.abs(item.value).toString();\n }\n }\n });\n }\n }\n\n },\n actions: {\n setSettingsAction(context, settings) {\n context.commit('setSettings', settings);\n },\n\n setAvailableTaxAction(context, availableTax) {\n context.commit('setAvailableTax', availableTax);\n },\n\n setCartDataAction(context, cartdata) {\n context.commit('setCartData', cartdata);\n context.commit('calculateDiscount', context.getters);\n context.commit('calculateFee', context.getters);\n },\n\n addToCartAction(context, product) {\n context.commit('addToCartItem', product);\n context.commit('calculateDiscount', context.getters);\n context.commit('calculateFee', context.getters);\n },\n\n removeCartItemAction(context, itemKey) {\n context.commit('removeCartItem', itemKey);\n context.commit('calculateDiscount', context.getters);\n context.commit('calculateFee', context.getters);\n },\n\n addItemQuantityAction(context, itemKey) {\n context.commit('addCartItemQuantity', itemKey);\n context.commit('calculateDiscount', context.getters);\n context.commit('calculateFee', context.getters);\n },\n\n removeItemQuantityAction(context, itemKey) {\n context.commit('removeCartItemQuantity', itemKey);\n context.commit('calculateDiscount', context.getters);\n context.commit('calculateFee', context.getters);\n },\n\n toggleEditQuantityAction(context, itemKey) {\n context.commit('toggleEditQuantity', itemKey);\n },\n\n addDiscountAction(context, discountData) {\n context.commit('addDiscount', discountData);\n context.commit('calculateDiscount', context.getters);\n context.commit('calculateFee', context.getters);\n },\n\n addFeeAction(context, feeData) {\n context.commit('addFee', feeData);\n context.commit('calculateDiscount', context.getters);\n context.commit('calculateFee', context.getters);\n },\n\n removeFeeLineItemsAction(context, itemKey) {\n context.commit('removeFeeLineItems', itemKey);\n context.commit('calculateDiscount', context.getters);\n context.commit('calculateFee', context.getters);\n },\n\n saveFeeValueAction(context, feeData) {\n context.commit('saveFeeValue', feeData);\n context.commit('calculateDiscount', context.getters);\n context.commit('calculateFee', context.getters);\n },\n\n editFeeValueAction(context, itemKey) {\n context.commit('editFeeValue', itemKey);\n },\n\n cancelSaveFeeValueAction(context, itemKey) {\n context.commit('cancelSaveFeeValue', itemKey);\n },\n\n emptyCartAction(context) {\n context.commit('emptyCart');\n },\n\n calculateDiscount(context) {\n context.commit('calculateDiscount', context.getters);\n },\n\n calculateFee(context) {\n context.commit('calculateFee', context.getters);\n }\n\n }\n});\n\n//# sourceURL=webpack://wepos/./assets/src/utils/store/modules/Cart.module.js?")},"./assets/src/utils/store/modules/Order.module.js": + \*******************************************************/(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _helper__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../helper */ \"./assets/src/utils/store/helper.js\");\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({\n namespaced: true,\n state: {\n settings: {},\n availableTax: {},\n cartdata: {\n line_items: [],\n fee_lines: [],\n coupon_lines: []\n }\n },\n getters: {\n getSubtotal(state) {\n var subtotal = 0;\n weLo_.forEach(state.cartdata.line_items, function (item, key) {\n if (item.on_sale) {\n subtotal += item.quantity * item.sale_price;\n } else {\n subtotal += item.quantity * item.regular_price;\n }\n });\n return subtotal;\n },\n\n getTotalFee(state) {\n var fee = 0;\n weLo_.forEach(state.cartdata.fee_lines, function (item, key) {\n fee += Math.abs(item.total);\n });\n return fee;\n },\n\n getTotalDiscount(state) {\n var discount = 0;\n weLo_.forEach(state.cartdata.coupon_lines, function (item, key) {\n discount += Number(Math.abs(item.total));\n });\n return discount;\n },\n\n getTotalLineTax(state) {\n var self = this,\n taxLineTotal = 0;\n weLo_.forEach(state.cartdata.line_items, function (item, key) {\n taxLineTotal += Math.abs(item.tax_amount * item.quantity);\n });\n return taxLineTotal;\n },\n\n getTotalTax(state, getters) {\n let self = this,\n taxLineTotal = 0,\n taxFeeTotal = 0,\n discountPercentage = 0,\n couponTaxDiscount = 0;\n weLo_.forEach(state.cartdata.line_items, function (item, key) {\n taxLineTotal += Math.abs(item.tax_amount * item.quantity);\n });\n\n if (state.settings.woo_tax != undefined && state.settings.woo_tax.wc_tax_display_cart == 'incl') {\n taxLineTotal = 0;\n }\n\n weLo_.forEach(state.cartdata.fee_lines, function (item, key) {\n if (item.tax_status !== 'taxable') {\n return;\n }\n\n let itemTaxClass = item.tax_class === '' ? 'standard' : item.tax_class;\n let taxClass = weLo_.find(state.availableTax, {\n 'class': itemTaxClass.toString()\n });\n\n if (!taxClass) {\n return;\n }\n\n taxFeeTotal += Math.abs(item.total) * Math.abs(taxClass.rate) / 100;\n });\n weLo_.forEach(state.cartdata.coupon_lines, function (item, key) {\n if (item.tax_status !== 'taxable') {\n return;\n }\n\n let itemTaxClass = item.tax_class === '' ? 'standard' : item.tax_class;\n let taxClass = weLo_.find(state.availableTax, {\n 'class': itemTaxClass.toString()\n });\n\n if (!taxClass) {\n return;\n }\n\n discountPercentage = item.total / getters.getSubtotal * 100;\n couponTaxDiscount += discountPercentage / 100 * taxLineTotal;\n });\n taxLineTotal += couponTaxDiscount;\n return taxLineTotal + taxFeeTotal;\n },\n\n getOrderTotal(state, getters) {\n return getters.getSubtotal + getters.getTotalFee + getters.getTotalTax;\n },\n\n getTotal(state, getters) {\n return getters.getOrderTotal - getters.getTotalDiscount;\n },\n\n getSettings(state, getters) {\n return state.settings;\n }\n\n },\n mutations: {\n setSettings(state, settings) {\n state.settings = settings;\n },\n\n setAvailableTax(state, availableTax) {\n state.availableTax = availableTax;\n },\n\n setCartData(state, cartdata) {\n if (weLo_.isEmpty(cartdata)) {\n state.cartdata = {\n line_items: [],\n fee_lines: [],\n coupon_lines: []\n };\n } else {\n state.cartdata = Object.assign({}, cartdata);\n }\n },\n\n addToCartItem(state, product) {\n var cartObject = {};\n cartObject.product_id = product.parent_id === 0 ? product.id : product.parent_id;\n cartObject.name = product.name;\n cartObject.quantity = 1;\n cartObject.regular_price = product.regular_display_price;\n cartObject.sale_price = product.sales_display_price;\n cartObject.on_sale = product.on_sale;\n cartObject.attribute = product.attributes;\n cartObject.variation_id = product.parent_id !== 0 ? product.id : 0;\n cartObject.editQuantity = false;\n cartObject.type = product.type;\n cartObject.tax_amount = product.tax_amount;\n cartObject.manage_stock = product.manage_stock;\n cartObject.stock_status = product.stock_status;\n cartObject.backorders_allowed = product.backorders_allowed;\n cartObject.stock_quantity = product.stock_quantity;\n var index = weLo_.findIndex(state.cartdata.line_items, {\n product_id: cartObject.product_id,\n variation_id: cartObject.variation_id\n });\n\n if (index < 0) {\n if (_helper__WEBPACK_IMPORTED_MODULE_0__[\"default\"].hasStock(product)) {\n state.cartdata.line_items.push(cartObject);\n }\n } else {\n if (_helper__WEBPACK_IMPORTED_MODULE_0__[\"default\"].hasStock(product, state.cartdata.line_items[index].quantity)) {\n state.cartdata.line_items[index].quantity += 1;\n }\n }\n },\n\n removeCartItem(state, itemKey) {\n state.cartdata.line_items.splice(itemKey, 1);\n },\n\n addCartItemQuantity(state, itemKey) {\n var item = state.cartdata.line_items[itemKey];\n\n if (_helper__WEBPACK_IMPORTED_MODULE_0__[\"default\"].hasStock(item, item.quantity)) {\n state.cartdata.line_items[itemKey].quantity++;\n }\n },\n\n removeCartItemQuantity(state, itemKey) {\n var item = state.cartdata.line_items[itemKey];\n\n if (item.quantity <= 1) {\n state.cartdata.line_items[itemKey].quantity = 1;\n } else {\n state.cartdata.line_items[itemKey].quantity--;\n }\n },\n\n toggleEditQuantity(state, itemKey) {\n state.cartdata.line_items[itemKey].editQuantity = !state.cartdata.line_items[itemKey].editQuantity;\n },\n\n addDiscount(state, discountData) {\n state.cartdata.coupon_lines.push({\n name: discountData.title,\n type: 'discount',\n isEdit: false,\n value: discountData.value.amount,\n discount_type: discountData.value.discount_type,\n tax_status: 'incl' !== state.settings.woo_tax.wc_tax_display_shop ? 'taxable' : 'none',\n tax_class: '',\n total: 0,\n code: discountData.value.code\n });\n },\n\n addFee(state, feeData) {\n state.cartdata.fee_lines.push({\n name: feeData.title,\n type: 'fee',\n value: feeData.value.toString(),\n isEdit: false,\n fee_type: feeData.type,\n tax_status: 'yes' === state.settings.wepos_general.enable_fee_tax ? 'taxable' : 'none',\n tax_class: '',\n total: 0\n });\n },\n\n saveFeeValue(state, item) {\n state.cartdata.fee_lines.splice(item.key, 1, item.feeData);\n state.cartdata.fee_lines[item.key].isEdit = false;\n },\n\n editFeeValue(state, itemKey) {\n state.cartdata.fee_lines[itemKey].isEdit = true;\n },\n\n cancelSaveFeeValue(state, itemKey) {\n state.cartdata.fee_lines[itemKey].isEdit = false;\n },\n\n removeCouponLineItems(state, itemKey) {\n state.cartdata.coupon_lines.splice(itemKey, 1);\n },\n\n removeFeeLineItems(state, itemKey) {\n state.cartdata.fee_lines.splice(itemKey, 1);\n },\n\n emptyCart(state) {\n state.cartdata = {\n line_items: [],\n fee_lines: [],\n coupon_lines: []\n };\n },\n\n calculateDiscount(state, payload) {\n if (state.cartdata.coupon_lines.length > 0) {\n weLo_.forEach(state.cartdata.coupon_lines, (item, key) => {\n if (item.type == \"discount\") {\n if (item.discount_type == 'percent') {\n state.cartdata.coupon_lines[key].total = '-' + payload.getSubtotal * Math.abs(item.value) / 100;\n } else {\n state.cartdata.coupon_lines[key].total = '-' + Math.abs(item.value);\n }\n }\n });\n }\n },\n\n calculateFee(state, payload) {\n if (state.cartdata.fee_lines.length > 0) {\n weLo_.forEach(state.cartdata.fee_lines, (item, key) => {\n if (item.type == 'fee') {\n if (item.fee_type == 'percent') {\n state.cartdata.fee_lines[key].total = (payload.getSubtotal * Math.abs(item.value) / 100).toString();\n } else {\n state.cartdata.fee_lines[key].total = Math.abs(item.value).toString();\n }\n }\n });\n }\n }\n\n },\n actions: {\n setSettingsAction(context, settings) {\n context.commit('setSettings', settings);\n },\n\n setAvailableTaxAction(context, availableTax) {\n context.commit('setAvailableTax', availableTax);\n },\n\n setCartDataAction(context, cartdata) {\n context.commit('setCartData', cartdata);\n context.commit('calculateDiscount', context.getters);\n context.commit('calculateFee', context.getters);\n },\n\n addToCartAction(context, product) {\n context.commit('addToCartItem', product);\n context.commit('calculateDiscount', context.getters);\n context.commit('calculateFee', context.getters);\n },\n\n removeCartItemAction(context, itemKey) {\n context.commit('removeCartItem', itemKey);\n context.commit('calculateDiscount', context.getters);\n context.commit('calculateFee', context.getters);\n },\n\n addItemQuantityAction(context, itemKey) {\n context.commit('addCartItemQuantity', itemKey);\n context.commit('calculateDiscount', context.getters);\n context.commit('calculateFee', context.getters);\n },\n\n removeItemQuantityAction(context, itemKey) {\n context.commit('removeCartItemQuantity', itemKey);\n context.commit('calculateDiscount', context.getters);\n context.commit('calculateFee', context.getters);\n },\n\n toggleEditQuantityAction(context, itemKey) {\n context.commit('toggleEditQuantity', itemKey);\n },\n\n addDiscountAction(context, discountData) {\n context.commit('addDiscount', discountData);\n context.commit('calculateDiscount', context.getters);\n },\n\n addFeeAction(context, feeData) {\n context.commit('addFee', feeData);\n context.commit('calculateFee', context.getters);\n },\n\n removeCouponLineItemsAction(context, itemKey) {\n context.commit('removeCouponLineItems', itemKey);\n context.commit('calculateDiscount', context.getters);\n },\n\n removeFeeLineItemsAction(context, itemKey) {\n context.commit('removeFeeLineItems', itemKey);\n context.commit('calculateFee', context.getters);\n },\n\n saveFeeValueAction(context, feeData) {\n context.commit('saveFeeValue', feeData);\n context.commit('calculateDiscount', context.getters);\n context.commit('calculateFee', context.getters);\n },\n\n editFeeValueAction(context, itemKey) {\n context.commit('editFeeValue', itemKey);\n },\n\n cancelSaveFeeValueAction(context, itemKey) {\n context.commit('cancelSaveFeeValue', itemKey);\n },\n\n emptyCartAction(context) {\n context.commit('emptyCart');\n },\n\n calculateDiscount(context) {\n context.commit('calculateDiscount', context.getters);\n },\n\n calculateFee(context) {\n context.commit('calculateFee', context.getters);\n }\n\n }\n});\n\n//# sourceURL=webpack://wepos/./assets/src/utils/store/modules/Cart.module.js?")},"./assets/src/utils/store/modules/Order.module.js": /*!********************************************************!*\ !*** ./assets/src/utils/store/modules/Order.module.js ***! \********************************************************/(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({\n namespaced: true,\n state: {\n orderdata: {\n billing: {},\n shipping: {},\n customer_id: 0,\n customer_note: '',\n payment_method: '',\n payment_method_title: ''\n },\n canProcessPayment: false\n },\n getters: {\n getCanProcessPayment: state => {\n return state.canProcessPayment;\n }\n },\n mutations: {\n setOrderData(state, orderdata) {\n if (weLo_.isEmpty(orderdata)) {\n state.orderdata = {\n billing: {},\n shipping: {},\n customer_id: 0,\n customer_note: '',\n payment_method: '',\n payment_method_title: ''\n };\n } else {\n state.orderdata = orderdata;\n }\n },\n\n setCustomer(state, customer) {\n if (Object.keys(customer).length > 0) {\n state.orderdata.billing = customer.billing;\n state.orderdata.shipping = customer.shipping;\n state.orderdata.customer_id = customer.id;\n } else {\n state.orderdata.billing = {};\n state.orderdata.shipping = {};\n state.orderdata.customer_id = 0;\n }\n },\n\n emptyOrderdata(state) {\n state.orderdata = {\n billing: {},\n shipping: {},\n customer_id: 0,\n customer_note: '',\n payment_method: '',\n payment_method_title: ''\n };\n },\n\n setCustomerNote(state, note) {\n state.orderdata.customer_note = note.trim();\n },\n\n removeCustomerNote(state) {\n state.orderdata.customer_note = '';\n },\n\n setGateway(state, gateway) {\n state.orderdata.payment_method = gateway.id;\n state.orderdata.payment_method_title = gateway.title;\n },\n\n setCanProcessPayment(state, canProcessPayment) {\n state.canProcessPayment = canProcessPayment;\n }\n\n },\n actions: {\n setOrderDataAction(context, orderdata) {\n context.commit('setOrderData', orderdata);\n },\n\n setCustomerAction(context, customer) {\n context.commit('setCustomer', customer);\n },\n\n emptyOrderdataAction(context) {\n context.commit('emptyOrderdata');\n },\n\n setCustomerNoteAction(context, note) {\n context.commit('setCustomerNote', note);\n },\n\n removeCustomerNoteAction(context) {\n context.commit('removeCustomerNote');\n },\n\n setGatewayAction(context, gateway) {\n context.commit('setGateway', gateway);\n },\n\n setCanProcessPaymentAction(context, canProcessPayment) {\n context.commit('setCanProcessPayment', canProcessPayment);\n }\n\n }\n});\n\n//# sourceURL=webpack://wepos/./assets/src/utils/store/modules/Order.module.js?")},"./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/index.js??vue-loader-options!./assets/src/admin/App.vue?vue&type=script&lang=js&": diff --git a/assets/js/admin.min.js b/assets/js/admin.min.js index d5e4f4ae..ceaab44b 100644 --- a/assets/js/admin.min.js +++ b/assets/js/admin.min.js @@ -1 +1 @@ -(()=>{var e={5627:e=>{e.exports=function(e,t,a){return ta?a:e:et?t:e}},3096:(e,t,a)=>{var i="Expected a function",s=/^\s+|\s+$/g,n=/^[-+]0x[0-9a-f]+$/i,r=/^0b[01]+$/i,o=/^0o[0-7]+$/i,l=parseInt,c="object"==typeof a.g&&a.g&&a.g.Object===Object&&a.g,d="object"==typeof self&&self&&self.Object===Object&&self,u=c||d||Function("return this")(),h=Object.prototype.toString,f=Math.max,p=Math.min,m=function(){return u.Date.now()};function v(e,t,a){var s,n,r,o,l,c,d=0,u=!1,h=!1,v=!0;if("function"!=typeof e)throw new TypeError(i);function b(t){var a=s,i=n;return s=n=void 0,d=t,o=e.apply(i,a)}function y(e){return d=e,l=setTimeout(C,t),u?b(e):o}function w(e){var a=e-c;return void 0===c||a>=t||a<0||h&&e-d>=r}function C(){var e=m();if(w(e))return D(e);l=setTimeout(C,function(e){var a=t-(e-c);return h?p(a,r-(e-d)):a}(e))}function D(e){return l=void 0,v&&s?b(e):(s=n=void 0,o)}function x(){var e=m(),a=w(e);if(s=arguments,n=this,c=e,a){if(void 0===l)return y(c);if(h)return l=setTimeout(C,t),b(c)}return void 0===l&&(l=setTimeout(C,t)),o}return t=_(t)||0,g(a)&&(u=!!a.leading,r=(h="maxWait"in a)?f(_(a.maxWait)||0,t):r,v="trailing"in a?!!a.trailing:v),x.cancel=function(){void 0!==l&&clearTimeout(l),d=0,s=c=n=l=void 0},x.flush=function(){return void 0===l?o:D(m())},x}function g(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function _(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==h.call(e)}(e))return NaN;if(g(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=g(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(s,"");var a=r.test(e);return a||o.test(e)?l(e.slice(2),a?2:8):n.test(e)?NaN:+e}e.exports=function(e,t,a){var s=!0,n=!0;if("function"!=typeof e)throw new TypeError(i);return g(a)&&(s="leading"in a?!!a.leading:s,n="trailing"in a?!!a.trailing:n),v(e,t,{leading:s,maxWait:t,trailing:n})}},7621:(e,t,a)=>{var i;!function(s){var n=/^\s+/,r=/\s+$/,o=0,l=s.round,c=s.min,d=s.max,u=s.random;function h(e,t){if(t=t||{},(e=e||"")instanceof h)return e;if(!(this instanceof h))return new h(e,t);var a=function(e){var t={r:0,g:0,b:0},a=1,i=null,o=null,l=null,u=!1,h=!1;"string"==typeof e&&(e=function(e){e=e.replace(n,"").replace(r,"").toLowerCase();var t,a=!1;if(F[e])e=F[e],a=!0;else if("transparent"==e)return{r:0,g:0,b:0,a:0,format:"name"};if(t=U.rgb.exec(e))return{r:t[1],g:t[2],b:t[3]};if(t=U.rgba.exec(e))return{r:t[1],g:t[2],b:t[3],a:t[4]};if(t=U.hsl.exec(e))return{h:t[1],s:t[2],l:t[3]};if(t=U.hsla.exec(e))return{h:t[1],s:t[2],l:t[3],a:t[4]};if(t=U.hsv.exec(e))return{h:t[1],s:t[2],v:t[3]};if(t=U.hsva.exec(e))return{h:t[1],s:t[2],v:t[3],a:t[4]};if(t=U.hex8.exec(e))return{r:H(t[1]),g:H(t[2]),b:H(t[3]),a:N(t[4]),format:a?"name":"hex8"};if(t=U.hex6.exec(e))return{r:H(t[1]),g:H(t[2]),b:H(t[3]),format:a?"name":"hex"};if(t=U.hex4.exec(e))return{r:H(t[1]+""+t[1]),g:H(t[2]+""+t[2]),b:H(t[3]+""+t[3]),a:N(t[4]+""+t[4]),format:a?"name":"hex8"};if(t=U.hex3.exec(e))return{r:H(t[1]+""+t[1]),g:H(t[2]+""+t[2]),b:H(t[3]+""+t[3]),format:a?"name":"hex"};return!1}(e));"object"==typeof e&&(B(e.r)&&B(e.g)&&B(e.b)?(f=e.r,p=e.g,m=e.b,t={r:255*E(f,255),g:255*E(p,255),b:255*E(m,255)},u=!0,h="%"===String(e.r).substr(-1)?"prgb":"rgb"):B(e.h)&&B(e.s)&&B(e.v)?(i=$(e.s),o=$(e.v),t=function(e,t,a){e=6*E(e,360),t=E(t,100),a=E(a,100);var i=s.floor(e),n=e-i,r=a*(1-t),o=a*(1-n*t),l=a*(1-(1-n)*t),c=i%6;return{r:255*[a,o,r,r,l,a][c],g:255*[l,a,a,o,r,r][c],b:255*[r,r,l,a,a,o][c]}}(e.h,i,o),u=!0,h="hsv"):B(e.h)&&B(e.s)&&B(e.l)&&(i=$(e.s),l=$(e.l),t=function(e,t,a){var i,s,n;function r(e,t,a){return a<0&&(a+=1),a>1&&(a-=1),a<1/6?e+6*(t-e)*a:a<.5?t:a<2/3?e+(t-e)*(2/3-a)*6:e}if(e=E(e,360),t=E(t,100),a=E(a,100),0===t)i=s=n=a;else{var o=a<.5?a*(1+t):a+t-a*t,l=2*a-o;i=r(l,o,e+1/3),s=r(l,o,e),n=r(l,o,e-1/3)}return{r:255*i,g:255*s,b:255*n}}(e.h,i,l),u=!0,h="hsl"),e.hasOwnProperty("a")&&(a=e.a));var f,p,m;return a=L(a),{ok:u,format:e.format||h,r:c(255,d(t.r,0)),g:c(255,d(t.g,0)),b:c(255,d(t.b,0)),a}}(e);this._originalInput=e,this._r=a.r,this._g=a.g,this._b=a.b,this._a=a.a,this._roundA=l(100*this._a)/100,this._format=t.format||a.format,this._gradientType=t.gradientType,this._r<1&&(this._r=l(this._r)),this._g<1&&(this._g=l(this._g)),this._b<1&&(this._b=l(this._b)),this._ok=a.ok,this._tc_id=o++}function f(e,t,a){e=E(e,255),t=E(t,255),a=E(a,255);var i,s,n=d(e,t,a),r=c(e,t,a),o=(n+r)/2;if(n==r)i=s=0;else{var l=n-r;switch(s=o>.5?l/(2-n-r):l/(n+r),n){case e:i=(t-a)/l+(t>1)+720)%360;--t;)i.h=(i.h+s)%360,n.push(h(i));return n}function I(e,t){t=t||6;for(var a=h(e).toHsv(),i=a.h,s=a.s,n=a.v,r=[],o=1/t;t--;)r.push(h({h:i,s,v:n})),n=(n+o)%1;return r}h.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},getLuminance:function(){var e,t,a,i=this.toRgb();return e=i.r/255,t=i.g/255,a=i.b/255,.2126*(e<=.03928?e/12.92:s.pow((e+.055)/1.055,2.4))+.7152*(t<=.03928?t/12.92:s.pow((t+.055)/1.055,2.4))+.0722*(a<=.03928?a/12.92:s.pow((a+.055)/1.055,2.4))},setAlpha:function(e){return this._a=L(e),this._roundA=l(100*this._a)/100,this},toHsv:function(){var e=p(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=p(this._r,this._g,this._b),t=l(360*e.h),a=l(100*e.s),i=l(100*e.v);return 1==this._a?"hsv("+t+", "+a+"%, "+i+"%)":"hsva("+t+", "+a+"%, "+i+"%, "+this._roundA+")"},toHsl:function(){var e=f(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=f(this._r,this._g,this._b),t=l(360*e.h),a=l(100*e.s),i=l(100*e.l);return 1==this._a?"hsl("+t+", "+a+"%, "+i+"%)":"hsla("+t+", "+a+"%, "+i+"%, "+this._roundA+")"},toHex:function(e){return m(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return function(e,t,a,i,s){var n=[M(l(e).toString(16)),M(l(t).toString(16)),M(l(a).toString(16)),M(O(i))];if(s&&n[0].charAt(0)==n[0].charAt(1)&&n[1].charAt(0)==n[1].charAt(1)&&n[2].charAt(0)==n[2].charAt(1)&&n[3].charAt(0)==n[3].charAt(1))return n[0].charAt(0)+n[1].charAt(0)+n[2].charAt(0)+n[3].charAt(0);return n.join("")}(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:l(this._r),g:l(this._g),b:l(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+l(this._r)+", "+l(this._g)+", "+l(this._b)+")":"rgba("+l(this._r)+", "+l(this._g)+", "+l(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:l(100*E(this._r,255))+"%",g:l(100*E(this._g,255))+"%",b:l(100*E(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+l(100*E(this._r,255))+"%, "+l(100*E(this._g,255))+"%, "+l(100*E(this._b,255))+"%)":"rgba("+l(100*E(this._r,255))+"%, "+l(100*E(this._g,255))+"%, "+l(100*E(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(T[m(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+v(this._r,this._g,this._b,this._a),a=t,i=this._gradientType?"GradientType = 1, ":"";if(e){var s=h(e);a="#"+v(s._r,s._g,s._b,s._a)}return"progid:DXImageTransform.Microsoft.gradient("+i+"startColorstr="+t+",endColorstr="+a+")"},toString:function(e){var t=!!e;e=e||this._format;var a=!1,i=this._a<1&&this._a>=0;return t||!i||"hex"!==e&&"hex6"!==e&&"hex3"!==e&&"hex4"!==e&&"hex8"!==e&&"name"!==e?("rgb"===e&&(a=this.toRgbString()),"prgb"===e&&(a=this.toPercentageRgbString()),"hex"!==e&&"hex6"!==e||(a=this.toHexString()),"hex3"===e&&(a=this.toHexString(!0)),"hex4"===e&&(a=this.toHex8String(!0)),"hex8"===e&&(a=this.toHex8String()),"name"===e&&(a=this.toName()),"hsl"===e&&(a=this.toHslString()),"hsv"===e&&(a=this.toHsvString()),a||this.toHexString()):"name"===e&&0===this._a?this.toName():this.toRgbString()},clone:function(){return h(this.toString())},_applyModification:function(e,t){var a=e.apply(null,[this].concat([].slice.call(t)));return this._r=a._r,this._g=a._g,this._b=a._b,this.setAlpha(a._a),this},lighten:function(){return this._applyModification(y,arguments)},brighten:function(){return this._applyModification(w,arguments)},darken:function(){return this._applyModification(C,arguments)},desaturate:function(){return this._applyModification(g,arguments)},saturate:function(){return this._applyModification(_,arguments)},greyscale:function(){return this._applyModification(b,arguments)},spin:function(){return this._applyModification(D,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(V,arguments)},complement:function(){return this._applyCombination(x,arguments)},monochromatic:function(){return this._applyCombination(I,arguments)},splitcomplement:function(){return this._applyCombination(A,arguments)},triad:function(){return this._applyCombination(k,arguments)},tetrad:function(){return this._applyCombination(S,arguments)}},h.fromRatio=function(e,t){if("object"==typeof e){var a={};for(var i in e)e.hasOwnProperty(i)&&(a[i]="a"===i?e[i]:$(e[i]));e=a}return h(e,t)},h.equals=function(e,t){return!(!e||!t)&&h(e).toRgbString()==h(t).toRgbString()},h.random=function(){return h.fromRatio({r:u(),g:u(),b:u()})},h.mix=function(e,t,a){a=0===a?0:a||50;var i=h(e).toRgb(),s=h(t).toRgb(),n=a/100;return h({r:(s.r-i.r)*n+i.r,g:(s.g-i.g)*n+i.g,b:(s.b-i.b)*n+i.b,a:(s.a-i.a)*n+i.a})},h.readability=function(e,t){var a=h(e),i=h(t);return(s.max(a.getLuminance(),i.getLuminance())+.05)/(s.min(a.getLuminance(),i.getLuminance())+.05)},h.isReadable=function(e,t,a){var i,s,n=h.readability(e,t);switch(s=!1,(i=function(e){var t,a;t=((e=e||{level:"AA",size:"small"}).level||"AA").toUpperCase(),a=(e.size||"small").toLowerCase(),"AA"!==t&&"AAA"!==t&&(t="AA");"small"!==a&&"large"!==a&&(a="small");return{level:t,size:a}}(a)).level+i.size){case"AAsmall":case"AAAlarge":s=n>=4.5;break;case"AAlarge":s=n>=3;break;case"AAAsmall":s=n>=7}return s},h.mostReadable=function(e,t,a){var i,s,n,r,o=null,l=0;s=(a=a||{}).includeFallbackColors,n=a.level,r=a.size;for(var c=0;cl&&(l=i,o=h(t[c]));return h.isReadable(e,o,{level:n,size:r})||!s?o:(a.includeFallbackColors=!1,h.mostReadable(e,["#fff","#000"],a))};var F=h.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},T=h.hexNames=function(e){var t={};for(var a in e)e.hasOwnProperty(a)&&(t[e[a]]=a);return t}(F);function L(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function E(e,t){(function(e){return"string"==typeof e&&-1!=e.indexOf(".")&&1===parseFloat(e)})(e)&&(e="100%");var a=function(e){return"string"==typeof e&&-1!=e.indexOf("%")}(e);return e=c(t,d(0,parseFloat(e))),a&&(e=parseInt(e*t,10)/100),s.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function P(e){return c(1,d(0,e))}function H(e){return parseInt(e,16)}function M(e){return 1==e.length?"0"+e:""+e}function $(e){return e<=1&&(e=100*e+"%"),e}function O(e){return s.round(255*parseFloat(e)).toString(16)}function N(e){return H(e)/255}var R,j,q,U=(j="[\\s|\\(]+("+(R="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+R+")[,|\\s]+("+R+")\\s*\\)?",q="[\\s|\\(]+("+R+")[,|\\s]+("+R+")[,|\\s]+("+R+")[,|\\s]+("+R+")\\s*\\)?",{CSS_UNIT:new RegExp(R),rgb:new RegExp("rgb"+j),rgba:new RegExp("rgba"+q),hsl:new RegExp("hsl"+j),hsla:new RegExp("hsla"+q),hsv:new RegExp("hsv"+j),hsva:new RegExp("hsva"+q),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function B(e){return!!U.CSS_UNIT.exec(e)}e.exports?e.exports=h:void 0===(i=function(){return h}.call(t,a,t,e))||(e.exports=i)}(Math)}},t={};function a(i){var s=t[i];if(void 0!==s)return s.exports;var n=t[i]={exports:{}};return e[i](n,n.exports,a),n.exports}a.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},a.d=(e,t)=>{for(var i in t)a.o(t,i)&&!a.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},a.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";var e=function(){var e=this._self._c;return e("div",{attrs:{id:"wepos-admin-app"}},[e("router-view")],1)};e._withStripped=!0;function t(e,t,a,i,s,n,r,o){var l,c="function"==typeof e?e.options:e;if(t&&(c.render=t,c.staticRenderFns=a,c._compiled=!0),i&&(c.functional=!0),n&&(c._scopeId="data-v-"+n),r?(l=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),s&&s.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(r)},c._ssrRegister=l):s&&(l=o?function(){s.call(this,(c.functional?this.parent:this).$root.$options.shadowRoot)}:s),l)if(c.functional){c._injectStyles=l;var d=c.render;c.render=function(e,t){return l.call(t),d(e,t)}}else{var u=c.beforeCreate;c.beforeCreate=u?[].concat(u,l):[l]}return{exports:e,options:c}}const i=t({name:"App"},e,[],!1,null,null,null).exports;var s=function(){var e=this,t=e._self._c;return t("div",{staticClass:"wepos-settings"},[t("h2",{staticStyle:{"margin-bottom":"15px"}},[e._v(e._s(e.__("Settings","wepos")))]),e._v(" "),e.isSaved?t("div",{staticClass:"settings-error notice is-dismissible",class:{updated:e.isUpdated,error:!e.isUpdated},attrs:{id:"setting-message_updated"}},[t("p",[t("strong",{domProps:{innerHTML:e._s(e.message)}})]),e._v(" "),t("button",{staticClass:"notice-dismiss",attrs:{type:"button"},on:{click:function(t){t.preventDefault(),e.isSaved=!1}}},[t("span",{staticClass:"screen-reader-text"},[e._v(e._s(e.__("Dismiss this notice.","wepos")))])])]):e._e(),e._v(" "),t("div",{staticClass:"wepos-settings-wrap"},[t("h2",{staticClass:"nav-tab-wrapper"},[e._l(e.settingSections,(function(a){return[t("a",{staticClass:"nav-tab",class:{"nav-tab-active":e.currentTab===a.id},attrs:{href:"#"},on:{click:function(t){return t.preventDefault(),e.changeTab(a)}}},[t("span",{staticClass:"dashicons",class:a.icon}),e._v(" "+e._s(a.title))])]}))],2),e._v(" "),t("div",{staticClass:"metabox-holder"},[e._l(e.settingFields,(function(a,i){return e.isLoaded?[t("div",{directives:[{name:"show",rawName:"v-show",value:e.currentTab===i,expression:"currentTab===index"}],staticClass:"group",attrs:{id:i}},[t("form",{attrs:{method:"post",action:"options.php"}},[t("input",{attrs:{type:"hidden",name:"option_page"},domProps:{value:i}}),e._v(" "),t("input",{attrs:{type:"hidden",name:"action",value:"update"}}),e._v(" "),t("h2",[e._v(e._s(e.showSectionTitle(i)))]),e._v(" "),t("table",{staticClass:"form-table"},[t("tbody",e._l(a,(function(a,s){return t("fields",{key:s,attrs:{"section-id":i,id:s,"field-data":a,"field-value":e.settingValues[i]},on:{openMedia:e.showMedia}})})),1)]),e._v(" "),t("p",{staticClass:"submit"},[t("input",{staticClass:"button button-primary",attrs:{type:"submit",name:"submit",id:"submit"},domProps:{value:e.__("Save Changes","wepos")},on:{click:function(t){return t.preventDefault(),e.saveSettings(e.settingValues[i],i)}}})])])])]:e._e()}))],2),e._v(" "),e.showLoading?t("div",{staticClass:"loading"}):e._e()])])};s._withStripped=!0;var n=function(){var e=this,t=e._self._c;return t("div",[e.containCommonFields(e.fieldData.type)?t("tr",{class:e.id},[t("th",{attrs:{scope:"row"}},[t("label",{attrs:{for:e.sectionId+"["+e.fieldData.name+"]"}},[e._v(e._s(e.fieldData.label))])]),e._v(" "),t("td",[t("input",{directives:[{name:"model",rawName:"v-model",value:e.fieldValue[e.fieldData.name],expression:"fieldValue[fieldData.name]"}],staticClass:"regular-text",attrs:{type:"text",id:e.sectionId+"["+e.fieldData.name+"]",name:e.sectionId+"["+e.fieldData.name+"]"},domProps:{value:e.fieldValue[e.fieldData.name]},on:{input:function(t){t.target.composing||e.$set(e.fieldValue,e.fieldData.name,t.target.value)}}}),e._v(" "),t("p",{staticClass:"description",domProps:{innerHTML:e._s(e.fieldData.desc)}})])]):e._e(),e._v(" "),"number"==e.fieldData.type?t("tr",{class:e.id},[t("th",{attrs:{scope:"row"}},[t("label",{attrs:{for:e.sectionId+"["+e.fieldData.name+"]"}},[e._v(e._s(e.fieldData.label))])]),e._v(" "),t("td",[t("input",{directives:[{name:"model",rawName:"v-model",value:e.fieldValue[e.fieldData.name],expression:"fieldValue[fieldData.name]"}],staticClass:"regular-text",attrs:{type:"number",min:e.fieldData.min,max:e.fieldData.max,step:e.fieldData.step,id:e.sectionId+"["+e.fieldData.name+"]",name:e.sectionId+"["+e.fieldData.name+"]"},domProps:{value:e.fieldValue[e.fieldData.name]},on:{input:function(t){t.target.composing||e.$set(e.fieldValue,e.fieldData.name,t.target.value)}}}),e._v(" "),t("p",{staticClass:"description",domProps:{innerHTML:e._s(e.fieldData.desc)}})])]):e._e(),e._v(" "),"textarea"==e.fieldData.type?t("tr",{class:e.id},[t("th",{attrs:{scope:"row"}},[t("label",{attrs:{for:e.sectionId+"["+e.fieldData.name+"]"}},[e._v(e._s(e.fieldData.label))])]),e._v(" "),t("td",[t("textarea",{directives:[{name:"model",rawName:"v-model",value:e.fieldValue[e.fieldData.name],expression:"fieldValue[fieldData.name]"}],staticClass:"regular-text",attrs:{type:"textarea",rows:e.fieldData.rows,cols:e.fieldData.cols,id:e.sectionId+"["+e.fieldData.name+"]",name:e.sectionId+"["+e.fieldData.name+"]"},domProps:{value:e.fieldValue[e.fieldData.name]},on:{input:function(t){t.target.composing||e.$set(e.fieldValue,e.fieldData.name,t.target.value)}}}),e._v(" "),t("p",{staticClass:"description",domProps:{innerHTML:e._s(e.fieldData.desc)}})])]):e._e(),e._v(" "),"checkbox"==e.fieldData.type?t("tr",{class:e.id},[t("th",{attrs:{scope:"row"}},[t("label",{attrs:{for:e.sectionId+"["+e.fieldData.name+"]"}},[e._v(e._s(e.fieldData.label))])]),e._v(" "),t("td",[t("fieldset",[t("label",{attrs:{for:e.sectionId+"["+e.fieldData.name+"]"}},[t("input",{directives:[{name:"model",rawName:"v-model",value:e.fieldValue[e.fieldData.name],expression:"fieldValue[fieldData.name]"}],staticClass:"checkbox",attrs:{type:"checkbox",id:e.sectionId+"["+e.fieldData.name+"]",name:e.sectionId+"["+e.fieldData.name+"]","true-value":"on","false-value":"off"},domProps:{checked:Array.isArray(e.fieldValue[e.fieldData.name])?e._i(e.fieldValue[e.fieldData.name],null)>-1:e._q(e.fieldValue[e.fieldData.name],"on")},on:{change:function(t){var a=e.fieldValue[e.fieldData.name],i=t.target,s=i.checked?"on":"off";if(Array.isArray(a)){var n=e._i(a,null);i.checked?n<0&&e.$set(e.fieldValue,e.fieldData.name,a.concat([null])):n>-1&&e.$set(e.fieldValue,e.fieldData.name,a.slice(0,n).concat(a.slice(n+1)))}else e.$set(e.fieldValue,e.fieldData.name,s)}}}),e._v("\n "+e._s(e.fieldData.desc)+"\n ")])])])]):e._e(),e._v(" "),"multicheck"==e.fieldData.type?t("tr",{class:e.id},[t("th",{attrs:{scope:"row"}},[t("label",{attrs:{for:e.sectionId+"["+e.fieldData.name+"]"}},[e._v(e._s(e.fieldData.label))])]),e._v(" "),t("td",[t("fieldset",[e._l(e.fieldData.options,(function(a,i){return[t("label",{attrs:{for:e.sectionId+"["+e.fieldData.name+"]["+i+"]"}},[t("input",{directives:[{name:"model",rawName:"v-model",value:e.fieldValue[e.fieldData.name][i],expression:"fieldValue[fieldData.name][optionKey]"}],staticClass:"checkbox",attrs:{type:"checkbox",id:e.sectionId+"["+e.fieldData.name+"]["+i+"]",name:e.sectionId+"["+e.fieldData.name+"]["+i+"]","true-value":i,"false-value":""},domProps:{checked:Array.isArray(e.fieldValue[e.fieldData.name][i])?e._i(e.fieldValue[e.fieldData.name][i],null)>-1:e._q(e.fieldValue[e.fieldData.name][i],i)},on:{change:function(t){var a=e.fieldValue[e.fieldData.name][i],s=t.target,n=s.checked?i:"";if(Array.isArray(a)){var r=e._i(a,null);s.checked?r<0&&e.$set(e.fieldValue[e.fieldData.name],i,a.concat([null])):r>-1&&e.$set(e.fieldValue[e.fieldData.name],i,a.slice(0,r).concat(a.slice(r+1)))}else e.$set(e.fieldValue[e.fieldData.name],i,n)}}}),e._v("\n "+e._s(a)+"\n ")]),e._v(" "),t("br")]}))],2)])]):e._e(),e._v(" "),"select"==e.fieldData.type?t("tr",{class:e.id},[t("th",{attrs:{scope:"row"}},[t("label",{attrs:{for:e.sectionId+"["+e.fieldData.name+"]"}},[e._v(e._s(e.fieldData.label))])]),e._v(" "),t("td",[e.fieldData.grouped?t("select",{directives:[{name:"model",rawName:"v-model",value:e.fieldValue[e.fieldData.name],expression:"fieldValue[fieldData.name]"}],staticClass:"regular",attrs:{name:e.sectionId+"["+e.fieldData.name+"]",id:e.sectionId+"["+e.fieldData.name+"]"},on:{change:function(t){var a=Array.prototype.filter.call(t.target.options,(function(e){return e.selected})).map((function(e){return"_value"in e?e._value:e.value}));e.$set(e.fieldValue,e.fieldData.name,t.target.multiple?a:a[0])}}},[e.fieldData.placeholder?t("option",{attrs:{value:""},domProps:{innerHTML:e._s(e.fieldData.placeholder)}}):e._e(),e._v(" "),e._l(e.fieldData.options,(function(a){return t("optgroup",{attrs:{label:a.group_label}},e._l(a.group_values,(function(a){return t("option",{domProps:{value:a.value,innerHTML:e._s(a.label)}})})),0)}))],2):t("select",{directives:[{name:"model",rawName:"v-model",value:e.fieldValue[e.fieldData.name],expression:"fieldValue[fieldData.name]"}],staticClass:"regular",attrs:{name:e.sectionId+"["+e.fieldData.name+"]",id:e.sectionId+"["+e.fieldData.name+"]"},on:{change:function(t){var a=Array.prototype.filter.call(t.target.options,(function(e){return e.selected})).map((function(e){return"_value"in e?e._value:e.value}));e.$set(e.fieldValue,e.fieldData.name,t.target.multiple?a:a[0])}}},[e.fieldData.placeholder?t("option",{attrs:{value:""},domProps:{innerHTML:e._s(e.fieldData.placeholder)}}):e._e(),e._v(" "),e._l(e.fieldData.options,(function(a,i){return t("option",{domProps:{value:i,innerHTML:e._s(a)}})}))],2),e._v(" "),t("p",{staticClass:"description",domProps:{innerHTML:e._s(e.fieldData.desc)}})])]):e._e(),e._v(" "),"file"==e.fieldData.type?t("tr",{class:e.id},[t("th",{attrs:{scope:"row"}},[t("label",{attrs:{for:e.sectionId+"["+e.fieldData.name+"]"}},[e._v(e._s(e.fieldData.label))])]),e._v(" "),t("td",[t("input",{directives:[{name:"model",rawName:"v-model",value:e.fieldValue[e.fieldData.name],expression:"fieldValue[fieldData.name]"}],staticClass:"regular-text wpsa-url",attrs:{type:"text",id:e.sectionId+"["+e.fieldData.name+"]",name:e.sectionId+"["+e.fieldData.name+"]"},domProps:{value:e.fieldValue[e.fieldData.name]},on:{input:function(t){t.target.composing||e.$set(e.fieldValue,e.fieldData.name,t.target.value)}}}),e._v(" "),t("input",{staticClass:"button wpsa-browse",attrs:{type:"button",value:"Choose File"},on:{click:function(t){return t.preventDefault(),e.$emit("openMedia",{sectionId:e.sectionId,name:e.fieldData.name},t)}}}),e._v(" "),t("p",{staticClass:"description",domProps:{innerHTML:e._s(e.fieldData.desc)}})])]):e._e(),e._v(" "),"color"==e.fieldData.type?t("tr",{class:e.id},[t("th",{attrs:{scope:"row"}},[t("label",{attrs:{for:e.sectionId+"["+e.fieldData.name+"]"}},[e._v(e._s(e.fieldData.label))])]),e._v(" "),t("td",[t("color-picker",{model:{value:e.fieldValue[e.fieldData.name],callback:function(t){e.$set(e.fieldValue,e.fieldData.name,t)},expression:"fieldValue[fieldData.name]"}}),e._v(" "),t("p",{staticClass:"description",domProps:{innerHTML:e._s(e.fieldData.desc)}})],1)]):e._e(),e._v(" "),"html"==e.fieldData.type?t("tr",{class:e.id},[t("th",{attrs:{scope:"row"}},[t("label",{attrs:{for:e.sectionId+"["+e.fieldData.name+"]"}},[e._v(e._s(e.fieldData.label))])]),e._v(" "),t("td",[t("p",{staticClass:"description",domProps:{innerHTML:e._s(e.fieldData.desc)}})])]):e._e(),e._v(" "),"radio"==e.fieldData.type?t("tr",{class:e.id},[t("th",{attrs:{scope:"row"}},[t("label",{attrs:{for:e.sectionId+"["+e.fieldData.name+"]"}},[e._v(e._s(e.fieldData.label))])]),e._v(" "),t("td",[t("fieldset",[e._l(e.fieldData.options,(function(a,i){return[t("label",{attrs:{for:e.sectionId+"["+e.fieldData.name+"]["+i+"]"}},[t("input",{directives:[{name:"model",rawName:"v-model",value:e.fieldValue[e.fieldData.name],expression:"fieldValue[fieldData.name]"}],staticClass:"radio",attrs:{type:"radio",id:e.sectionId+"["+e.fieldData.name+"]["+i+"]",name:i},domProps:{value:i,checked:e._q(e.fieldValue[e.fieldData.name],i)},on:{change:function(t){return e.$set(e.fieldValue,e.fieldData.name,i)}}}),e._v(" "+e._s(a)+"\n ")])]}))],2),e._v(" "),t("p",{staticClass:"description",domProps:{innerHTML:e._s(e.fieldData.desc)}})])]):e._e(),e._v(" "),"wpeditor"==e.fieldData.type?t("tr",{class:e.id},[t("th",{attrs:{scope:"row"}},[t("label",{attrs:{for:e.sectionId+"["+e.fieldData.name+"]"}},[e._v(e._s(e.fieldData.label))])]),e._v(" "),t("td",{attrs:{width:"72%"}},[t("text-editor",{model:{value:e.fieldValue[e.fieldData.name],callback:function(t){e.$set(e.fieldValue,e.fieldData.name,t)},expression:"fieldValue[fieldData.name]"}}),e._v(" "),t("p",{staticClass:"description",domProps:{innerHTML:e._s(e.fieldData.desc)}})],1)]):e._e(),e._v(" "),"repeatable"==e.fieldData.type?t("tr",{class:e.id},[t("th",{attrs:{scope:"row"}},[t("label",{attrs:{for:e.sectionId+"["+e.fieldData.name+"]"}},[e._v(e._s(e.fieldData.label))])]),e._v(" "),t("td",{attrs:{width:"72%"}},[t("ul",{staticClass:"dokan-settings-repeatable-list"},e._l(e.fieldValue[e.fieldData.name],(function(a,i){return e.fieldValue[e.fieldData.name]?t("li",[e._v("\n "+e._s(a.value)+" "),t("span",{staticClass:"dashicons dashicons-no-alt remove-item",on:{click:function(t){return t.preventDefault(),e.removeItem(i,e.fieldData.name)}}})]):e._e()})),0),e._v(" "),t("input",{directives:[{name:"model",rawName:"v-model",value:e.repeatableItem[e.fieldData.name],expression:"repeatableItem[fieldData.name]"}],staticClass:"regular-text",attrs:{type:"text"},domProps:{value:e.repeatableItem[e.fieldData.name]},on:{input:function(t){t.target.composing||e.$set(e.repeatableItem,e.fieldData.name,t.target.value)}}}),e._v(" "),t("a",{staticClass:"button wepos-repetable-add-item-btn",attrs:{href:"#"},on:{click:function(t){return t.preventDefault(),e.addItem(e.fieldData.type,e.fieldData.name)}}},[e._v("+")]),e._v(" "),t("p",{staticClass:"description",domProps:{innerHTML:e._s(e.fieldData.desc)}})])]):e._e(),e._v(" "),"radio_image"==e.fieldData.type?t("tr",{class:e.id},[t("th",{attrs:{scope:"row"}},[t("label",{attrs:{for:e.sectionId+"["+e.fieldData.name+"]"}},[e._v(e._s(e.fieldData.label))])]),e._v(" "),t("td",[t("div",{staticClass:"radio-image-container"},[e._l(e.fieldData.options,(function(a,i){return[t("label",{staticClass:"radio-image",class:{active:e.fieldValue[e.fieldData.name]===i,"not-active":e.fieldValue[e.fieldData.name]!==i}},[t("input",{directives:[{name:"model",rawName:"v-model",value:e.fieldValue[e.fieldData.name],expression:"fieldValue[fieldData.name]"}],staticClass:"radio",attrs:{type:"radio",name:e.fieldData.name},domProps:{value:i,checked:e._q(e.fieldValue[e.fieldData.name],i)},on:{change:function(t){return e.$set(e.fieldValue,e.fieldData.name,i)}}}),e._v(" "),t("span",{staticClass:"current-option-indicator"},[t("span",{staticClass:"dashicons dashicons-yes"}),e._v(" "+e._s(e.__("Active","wepos")))]),e._v(" "),t("img",{attrs:{src:a}}),e._v(" "),t("span",{staticClass:"active-option"},[t("button",{staticClass:"button button-primary button-hero",attrs:{type:"button"},on:{click:function(t){t.preventDefault(),e.fieldValue[e.fieldData.name]=i}}},[e._v("\n "+e._s(e.__("Select","wepos"))+"\n ")])])])]}))],2)])]):e._e()])};n._withStripped=!0;var r=function(){var e=this,t=e._self._c;return t("div",{staticClass:"color-picker-container"},[t("button",{staticClass:"button color-picker-button",style:{backgroundColor:e.value},attrs:{type:"button"},on:{click:e.toggleColorPicker}},[t("span",[e._v(e._s(e.__("Select Color","wepos")))])]),e._v(" "),e.showColorPicker&&"hex"===e.format?t("input",{staticClass:"hex-input",attrs:{type:"text"},domProps:{value:e.value},on:{input:function(t){return e.setHexColor(t.target.value)}}}):e._e(),e._v(" "),e.showColorPicker?t("div",{staticClass:"button-group"},[t("button",{staticClass:"button button-small",attrs:{type:"button"},on:{click:function(t){return e.updateColor({})}}},[e._v(e._s(e.__("Clear","wepos")))]),e._v(" "),t("button",{staticClass:"button button-small",attrs:{type:"button"},on:{click:e.toggleColorPicker}},[e._v(e._s(e.__("Close","wepos")))])]):e._e(),e._v(" "),e.showColorPicker?t("sketch",{attrs:{value:e.value,"preset-colors":e.presetColors,"disable-alpha":e.disableAlpha,"disable-fields":e.disableFields},on:{input:e.updateColor}}):e._e()],1)};r._withStripped=!0;var o=function(){var e=this,t=e._self._c;return t("div",{class:["vc-sketch",e.disableAlpha?"vc-sketch__disable-alpha":""],attrs:{role:"application","aria-label":"Sketch color picker"}},[t("div",{staticClass:"vc-sketch-saturation-wrap"},[t("saturation",{on:{change:e.childChange},model:{value:e.colors,callback:function(t){e.colors=t},expression:"colors"}})],1),e._v(" "),t("div",{staticClass:"vc-sketch-controls"},[t("div",{staticClass:"vc-sketch-sliders"},[t("div",{staticClass:"vc-sketch-hue-wrap"},[t("hue",{on:{change:e.childChange},model:{value:e.colors,callback:function(t){e.colors=t},expression:"colors"}})],1),e._v(" "),e.disableAlpha?e._e():t("div",{staticClass:"vc-sketch-alpha-wrap"},[t("alpha",{on:{change:e.childChange},model:{value:e.colors,callback:function(t){e.colors=t},expression:"colors"}})],1)]),e._v(" "),t("div",{staticClass:"vc-sketch-color-wrap"},[t("div",{staticClass:"vc-sketch-active-color",style:{background:e.activeColor},attrs:{"aria-label":`Current color is ${e.activeColor}`}}),e._v(" "),t("checkboard")],1)]),e._v(" "),e.disableFields?e._e():t("div",{staticClass:"vc-sketch-field"},[t("div",{staticClass:"vc-sketch-field--double"},[t("ed-in",{attrs:{label:"hex",value:e.hex},on:{change:e.inputChange}})],1),e._v(" "),t("div",{staticClass:"vc-sketch-field--single"},[t("ed-in",{attrs:{label:"r",value:e.colors.rgba.r},on:{change:e.inputChange}})],1),e._v(" "),t("div",{staticClass:"vc-sketch-field--single"},[t("ed-in",{attrs:{label:"g",value:e.colors.rgba.g},on:{change:e.inputChange}})],1),e._v(" "),t("div",{staticClass:"vc-sketch-field--single"},[t("ed-in",{attrs:{label:"b",value:e.colors.rgba.b},on:{change:e.inputChange}})],1),e._v(" "),e.disableAlpha?e._e():t("div",{staticClass:"vc-sketch-field--single"},[t("ed-in",{attrs:{label:"a",value:e.colors.a,"arrow-offset":.01,max:1},on:{change:e.inputChange}})],1)]),e._v(" "),t("div",{staticClass:"vc-sketch-presets",attrs:{role:"group","aria-label":"A color preset, pick one to set as current color"}},[e._l(e.presetColors,(function(a){return[e.isTransparent(a)?t("div",{key:a,staticClass:"vc-sketch-presets-color",attrs:{"aria-label":"Color:"+a},on:{click:function(t){return e.handlePreset(a)}}},[t("checkboard")],1):t("div",{key:a,staticClass:"vc-sketch-presets-color",style:{background:a},attrs:{"aria-label":"Color:"+a},on:{click:function(t){return e.handlePreset(a)}}})]}))],2)])};o._withStripped=!0;var l=a(7621),c=a.n(l);function d(e,t){var a,i=e&&e.a;!(a=e&&e.hsl?c()(e.hsl):e&&e.hex&&e.hex.length>0?c()(e.hex):e&&e.hsv?c()(e.hsv):e&&e.rgba?c()(e.rgba):e&&e.rgb?c()(e.rgb):c()(e))||void 0!==a._a&&null!==a._a||a.setAlpha(i||1);var s=a.toHsl(),n=a.toHsv();return 0===s.s&&(n.h=s.h=e.h||e.hsl&&e.hsl.h||t||0),{hsl:s,hex:a.toHexString().toUpperCase(),hex8:a.toHex8String().toUpperCase(),rgba:a.toRgb(),hsv:n,oldHue:e.h||t||s.h,source:e.source,a:e.a||a.getAlpha()}}const u={props:["value"],data(){return{val:d(this.value)}},computed:{colors:{get(){return this.val},set(e){this.val=e,this.$emit("input",e)}}},watch:{value(e){this.val=d(e)}},methods:{colorChange(e,t){this.oldHue=this.colors.hsl.h,this.colors=d(e,t||this.oldHue)},isValidHex:e=>c()(e).isValid(),simpleCheckForValidColor(e){for(var t=["r","g","b","a","h","s","l","v"],a=0,i=0,s=0;se.map((e=>e.toUpperCase())),isTransparent:e=>0===c()(e).getAlpha()}};var h=function(){var e=this,t=e._self._c;return t("div",{staticClass:"vc-editable-input"},[t("input",{directives:[{name:"model",rawName:"v-model",value:e.val,expression:"val"}],ref:"input",staticClass:"vc-input__input",attrs:{"aria-labelledby":e.labelId},domProps:{value:e.val},on:{keydown:e.handleKeyDown,input:[function(t){t.target.composing||(e.val=t.target.value)},e.update]}}),e._v(" "),t("span",{staticClass:"vc-input__label",attrs:{for:e.label,id:e.labelId}},[e._v(e._s(e.labelSpanText))]),e._v(" "),t("span",{staticClass:"vc-input__desc"},[e._v(e._s(e.desc))])])};h._withStripped=!0;const f=t({name:"editableInput",props:{label:String,labelText:String,desc:String,value:[String,Number],max:Number,min:Number,arrowOffset:{type:Number,default:1}},computed:{val:{get(){return this.value},set(e){if(!(void 0!==this.max&&+e>this.max))return e;this.$refs.input.value=this.max}},labelId(){return`input__label__${this.label}__${Math.random().toString().slice(2,5)}`},labelSpanText(){return this.labelText||this.label}},methods:{update(e){this.handleChange(e.target.value)},handleChange(e){let t={};t[this.label]=e,(void 0===t.hex&&void 0===t["#"]||e.length>5)&&this.$emit("change",t)},handleKeyDown(e){let t=this.val,a=Number(t);if(a){let i=this.arrowOffset||1;38===e.keyCode&&(t=a+i,this.handleChange(t),e.preventDefault()),40===e.keyCode&&(t=a-i,this.handleChange(t),e.preventDefault())}}}},h,[],!1,null,null,null).exports;var p=function(){var e=this,t=e._self._c;return t("div",{ref:"container",staticClass:"vc-saturation",style:{background:e.bgColor},on:{mousedown:e.handleMouseDown,touchmove:e.handleChange,touchstart:e.handleChange}},[t("div",{staticClass:"vc-saturation--white"}),e._v(" "),t("div",{staticClass:"vc-saturation--black"}),e._v(" "),t("div",{staticClass:"vc-saturation-pointer",style:{top:e.pointerTop,left:e.pointerLeft}},[t("div",{staticClass:"vc-saturation-circle"})])])};p._withStripped=!0;var m=a(5627),v=a.n(m),g=a(3096);const _=t({name:"Saturation",props:{value:Object},computed:{colors(){return this.value},bgColor(){return`hsl(${this.colors.hsv.h}, 100%, 50%)`},pointerTop(){return-100*this.colors.hsv.v+1+100+"%"},pointerLeft(){return 100*this.colors.hsv.s+"%"}},methods:{throttle:a.n(g)()(((e,t)=>{e(t)}),20,{leading:!0,trailing:!1}),handleChange(e,t){!t&&e.preventDefault();var a=this.$refs.container;if(a){var i=a.clientWidth,s=a.clientHeight,n=a.getBoundingClientRect().left+window.pageXOffset,r=a.getBoundingClientRect().top+window.pageYOffset,o=e.pageX||(e.touches?e.touches[0].pageX:0),l=e.pageY||(e.touches?e.touches[0].pageY:0),c=v()(o-n,0,i),d=v()(l-r,0,s),u=c/i,h=v()(-d/s+1,0,1);this.throttle(this.onChange,{h:this.colors.hsv.h,s:u,v:h,a:this.colors.hsv.a,source:"hsva"})}},onChange(e){this.$emit("change",e)},handleMouseDown(e){window.addEventListener("mousemove",this.handleChange),window.addEventListener("mouseup",this.handleChange),window.addEventListener("mouseup",this.handleMouseUp)},handleMouseUp(e){this.unbindEventListeners()},unbindEventListeners(){window.removeEventListener("mousemove",this.handleChange),window.removeEventListener("mouseup",this.handleChange),window.removeEventListener("mouseup",this.handleMouseUp)}}},p,[],!1,null,null,null).exports;var b=function(){var e=this,t=e._self._c;return t("div",{class:["vc-hue",e.directionClass]},[t("div",{ref:"container",staticClass:"vc-hue-container",attrs:{role:"slider","aria-valuenow":e.colors.hsl.h,"aria-valuemin":"0","aria-valuemax":"360"},on:{mousedown:e.handleMouseDown,touchmove:e.handleChange,touchstart:e.handleChange}},[t("div",{staticClass:"vc-hue-pointer",style:{top:e.pointerTop,left:e.pointerLeft},attrs:{role:"presentation"}},[t("div",{staticClass:"vc-hue-picker"})])])])};b._withStripped=!0;const y=t({name:"Hue",props:{value:Object,direction:{type:String,default:"horizontal"}},data:()=>({oldHue:0,pullDirection:""}),computed:{colors(){const e=this.value.hsl.h;return 0!==e&&e-this.oldHue>0&&(this.pullDirection="right"),0!==e&&e-this.oldHue<0&&(this.pullDirection="left"),this.oldHue=e,this.value},directionClass(){return{"vc-hue--horizontal":"horizontal"===this.direction,"vc-hue--vertical":"vertical"===this.direction}},pointerTop(){return"vertical"===this.direction?0===this.colors.hsl.h&&"right"===this.pullDirection?0:-100*this.colors.hsl.h/360+100+"%":0},pointerLeft(){return"vertical"===this.direction?0:0===this.colors.hsl.h&&"right"===this.pullDirection?"100%":100*this.colors.hsl.h/360+"%"}},methods:{handleChange(e,t){!t&&e.preventDefault();var a=this.$refs.container;if(a){var i,s=a.clientWidth,n=a.clientHeight,r=a.getBoundingClientRect().left+window.pageXOffset,o=a.getBoundingClientRect().top+window.pageYOffset,l=(e.pageX||(e.touches?e.touches[0].pageX:0))-r,c=(e.pageY||(e.touches?e.touches[0].pageY:0))-o;"vertical"===this.direction?(i=c<0?360:c>n?0:360*(-100*c/n+100)/100,this.colors.hsl.h!==i&&this.$emit("change",{h:i,s:this.colors.hsl.s,l:this.colors.hsl.l,a:this.colors.hsl.a,source:"hsl"})):(i=l<0?0:l>s?360:360*(100*l/s)/100,this.colors.hsl.h!==i&&this.$emit("change",{h:i,s:this.colors.hsl.s,l:this.colors.hsl.l,a:this.colors.hsl.a,source:"hsl"}))}},handleMouseDown(e){this.handleChange(e,!0),window.addEventListener("mousemove",this.handleChange),window.addEventListener("mouseup",this.handleMouseUp)},handleMouseUp(e){this.unbindEventListeners()},unbindEventListeners(){window.removeEventListener("mousemove",this.handleChange),window.removeEventListener("mouseup",this.handleMouseUp)}}},b,[],!1,null,null,null).exports;var w=function(){var e=this,t=e._self._c;return t("div",{staticClass:"vc-alpha"},[t("div",{staticClass:"vc-alpha-checkboard-wrap"},[t("checkboard")],1),e._v(" "),t("div",{staticClass:"vc-alpha-gradient",style:{background:e.gradientColor}}),e._v(" "),t("div",{ref:"container",staticClass:"vc-alpha-container",on:{mousedown:e.handleMouseDown,touchmove:e.handleChange,touchstart:e.handleChange}},[t("div",{staticClass:"vc-alpha-pointer",style:{left:100*e.colors.a+"%"}},[t("div",{staticClass:"vc-alpha-picker"})])])])};w._withStripped=!0;var C=function(){return(0,this._self._c)("div",{staticClass:"vc-checkerboard",style:this.bgStyle})};C._withStripped=!0;let D={};function x(e,t,a){var i=e+","+t+","+a;if(D[i])return D[i];var s=function(e,t,a){if("undefined"==typeof document)return null;var i=document.createElement("canvas");i.width=i.height=2*a;var s=i.getContext("2d");return s?(s.fillStyle=e,s.fillRect(0,0,i.width,i.height),s.fillStyle=t,s.fillRect(0,0,a,a),s.translate(a,a),s.fillRect(0,0,a,a),i.toDataURL()):null}(e,t,a);return D[i]=s,s}const k=t({name:"Checkboard",props:{size:{type:[Number,String],default:8},white:{type:String,default:"#fff"},grey:{type:String,default:"#e6e6e6"}},computed:{bgStyle(){return{"background-image":"url("+x(this.white,this.grey,this.size)+")"}}}},C,[],!1,null,null,null).exports;const S=t({name:"Alpha",props:{value:Object,onChange:Function},components:{checkboard:k},computed:{colors(){return this.value},gradientColor(){var e=this.colors.rgba,t=[e.r,e.g,e.b].join(",");return"linear-gradient(to right, rgba("+t+", 0) 0%, rgba("+t+", 1) 100%)"}},methods:{handleChange(e,t){!t&&e.preventDefault();var a=this.$refs.container;if(a){var i,s=a.clientWidth,n=a.getBoundingClientRect().left+window.pageXOffset,r=(e.pageX||(e.touches?e.touches[0].pageX:0))-n;i=r<0?0:r>s?1:Math.round(100*r/s)/100,this.colors.a!==i&&this.$emit("change",{h:this.colors.hsl.h,s:this.colors.hsl.s,l:this.colors.hsl.l,a:i,source:"rgba"})}},handleMouseDown(e){this.handleChange(e,!0),window.addEventListener("mousemove",this.handleChange),window.addEventListener("mouseup",this.handleMouseUp)},handleMouseUp(){this.unbindEventListeners()},unbindEventListeners(){window.removeEventListener("mousemove",this.handleChange),window.removeEventListener("mouseup",this.handleMouseUp)}}},w,[],!1,null,null,null).exports,A=["#D0021B","#F5A623","#F8E71C","#8B572A","#7ED321","#417505","#BD10E0","#9013FE","#4A90E2","#50E3C2","#B8E986","#000000","#4A4A4A","#9B9B9B","#FFFFFF","rgba(0,0,0,0)"];const V={components:{Sketch:t({name:"Sketch",mixins:[u],components:{saturation:_,hue:y,alpha:S,"ed-in":f,checkboard:k},props:{presetColors:{type:Array,default:()=>A},disableAlpha:{type:Boolean,default:!1},disableFields:{type:Boolean,default:!1}},computed:{hex(){let e;return e=this.colors.a<1?this.colors.hex8:this.colors.hex,e.replace("#","")},activeColor(){var e=this.colors.rgba;return"rgba("+[e.r,e.g,e.b,e.a].join(",")+")"}},methods:{handlePreset(e){this.colorChange({hex:e,source:"hex"})},childChange(e){this.colorChange(e)},inputChange(e){e&&(e.hex?this.isValidHex(e.hex)&&this.colorChange({hex:e.hex,source:"hex"}):(e.r||e.g||e.b||e.a)&&this.colorChange({r:e.r||this.colors.rgba.r,g:e.g||this.colors.rgba.g,b:e.b||this.colors.rgba.b,a:e.a||this.colors.rgba.a,source:"rgba"}))}}},o,[],!1,null,null,null).exports},props:{value:{type:String,required:!0,default:""},format:{type:String,required:!1,default:"hex",validator:e=>-1!==["hsl","hex","rgba","hsv"].indexOf(e)},presetColors:{type:Array,required:!1,default:()=>["#000","#fff","#d33","#d93","#ee2","#81d742","#1e73be","#8224e3"]},disableAlpha:{type:Boolean,required:!1,default:!0},disableFields:{type:Boolean,required:!1,default:!0}},data:()=>({showColorPicker:!1}),methods:{updateColor(e){let t="";e[this.format]&&(t=e[this.format]),this.$emit("input",t)},toggleColorPicker(){this.showColorPicker=!this.showColorPicker},setHexColor(e){this.updateColor({hex:e})}}};var I=t(V,r,[],!1,null,"5c4eff5b",null);var F=t({name:"Fields",components:{colorPicker:I.exports,TextEditor:wepos_get_lib("TextEditor")},data:()=>({repeatableItem:{}}),props:["id","fieldData","sectionId","fieldValue"],methods:{containCommonFields:e=>window.weLo_.includes([void 0,"text","email","url","phone"],e),addItem(e,t){this.fieldValue[t]=this.fieldValue[t]||[],void 0!==this.repeatableItem[t]&&this.repeatableItem[t]&&(this.fieldValue[t].push({id:this.repeatableItem[t].trim().replace(/\s+/g,"_").toLowerCase(),value:this.repeatableItem[t]}),this.repeatableItem[t]="")},removeItem(e,t){this.fieldValue[t].splice(e,1)}}},n,[],!1,null,null,null);const T=t({name:"Settings",components:{Fields:F.exports},data:()=>({isSaved:!1,showLoading:!1,isUpdated:!1,isLoaded:!1,message:"",currentTab:null,settingSections:[],settingFields:{},settingValues:{}}),methods:{changeTab(e){this.currentTab=e.id,"undefined"!=typeof localStorage&&localStorage.setItem("activetab",this.currentTab)},showSectionTitle(e){return window.weLo_.findIndex(this.settingSections,{id:e}).title},fetchSettingValues(){var e=this,t={action:"wepos_get_setting_values",nonce:wepos.nonce};e.showLoading=!0,jQuery.post(wepos.ajaxurl,t,(function(t){t.success&&(Object.keys(e.settingFields).forEach((function(a,i){Object.keys(e.settingFields[a]).forEach((function(i,s){e.settingValues[a]||(e.settingValues[a]={}),void 0===t.data[a][i]?void 0===e.settingFields[a][i].default?e.settingValues[a][i]="":e.settingValues[a][i]=e.settingFields[a][i].default:e.settingValues[a][i]=t.data[a][i]}))})),e.settingValues=jQuery.extend({},e.settingValues),e.showLoading=!1,e.isLoaded=!0)}))},showMedia(e,t){var a=this,i=wp.media.frames.file_frame=wp.media({title:this.__("Choose your file","wepos"),button:{text:this.__("Select","wepos")},multiple:!1});i.on("select",(function(){var t=i.state().get("selection").first().toJSON();a.settingValues[e.sectionId][e.name]=t.url})),i.open()},saveSettings(e,t){var a=this,i={action:"wepos_save_settings",nonce:wepos.nonce,settingsData:e,section:t};a.showLoading=!0,jQuery.post(wepos.ajaxurl,i).done((function(e){var t=e.data.settings;a.isSaved=!0,a.isUpdated=!0,a.message=e.data.message,a.settingValues[t.name]=t.value})).fail((function(e){var t=e.responseJSON.data.map((function(e){return e.message}));alert(t.join(" "))})).always((function(){a.showLoading=!1}))}},created(){this.fetchSettingValues(),this.currentTab="wepos_general","undefined"!=typeof localStorage&&(this.currentTab=localStorage.getItem("activetab")?localStorage.getItem("activetab"):"wepos_general"),this.settingSections=wepos.settings_sections,this.settingFields=wepos.settings_fields}},s,[],!1,null,null,null).exports;let L=wepos_get_lib("Vue"),E=wepos_get_lib("Router");L.use(E);const P=new E({routes:wepos.hooks.applyFilters("wepos_admin_routes",[{path:"/settings",name:"Settings",component:T}])}),H={hasStock(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e.manage_stock?!!e.backorders_allowed||e.stock_quantity>t:"outofstock"!=e.stock_status}},M={namespaced:!0,state:{settings:{},availableTax:{},cartdata:{line_items:[],fee_lines:[]}},getters:{getSubtotal(e){var t=0;return weLo_.forEach(e.cartdata.line_items,(function(e,a){e.on_sale?t+=e.quantity*e.sale_price:t+=e.quantity*e.regular_price})),t},getTotalFee(e){var t=0;return weLo_.forEach(e.cartdata.fee_lines,(function(e,a){"fee"==e.type&&(t+=Math.abs(e.total))})),t},getTotalDiscount(e){var t=0;return weLo_.forEach(e.cartdata.fee_lines,(function(e,a){"discount"==e.type&&(t+=Number(Math.abs(e.total)))})),t},getTotalLineTax(e){var t=0;return weLo_.forEach(e.cartdata.line_items,(function(e,a){t+=Math.abs(e.tax_amount*e.quantity)})),t},getTotalTax(e){let t=0,a=0;return weLo_.forEach(e.cartdata.line_items,(function(e,a){t+=Math.abs(e.tax_amount*e.quantity)})),null!=e.settings.woo_tax&&"incl"==e.settings.woo_tax.wc_tax_display_cart&&(t=0),weLo_.forEach(e.cartdata.fee_lines,(function(i,s){if("taxable"!==i.tax_status)return;let n=""===i.tax_class?"standard":i.tax_class,r=weLo_.find(e.availableTax,{class:n.toString()});r&&("discount"===i.type&&(t+=i.total/r.rate),"fee"===i.type&&(a+=Math.abs(i.total)*Math.abs(r.rate)/100))})),t+a},getOrderTotal:(e,t)=>t.getSubtotal+t.getTotalFee+t.getTotalTax,getTotal:(e,t)=>t.getOrderTotal-t.getTotalDiscount,getSettings:(e,t)=>e.settings},mutations:{setSettings(e,t){e.settings=t},setAvailableTax(e,t){e.availableTax=t},setCartData(e,t){weLo_.isEmpty(t)?e.cartdata={line_items:[],fee_lines:[]}:e.cartdata=Object.assign({},t)},addToCartItem(e,t){var a={};a.product_id=0===t.parent_id?t.id:t.parent_id,a.name=t.name,a.quantity=1,a.regular_price=t.regular_display_price,a.sale_price=t.sales_display_price,a.on_sale=t.on_sale,a.attribute=t.attributes,a.variation_id=0!==t.parent_id?t.id:0,a.editQuantity=!1,a.type=t.type,a.tax_amount=t.tax_amount,a.manage_stock=t.manage_stock,a.stock_status=t.stock_status,a.backorders_allowed=t.backorders_allowed,a.stock_quantity=t.stock_quantity;var i=weLo_.findIndex(e.cartdata.line_items,{product_id:a.product_id,variation_id:a.variation_id});i<0?H.hasStock(t)&&e.cartdata.line_items.push(a):H.hasStock(t,e.cartdata.line_items[i].quantity)&&(e.cartdata.line_items[i].quantity+=1)},removeCartItem(e,t){e.cartdata.line_items.splice(t,1)},addCartItemQuantity(e,t){var a=e.cartdata.line_items[t];H.hasStock(a,a.quantity)&&e.cartdata.line_items[t].quantity++},removeCartItemQuantity(e,t){e.cartdata.line_items[t].quantity<=1?e.cartdata.line_items[t].quantity=1:e.cartdata.line_items[t].quantity--},toggleEditQuantity(e,t){e.cartdata.line_items[t].editQuantity=!e.cartdata.line_items[t].editQuantity},addDiscount(e,t){e.cartdata.fee_lines.push({name:t.title,type:"discount",value:t.value.toString(),isEdit:!1,discount_type:t.type,tax_status:"taxable",tax_class:"",total:0})},addFee(e,t){e.cartdata.fee_lines.push({name:t.title,type:"fee",value:t.value.toString(),isEdit:!1,fee_type:t.type,tax_status:"taxable",tax_class:"",total:0})},saveFeeValue(e,t){e.cartdata.fee_lines.splice(t.key,1,t.feeData),e.cartdata.fee_lines[t.key].isEdit=!1},editFeeValue(e,t){e.cartdata.fee_lines[t].isEdit=!0},cancelSaveFeeValue(e,t){e.cartdata.fee_lines[t].isEdit=!1},removeFeeLineItems(e,t){e.cartdata.fee_lines.splice(t,1)},emptyCart(e){e.cartdata={line_items:[],fee_lines:[]}},calculateDiscount(e,t){e.cartdata.fee_lines.length>0&&weLo_.forEach(e.cartdata.fee_lines,((a,i)=>{"discount"==a.type&&("percent"==a.discount_type?e.cartdata.fee_lines[i].total="-"+t.getSubtotal*Math.abs(a.value)/100:e.cartdata.fee_lines[i].total="-"+Math.abs(a.value))}))},calculateFee(e,t){e.cartdata.fee_lines.length>0&&weLo_.forEach(e.cartdata.fee_lines,((a,i)=>{"fee"==a.type&&("percent"==a.fee_type?e.cartdata.fee_lines[i].total=(t.getSubtotal*Math.abs(a.value)/100).toString():e.cartdata.fee_lines[i].total=Math.abs(a.value).toString())}))}},actions:{setSettingsAction(e,t){e.commit("setSettings",t)},setAvailableTaxAction(e,t){e.commit("setAvailableTax",t)},setCartDataAction(e,t){e.commit("setCartData",t),e.commit("calculateDiscount",e.getters),e.commit("calculateFee",e.getters)},addToCartAction(e,t){e.commit("addToCartItem",t),e.commit("calculateDiscount",e.getters),e.commit("calculateFee",e.getters)},removeCartItemAction(e,t){e.commit("removeCartItem",t),e.commit("calculateDiscount",e.getters),e.commit("calculateFee",e.getters)},addItemQuantityAction(e,t){e.commit("addCartItemQuantity",t),e.commit("calculateDiscount",e.getters),e.commit("calculateFee",e.getters)},removeItemQuantityAction(e,t){e.commit("removeCartItemQuantity",t),e.commit("calculateDiscount",e.getters),e.commit("calculateFee",e.getters)},toggleEditQuantityAction(e,t){e.commit("toggleEditQuantity",t)},addDiscountAction(e,t){e.commit("addDiscount",t),e.commit("calculateDiscount",e.getters),e.commit("calculateFee",e.getters)},addFeeAction(e,t){e.commit("addFee",t),e.commit("calculateDiscount",e.getters),e.commit("calculateFee",e.getters)},removeFeeLineItemsAction(e,t){e.commit("removeFeeLineItems",t),e.commit("calculateDiscount",e.getters),e.commit("calculateFee",e.getters)},saveFeeValueAction(e,t){e.commit("saveFeeValue",t),e.commit("calculateDiscount",e.getters),e.commit("calculateFee",e.getters)},editFeeValueAction(e,t){e.commit("editFeeValue",t)},cancelSaveFeeValueAction(e,t){e.commit("cancelSaveFeeValue",t)},emptyCartAction(e){e.commit("emptyCart")},calculateDiscount(e){e.commit("calculateDiscount",e.getters)},calculateFee(e){e.commit("calculateFee",e.getters)}}},$={namespaced:!0,state:{orderdata:{billing:{},shipping:{},customer_id:0,customer_note:"",payment_method:"",payment_method_title:""},canProcessPayment:!1},getters:{getCanProcessPayment:e=>e.canProcessPayment},mutations:{setOrderData(e,t){weLo_.isEmpty(t)?e.orderdata={billing:{},shipping:{},customer_id:0,customer_note:"",payment_method:"",payment_method_title:""}:e.orderdata=t},setCustomer(e,t){Object.keys(t).length>0?(e.orderdata.billing=t.billing,e.orderdata.shipping=t.shipping,e.orderdata.customer_id=t.id):(e.orderdata.billing={},e.orderdata.shipping={},e.orderdata.customer_id=0)},emptyOrderdata(e){e.orderdata={billing:{},shipping:{},customer_id:0,customer_note:"",payment_method:"",payment_method_title:""}},setCustomerNote(e,t){e.orderdata.customer_note=t.trim()},removeCustomerNote(e){e.orderdata.customer_note=""},setGateway(e,t){e.orderdata.payment_method=t.id,e.orderdata.payment_method_title=t.title},setCanProcessPayment(e,t){e.canProcessPayment=t}},actions:{setOrderDataAction(e,t){e.commit("setOrderData",t)},setCustomerAction(e,t){e.commit("setCustomer",t)},emptyOrderdataAction(e){e.commit("emptyOrderdata")},setCustomerNoteAction(e,t){e.commit("setCustomerNote",t)},removeCustomerNoteAction(e){e.commit("removeCustomerNote")},setGatewayAction(e,t){e.commit("setGateway",t)},setCanProcessPaymentAction(e,t){e.commit("setCanProcessPayment",t)}}};let O=wepos_get_lib("Vue"),N=wepos_get_lib("Vuex");O.use(N);const R=new N.Store({modules:{Cart:M,Order:$}});const j=function(e){var t=jQuery;let a=t("#toplevel_page_"+e),i=window.location.href,s=i.substr(i.indexOf("admin.php"));a.on("click","a",(function(){var e=t(this);t("ul.wp-submenu li",a).removeClass("current"),e.hasClass("wp-has-submenu")?t("li.wp-first-item",a).addClass("current"):e.parents("li").addClass("current")})),t("ul.wp-submenu a",a).each((function(e,a){t(a).attr("href")!==s||t(a).parent().addClass("current")}))};let q=wepos_get_lib("Vue");q.config.productionTip=!1,new q({el:"#wepos-admin-app",router:P,store:R,render:e=>e(i),created(){this.setLocaleData(wepos.i18n.wepos),wepos.i18n["wepos-pro"]&&this.setLocaleData(wepos.i18n["wepos-pro"])}}),j("wepos")})()})(); \ No newline at end of file +(()=>{var e={5627:e=>{e.exports=function(e,t,a){return ta?a:e:et?t:e}},3096:(e,t,a)=>{var i="Expected a function",s=/^\s+|\s+$/g,n=/^[-+]0x[0-9a-f]+$/i,r=/^0b[01]+$/i,o=/^0o[0-7]+$/i,l=parseInt,c="object"==typeof a.g&&a.g&&a.g.Object===Object&&a.g,d="object"==typeof self&&self&&self.Object===Object&&self,u=c||d||Function("return this")(),h=Object.prototype.toString,f=Math.max,p=Math.min,m=function(){return u.Date.now()};function v(e,t,a){var s,n,r,o,l,c,d=0,u=!1,h=!1,v=!0;if("function"!=typeof e)throw new TypeError(i);function b(t){var a=s,i=n;return s=n=void 0,d=t,o=e.apply(i,a)}function w(e){return d=e,l=setTimeout(C,t),u?b(e):o}function y(e){var a=e-c;return void 0===c||a>=t||a<0||h&&e-d>=r}function C(){var e=m();if(y(e))return x(e);l=setTimeout(C,function(e){var a=t-(e-c);return h?p(a,r-(e-d)):a}(e))}function x(e){return l=void 0,v&&s?b(e):(s=n=void 0,o)}function D(){var e=m(),a=y(e);if(s=arguments,n=this,c=e,a){if(void 0===l)return w(c);if(h)return l=setTimeout(C,t),b(c)}return void 0===l&&(l=setTimeout(C,t)),o}return t=_(t)||0,g(a)&&(u=!!a.leading,r=(h="maxWait"in a)?f(_(a.maxWait)||0,t):r,v="trailing"in a?!!a.trailing:v),D.cancel=function(){void 0!==l&&clearTimeout(l),d=0,s=c=n=l=void 0},D.flush=function(){return void 0===l?o:x(m())},D}function g(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function _(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==h.call(e)}(e))return NaN;if(g(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=g(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(s,"");var a=r.test(e);return a||o.test(e)?l(e.slice(2),a?2:8):n.test(e)?NaN:+e}e.exports=function(e,t,a){var s=!0,n=!0;if("function"!=typeof e)throw new TypeError(i);return g(a)&&(s="leading"in a?!!a.leading:s,n="trailing"in a?!!a.trailing:n),v(e,t,{leading:s,maxWait:t,trailing:n})}},7621:(e,t,a)=>{var i;!function(s){var n=/^\s+/,r=/\s+$/,o=0,l=s.round,c=s.min,d=s.max,u=s.random;function h(e,t){if(t=t||{},(e=e||"")instanceof h)return e;if(!(this instanceof h))return new h(e,t);var a=function(e){var t={r:0,g:0,b:0},a=1,i=null,o=null,l=null,u=!1,h=!1;"string"==typeof e&&(e=function(e){e=e.replace(n,"").replace(r,"").toLowerCase();var t,a=!1;if(L[e])e=L[e],a=!0;else if("transparent"==e)return{r:0,g:0,b:0,a:0,format:"name"};if(t=U.rgb.exec(e))return{r:t[1],g:t[2],b:t[3]};if(t=U.rgba.exec(e))return{r:t[1],g:t[2],b:t[3],a:t[4]};if(t=U.hsl.exec(e))return{h:t[1],s:t[2],l:t[3]};if(t=U.hsla.exec(e))return{h:t[1],s:t[2],l:t[3],a:t[4]};if(t=U.hsv.exec(e))return{h:t[1],s:t[2],v:t[3]};if(t=U.hsva.exec(e))return{h:t[1],s:t[2],v:t[3],a:t[4]};if(t=U.hex8.exec(e))return{r:H(t[1]),g:H(t[2]),b:H(t[3]),a:N(t[4]),format:a?"name":"hex8"};if(t=U.hex6.exec(e))return{r:H(t[1]),g:H(t[2]),b:H(t[3]),format:a?"name":"hex"};if(t=U.hex4.exec(e))return{r:H(t[1]+""+t[1]),g:H(t[2]+""+t[2]),b:H(t[3]+""+t[3]),a:N(t[4]+""+t[4]),format:a?"name":"hex8"};if(t=U.hex3.exec(e))return{r:H(t[1]+""+t[1]),g:H(t[2]+""+t[2]),b:H(t[3]+""+t[3]),format:a?"name":"hex"};return!1}(e));"object"==typeof e&&(B(e.r)&&B(e.g)&&B(e.b)?(f=e.r,p=e.g,m=e.b,t={r:255*E(f,255),g:255*E(p,255),b:255*E(m,255)},u=!0,h="%"===String(e.r).substr(-1)?"prgb":"rgb"):B(e.h)&&B(e.s)&&B(e.v)?(i=$(e.s),o=$(e.v),t=function(e,t,a){e=6*E(e,360),t=E(t,100),a=E(a,100);var i=s.floor(e),n=e-i,r=a*(1-t),o=a*(1-n*t),l=a*(1-(1-n)*t),c=i%6;return{r:255*[a,o,r,r,l,a][c],g:255*[l,a,a,o,r,r][c],b:255*[r,r,l,a,a,o][c]}}(e.h,i,o),u=!0,h="hsv"):B(e.h)&&B(e.s)&&B(e.l)&&(i=$(e.s),l=$(e.l),t=function(e,t,a){var i,s,n;function r(e,t,a){return a<0&&(a+=1),a>1&&(a-=1),a<1/6?e+6*(t-e)*a:a<.5?t:a<2/3?e+(t-e)*(2/3-a)*6:e}if(e=E(e,360),t=E(t,100),a=E(a,100),0===t)i=s=n=a;else{var o=a<.5?a*(1+t):a+t-a*t,l=2*a-o;i=r(l,o,e+1/3),s=r(l,o,e),n=r(l,o,e-1/3)}return{r:255*i,g:255*s,b:255*n}}(e.h,i,l),u=!0,h="hsl"),e.hasOwnProperty("a")&&(a=e.a));var f,p,m;return a=F(a),{ok:u,format:e.format||h,r:c(255,d(t.r,0)),g:c(255,d(t.g,0)),b:c(255,d(t.b,0)),a}}(e);this._originalInput=e,this._r=a.r,this._g=a.g,this._b=a.b,this._a=a.a,this._roundA=l(100*this._a)/100,this._format=t.format||a.format,this._gradientType=t.gradientType,this._r<1&&(this._r=l(this._r)),this._g<1&&(this._g=l(this._g)),this._b<1&&(this._b=l(this._b)),this._ok=a.ok,this._tc_id=o++}function f(e,t,a){e=E(e,255),t=E(t,255),a=E(a,255);var i,s,n=d(e,t,a),r=c(e,t,a),o=(n+r)/2;if(n==r)i=s=0;else{var l=n-r;switch(s=o>.5?l/(2-n-r):l/(n+r),n){case e:i=(t-a)/l+(t>1)+720)%360;--t;)i.h=(i.h+s)%360,n.push(h(i));return n}function I(e,t){t=t||6;for(var a=h(e).toHsv(),i=a.h,s=a.s,n=a.v,r=[],o=1/t;t--;)r.push(h({h:i,s,v:n})),n=(n+o)%1;return r}h.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},getLuminance:function(){var e,t,a,i=this.toRgb();return e=i.r/255,t=i.g/255,a=i.b/255,.2126*(e<=.03928?e/12.92:s.pow((e+.055)/1.055,2.4))+.7152*(t<=.03928?t/12.92:s.pow((t+.055)/1.055,2.4))+.0722*(a<=.03928?a/12.92:s.pow((a+.055)/1.055,2.4))},setAlpha:function(e){return this._a=F(e),this._roundA=l(100*this._a)/100,this},toHsv:function(){var e=p(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=p(this._r,this._g,this._b),t=l(360*e.h),a=l(100*e.s),i=l(100*e.v);return 1==this._a?"hsv("+t+", "+a+"%, "+i+"%)":"hsva("+t+", "+a+"%, "+i+"%, "+this._roundA+")"},toHsl:function(){var e=f(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=f(this._r,this._g,this._b),t=l(360*e.h),a=l(100*e.s),i=l(100*e.l);return 1==this._a?"hsl("+t+", "+a+"%, "+i+"%)":"hsla("+t+", "+a+"%, "+i+"%, "+this._roundA+")"},toHex:function(e){return m(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return function(e,t,a,i,s){var n=[M(l(e).toString(16)),M(l(t).toString(16)),M(l(a).toString(16)),M(O(i))];if(s&&n[0].charAt(0)==n[0].charAt(1)&&n[1].charAt(0)==n[1].charAt(1)&&n[2].charAt(0)==n[2].charAt(1)&&n[3].charAt(0)==n[3].charAt(1))return n[0].charAt(0)+n[1].charAt(0)+n[2].charAt(0)+n[3].charAt(0);return n.join("")}(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:l(this._r),g:l(this._g),b:l(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+l(this._r)+", "+l(this._g)+", "+l(this._b)+")":"rgba("+l(this._r)+", "+l(this._g)+", "+l(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:l(100*E(this._r,255))+"%",g:l(100*E(this._g,255))+"%",b:l(100*E(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+l(100*E(this._r,255))+"%, "+l(100*E(this._g,255))+"%, "+l(100*E(this._b,255))+"%)":"rgba("+l(100*E(this._r,255))+"%, "+l(100*E(this._g,255))+"%, "+l(100*E(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(T[m(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+v(this._r,this._g,this._b,this._a),a=t,i=this._gradientType?"GradientType = 1, ":"";if(e){var s=h(e);a="#"+v(s._r,s._g,s._b,s._a)}return"progid:DXImageTransform.Microsoft.gradient("+i+"startColorstr="+t+",endColorstr="+a+")"},toString:function(e){var t=!!e;e=e||this._format;var a=!1,i=this._a<1&&this._a>=0;return t||!i||"hex"!==e&&"hex6"!==e&&"hex3"!==e&&"hex4"!==e&&"hex8"!==e&&"name"!==e?("rgb"===e&&(a=this.toRgbString()),"prgb"===e&&(a=this.toPercentageRgbString()),"hex"!==e&&"hex6"!==e||(a=this.toHexString()),"hex3"===e&&(a=this.toHexString(!0)),"hex4"===e&&(a=this.toHex8String(!0)),"hex8"===e&&(a=this.toHex8String()),"name"===e&&(a=this.toName()),"hsl"===e&&(a=this.toHslString()),"hsv"===e&&(a=this.toHsvString()),a||this.toHexString()):"name"===e&&0===this._a?this.toName():this.toRgbString()},clone:function(){return h(this.toString())},_applyModification:function(e,t){var a=e.apply(null,[this].concat([].slice.call(t)));return this._r=a._r,this._g=a._g,this._b=a._b,this.setAlpha(a._a),this},lighten:function(){return this._applyModification(w,arguments)},brighten:function(){return this._applyModification(y,arguments)},darken:function(){return this._applyModification(C,arguments)},desaturate:function(){return this._applyModification(g,arguments)},saturate:function(){return this._applyModification(_,arguments)},greyscale:function(){return this._applyModification(b,arguments)},spin:function(){return this._applyModification(x,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(V,arguments)},complement:function(){return this._applyCombination(D,arguments)},monochromatic:function(){return this._applyCombination(I,arguments)},splitcomplement:function(){return this._applyCombination(A,arguments)},triad:function(){return this._applyCombination(k,arguments)},tetrad:function(){return this._applyCombination(S,arguments)}},h.fromRatio=function(e,t){if("object"==typeof e){var a={};for(var i in e)e.hasOwnProperty(i)&&(a[i]="a"===i?e[i]:$(e[i]));e=a}return h(e,t)},h.equals=function(e,t){return!(!e||!t)&&h(e).toRgbString()==h(t).toRgbString()},h.random=function(){return h.fromRatio({r:u(),g:u(),b:u()})},h.mix=function(e,t,a){a=0===a?0:a||50;var i=h(e).toRgb(),s=h(t).toRgb(),n=a/100;return h({r:(s.r-i.r)*n+i.r,g:(s.g-i.g)*n+i.g,b:(s.b-i.b)*n+i.b,a:(s.a-i.a)*n+i.a})},h.readability=function(e,t){var a=h(e),i=h(t);return(s.max(a.getLuminance(),i.getLuminance())+.05)/(s.min(a.getLuminance(),i.getLuminance())+.05)},h.isReadable=function(e,t,a){var i,s,n=h.readability(e,t);switch(s=!1,(i=function(e){var t,a;t=((e=e||{level:"AA",size:"small"}).level||"AA").toUpperCase(),a=(e.size||"small").toLowerCase(),"AA"!==t&&"AAA"!==t&&(t="AA");"small"!==a&&"large"!==a&&(a="small");return{level:t,size:a}}(a)).level+i.size){case"AAsmall":case"AAAlarge":s=n>=4.5;break;case"AAlarge":s=n>=3;break;case"AAAsmall":s=n>=7}return s},h.mostReadable=function(e,t,a){var i,s,n,r,o=null,l=0;s=(a=a||{}).includeFallbackColors,n=a.level,r=a.size;for(var c=0;cl&&(l=i,o=h(t[c]));return h.isReadable(e,o,{level:n,size:r})||!s?o:(a.includeFallbackColors=!1,h.mostReadable(e,["#fff","#000"],a))};var L=h.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},T=h.hexNames=function(e){var t={};for(var a in e)e.hasOwnProperty(a)&&(t[e[a]]=a);return t}(L);function F(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function E(e,t){(function(e){return"string"==typeof e&&-1!=e.indexOf(".")&&1===parseFloat(e)})(e)&&(e="100%");var a=function(e){return"string"==typeof e&&-1!=e.indexOf("%")}(e);return e=c(t,d(0,parseFloat(e))),a&&(e=parseInt(e*t,10)/100),s.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function P(e){return c(1,d(0,e))}function H(e){return parseInt(e,16)}function M(e){return 1==e.length?"0"+e:""+e}function $(e){return e<=1&&(e=100*e+"%"),e}function O(e){return s.round(255*parseFloat(e)).toString(16)}function N(e){return H(e)/255}var R,j,q,U=(j="[\\s|\\(]+("+(R="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+R+")[,|\\s]+("+R+")\\s*\\)?",q="[\\s|\\(]+("+R+")[,|\\s]+("+R+")[,|\\s]+("+R+")[,|\\s]+("+R+")\\s*\\)?",{CSS_UNIT:new RegExp(R),rgb:new RegExp("rgb"+j),rgba:new RegExp("rgba"+q),hsl:new RegExp("hsl"+j),hsla:new RegExp("hsla"+q),hsv:new RegExp("hsv"+j),hsva:new RegExp("hsva"+q),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function B(e){return!!U.CSS_UNIT.exec(e)}e.exports?e.exports=h:void 0===(i=function(){return h}.call(t,a,t,e))||(e.exports=i)}(Math)}},t={};function a(i){var s=t[i];if(void 0!==s)return s.exports;var n=t[i]={exports:{}};return e[i](n,n.exports,a),n.exports}a.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},a.d=(e,t)=>{for(var i in t)a.o(t,i)&&!a.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},a.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";var e=function(){var e=this._self._c;return e("div",{attrs:{id:"wepos-admin-app"}},[e("router-view")],1)};e._withStripped=!0;function t(e,t,a,i,s,n,r,o){var l,c="function"==typeof e?e.options:e;if(t&&(c.render=t,c.staticRenderFns=a,c._compiled=!0),i&&(c.functional=!0),n&&(c._scopeId="data-v-"+n),r?(l=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),s&&s.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(r)},c._ssrRegister=l):s&&(l=o?function(){s.call(this,(c.functional?this.parent:this).$root.$options.shadowRoot)}:s),l)if(c.functional){c._injectStyles=l;var d=c.render;c.render=function(e,t){return l.call(t),d(e,t)}}else{var u=c.beforeCreate;c.beforeCreate=u?[].concat(u,l):[l]}return{exports:e,options:c}}const i=t({name:"App"},e,[],!1,null,null,null).exports;var s=function(){var e=this,t=e._self._c;return t("div",{staticClass:"wepos-settings"},[t("h2",{staticStyle:{"margin-bottom":"15px"}},[e._v(e._s(e.__("Settings","wepos")))]),e._v(" "),e.isSaved?t("div",{staticClass:"settings-error notice is-dismissible",class:{updated:e.isUpdated,error:!e.isUpdated},attrs:{id:"setting-message_updated"}},[t("p",[t("strong",{domProps:{innerHTML:e._s(e.message)}})]),e._v(" "),t("button",{staticClass:"notice-dismiss",attrs:{type:"button"},on:{click:function(t){t.preventDefault(),e.isSaved=!1}}},[t("span",{staticClass:"screen-reader-text"},[e._v(e._s(e.__("Dismiss this notice.","wepos")))])])]):e._e(),e._v(" "),t("div",{staticClass:"wepos-settings-wrap"},[t("h2",{staticClass:"nav-tab-wrapper"},[e._l(e.settingSections,(function(a){return[t("a",{staticClass:"nav-tab",class:{"nav-tab-active":e.currentTab===a.id},attrs:{href:"#"},on:{click:function(t){return t.preventDefault(),e.changeTab(a)}}},[t("span",{staticClass:"dashicons",class:a.icon}),e._v(" "+e._s(a.title))])]}))],2),e._v(" "),t("div",{staticClass:"metabox-holder"},[e._l(e.settingFields,(function(a,i){return e.isLoaded?[t("div",{directives:[{name:"show",rawName:"v-show",value:e.currentTab===i,expression:"currentTab===index"}],staticClass:"group",attrs:{id:i}},[t("form",{attrs:{method:"post",action:"options.php"}},[t("input",{attrs:{type:"hidden",name:"option_page"},domProps:{value:i}}),e._v(" "),t("input",{attrs:{type:"hidden",name:"action",value:"update"}}),e._v(" "),t("h2",[e._v(e._s(e.showSectionTitle(i)))]),e._v(" "),t("table",{staticClass:"form-table"},[t("tbody",e._l(a,(function(a,s){return t("fields",{key:s,attrs:{"section-id":i,id:s,"field-data":a,"field-value":e.settingValues[i]},on:{openMedia:e.showMedia}})})),1)]),e._v(" "),t("p",{staticClass:"submit"},[t("input",{staticClass:"button button-primary",attrs:{type:"submit",name:"submit",id:"submit"},domProps:{value:e.__("Save Changes","wepos")},on:{click:function(t){return t.preventDefault(),e.saveSettings(e.settingValues[i],i)}}})])])])]:e._e()}))],2),e._v(" "),e.showLoading?t("div",{staticClass:"loading"}):e._e()])])};s._withStripped=!0;var n=function(){var e=this,t=e._self._c;return t("div",[e.containCommonFields(e.fieldData.type)?t("tr",{class:e.id},[t("th",{attrs:{scope:"row"}},[t("label",{attrs:{for:e.sectionId+"["+e.fieldData.name+"]"}},[e._v(e._s(e.fieldData.label))])]),e._v(" "),t("td",[t("input",{directives:[{name:"model",rawName:"v-model",value:e.fieldValue[e.fieldData.name],expression:"fieldValue[fieldData.name]"}],staticClass:"regular-text",attrs:{type:"text",id:e.sectionId+"["+e.fieldData.name+"]",name:e.sectionId+"["+e.fieldData.name+"]"},domProps:{value:e.fieldValue[e.fieldData.name]},on:{input:function(t){t.target.composing||e.$set(e.fieldValue,e.fieldData.name,t.target.value)}}}),e._v(" "),t("p",{staticClass:"description",domProps:{innerHTML:e._s(e.fieldData.desc)}})])]):e._e(),e._v(" "),"number"==e.fieldData.type?t("tr",{class:e.id},[t("th",{attrs:{scope:"row"}},[t("label",{attrs:{for:e.sectionId+"["+e.fieldData.name+"]"}},[e._v(e._s(e.fieldData.label))])]),e._v(" "),t("td",[t("input",{directives:[{name:"model",rawName:"v-model",value:e.fieldValue[e.fieldData.name],expression:"fieldValue[fieldData.name]"}],staticClass:"regular-text",attrs:{type:"number",min:e.fieldData.min,max:e.fieldData.max,step:e.fieldData.step,id:e.sectionId+"["+e.fieldData.name+"]",name:e.sectionId+"["+e.fieldData.name+"]"},domProps:{value:e.fieldValue[e.fieldData.name]},on:{input:function(t){t.target.composing||e.$set(e.fieldValue,e.fieldData.name,t.target.value)}}}),e._v(" "),t("p",{staticClass:"description",domProps:{innerHTML:e._s(e.fieldData.desc)}})])]):e._e(),e._v(" "),"textarea"==e.fieldData.type?t("tr",{class:e.id},[t("th",{attrs:{scope:"row"}},[t("label",{attrs:{for:e.sectionId+"["+e.fieldData.name+"]"}},[e._v(e._s(e.fieldData.label))])]),e._v(" "),t("td",[t("textarea",{directives:[{name:"model",rawName:"v-model",value:e.fieldValue[e.fieldData.name],expression:"fieldValue[fieldData.name]"}],staticClass:"regular-text",attrs:{type:"textarea",rows:e.fieldData.rows,cols:e.fieldData.cols,id:e.sectionId+"["+e.fieldData.name+"]",name:e.sectionId+"["+e.fieldData.name+"]"},domProps:{value:e.fieldValue[e.fieldData.name]},on:{input:function(t){t.target.composing||e.$set(e.fieldValue,e.fieldData.name,t.target.value)}}}),e._v(" "),t("p",{staticClass:"description",domProps:{innerHTML:e._s(e.fieldData.desc)}})])]):e._e(),e._v(" "),"checkbox"==e.fieldData.type?t("tr",{class:e.id},[t("th",{attrs:{scope:"row"}},[t("label",{attrs:{for:e.sectionId+"["+e.fieldData.name+"]"}},[e._v(e._s(e.fieldData.label))])]),e._v(" "),t("td",[t("fieldset",[t("label",{attrs:{for:e.sectionId+"["+e.fieldData.name+"]"}},[t("input",{directives:[{name:"model",rawName:"v-model",value:e.fieldValue[e.fieldData.name],expression:"fieldValue[fieldData.name]"}],staticClass:"checkbox",attrs:{type:"checkbox",id:e.sectionId+"["+e.fieldData.name+"]",name:e.sectionId+"["+e.fieldData.name+"]","true-value":"on","false-value":"off"},domProps:{checked:Array.isArray(e.fieldValue[e.fieldData.name])?e._i(e.fieldValue[e.fieldData.name],null)>-1:e._q(e.fieldValue[e.fieldData.name],"on")},on:{change:function(t){var a=e.fieldValue[e.fieldData.name],i=t.target,s=i.checked?"on":"off";if(Array.isArray(a)){var n=e._i(a,null);i.checked?n<0&&e.$set(e.fieldValue,e.fieldData.name,a.concat([null])):n>-1&&e.$set(e.fieldValue,e.fieldData.name,a.slice(0,n).concat(a.slice(n+1)))}else e.$set(e.fieldValue,e.fieldData.name,s)}}}),e._v("\n "+e._s(e.fieldData.desc)+"\n ")])])])]):e._e(),e._v(" "),"multicheck"==e.fieldData.type?t("tr",{class:e.id},[t("th",{attrs:{scope:"row"}},[t("label",{attrs:{for:e.sectionId+"["+e.fieldData.name+"]"}},[e._v(e._s(e.fieldData.label))])]),e._v(" "),t("td",[t("fieldset",[e._l(e.fieldData.options,(function(a,i){return[t("label",{attrs:{for:e.sectionId+"["+e.fieldData.name+"]["+i+"]"}},[t("input",{directives:[{name:"model",rawName:"v-model",value:e.fieldValue[e.fieldData.name][i],expression:"fieldValue[fieldData.name][optionKey]"}],staticClass:"checkbox",attrs:{type:"checkbox",id:e.sectionId+"["+e.fieldData.name+"]["+i+"]",name:e.sectionId+"["+e.fieldData.name+"]["+i+"]","true-value":i,"false-value":""},domProps:{checked:Array.isArray(e.fieldValue[e.fieldData.name][i])?e._i(e.fieldValue[e.fieldData.name][i],null)>-1:e._q(e.fieldValue[e.fieldData.name][i],i)},on:{change:function(t){var a=e.fieldValue[e.fieldData.name][i],s=t.target,n=s.checked?i:"";if(Array.isArray(a)){var r=e._i(a,null);s.checked?r<0&&e.$set(e.fieldValue[e.fieldData.name],i,a.concat([null])):r>-1&&e.$set(e.fieldValue[e.fieldData.name],i,a.slice(0,r).concat(a.slice(r+1)))}else e.$set(e.fieldValue[e.fieldData.name],i,n)}}}),e._v("\n "+e._s(a)+"\n ")]),e._v(" "),t("br")]}))],2)])]):e._e(),e._v(" "),"select"==e.fieldData.type?t("tr",{class:e.id},[t("th",{attrs:{scope:"row"}},[t("label",{attrs:{for:e.sectionId+"["+e.fieldData.name+"]"}},[e._v(e._s(e.fieldData.label))])]),e._v(" "),t("td",[e.fieldData.grouped?t("select",{directives:[{name:"model",rawName:"v-model",value:e.fieldValue[e.fieldData.name],expression:"fieldValue[fieldData.name]"}],staticClass:"regular",attrs:{name:e.sectionId+"["+e.fieldData.name+"]",id:e.sectionId+"["+e.fieldData.name+"]"},on:{change:function(t){var a=Array.prototype.filter.call(t.target.options,(function(e){return e.selected})).map((function(e){return"_value"in e?e._value:e.value}));e.$set(e.fieldValue,e.fieldData.name,t.target.multiple?a:a[0])}}},[e.fieldData.placeholder?t("option",{attrs:{value:""},domProps:{innerHTML:e._s(e.fieldData.placeholder)}}):e._e(),e._v(" "),e._l(e.fieldData.options,(function(a){return t("optgroup",{attrs:{label:a.group_label}},e._l(a.group_values,(function(a){return t("option",{domProps:{value:a.value,innerHTML:e._s(a.label)}})})),0)}))],2):t("select",{directives:[{name:"model",rawName:"v-model",value:e.fieldValue[e.fieldData.name],expression:"fieldValue[fieldData.name]"}],staticClass:"regular",attrs:{name:e.sectionId+"["+e.fieldData.name+"]",id:e.sectionId+"["+e.fieldData.name+"]"},on:{change:function(t){var a=Array.prototype.filter.call(t.target.options,(function(e){return e.selected})).map((function(e){return"_value"in e?e._value:e.value}));e.$set(e.fieldValue,e.fieldData.name,t.target.multiple?a:a[0])}}},[e.fieldData.placeholder?t("option",{attrs:{value:""},domProps:{innerHTML:e._s(e.fieldData.placeholder)}}):e._e(),e._v(" "),e._l(e.fieldData.options,(function(a,i){return t("option",{domProps:{value:i,innerHTML:e._s(a)}})}))],2),e._v(" "),t("p",{staticClass:"description",domProps:{innerHTML:e._s(e.fieldData.desc)}})])]):e._e(),e._v(" "),"file"==e.fieldData.type?t("tr",{class:e.id},[t("th",{attrs:{scope:"row"}},[t("label",{attrs:{for:e.sectionId+"["+e.fieldData.name+"]"}},[e._v(e._s(e.fieldData.label))])]),e._v(" "),t("td",[t("input",{directives:[{name:"model",rawName:"v-model",value:e.fieldValue[e.fieldData.name],expression:"fieldValue[fieldData.name]"}],staticClass:"regular-text wpsa-url",attrs:{type:"text",id:e.sectionId+"["+e.fieldData.name+"]",name:e.sectionId+"["+e.fieldData.name+"]"},domProps:{value:e.fieldValue[e.fieldData.name]},on:{input:function(t){t.target.composing||e.$set(e.fieldValue,e.fieldData.name,t.target.value)}}}),e._v(" "),t("input",{staticClass:"button wpsa-browse",attrs:{type:"button",value:"Choose File"},on:{click:function(t){return t.preventDefault(),e.$emit("openMedia",{sectionId:e.sectionId,name:e.fieldData.name},t)}}}),e._v(" "),t("p",{staticClass:"description",domProps:{innerHTML:e._s(e.fieldData.desc)}})])]):e._e(),e._v(" "),"color"==e.fieldData.type?t("tr",{class:e.id},[t("th",{attrs:{scope:"row"}},[t("label",{attrs:{for:e.sectionId+"["+e.fieldData.name+"]"}},[e._v(e._s(e.fieldData.label))])]),e._v(" "),t("td",[t("color-picker",{model:{value:e.fieldValue[e.fieldData.name],callback:function(t){e.$set(e.fieldValue,e.fieldData.name,t)},expression:"fieldValue[fieldData.name]"}}),e._v(" "),t("p",{staticClass:"description",domProps:{innerHTML:e._s(e.fieldData.desc)}})],1)]):e._e(),e._v(" "),"html"==e.fieldData.type?t("tr",{class:e.id},[t("th",{attrs:{scope:"row"}},[t("label",{attrs:{for:e.sectionId+"["+e.fieldData.name+"]"}},[e._v(e._s(e.fieldData.label))])]),e._v(" "),t("td",[t("p",{staticClass:"description",domProps:{innerHTML:e._s(e.fieldData.desc)}})])]):e._e(),e._v(" "),"radio"==e.fieldData.type?t("tr",{class:e.id},[t("th",{attrs:{scope:"row"}},[t("label",{attrs:{for:e.sectionId+"["+e.fieldData.name+"]"}},[e._v(e._s(e.fieldData.label))])]),e._v(" "),t("td",[t("fieldset",[e._l(e.fieldData.options,(function(a,i){return[t("label",{attrs:{for:e.sectionId+"["+e.fieldData.name+"]["+i+"]"}},[t("input",{directives:[{name:"model",rawName:"v-model",value:e.fieldValue[e.fieldData.name],expression:"fieldValue[fieldData.name]"}],staticClass:"radio",attrs:{type:"radio",id:e.sectionId+"["+e.fieldData.name+"]["+i+"]",name:i},domProps:{value:i,checked:e._q(e.fieldValue[e.fieldData.name],i)},on:{change:function(t){return e.$set(e.fieldValue,e.fieldData.name,i)}}}),e._v(" "+e._s(a)+"\n ")])]}))],2),e._v(" "),t("p",{staticClass:"description",domProps:{innerHTML:e._s(e.fieldData.desc)}})])]):e._e(),e._v(" "),"wpeditor"==e.fieldData.type?t("tr",{class:e.id},[t("th",{attrs:{scope:"row"}},[t("label",{attrs:{for:e.sectionId+"["+e.fieldData.name+"]"}},[e._v(e._s(e.fieldData.label))])]),e._v(" "),t("td",{attrs:{width:"72%"}},[t("text-editor",{model:{value:e.fieldValue[e.fieldData.name],callback:function(t){e.$set(e.fieldValue,e.fieldData.name,t)},expression:"fieldValue[fieldData.name]"}}),e._v(" "),t("p",{staticClass:"description",domProps:{innerHTML:e._s(e.fieldData.desc)}})],1)]):e._e(),e._v(" "),"repeatable"==e.fieldData.type?t("tr",{class:e.id},[t("th",{attrs:{scope:"row"}},[t("label",{attrs:{for:e.sectionId+"["+e.fieldData.name+"]"}},[e._v(e._s(e.fieldData.label))])]),e._v(" "),t("td",{attrs:{width:"72%"}},[t("ul",{staticClass:"dokan-settings-repeatable-list"},e._l(e.fieldValue[e.fieldData.name],(function(a,i){return e.fieldValue[e.fieldData.name]?t("li",[e._v("\n "+e._s(a.value)+" "),t("span",{staticClass:"dashicons dashicons-no-alt remove-item",on:{click:function(t){return t.preventDefault(),e.removeItem(i,e.fieldData.name)}}})]):e._e()})),0),e._v(" "),t("input",{directives:[{name:"model",rawName:"v-model",value:e.repeatableItem[e.fieldData.name],expression:"repeatableItem[fieldData.name]"}],staticClass:"regular-text",attrs:{type:"text"},domProps:{value:e.repeatableItem[e.fieldData.name]},on:{input:function(t){t.target.composing||e.$set(e.repeatableItem,e.fieldData.name,t.target.value)}}}),e._v(" "),t("a",{staticClass:"button wepos-repetable-add-item-btn",attrs:{href:"#"},on:{click:function(t){return t.preventDefault(),e.addItem(e.fieldData.type,e.fieldData.name)}}},[e._v("+")]),e._v(" "),t("p",{staticClass:"description",domProps:{innerHTML:e._s(e.fieldData.desc)}})])]):e._e(),e._v(" "),"radio_image"==e.fieldData.type?t("tr",{class:e.id},[t("th",{attrs:{scope:"row"}},[t("label",{attrs:{for:e.sectionId+"["+e.fieldData.name+"]"}},[e._v(e._s(e.fieldData.label))])]),e._v(" "),t("td",[t("div",{staticClass:"radio-image-container"},[e._l(e.fieldData.options,(function(a,i){return[t("label",{staticClass:"radio-image",class:{active:e.fieldValue[e.fieldData.name]===i,"not-active":e.fieldValue[e.fieldData.name]!==i}},[t("input",{directives:[{name:"model",rawName:"v-model",value:e.fieldValue[e.fieldData.name],expression:"fieldValue[fieldData.name]"}],staticClass:"radio",attrs:{type:"radio",name:e.fieldData.name},domProps:{value:i,checked:e._q(e.fieldValue[e.fieldData.name],i)},on:{change:function(t){return e.$set(e.fieldValue,e.fieldData.name,i)}}}),e._v(" "),t("span",{staticClass:"current-option-indicator"},[t("span",{staticClass:"dashicons dashicons-yes"}),e._v(" "+e._s(e.__("Active","wepos")))]),e._v(" "),t("img",{attrs:{src:a}}),e._v(" "),t("span",{staticClass:"active-option"},[t("button",{staticClass:"button button-primary button-hero",attrs:{type:"button"},on:{click:function(t){t.preventDefault(),e.fieldValue[e.fieldData.name]=i}}},[e._v("\n "+e._s(e.__("Select","wepos"))+"\n ")])])])]}))],2)])]):e._e()])};n._withStripped=!0;var r=function(){var e=this,t=e._self._c;return t("div",{staticClass:"color-picker-container"},[t("button",{staticClass:"button color-picker-button",style:{backgroundColor:e.value},attrs:{type:"button"},on:{click:e.toggleColorPicker}},[t("span",[e._v(e._s(e.__("Select Color","wepos")))])]),e._v(" "),e.showColorPicker&&"hex"===e.format?t("input",{staticClass:"hex-input",attrs:{type:"text"},domProps:{value:e.value},on:{input:function(t){return e.setHexColor(t.target.value)}}}):e._e(),e._v(" "),e.showColorPicker?t("div",{staticClass:"button-group"},[t("button",{staticClass:"button button-small",attrs:{type:"button"},on:{click:function(t){return e.updateColor({})}}},[e._v(e._s(e.__("Clear","wepos")))]),e._v(" "),t("button",{staticClass:"button button-small",attrs:{type:"button"},on:{click:e.toggleColorPicker}},[e._v(e._s(e.__("Close","wepos")))])]):e._e(),e._v(" "),e.showColorPicker?t("sketch",{attrs:{value:e.value,"preset-colors":e.presetColors,"disable-alpha":e.disableAlpha,"disable-fields":e.disableFields},on:{input:e.updateColor}}):e._e()],1)};r._withStripped=!0;var o=function(){var e=this,t=e._self._c;return t("div",{class:["vc-sketch",e.disableAlpha?"vc-sketch__disable-alpha":""],attrs:{role:"application","aria-label":"Sketch color picker"}},[t("div",{staticClass:"vc-sketch-saturation-wrap"},[t("saturation",{on:{change:e.childChange},model:{value:e.colors,callback:function(t){e.colors=t},expression:"colors"}})],1),e._v(" "),t("div",{staticClass:"vc-sketch-controls"},[t("div",{staticClass:"vc-sketch-sliders"},[t("div",{staticClass:"vc-sketch-hue-wrap"},[t("hue",{on:{change:e.childChange},model:{value:e.colors,callback:function(t){e.colors=t},expression:"colors"}})],1),e._v(" "),e.disableAlpha?e._e():t("div",{staticClass:"vc-sketch-alpha-wrap"},[t("alpha",{on:{change:e.childChange},model:{value:e.colors,callback:function(t){e.colors=t},expression:"colors"}})],1)]),e._v(" "),t("div",{staticClass:"vc-sketch-color-wrap"},[t("div",{staticClass:"vc-sketch-active-color",style:{background:e.activeColor},attrs:{"aria-label":`Current color is ${e.activeColor}`}}),e._v(" "),t("checkboard")],1)]),e._v(" "),e.disableFields?e._e():t("div",{staticClass:"vc-sketch-field"},[t("div",{staticClass:"vc-sketch-field--double"},[t("ed-in",{attrs:{label:"hex",value:e.hex},on:{change:e.inputChange}})],1),e._v(" "),t("div",{staticClass:"vc-sketch-field--single"},[t("ed-in",{attrs:{label:"r",value:e.colors.rgba.r},on:{change:e.inputChange}})],1),e._v(" "),t("div",{staticClass:"vc-sketch-field--single"},[t("ed-in",{attrs:{label:"g",value:e.colors.rgba.g},on:{change:e.inputChange}})],1),e._v(" "),t("div",{staticClass:"vc-sketch-field--single"},[t("ed-in",{attrs:{label:"b",value:e.colors.rgba.b},on:{change:e.inputChange}})],1),e._v(" "),e.disableAlpha?e._e():t("div",{staticClass:"vc-sketch-field--single"},[t("ed-in",{attrs:{label:"a",value:e.colors.a,"arrow-offset":.01,max:1},on:{change:e.inputChange}})],1)]),e._v(" "),t("div",{staticClass:"vc-sketch-presets",attrs:{role:"group","aria-label":"A color preset, pick one to set as current color"}},[e._l(e.presetColors,(function(a){return[e.isTransparent(a)?t("div",{key:a,staticClass:"vc-sketch-presets-color",attrs:{"aria-label":"Color:"+a},on:{click:function(t){return e.handlePreset(a)}}},[t("checkboard")],1):t("div",{key:a,staticClass:"vc-sketch-presets-color",style:{background:a},attrs:{"aria-label":"Color:"+a},on:{click:function(t){return e.handlePreset(a)}}})]}))],2)])};o._withStripped=!0;var l=a(7621),c=a.n(l);function d(e,t){var a,i=e&&e.a;!(a=e&&e.hsl?c()(e.hsl):e&&e.hex&&e.hex.length>0?c()(e.hex):e&&e.hsv?c()(e.hsv):e&&e.rgba?c()(e.rgba):e&&e.rgb?c()(e.rgb):c()(e))||void 0!==a._a&&null!==a._a||a.setAlpha(i||1);var s=a.toHsl(),n=a.toHsv();return 0===s.s&&(n.h=s.h=e.h||e.hsl&&e.hsl.h||t||0),{hsl:s,hex:a.toHexString().toUpperCase(),hex8:a.toHex8String().toUpperCase(),rgba:a.toRgb(),hsv:n,oldHue:e.h||t||s.h,source:e.source,a:e.a||a.getAlpha()}}const u={props:["value"],data(){return{val:d(this.value)}},computed:{colors:{get(){return this.val},set(e){this.val=e,this.$emit("input",e)}}},watch:{value(e){this.val=d(e)}},methods:{colorChange(e,t){this.oldHue=this.colors.hsl.h,this.colors=d(e,t||this.oldHue)},isValidHex:e=>c()(e).isValid(),simpleCheckForValidColor(e){for(var t=["r","g","b","a","h","s","l","v"],a=0,i=0,s=0;se.map((e=>e.toUpperCase())),isTransparent:e=>0===c()(e).getAlpha()}};var h=function(){var e=this,t=e._self._c;return t("div",{staticClass:"vc-editable-input"},[t("input",{directives:[{name:"model",rawName:"v-model",value:e.val,expression:"val"}],ref:"input",staticClass:"vc-input__input",attrs:{"aria-labelledby":e.labelId},domProps:{value:e.val},on:{keydown:e.handleKeyDown,input:[function(t){t.target.composing||(e.val=t.target.value)},e.update]}}),e._v(" "),t("span",{staticClass:"vc-input__label",attrs:{for:e.label,id:e.labelId}},[e._v(e._s(e.labelSpanText))]),e._v(" "),t("span",{staticClass:"vc-input__desc"},[e._v(e._s(e.desc))])])};h._withStripped=!0;const f=t({name:"editableInput",props:{label:String,labelText:String,desc:String,value:[String,Number],max:Number,min:Number,arrowOffset:{type:Number,default:1}},computed:{val:{get(){return this.value},set(e){if(!(void 0!==this.max&&+e>this.max))return e;this.$refs.input.value=this.max}},labelId(){return`input__label__${this.label}__${Math.random().toString().slice(2,5)}`},labelSpanText(){return this.labelText||this.label}},methods:{update(e){this.handleChange(e.target.value)},handleChange(e){let t={};t[this.label]=e,(void 0===t.hex&&void 0===t["#"]||e.length>5)&&this.$emit("change",t)},handleKeyDown(e){let t=this.val,a=Number(t);if(a){let i=this.arrowOffset||1;38===e.keyCode&&(t=a+i,this.handleChange(t),e.preventDefault()),40===e.keyCode&&(t=a-i,this.handleChange(t),e.preventDefault())}}}},h,[],!1,null,null,null).exports;var p=function(){var e=this,t=e._self._c;return t("div",{ref:"container",staticClass:"vc-saturation",style:{background:e.bgColor},on:{mousedown:e.handleMouseDown,touchmove:e.handleChange,touchstart:e.handleChange}},[t("div",{staticClass:"vc-saturation--white"}),e._v(" "),t("div",{staticClass:"vc-saturation--black"}),e._v(" "),t("div",{staticClass:"vc-saturation-pointer",style:{top:e.pointerTop,left:e.pointerLeft}},[t("div",{staticClass:"vc-saturation-circle"})])])};p._withStripped=!0;var m=a(5627),v=a.n(m),g=a(3096);const _=t({name:"Saturation",props:{value:Object},computed:{colors(){return this.value},bgColor(){return`hsl(${this.colors.hsv.h}, 100%, 50%)`},pointerTop(){return-100*this.colors.hsv.v+1+100+"%"},pointerLeft(){return 100*this.colors.hsv.s+"%"}},methods:{throttle:a.n(g)()(((e,t)=>{e(t)}),20,{leading:!0,trailing:!1}),handleChange(e,t){!t&&e.preventDefault();var a=this.$refs.container;if(a){var i=a.clientWidth,s=a.clientHeight,n=a.getBoundingClientRect().left+window.pageXOffset,r=a.getBoundingClientRect().top+window.pageYOffset,o=e.pageX||(e.touches?e.touches[0].pageX:0),l=e.pageY||(e.touches?e.touches[0].pageY:0),c=v()(o-n,0,i),d=v()(l-r,0,s),u=c/i,h=v()(-d/s+1,0,1);this.throttle(this.onChange,{h:this.colors.hsv.h,s:u,v:h,a:this.colors.hsv.a,source:"hsva"})}},onChange(e){this.$emit("change",e)},handleMouseDown(e){window.addEventListener("mousemove",this.handleChange),window.addEventListener("mouseup",this.handleChange),window.addEventListener("mouseup",this.handleMouseUp)},handleMouseUp(e){this.unbindEventListeners()},unbindEventListeners(){window.removeEventListener("mousemove",this.handleChange),window.removeEventListener("mouseup",this.handleChange),window.removeEventListener("mouseup",this.handleMouseUp)}}},p,[],!1,null,null,null).exports;var b=function(){var e=this,t=e._self._c;return t("div",{class:["vc-hue",e.directionClass]},[t("div",{ref:"container",staticClass:"vc-hue-container",attrs:{role:"slider","aria-valuenow":e.colors.hsl.h,"aria-valuemin":"0","aria-valuemax":"360"},on:{mousedown:e.handleMouseDown,touchmove:e.handleChange,touchstart:e.handleChange}},[t("div",{staticClass:"vc-hue-pointer",style:{top:e.pointerTop,left:e.pointerLeft},attrs:{role:"presentation"}},[t("div",{staticClass:"vc-hue-picker"})])])])};b._withStripped=!0;const w=t({name:"Hue",props:{value:Object,direction:{type:String,default:"horizontal"}},data:()=>({oldHue:0,pullDirection:""}),computed:{colors(){const e=this.value.hsl.h;return 0!==e&&e-this.oldHue>0&&(this.pullDirection="right"),0!==e&&e-this.oldHue<0&&(this.pullDirection="left"),this.oldHue=e,this.value},directionClass(){return{"vc-hue--horizontal":"horizontal"===this.direction,"vc-hue--vertical":"vertical"===this.direction}},pointerTop(){return"vertical"===this.direction?0===this.colors.hsl.h&&"right"===this.pullDirection?0:-100*this.colors.hsl.h/360+100+"%":0},pointerLeft(){return"vertical"===this.direction?0:0===this.colors.hsl.h&&"right"===this.pullDirection?"100%":100*this.colors.hsl.h/360+"%"}},methods:{handleChange(e,t){!t&&e.preventDefault();var a=this.$refs.container;if(a){var i,s=a.clientWidth,n=a.clientHeight,r=a.getBoundingClientRect().left+window.pageXOffset,o=a.getBoundingClientRect().top+window.pageYOffset,l=(e.pageX||(e.touches?e.touches[0].pageX:0))-r,c=(e.pageY||(e.touches?e.touches[0].pageY:0))-o;"vertical"===this.direction?(i=c<0?360:c>n?0:360*(-100*c/n+100)/100,this.colors.hsl.h!==i&&this.$emit("change",{h:i,s:this.colors.hsl.s,l:this.colors.hsl.l,a:this.colors.hsl.a,source:"hsl"})):(i=l<0?0:l>s?360:360*(100*l/s)/100,this.colors.hsl.h!==i&&this.$emit("change",{h:i,s:this.colors.hsl.s,l:this.colors.hsl.l,a:this.colors.hsl.a,source:"hsl"}))}},handleMouseDown(e){this.handleChange(e,!0),window.addEventListener("mousemove",this.handleChange),window.addEventListener("mouseup",this.handleMouseUp)},handleMouseUp(e){this.unbindEventListeners()},unbindEventListeners(){window.removeEventListener("mousemove",this.handleChange),window.removeEventListener("mouseup",this.handleMouseUp)}}},b,[],!1,null,null,null).exports;var y=function(){var e=this,t=e._self._c;return t("div",{staticClass:"vc-alpha"},[t("div",{staticClass:"vc-alpha-checkboard-wrap"},[t("checkboard")],1),e._v(" "),t("div",{staticClass:"vc-alpha-gradient",style:{background:e.gradientColor}}),e._v(" "),t("div",{ref:"container",staticClass:"vc-alpha-container",on:{mousedown:e.handleMouseDown,touchmove:e.handleChange,touchstart:e.handleChange}},[t("div",{staticClass:"vc-alpha-pointer",style:{left:100*e.colors.a+"%"}},[t("div",{staticClass:"vc-alpha-picker"})])])])};y._withStripped=!0;var C=function(){return(0,this._self._c)("div",{staticClass:"vc-checkerboard",style:this.bgStyle})};C._withStripped=!0;let x={};function D(e,t,a){var i=e+","+t+","+a;if(x[i])return x[i];var s=function(e,t,a){if("undefined"==typeof document)return null;var i=document.createElement("canvas");i.width=i.height=2*a;var s=i.getContext("2d");return s?(s.fillStyle=e,s.fillRect(0,0,i.width,i.height),s.fillStyle=t,s.fillRect(0,0,a,a),s.translate(a,a),s.fillRect(0,0,a,a),i.toDataURL()):null}(e,t,a);return x[i]=s,s}const k=t({name:"Checkboard",props:{size:{type:[Number,String],default:8},white:{type:String,default:"#fff"},grey:{type:String,default:"#e6e6e6"}},computed:{bgStyle(){return{"background-image":"url("+D(this.white,this.grey,this.size)+")"}}}},C,[],!1,null,null,null).exports;const S=t({name:"Alpha",props:{value:Object,onChange:Function},components:{checkboard:k},computed:{colors(){return this.value},gradientColor(){var e=this.colors.rgba,t=[e.r,e.g,e.b].join(",");return"linear-gradient(to right, rgba("+t+", 0) 0%, rgba("+t+", 1) 100%)"}},methods:{handleChange(e,t){!t&&e.preventDefault();var a=this.$refs.container;if(a){var i,s=a.clientWidth,n=a.getBoundingClientRect().left+window.pageXOffset,r=(e.pageX||(e.touches?e.touches[0].pageX:0))-n;i=r<0?0:r>s?1:Math.round(100*r/s)/100,this.colors.a!==i&&this.$emit("change",{h:this.colors.hsl.h,s:this.colors.hsl.s,l:this.colors.hsl.l,a:i,source:"rgba"})}},handleMouseDown(e){this.handleChange(e,!0),window.addEventListener("mousemove",this.handleChange),window.addEventListener("mouseup",this.handleMouseUp)},handleMouseUp(){this.unbindEventListeners()},unbindEventListeners(){window.removeEventListener("mousemove",this.handleChange),window.removeEventListener("mouseup",this.handleMouseUp)}}},y,[],!1,null,null,null).exports,A=["#D0021B","#F5A623","#F8E71C","#8B572A","#7ED321","#417505","#BD10E0","#9013FE","#4A90E2","#50E3C2","#B8E986","#000000","#4A4A4A","#9B9B9B","#FFFFFF","rgba(0,0,0,0)"];const V={components:{Sketch:t({name:"Sketch",mixins:[u],components:{saturation:_,hue:w,alpha:S,"ed-in":f,checkboard:k},props:{presetColors:{type:Array,default:()=>A},disableAlpha:{type:Boolean,default:!1},disableFields:{type:Boolean,default:!1}},computed:{hex(){let e;return e=this.colors.a<1?this.colors.hex8:this.colors.hex,e.replace("#","")},activeColor(){var e=this.colors.rgba;return"rgba("+[e.r,e.g,e.b,e.a].join(",")+")"}},methods:{handlePreset(e){this.colorChange({hex:e,source:"hex"})},childChange(e){this.colorChange(e)},inputChange(e){e&&(e.hex?this.isValidHex(e.hex)&&this.colorChange({hex:e.hex,source:"hex"}):(e.r||e.g||e.b||e.a)&&this.colorChange({r:e.r||this.colors.rgba.r,g:e.g||this.colors.rgba.g,b:e.b||this.colors.rgba.b,a:e.a||this.colors.rgba.a,source:"rgba"}))}}},o,[],!1,null,null,null).exports},props:{value:{type:String,required:!0,default:""},format:{type:String,required:!1,default:"hex",validator:e=>-1!==["hsl","hex","rgba","hsv"].indexOf(e)},presetColors:{type:Array,required:!1,default:()=>["#000","#fff","#d33","#d93","#ee2","#81d742","#1e73be","#8224e3"]},disableAlpha:{type:Boolean,required:!1,default:!0},disableFields:{type:Boolean,required:!1,default:!0}},data:()=>({showColorPicker:!1}),methods:{updateColor(e){let t="";e[this.format]&&(t=e[this.format]),this.$emit("input",t)},toggleColorPicker(){this.showColorPicker=!this.showColorPicker},setHexColor(e){this.updateColor({hex:e})}}};var I=t(V,r,[],!1,null,"5c4eff5b",null);var L=t({name:"Fields",components:{colorPicker:I.exports,TextEditor:wepos_get_lib("TextEditor")},data:()=>({repeatableItem:{}}),props:["id","fieldData","sectionId","fieldValue"],methods:{containCommonFields:e=>window.weLo_.includes([void 0,"text","email","url","phone"],e),addItem(e,t){this.fieldValue[t]=this.fieldValue[t]||[],void 0!==this.repeatableItem[t]&&this.repeatableItem[t]&&(this.fieldValue[t].push({id:this.repeatableItem[t].trim().replace(/\s+/g,"_").toLowerCase(),value:this.repeatableItem[t]}),this.repeatableItem[t]="")},removeItem(e,t){this.fieldValue[t].splice(e,1)}}},n,[],!1,null,null,null);const T=t({name:"Settings",components:{Fields:L.exports},data:()=>({isSaved:!1,showLoading:!1,isUpdated:!1,isLoaded:!1,message:"",currentTab:null,settingSections:[],settingFields:{},settingValues:{}}),methods:{changeTab(e){this.currentTab=e.id,"undefined"!=typeof localStorage&&localStorage.setItem("activetab",this.currentTab)},showSectionTitle(e){return window.weLo_.findIndex(this.settingSections,{id:e}).title},fetchSettingValues(){var e=this,t={action:"wepos_get_setting_values",nonce:wepos.nonce};e.showLoading=!0,jQuery.post(wepos.ajaxurl,t,(function(t){t.success&&(Object.keys(e.settingFields).forEach((function(a,i){Object.keys(e.settingFields[a]).forEach((function(i,s){e.settingValues[a]||(e.settingValues[a]={}),void 0===t.data[a][i]?void 0===e.settingFields[a][i].default?e.settingValues[a][i]="":e.settingValues[a][i]=e.settingFields[a][i].default:e.settingValues[a][i]=t.data[a][i]}))})),e.settingValues=jQuery.extend({},e.settingValues),e.showLoading=!1,e.isLoaded=!0)}))},showMedia(e,t){var a=this,i=wp.media.frames.file_frame=wp.media({title:this.__("Choose your file","wepos"),button:{text:this.__("Select","wepos")},multiple:!1});i.on("select",(function(){var t=i.state().get("selection").first().toJSON();a.settingValues[e.sectionId][e.name]=t.url})),i.open()},saveSettings(e,t){var a=this,i={action:"wepos_save_settings",nonce:wepos.nonce,settingsData:e,section:t};a.showLoading=!0,jQuery.post(wepos.ajaxurl,i).done((function(e){var t=e.data.settings;a.isSaved=!0,a.isUpdated=!0,a.message=e.data.message,a.settingValues[t.name]=t.value})).fail((function(e){var t=e.responseJSON.data.map((function(e){return e.message}));alert(t.join(" "))})).always((function(){a.showLoading=!1}))}},created(){this.fetchSettingValues(),this.currentTab="wepos_general","undefined"!=typeof localStorage&&(this.currentTab=localStorage.getItem("activetab")?localStorage.getItem("activetab"):"wepos_general"),this.settingSections=wepos.settings_sections,this.settingFields=wepos.settings_fields}},s,[],!1,null,null,null).exports;let F=wepos_get_lib("Vue"),E=wepos_get_lib("Router");F.use(E);const P=new E({routes:wepos.hooks.applyFilters("wepos_admin_routes",[{path:"/settings",name:"Settings",component:T}])}),H={hasStock(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e.manage_stock?!!e.backorders_allowed||e.stock_quantity>t:"outofstock"!=e.stock_status}},M={namespaced:!0,state:{settings:{},availableTax:{},cartdata:{line_items:[],fee_lines:[],coupon_lines:[]}},getters:{getSubtotal(e){var t=0;return weLo_.forEach(e.cartdata.line_items,(function(e,a){e.on_sale?t+=e.quantity*e.sale_price:t+=e.quantity*e.regular_price})),t},getTotalFee(e){var t=0;return weLo_.forEach(e.cartdata.fee_lines,(function(e,a){t+=Math.abs(e.total)})),t},getTotalDiscount(e){var t=0;return weLo_.forEach(e.cartdata.coupon_lines,(function(e,a){t+=Number(Math.abs(e.total))})),t},getTotalLineTax(e){var t=0;return weLo_.forEach(e.cartdata.line_items,(function(e,a){t+=Math.abs(e.tax_amount*e.quantity)})),t},getTotalTax(e,t){let a=0,i=0,s=0,n=0;return weLo_.forEach(e.cartdata.line_items,(function(e,t){a+=Math.abs(e.tax_amount*e.quantity)})),null!=e.settings.woo_tax&&"incl"==e.settings.woo_tax.wc_tax_display_cart&&(a=0),weLo_.forEach(e.cartdata.fee_lines,(function(t,a){if("taxable"!==t.tax_status)return;let s=""===t.tax_class?"standard":t.tax_class,n=weLo_.find(e.availableTax,{class:s.toString()});n&&(i+=Math.abs(t.total)*Math.abs(n.rate)/100)})),weLo_.forEach(e.cartdata.coupon_lines,(function(i,r){if("taxable"!==i.tax_status)return;let o=""===i.tax_class?"standard":i.tax_class;weLo_.find(e.availableTax,{class:o.toString()})&&(s=i.total/t.getSubtotal*100,n+=s/100*a)})),a+=n,a+i},getOrderTotal:(e,t)=>t.getSubtotal+t.getTotalFee+t.getTotalTax,getTotal:(e,t)=>t.getOrderTotal-t.getTotalDiscount,getSettings:(e,t)=>e.settings},mutations:{setSettings(e,t){e.settings=t},setAvailableTax(e,t){e.availableTax=t},setCartData(e,t){weLo_.isEmpty(t)?e.cartdata={line_items:[],fee_lines:[],coupon_lines:[]}:e.cartdata=Object.assign({},t)},addToCartItem(e,t){var a={};a.product_id=0===t.parent_id?t.id:t.parent_id,a.name=t.name,a.quantity=1,a.regular_price=t.regular_display_price,a.sale_price=t.sales_display_price,a.on_sale=t.on_sale,a.attribute=t.attributes,a.variation_id=0!==t.parent_id?t.id:0,a.editQuantity=!1,a.type=t.type,a.tax_amount=t.tax_amount,a.manage_stock=t.manage_stock,a.stock_status=t.stock_status,a.backorders_allowed=t.backorders_allowed,a.stock_quantity=t.stock_quantity;var i=weLo_.findIndex(e.cartdata.line_items,{product_id:a.product_id,variation_id:a.variation_id});i<0?H.hasStock(t)&&e.cartdata.line_items.push(a):H.hasStock(t,e.cartdata.line_items[i].quantity)&&(e.cartdata.line_items[i].quantity+=1)},removeCartItem(e,t){e.cartdata.line_items.splice(t,1)},addCartItemQuantity(e,t){var a=e.cartdata.line_items[t];H.hasStock(a,a.quantity)&&e.cartdata.line_items[t].quantity++},removeCartItemQuantity(e,t){e.cartdata.line_items[t].quantity<=1?e.cartdata.line_items[t].quantity=1:e.cartdata.line_items[t].quantity--},toggleEditQuantity(e,t){e.cartdata.line_items[t].editQuantity=!e.cartdata.line_items[t].editQuantity},addDiscount(e,t){e.cartdata.coupon_lines.push({name:t.title,type:"discount",isEdit:!1,value:t.value.amount,discount_type:t.value.discount_type,tax_status:"incl"!==e.settings.woo_tax.wc_tax_display_shop?"taxable":"none",tax_class:"",total:0,code:t.value.code})},addFee(e,t){e.cartdata.fee_lines.push({name:t.title,type:"fee",value:t.value.toString(),isEdit:!1,fee_type:t.type,tax_status:"yes"===e.settings.wepos_general.enable_fee_tax?"taxable":"none",tax_class:"",total:0})},saveFeeValue(e,t){e.cartdata.fee_lines.splice(t.key,1,t.feeData),e.cartdata.fee_lines[t.key].isEdit=!1},editFeeValue(e,t){e.cartdata.fee_lines[t].isEdit=!0},cancelSaveFeeValue(e,t){e.cartdata.fee_lines[t].isEdit=!1},removeCouponLineItems(e,t){e.cartdata.coupon_lines.splice(t,1)},removeFeeLineItems(e,t){e.cartdata.fee_lines.splice(t,1)},emptyCart(e){e.cartdata={line_items:[],fee_lines:[],coupon_lines:[]}},calculateDiscount(e,t){e.cartdata.coupon_lines.length>0&&weLo_.forEach(e.cartdata.coupon_lines,((a,i)=>{"discount"==a.type&&("percent"==a.discount_type?e.cartdata.coupon_lines[i].total="-"+t.getSubtotal*Math.abs(a.value)/100:e.cartdata.coupon_lines[i].total="-"+Math.abs(a.value))}))},calculateFee(e,t){e.cartdata.fee_lines.length>0&&weLo_.forEach(e.cartdata.fee_lines,((a,i)=>{"fee"==a.type&&("percent"==a.fee_type?e.cartdata.fee_lines[i].total=(t.getSubtotal*Math.abs(a.value)/100).toString():e.cartdata.fee_lines[i].total=Math.abs(a.value).toString())}))}},actions:{setSettingsAction(e,t){e.commit("setSettings",t)},setAvailableTaxAction(e,t){e.commit("setAvailableTax",t)},setCartDataAction(e,t){e.commit("setCartData",t),e.commit("calculateDiscount",e.getters),e.commit("calculateFee",e.getters)},addToCartAction(e,t){e.commit("addToCartItem",t),e.commit("calculateDiscount",e.getters),e.commit("calculateFee",e.getters)},removeCartItemAction(e,t){e.commit("removeCartItem",t),e.commit("calculateDiscount",e.getters),e.commit("calculateFee",e.getters)},addItemQuantityAction(e,t){e.commit("addCartItemQuantity",t),e.commit("calculateDiscount",e.getters),e.commit("calculateFee",e.getters)},removeItemQuantityAction(e,t){e.commit("removeCartItemQuantity",t),e.commit("calculateDiscount",e.getters),e.commit("calculateFee",e.getters)},toggleEditQuantityAction(e,t){e.commit("toggleEditQuantity",t)},addDiscountAction(e,t){e.commit("addDiscount",t),e.commit("calculateDiscount",e.getters)},addFeeAction(e,t){e.commit("addFee",t),e.commit("calculateFee",e.getters)},removeCouponLineItemsAction(e,t){e.commit("removeCouponLineItems",t),e.commit("calculateDiscount",e.getters)},removeFeeLineItemsAction(e,t){e.commit("removeFeeLineItems",t),e.commit("calculateFee",e.getters)},saveFeeValueAction(e,t){e.commit("saveFeeValue",t),e.commit("calculateDiscount",e.getters),e.commit("calculateFee",e.getters)},editFeeValueAction(e,t){e.commit("editFeeValue",t)},cancelSaveFeeValueAction(e,t){e.commit("cancelSaveFeeValue",t)},emptyCartAction(e){e.commit("emptyCart")},calculateDiscount(e){e.commit("calculateDiscount",e.getters)},calculateFee(e){e.commit("calculateFee",e.getters)}}},$={namespaced:!0,state:{orderdata:{billing:{},shipping:{},customer_id:0,customer_note:"",payment_method:"",payment_method_title:""},canProcessPayment:!1},getters:{getCanProcessPayment:e=>e.canProcessPayment},mutations:{setOrderData(e,t){weLo_.isEmpty(t)?e.orderdata={billing:{},shipping:{},customer_id:0,customer_note:"",payment_method:"",payment_method_title:""}:e.orderdata=t},setCustomer(e,t){Object.keys(t).length>0?(e.orderdata.billing=t.billing,e.orderdata.shipping=t.shipping,e.orderdata.customer_id=t.id):(e.orderdata.billing={},e.orderdata.shipping={},e.orderdata.customer_id=0)},emptyOrderdata(e){e.orderdata={billing:{},shipping:{},customer_id:0,customer_note:"",payment_method:"",payment_method_title:""}},setCustomerNote(e,t){e.orderdata.customer_note=t.trim()},removeCustomerNote(e){e.orderdata.customer_note=""},setGateway(e,t){e.orderdata.payment_method=t.id,e.orderdata.payment_method_title=t.title},setCanProcessPayment(e,t){e.canProcessPayment=t}},actions:{setOrderDataAction(e,t){e.commit("setOrderData",t)},setCustomerAction(e,t){e.commit("setCustomer",t)},emptyOrderdataAction(e){e.commit("emptyOrderdata")},setCustomerNoteAction(e,t){e.commit("setCustomerNote",t)},removeCustomerNoteAction(e){e.commit("removeCustomerNote")},setGatewayAction(e,t){e.commit("setGateway",t)},setCanProcessPaymentAction(e,t){e.commit("setCanProcessPayment",t)}}};let O=wepos_get_lib("Vue"),N=wepos_get_lib("Vuex");O.use(N);const R=new N.Store({modules:{Cart:M,Order:$}});const j=function(e){var t=jQuery;let a=t("#toplevel_page_"+e),i=window.location.href,s=i.substr(i.indexOf("admin.php"));a.on("click","a",(function(){var e=t(this);t("ul.wp-submenu li",a).removeClass("current"),e.hasClass("wp-has-submenu")?t("li.wp-first-item",a).addClass("current"):e.parents("li").addClass("current")})),t("ul.wp-submenu a",a).each((function(e,a){t(a).attr("href")!==s||t(a).parent().addClass("current")}))};let q=wepos_get_lib("Vue");q.config.productionTip=!1,new q({el:"#wepos-admin-app",router:P,store:R,render:e=>e(i),created(){this.setLocaleData(wepos.i18n.wepos),wepos.i18n["wepos-pro"]&&this.setLocaleData(wepos.i18n["wepos-pro"])}}),j("wepos")})()})(); \ No newline at end of file diff --git a/assets/js/frontend.js b/assets/js/frontend.js index a53cecb4..a7037623 100644 --- a/assets/js/frontend.js +++ b/assets/js/frontend.js @@ -13,7 +13,7 @@ \*****************************************/(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";eval('__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _modules_Cart_module__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./modules/Cart.module */ "./assets/src/utils/store/modules/Cart.module.js");\n/* harmony import */ var _modules_Order_module__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./modules/Order.module */ "./assets/src/utils/store/modules/Order.module.js");\nlet Vue = wepos_get_lib(\'Vue\');\nlet Vuex = wepos_get_lib(\'Vuex\');\nVue.use(Vuex);\n\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (new Vuex.Store({\n modules: {\n Cart: _modules_Cart_module__WEBPACK_IMPORTED_MODULE_0__["default"],\n Order: _modules_Order_module__WEBPACK_IMPORTED_MODULE_1__["default"]\n }\n}));\n\n//# sourceURL=webpack://wepos/./assets/src/utils/store/index.js?')},"./assets/src/utils/store/modules/Cart.module.js": /*!*******************************************************!*\ !*** ./assets/src/utils/store/modules/Cart.module.js ***! - \*******************************************************/(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _helper__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../helper */ \"./assets/src/utils/store/helper.js\");\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({\n namespaced: true,\n state: {\n settings: {},\n availableTax: {},\n cartdata: {\n line_items: [],\n fee_lines: []\n }\n },\n getters: {\n getSubtotal(state) {\n var subtotal = 0;\n weLo_.forEach(state.cartdata.line_items, function (item, key) {\n if (item.on_sale) {\n subtotal += item.quantity * item.sale_price;\n } else {\n subtotal += item.quantity * item.regular_price;\n }\n });\n return subtotal;\n },\n\n getTotalFee(state) {\n var fee = 0;\n weLo_.forEach(state.cartdata.fee_lines, function (item, key) {\n if (item.type == 'fee') {\n fee += Math.abs(item.total);\n }\n });\n return fee;\n },\n\n getTotalDiscount(state) {\n var discount = 0;\n weLo_.forEach(state.cartdata.fee_lines, function (item, key) {\n if (item.type == 'discount') {\n discount += Number(Math.abs(item.total));\n }\n });\n return discount;\n },\n\n getTotalLineTax(state) {\n var self = this,\n taxLineTotal = 0;\n weLo_.forEach(state.cartdata.line_items, function (item, key) {\n taxLineTotal += Math.abs(item.tax_amount * item.quantity);\n });\n return taxLineTotal;\n },\n\n getTotalTax(state) {\n let self = this,\n taxLineTotal = 0,\n taxFeeTotal = 0;\n weLo_.forEach(state.cartdata.line_items, function (item, key) {\n taxLineTotal += Math.abs(item.tax_amount * item.quantity);\n });\n\n if (state.settings.woo_tax != undefined && state.settings.woo_tax.wc_tax_display_cart == 'incl') {\n taxLineTotal = 0;\n }\n\n weLo_.forEach(state.cartdata.fee_lines, function (item, key) {\n if (item.tax_status !== 'taxable') {\n return;\n }\n\n let itemTaxClass = item.tax_class === '' ? 'standard' : item.tax_class;\n let taxClass = weLo_.find(state.availableTax, {\n 'class': itemTaxClass.toString()\n });\n\n if (!taxClass) {\n return;\n }\n\n if (item.type === 'discount') {\n taxLineTotal += item.total / taxClass.rate;\n }\n\n if (item.type === 'fee') {\n taxFeeTotal += Math.abs(item.total) * Math.abs(taxClass.rate) / 100;\n }\n });\n return taxLineTotal + taxFeeTotal;\n },\n\n getOrderTotal(state, getters) {\n return getters.getSubtotal + getters.getTotalFee + getters.getTotalTax;\n },\n\n getTotal(state, getters) {\n return getters.getOrderTotal - getters.getTotalDiscount;\n },\n\n getSettings(state, getters) {\n return state.settings;\n }\n\n },\n mutations: {\n setSettings(state, settings) {\n state.settings = settings;\n },\n\n setAvailableTax(state, availableTax) {\n state.availableTax = availableTax;\n },\n\n setCartData(state, cartdata) {\n if (weLo_.isEmpty(cartdata)) {\n state.cartdata = {\n line_items: [],\n fee_lines: []\n };\n } else {\n state.cartdata = Object.assign({}, cartdata);\n }\n },\n\n addToCartItem(state, product) {\n var cartObject = {};\n cartObject.product_id = product.parent_id === 0 ? product.id : product.parent_id;\n cartObject.name = product.name;\n cartObject.quantity = 1;\n cartObject.regular_price = product.regular_display_price;\n cartObject.sale_price = product.sales_display_price;\n cartObject.on_sale = product.on_sale;\n cartObject.attribute = product.attributes;\n cartObject.variation_id = product.parent_id !== 0 ? product.id : 0;\n cartObject.editQuantity = false;\n cartObject.type = product.type;\n cartObject.tax_amount = product.tax_amount;\n cartObject.manage_stock = product.manage_stock;\n cartObject.stock_status = product.stock_status;\n cartObject.backorders_allowed = product.backorders_allowed;\n cartObject.stock_quantity = product.stock_quantity;\n var index = weLo_.findIndex(state.cartdata.line_items, {\n product_id: cartObject.product_id,\n variation_id: cartObject.variation_id\n });\n\n if (index < 0) {\n if (_helper__WEBPACK_IMPORTED_MODULE_0__[\"default\"].hasStock(product)) {\n state.cartdata.line_items.push(cartObject);\n }\n } else {\n if (_helper__WEBPACK_IMPORTED_MODULE_0__[\"default\"].hasStock(product, state.cartdata.line_items[index].quantity)) {\n state.cartdata.line_items[index].quantity += 1;\n }\n }\n },\n\n removeCartItem(state, itemKey) {\n state.cartdata.line_items.splice(itemKey, 1);\n },\n\n addCartItemQuantity(state, itemKey) {\n var item = state.cartdata.line_items[itemKey];\n\n if (_helper__WEBPACK_IMPORTED_MODULE_0__[\"default\"].hasStock(item, item.quantity)) {\n state.cartdata.line_items[itemKey].quantity++;\n }\n },\n\n removeCartItemQuantity(state, itemKey) {\n var item = state.cartdata.line_items[itemKey];\n\n if (item.quantity <= 1) {\n state.cartdata.line_items[itemKey].quantity = 1;\n } else {\n state.cartdata.line_items[itemKey].quantity--;\n }\n },\n\n toggleEditQuantity(state, itemKey) {\n state.cartdata.line_items[itemKey].editQuantity = !state.cartdata.line_items[itemKey].editQuantity;\n },\n\n addDiscount(state, discountData) {\n state.cartdata.fee_lines.push({\n name: discountData.title,\n type: 'discount',\n value: discountData.value.toString(),\n isEdit: false,\n discount_type: discountData.type,\n tax_status: 'taxable',\n tax_class: '',\n total: 0\n });\n },\n\n addFee(state, feeData) {\n state.cartdata.fee_lines.push({\n name: feeData.title,\n type: 'fee',\n value: feeData.value.toString(),\n isEdit: false,\n fee_type: feeData.type,\n tax_status: 'taxable',\n tax_class: '',\n total: 0\n });\n },\n\n saveFeeValue(state, item) {\n state.cartdata.fee_lines.splice(item.key, 1, item.feeData);\n state.cartdata.fee_lines[item.key].isEdit = false;\n },\n\n editFeeValue(state, itemKey) {\n state.cartdata.fee_lines[itemKey].isEdit = true;\n },\n\n cancelSaveFeeValue(state, itemKey) {\n state.cartdata.fee_lines[itemKey].isEdit = false;\n },\n\n removeFeeLineItems(state, itemKey) {\n state.cartdata.fee_lines.splice(itemKey, 1);\n },\n\n emptyCart(state) {\n state.cartdata = {\n line_items: [],\n fee_lines: []\n };\n },\n\n calculateDiscount(state, payload) {\n if (state.cartdata.fee_lines.length > 0) {\n weLo_.forEach(state.cartdata.fee_lines, (item, key) => {\n if (item.type == \"discount\") {\n if (item.discount_type == 'percent') {\n state.cartdata.fee_lines[key].total = '-' + payload.getSubtotal * Math.abs(item.value) / 100;\n } else {\n state.cartdata.fee_lines[key].total = '-' + Math.abs(item.value);\n }\n }\n });\n }\n },\n\n calculateFee(state, payload) {\n if (state.cartdata.fee_lines.length > 0) {\n weLo_.forEach(state.cartdata.fee_lines, (item, key) => {\n if (item.type == 'fee') {\n if (item.fee_type == 'percent') {\n state.cartdata.fee_lines[key].total = (payload.getSubtotal * Math.abs(item.value) / 100).toString();\n } else {\n state.cartdata.fee_lines[key].total = Math.abs(item.value).toString();\n }\n }\n });\n }\n }\n\n },\n actions: {\n setSettingsAction(context, settings) {\n context.commit('setSettings', settings);\n },\n\n setAvailableTaxAction(context, availableTax) {\n context.commit('setAvailableTax', availableTax);\n },\n\n setCartDataAction(context, cartdata) {\n context.commit('setCartData', cartdata);\n context.commit('calculateDiscount', context.getters);\n context.commit('calculateFee', context.getters);\n },\n\n addToCartAction(context, product) {\n context.commit('addToCartItem', product);\n context.commit('calculateDiscount', context.getters);\n context.commit('calculateFee', context.getters);\n },\n\n removeCartItemAction(context, itemKey) {\n context.commit('removeCartItem', itemKey);\n context.commit('calculateDiscount', context.getters);\n context.commit('calculateFee', context.getters);\n },\n\n addItemQuantityAction(context, itemKey) {\n context.commit('addCartItemQuantity', itemKey);\n context.commit('calculateDiscount', context.getters);\n context.commit('calculateFee', context.getters);\n },\n\n removeItemQuantityAction(context, itemKey) {\n context.commit('removeCartItemQuantity', itemKey);\n context.commit('calculateDiscount', context.getters);\n context.commit('calculateFee', context.getters);\n },\n\n toggleEditQuantityAction(context, itemKey) {\n context.commit('toggleEditQuantity', itemKey);\n },\n\n addDiscountAction(context, discountData) {\n context.commit('addDiscount', discountData);\n context.commit('calculateDiscount', context.getters);\n context.commit('calculateFee', context.getters);\n },\n\n addFeeAction(context, feeData) {\n context.commit('addFee', feeData);\n context.commit('calculateDiscount', context.getters);\n context.commit('calculateFee', context.getters);\n },\n\n removeFeeLineItemsAction(context, itemKey) {\n context.commit('removeFeeLineItems', itemKey);\n context.commit('calculateDiscount', context.getters);\n context.commit('calculateFee', context.getters);\n },\n\n saveFeeValueAction(context, feeData) {\n context.commit('saveFeeValue', feeData);\n context.commit('calculateDiscount', context.getters);\n context.commit('calculateFee', context.getters);\n },\n\n editFeeValueAction(context, itemKey) {\n context.commit('editFeeValue', itemKey);\n },\n\n cancelSaveFeeValueAction(context, itemKey) {\n context.commit('cancelSaveFeeValue', itemKey);\n },\n\n emptyCartAction(context) {\n context.commit('emptyCart');\n },\n\n calculateDiscount(context) {\n context.commit('calculateDiscount', context.getters);\n },\n\n calculateFee(context) {\n context.commit('calculateFee', context.getters);\n }\n\n }\n});\n\n//# sourceURL=webpack://wepos/./assets/src/utils/store/modules/Cart.module.js?")},"./assets/src/utils/store/modules/Order.module.js": + \*******************************************************/(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _helper__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../helper */ \"./assets/src/utils/store/helper.js\");\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({\n namespaced: true,\n state: {\n settings: {},\n availableTax: {},\n cartdata: {\n line_items: [],\n fee_lines: [],\n coupon_lines: []\n }\n },\n getters: {\n getSubtotal(state) {\n var subtotal = 0;\n weLo_.forEach(state.cartdata.line_items, function (item, key) {\n if (item.on_sale) {\n subtotal += item.quantity * item.sale_price;\n } else {\n subtotal += item.quantity * item.regular_price;\n }\n });\n return subtotal;\n },\n\n getTotalFee(state) {\n var fee = 0;\n weLo_.forEach(state.cartdata.fee_lines, function (item, key) {\n fee += Math.abs(item.total);\n });\n return fee;\n },\n\n getTotalDiscount(state) {\n var discount = 0;\n weLo_.forEach(state.cartdata.coupon_lines, function (item, key) {\n discount += Number(Math.abs(item.total));\n });\n return discount;\n },\n\n getTotalLineTax(state) {\n var self = this,\n taxLineTotal = 0;\n weLo_.forEach(state.cartdata.line_items, function (item, key) {\n taxLineTotal += Math.abs(item.tax_amount * item.quantity);\n });\n return taxLineTotal;\n },\n\n getTotalTax(state, getters) {\n let self = this,\n taxLineTotal = 0,\n taxFeeTotal = 0,\n discountPercentage = 0,\n couponTaxDiscount = 0;\n weLo_.forEach(state.cartdata.line_items, function (item, key) {\n taxLineTotal += Math.abs(item.tax_amount * item.quantity);\n });\n\n if (state.settings.woo_tax != undefined && state.settings.woo_tax.wc_tax_display_cart == 'incl') {\n taxLineTotal = 0;\n }\n\n weLo_.forEach(state.cartdata.fee_lines, function (item, key) {\n if (item.tax_status !== 'taxable') {\n return;\n }\n\n let itemTaxClass = item.tax_class === '' ? 'standard' : item.tax_class;\n let taxClass = weLo_.find(state.availableTax, {\n 'class': itemTaxClass.toString()\n });\n\n if (!taxClass) {\n return;\n }\n\n taxFeeTotal += Math.abs(item.total) * Math.abs(taxClass.rate) / 100;\n });\n weLo_.forEach(state.cartdata.coupon_lines, function (item, key) {\n if (item.tax_status !== 'taxable') {\n return;\n }\n\n let itemTaxClass = item.tax_class === '' ? 'standard' : item.tax_class;\n let taxClass = weLo_.find(state.availableTax, {\n 'class': itemTaxClass.toString()\n });\n\n if (!taxClass) {\n return;\n }\n\n discountPercentage = item.total / getters.getSubtotal * 100;\n couponTaxDiscount += discountPercentage / 100 * taxLineTotal;\n });\n taxLineTotal += couponTaxDiscount;\n return taxLineTotal + taxFeeTotal;\n },\n\n getOrderTotal(state, getters) {\n return getters.getSubtotal + getters.getTotalFee + getters.getTotalTax;\n },\n\n getTotal(state, getters) {\n return getters.getOrderTotal - getters.getTotalDiscount;\n },\n\n getSettings(state, getters) {\n return state.settings;\n }\n\n },\n mutations: {\n setSettings(state, settings) {\n state.settings = settings;\n },\n\n setAvailableTax(state, availableTax) {\n state.availableTax = availableTax;\n },\n\n setCartData(state, cartdata) {\n if (weLo_.isEmpty(cartdata)) {\n state.cartdata = {\n line_items: [],\n fee_lines: [],\n coupon_lines: []\n };\n } else {\n state.cartdata = Object.assign({}, cartdata);\n }\n },\n\n addToCartItem(state, product) {\n var cartObject = {};\n cartObject.product_id = product.parent_id === 0 ? product.id : product.parent_id;\n cartObject.name = product.name;\n cartObject.quantity = 1;\n cartObject.regular_price = product.regular_display_price;\n cartObject.sale_price = product.sales_display_price;\n cartObject.on_sale = product.on_sale;\n cartObject.attribute = product.attributes;\n cartObject.variation_id = product.parent_id !== 0 ? product.id : 0;\n cartObject.editQuantity = false;\n cartObject.type = product.type;\n cartObject.tax_amount = product.tax_amount;\n cartObject.manage_stock = product.manage_stock;\n cartObject.stock_status = product.stock_status;\n cartObject.backorders_allowed = product.backorders_allowed;\n cartObject.stock_quantity = product.stock_quantity;\n var index = weLo_.findIndex(state.cartdata.line_items, {\n product_id: cartObject.product_id,\n variation_id: cartObject.variation_id\n });\n\n if (index < 0) {\n if (_helper__WEBPACK_IMPORTED_MODULE_0__[\"default\"].hasStock(product)) {\n state.cartdata.line_items.push(cartObject);\n }\n } else {\n if (_helper__WEBPACK_IMPORTED_MODULE_0__[\"default\"].hasStock(product, state.cartdata.line_items[index].quantity)) {\n state.cartdata.line_items[index].quantity += 1;\n }\n }\n },\n\n removeCartItem(state, itemKey) {\n state.cartdata.line_items.splice(itemKey, 1);\n },\n\n addCartItemQuantity(state, itemKey) {\n var item = state.cartdata.line_items[itemKey];\n\n if (_helper__WEBPACK_IMPORTED_MODULE_0__[\"default\"].hasStock(item, item.quantity)) {\n state.cartdata.line_items[itemKey].quantity++;\n }\n },\n\n removeCartItemQuantity(state, itemKey) {\n var item = state.cartdata.line_items[itemKey];\n\n if (item.quantity <= 1) {\n state.cartdata.line_items[itemKey].quantity = 1;\n } else {\n state.cartdata.line_items[itemKey].quantity--;\n }\n },\n\n toggleEditQuantity(state, itemKey) {\n state.cartdata.line_items[itemKey].editQuantity = !state.cartdata.line_items[itemKey].editQuantity;\n },\n\n addDiscount(state, discountData) {\n state.cartdata.coupon_lines.push({\n name: discountData.title,\n type: 'discount',\n isEdit: false,\n value: discountData.value.amount,\n discount_type: discountData.value.discount_type,\n tax_status: 'incl' !== state.settings.woo_tax.wc_tax_display_shop ? 'taxable' : 'none',\n tax_class: '',\n total: 0,\n code: discountData.value.code\n });\n },\n\n addFee(state, feeData) {\n state.cartdata.fee_lines.push({\n name: feeData.title,\n type: 'fee',\n value: feeData.value.toString(),\n isEdit: false,\n fee_type: feeData.type,\n tax_status: 'yes' === state.settings.wepos_general.enable_fee_tax ? 'taxable' : 'none',\n tax_class: '',\n total: 0\n });\n },\n\n saveFeeValue(state, item) {\n state.cartdata.fee_lines.splice(item.key, 1, item.feeData);\n state.cartdata.fee_lines[item.key].isEdit = false;\n },\n\n editFeeValue(state, itemKey) {\n state.cartdata.fee_lines[itemKey].isEdit = true;\n },\n\n cancelSaveFeeValue(state, itemKey) {\n state.cartdata.fee_lines[itemKey].isEdit = false;\n },\n\n removeCouponLineItems(state, itemKey) {\n state.cartdata.coupon_lines.splice(itemKey, 1);\n },\n\n removeFeeLineItems(state, itemKey) {\n state.cartdata.fee_lines.splice(itemKey, 1);\n },\n\n emptyCart(state) {\n state.cartdata = {\n line_items: [],\n fee_lines: [],\n coupon_lines: []\n };\n },\n\n calculateDiscount(state, payload) {\n if (state.cartdata.coupon_lines.length > 0) {\n weLo_.forEach(state.cartdata.coupon_lines, (item, key) => {\n if (item.type == \"discount\") {\n if (item.discount_type == 'percent') {\n state.cartdata.coupon_lines[key].total = '-' + payload.getSubtotal * Math.abs(item.value) / 100;\n } else {\n state.cartdata.coupon_lines[key].total = '-' + Math.abs(item.value);\n }\n }\n });\n }\n },\n\n calculateFee(state, payload) {\n if (state.cartdata.fee_lines.length > 0) {\n weLo_.forEach(state.cartdata.fee_lines, (item, key) => {\n if (item.type == 'fee') {\n if (item.fee_type == 'percent') {\n state.cartdata.fee_lines[key].total = (payload.getSubtotal * Math.abs(item.value) / 100).toString();\n } else {\n state.cartdata.fee_lines[key].total = Math.abs(item.value).toString();\n }\n }\n });\n }\n }\n\n },\n actions: {\n setSettingsAction(context, settings) {\n context.commit('setSettings', settings);\n },\n\n setAvailableTaxAction(context, availableTax) {\n context.commit('setAvailableTax', availableTax);\n },\n\n setCartDataAction(context, cartdata) {\n context.commit('setCartData', cartdata);\n context.commit('calculateDiscount', context.getters);\n context.commit('calculateFee', context.getters);\n },\n\n addToCartAction(context, product) {\n context.commit('addToCartItem', product);\n context.commit('calculateDiscount', context.getters);\n context.commit('calculateFee', context.getters);\n },\n\n removeCartItemAction(context, itemKey) {\n context.commit('removeCartItem', itemKey);\n context.commit('calculateDiscount', context.getters);\n context.commit('calculateFee', context.getters);\n },\n\n addItemQuantityAction(context, itemKey) {\n context.commit('addCartItemQuantity', itemKey);\n context.commit('calculateDiscount', context.getters);\n context.commit('calculateFee', context.getters);\n },\n\n removeItemQuantityAction(context, itemKey) {\n context.commit('removeCartItemQuantity', itemKey);\n context.commit('calculateDiscount', context.getters);\n context.commit('calculateFee', context.getters);\n },\n\n toggleEditQuantityAction(context, itemKey) {\n context.commit('toggleEditQuantity', itemKey);\n },\n\n addDiscountAction(context, discountData) {\n context.commit('addDiscount', discountData);\n context.commit('calculateDiscount', context.getters);\n },\n\n addFeeAction(context, feeData) {\n context.commit('addFee', feeData);\n context.commit('calculateFee', context.getters);\n },\n\n removeCouponLineItemsAction(context, itemKey) {\n context.commit('removeCouponLineItems', itemKey);\n context.commit('calculateDiscount', context.getters);\n },\n\n removeFeeLineItemsAction(context, itemKey) {\n context.commit('removeFeeLineItems', itemKey);\n context.commit('calculateFee', context.getters);\n },\n\n saveFeeValueAction(context, feeData) {\n context.commit('saveFeeValue', feeData);\n context.commit('calculateDiscount', context.getters);\n context.commit('calculateFee', context.getters);\n },\n\n editFeeValueAction(context, itemKey) {\n context.commit('editFeeValue', itemKey);\n },\n\n cancelSaveFeeValueAction(context, itemKey) {\n context.commit('cancelSaveFeeValue', itemKey);\n },\n\n emptyCartAction(context) {\n context.commit('emptyCart');\n },\n\n calculateDiscount(context) {\n context.commit('calculateDiscount', context.getters);\n },\n\n calculateFee(context) {\n context.commit('calculateFee', context.getters);\n }\n\n }\n});\n\n//# sourceURL=webpack://wepos/./assets/src/utils/store/modules/Cart.module.js?")},"./assets/src/utils/store/modules/Order.module.js": /*!********************************************************!*\ !*** ./assets/src/utils/store/modules/Order.module.js ***! \********************************************************/(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({\n namespaced: true,\n state: {\n orderdata: {\n billing: {},\n shipping: {},\n customer_id: 0,\n customer_note: '',\n payment_method: '',\n payment_method_title: ''\n },\n canProcessPayment: false\n },\n getters: {\n getCanProcessPayment: state => {\n return state.canProcessPayment;\n }\n },\n mutations: {\n setOrderData(state, orderdata) {\n if (weLo_.isEmpty(orderdata)) {\n state.orderdata = {\n billing: {},\n shipping: {},\n customer_id: 0,\n customer_note: '',\n payment_method: '',\n payment_method_title: ''\n };\n } else {\n state.orderdata = orderdata;\n }\n },\n\n setCustomer(state, customer) {\n if (Object.keys(customer).length > 0) {\n state.orderdata.billing = customer.billing;\n state.orderdata.shipping = customer.shipping;\n state.orderdata.customer_id = customer.id;\n } else {\n state.orderdata.billing = {};\n state.orderdata.shipping = {};\n state.orderdata.customer_id = 0;\n }\n },\n\n emptyOrderdata(state) {\n state.orderdata = {\n billing: {},\n shipping: {},\n customer_id: 0,\n customer_note: '',\n payment_method: '',\n payment_method_title: ''\n };\n },\n\n setCustomerNote(state, note) {\n state.orderdata.customer_note = note.trim();\n },\n\n removeCustomerNote(state) {\n state.orderdata.customer_note = '';\n },\n\n setGateway(state, gateway) {\n state.orderdata.payment_method = gateway.id;\n state.orderdata.payment_method_title = gateway.title;\n },\n\n setCanProcessPayment(state, canProcessPayment) {\n state.canProcessPayment = canProcessPayment;\n }\n\n },\n actions: {\n setOrderDataAction(context, orderdata) {\n context.commit('setOrderData', orderdata);\n },\n\n setCustomerAction(context, customer) {\n context.commit('setCustomer', customer);\n },\n\n emptyOrderdataAction(context) {\n context.commit('emptyOrderdata');\n },\n\n setCustomerNoteAction(context, note) {\n context.commit('setCustomerNote', note);\n },\n\n removeCustomerNoteAction(context) {\n context.commit('removeCustomerNote');\n },\n\n setGatewayAction(context, gateway) {\n context.commit('setGateway', gateway);\n },\n\n setCanProcessPaymentAction(context, canProcessPayment) {\n context.commit('setCanProcessPayment', canProcessPayment);\n }\n\n }\n});\n\n//# sourceURL=webpack://wepos/./assets/src/utils/store/modules/Order.module.js?")},"./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/index.js??vue-loader-options!./assets/src/frontend/App.vue?vue&type=script&lang=js&": @@ -31,7 +31,7 @@ \***********************************************************************************************************************************************************************************/(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _Keyboard_vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Keyboard.vue */ \"./assets/src/frontend/components/Keyboard.vue\");\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({\n name: 'FeeKeypad',\n components: {\n keyboard: _Keyboard_vue__WEBPACK_IMPORTED_MODULE_0__[\"default\"]\n },\n computed: {\n hotkeys() {\n var keymap = {\n discount: {\n 'f4': this.showFeeKeypad,\n 'esc': this.hideFeeKepad\n },\n fee: {\n 'f5': this.showFeeKeypad,\n 'esc': this.hideFeeKepad\n }\n };\n return keymap[this.shortKey];\n }\n\n },\n props: {\n name: {\n type: String,\n default: 'Fee'\n },\n className: {\n type: String,\n default: ''\n },\n shortKey: {\n type: String,\n default: ''\n }\n },\n\n data() {\n return {\n input: '',\n displayValue: '',\n viewFeeKeypad: false\n };\n },\n\n watch: {\n displayValue(newValue, oldValue) {\n this.inputChange();\n }\n\n },\n methods: {\n hideFeeKepad(e) {\n this.viewFeeKeypad = false;\n },\n\n layout() {\n return '123|456|789|{:backspace}0' + wepos.currency_format_decimal_sep + '|{% ' + this.name + ':percent}{' + wepos.currency_format_symbol + ' ' + this.name + ':flat}';\n },\n\n percentFee() {\n this.$emit('inputfee', this.input, 'percent');\n this.viewFeeKeypad = false;\n this.input = '';\n this.displayValue = '';\n },\n\n flatFee() {\n this.$emit('inputfee', this.input, 'flat');\n this.viewFeeKeypad = false;\n this.input = '';\n this.displayValue = '';\n },\n\n inputChange() {\n if (this.isValidAmount(this.displayValue)) {\n this.input = this.getFormattedValue(this.displayValue, wepos.currency_format_decimal_sep, \".\");\n } else {\n this.displayValue = this.getFormattedValue(this.input, \".\", wepos.currency_format_decimal_sep);\n }\n\n jQuery(this.$refs.feeinput).focus();\n },\n\n getFormattedValue(value, charFrom, charTo) {\n let formattedValue = value;\n\n if (\".\" !== wepos.currency_format_decimal_sep) {\n formattedValue = value.replace(charFrom, charTo);\n }\n\n return formattedValue;\n },\n\n isValidAmount(amount) {\n const decimalSep = wepos.currency_format_decimal_sep;\n const allowedChars = \"^[0-9]*[\" + decimalSep + \"]{0,1}[0-9]*$\";\n const regexPattern = new RegExp(allowedChars, \"gi\");\n return amount.match(regexPattern);\n },\n\n showFeeKeypad(e) {\n e.preventDefault();\n this.viewFeeKeypad = true;\n setTimeout(() => {\n jQuery(this.$refs.feeinput).focus();\n }, 500);\n }\n\n }\n});\n\n//# sourceURL=webpack://wepos/./assets/src/frontend/components/FeeKeypad.vue?./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/index.js??vue-loader-options")},"./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/index.js??vue-loader-options!./assets/src/frontend/components/Home.vue?vue&type=script&lang=js&": /*!******************************************************************************************************************************************************************************!*\ !*** ./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/index.js??vue-loader-options!./assets/src/frontend/components/Home.vue?vue&type=script&lang=js& ***! - \******************************************************************************************************************************************************************************/(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _Overlay_vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Overlay.vue */ \"./assets/src/frontend/components/Overlay.vue\");\n/* harmony import */ var _ProductSearch_vue__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ProductSearch.vue */ \"./assets/src/frontend/components/ProductSearch.vue\");\n/* harmony import */ var _CustomerSearch_vue__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./CustomerSearch.vue */ \"./assets/src/frontend/components/CustomerSearch.vue\");\n/* harmony import */ var _FeeKeypad_vue__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./FeeKeypad.vue */ \"./assets/src/frontend/components/FeeKeypad.vue\");\n/* harmony import */ var vue_mugen_scroll__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! vue-mugen-scroll */ \"./node_modules/vue-mugen-scroll/dist/vue-mugen-scroll.common.js\");\n/* harmony import */ var vue_mugen_scroll__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(vue_mugen_scroll__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _PrintReceipt_vue__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./PrintReceipt.vue */ \"./assets/src/frontend/components/PrintReceipt.vue\");\n/* harmony import */ var _PrintReceiptHtml_vue__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./PrintReceiptHtml.vue */ \"./assets/src/frontend/components/PrintReceiptHtml.vue\");\n/* harmony import */ var _CustomerNote_vue__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./CustomerNote.vue */ \"./assets/src/frontend/components/CustomerNote.vue\");\n\n\n\n\n\n\n\n\nlet Modal = wepos_get_lib('Modal');\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({\n name: 'Home',\n components: {\n ProductSearch: _ProductSearch_vue__WEBPACK_IMPORTED_MODULE_1__[\"default\"],\n CustomerSearch: _CustomerSearch_vue__WEBPACK_IMPORTED_MODULE_2__[\"default\"],\n Overlay: _Overlay_vue__WEBPACK_IMPORTED_MODULE_0__[\"default\"],\n Modal,\n MugenScroll: (vue_mugen_scroll__WEBPACK_IMPORTED_MODULE_4___default()),\n FeeKeypad: _FeeKeypad_vue__WEBPACK_IMPORTED_MODULE_3__[\"default\"],\n PrintReceipt: _PrintReceipt_vue__WEBPACK_IMPORTED_MODULE_5__[\"default\"],\n PrintReceiptHtml: _PrintReceiptHtml_vue__WEBPACK_IMPORTED_MODULE_6__[\"default\"],\n CustomerNote: _CustomerNote_vue__WEBPACK_IMPORTED_MODULE_7__[\"default\"]\n },\n\n data() {\n return {\n showHelp: false,\n showQucikMenu: false,\n productView: 'grid',\n productLoading: false,\n viewVariationPopover: false,\n showModal: false,\n showPaymentReceipt: false,\n products: [],\n filteredProducts: [],\n totalPages: 1,\n page: 1,\n showOverlay: false,\n selectedVariationProduct: {},\n attributeDisabled: true,\n selectedAttribute: {},\n availableGateways: [],\n emptyGatewayDiv: 0,\n cashAmount: '',\n availableTax: [],\n settings: {},\n taxSettings: {},\n printdata: wepos.hooks.applyFilters('wepos_initial_print_data', {\n gateway: {\n id: '',\n title: ''\n }\n }),\n feeData: {},\n createprintreceipt: false,\n selectedCategory: '',\n selectedGateway: '',\n categories: [],\n showReceiptHtml: wepos.hooks.applyFilters('wepos_render_receipt_html', true),\n quickLinkList: wepos.hooks.applyFilters('wepos_quick_links', []),\n quickLinkListStart: wepos.hooks.applyFilters('wepos_quick_links_start', []),\n availableGatewayContent: wepos.hooks.applyFilters('wepos_avaialable_gateway_content', []),\n afterMainContents: wepos.hooks.applyFilters('wepos_after_main_content', []),\n beforCartPanels: wepos.hooks.applyFilters('wepos_before_cart_panel', [])\n };\n },\n\n computed: {\n cartdata() {\n return this.$store.state.Cart.cartdata;\n },\n\n orderdata() {\n return this.$store.state.Order.orderdata;\n },\n\n hotkeys() {\n return {\n 'f3': this.toggleProductView,\n 'f9': this.initPayment,\n 'f10': this.processPayment,\n 'f8': this.createNewSale,\n 'shift+f8': this.emptyCart,\n 'esc': this.backToSale,\n 'meta+/': this.openHelp,\n 'ctrl+/': this.openHelp\n };\n },\n\n getFilteredProduct() {\n if (this.$route.query.category !== undefined) {\n return this.products.filter(product => {\n var foundCat = weLo_.find(product.categories, {\n id: parseInt(this.$route.query.category)\n });\n return foundCat != undefined && Object.keys(foundCat).length > 0;\n });\n } else {\n return this.products;\n }\n },\n\n changeAmount() {\n var returnMoney = this.unFormat(this.cashAmount) - this.$store.getters['Cart/getTotal'];\n return returnMoney > 0 ? returnMoney : 0;\n },\n\n getBreadCrums() {\n if (this.$route.query.category !== undefined) {\n var categories = jQuery.extend(true, [], this.categories),\n selectedCat = weLo_.find(this.categories, {\n id: parseInt(this.$route.query.category)\n }),\n selectedCatIndex = weLo_.findIndex(this.categories, selectedCat);\n var categoriesLoop = categories.splice(0, selectedCatIndex + 1);\n var choosenCat = [];\n\n if (categoriesLoop.length > 0) {\n for (var i = categoriesLoop.length - 1; i >= 0; i--) {\n if (choosenCat.length > 0) {\n var foundCat = weLo_.find(categoriesLoop, {\n id: categoriesLoop[i + 1].parent_id\n });\n\n if (foundCat != undefined) {\n choosenCat.push(foundCat);\n\n if (foundCat.parent_id == null) {\n break;\n }\n }\n } else {\n choosenCat.push(categoriesLoop[i]);\n }\n }\n\n return choosenCat.slice().reverse();\n }\n }\n\n return [];\n }\n\n },\n watch: {\n selectedAttribute(newdata, olddata) {\n if (Object.keys(newdata).length == this.selectedVariationProduct.attributes.length) {\n this.attributeDisabled = false;\n }\n },\n\n '$route.query.order_key'() {\n if (this.$route.query.order_key != '' && this.$route.query.payment == 'success') {\n this.showModal = false;\n this.showPaymentReceipt = true;\n }\n\n ;\n },\n\n '$route.query.category'() {\n this.selectedCategory = {\n id: -1,\n level: 0,\n name: this.__('All categories', 'wepos'),\n parent_id: null\n };\n\n if (this.$route.query.category !== undefined) {\n this.selectedCategory = weLo_.find(this.categories, {\n id: parseInt(this.$route.query.category)\n });\n }\n },\n\n 'selectedGateway'(newdata, olddata) {\n var gateway = weLo_.find(this.availableGateways, {\n 'id': newdata\n });\n this.$store.dispatch('Order/setGatewayAction', gateway);\n },\n\n cashAmount(newdata, olddata) {\n this.ableToProcess();\n }\n\n },\n methods: {\n openQucikMenu() {\n this.showQucikMenu = true;\n },\n\n openHelp(e) {\n e.preventDefault();\n this.showHelp = true;\n this.showQucikMenu = false;\n },\n\n closeHelp() {\n this.showHelp = false;\n },\n\n addCustomerNote(note) {\n this.$store.dispatch('Order/setCustomerNoteAction', note);\n },\n\n removeCustomerNote() {\n this.$store.dispatch('Order/removeCustomerNoteAction');\n },\n\n removeBreadcrums() {\n this.$router.push({\n name: 'Home'\n });\n },\n\n logout() {\n wepos.hooks.doAction('wepos_before_logout');\n window.location.href = wepos.logout_url.toString();\n },\n\n emptyCart() {\n this.$store.dispatch('Cart/emptyCartAction');\n this.$store.dispatch('Order/emptyOrderdataAction');\n this.printdata = wepos.hooks.applyFilters('wepos_initial_print_data', {\n gateway: {\n id: '',\n title: ''\n }\n });\n this.showPaymentReceipt = false;\n this.cashAmount = '';\n this.eventBus.$emit('emptycart', this.orderdata);\n this.showQucikMenu = false;\n },\n\n toggleProductView(e) {\n e.preventDefault();\n this.productView = this.productView == 'grid' ? 'list' : 'grid';\n },\n\n createNewSale() {\n this.$router.push({\n name: 'Home'\n });\n this.emptyCart();\n },\n\n ableToProcess() {\n let canProcess = this.cartdata.line_items.length > 0 && this.isSelectGateway();\n\n if (this.selectedGateway === 'wepos_cash') {\n canProcess = this.unFormat(this.cashAmount) >= this.truncateNumber(this.$store.getters['Cart/getTotal']) && canProcess;\n }\n\n console.log(canProcess);\n this.$store.dispatch('Order/setCanProcessPaymentAction', canProcess);\n },\n\n processPayment(e) {\n if (!this.$store.getters['Order/getCanProcessPayment']) {\n return;\n }\n\n var self = this,\n gateway = weLo_.find(this.availableGateways, {\n 'id': this.orderdata.payment_method\n }),\n orderdata = wepos.hooks.applyFilters('wepos_order_form_data', {\n billing: this.orderdata.billing,\n shipping: this.orderdata.shipping,\n line_items: this.cartdata.line_items,\n fee_lines: this.cartdata.fee_lines,\n customer_id: this.orderdata.customer_id,\n customer_note: this.orderdata.customer_note,\n payment_method: this.orderdata.payment_method,\n payment_method_title: this.orderdata.payment_method_title,\n meta_data: [{\n key: '_wepos_is_pos_order',\n value: true\n }, {\n key: '_wepos_cash_tendered_amount',\n value: self.cashAmount.toString()\n }, {\n key: '_wepos_cash_change_amount',\n value: self.changeAmount.toString()\n }]\n }, this.orderdata, this.cartdata);\n var $contentWrap = jQuery('.wepos-checkout-wrapper');\n $contentWrap.block({\n message: null,\n overlayCSS: {\n background: '#fff url(' + wepos.ajax_loader + ') no-repeat center',\n opacity: 0.4\n }\n });\n wepos.api.post(wepos.rest.root + wepos.rest.wcversion + '/orders', orderdata).done(response => {\n wepos.api.post(wepos.rest.root + wepos.rest.posversion + '/payment/process', response).done(data => {\n if (data.result == 'success') {\n this.$router.push({\n name: 'Home',\n query: {\n order_key: response.order_key,\n payment: 'success'\n }\n });\n this.printdata = wepos.hooks.applyFilters('wepos_after_payment_print_data', {\n line_items: this.cartdata.line_items,\n fee_lines: this.cartdata.fee_lines,\n subtotal: this.$store.getters['Cart/getSubtotal'],\n taxtotal: this.$store.getters['Cart/getTotalTax'],\n ordertotal: this.$store.getters['Cart/getTotal'],\n gateway: {\n id: response.payment_method,\n title: response.payment_method_title\n },\n order_id: response.id,\n order_date: response.date_created,\n cashamount: this.cashAmount.toString(),\n changeamount: this.changeAmount.toString()\n }, orderdata);\n $contentWrap.unblock();\n } else {\n $contentWrap.unblock();\n }\n }).fail(data => {\n $contentWrap.unblock();\n alert(data.responseJSON.message);\n });\n }).fail(response => {\n $contentWrap.unblock();\n alert(response.responseJSON.message);\n });\n },\n\n initPayment() {\n if (this.$store.state.Cart.cartdata.line_items.length <= 0) {\n return;\n }\n\n this.showModal = true;\n this.$store.dispatch('Order/setGatewayAction', this.availableGateways[0]);\n this.selectedGateway = this.availableGateways[0].id;\n },\n\n backToSale() {\n this.showModal = false;\n this.showHelp = false; // Remove gateway selections\n },\n\n isSelectGateway() {\n return !(this.orderdata.payment_method == undefined || this.orderdata.payment_method == '');\n },\n\n getProductImage(product) {\n return product.images.length > 0 ? product.images[0].woocommerce_thumbnail : wepos.placeholder_image;\n },\n\n getProductImageName(product) {\n return product.images.length > 0 ? product.images[0].name : product.name;\n },\n\n setDiscount(value, type) {\n this.$store.dispatch('Cart/addDiscountAction', {\n title: this.__('Discount', 'wepos'),\n value: value,\n type: type\n });\n },\n\n saveFee(key) {\n this.$store.dispatch('Cart/saveFeeValueAction', {\n key: key,\n feeData: this.feeData\n });\n this.feeData = {};\n },\n\n cancelEditFee(key) {\n this.$store.dispatch('Cart/cancelSaveFeeValueAction', key);\n this.feeData = {};\n },\n\n editFeeData(key) {\n this.$store.dispatch('Cart/editFeeValueAction', key);\n this.feeData = Object.assign({}, this.cartdata.fee_lines[key]);\n this.$nextTick(() => {\n jQuery(this.$refs.fee_name).focus();\n });\n },\n\n setFee(value, type) {\n this.$store.dispatch('Cart/addFeeAction', {\n title: this.__('Fee', 'wepos'),\n value: value,\n type: type\n });\n },\n\n removeFeeLine(key) {\n this.$store.dispatch('Cart/removeFeeLineItemsAction', key);\n },\n\n getDiscountAmount(fee) {\n return fee.discount_type === 'percent' || fee.fee_type === 'percent' ? this.formatNumber(fee.value) + '%' : this.formatPrice(fee.total);\n },\n\n fetchProducts() {\n if (this.page == 1) {\n this.productLoading = true;\n }\n\n if (this.totalPages >= this.page) {\n wepos.api.get(wepos.rest.root + wepos.rest.posversion + '/products?status=publish&per_page=30&page=' + this.page).done((response, status, xhr) => {\n this.appendProducts(response);\n this.page += 1;\n this.totalPages = parseInt(xhr.getResponseHeader('X-WP-TotalPages'));\n this.productLoading = false;\n }).then((response, status, xhr) => {\n this.fetchProducts();\n });\n } else {\n this.productLoading = false;\n }\n },\n\n appendProducts(products) {\n products.forEach(product => {\n if (\"variable\" === product.type && this.isAllVariationsDisabled(product)) {\n return;\n }\n\n this.products = this.products.concat(product);\n });\n },\n\n isAllVariationsDisabled(product) {\n let isDisabled = true;\n product.attributes.forEach(attribute => {\n if (true === attribute.variation) {\n isDisabled = false;\n }\n });\n return isDisabled;\n },\n\n maybeRemoveDeletedProduct(cartData) {\n return new Promise((resolve, reject) => {\n if (!cartData) {\n return resolve(cartData);\n }\n\n if (!cartData.line_items || cartData.line_items.length < 1) {\n return resolve(cartData);\n }\n\n let productIds = cartData.line_items.map(lineItem => {\n return lineItem.product_id;\n });\n wepos.api.get(wepos.rest.root + wepos.rest.posversion + '/products?include=' + productIds.toString()).then(response => {\n let foundProducts = response.map(product => {\n return product.id;\n });\n cartData.line_items.forEach((product, key) => {\n if (!foundProducts.includes(product.product_id)) {\n cartData.line_items.splice(key, 1);\n localStorage.setItem('cartdata', JSON.stringify(cartData));\n }\n });\n return resolve(cartData);\n }).fail(() => {\n return reject(cartData);\n });\n });\n },\n\n selectCustomer(customer) {\n this.$store.dispatch('Order/setCustomerAction', customer);\n },\n\n selectVariationProduct(product) {\n this.viewVariationPopover = true;\n this.selectedVariationProduct = product;\n },\n\n addVariationProduct() {\n let chosenVariationProduct = this.findMatchingVariations(this.selectedVariationProduct.variations, this.selectedAttribute);\n let variationProduct = chosenVariationProduct[0];\n\n if (!this.hasStock(variationProduct)) {\n this.toast({\n title: this.__('This product is out of stock.', 'wepos'),\n type: 'error'\n });\n }\n\n variationProduct.parent_id = this.selectedVariationProduct.id;\n variationProduct.type = this.selectedVariationProduct.type;\n variationProduct.name = this.selectedVariationProduct.name;\n variationProduct.type = this.selectedVariationProduct.type;\n this.selectedAttribute = {};\n this.attributeDisabled = true;\n this.$store.dispatch('Cart/addToCartAction', variationProduct);\n },\n\n addToCart(product) {\n if (!this.hasStock(product)) {\n this.toast({\n title: this.__('Product is out of stock!', 'wepos-pro'),\n type: 'error'\n });\n return;\n }\n\n this.$store.dispatch('Cart/addToCartAction', product);\n },\n\n toggleEditQuantity(product, key) {\n this.$store.dispatch('Cart/toggleEditQuantityAction', key);\n },\n\n removeItem(key) {\n this.$store.dispatch('Cart/removeCartItemAction', key);\n },\n\n addQuantity(item, key) {\n this.$store.dispatch('Cart/addItemQuantityAction', key);\n },\n\n removeQuantity(item, key) {\n this.$store.dispatch('Cart/removeItemQuantityAction', key);\n },\n\n fetchGateway() {\n wepos.api.get(wepos.rest.root + wepos.rest.posversion + '/payment/gateways').done(response => {\n this.availableGateways = response;\n this.emptyGatewayDiv = 4 - this.availableGateways.length % 4;\n });\n },\n\n truncateTitle(text, length) {\n return weLo_.truncate(text, {\n 'length': length\n });\n },\n\n unSanitizeString(str) {\n return str.split('-').map(function capitalize(part) {\n return part.charAt(0).toUpperCase() + part.slice(1);\n }).join(' ');\n },\n\n fetchSettings() {\n wepos.api.get(wepos.rest.root + wepos.rest.posversion + '/settings').done(response => {\n this.settings = response;\n this.$store.dispatch('Cart/setSettingsAction', response);\n });\n },\n\n fetchTaxes() {\n wepos.api.get(wepos.rest.root + wepos.rest.posversion + '/taxes').done(response => {\n this.availableTax = response;\n this.$store.dispatch('Cart/setAvailableTaxAction', response);\n });\n },\n\n handleCategorySelect(selectedOption, id) {\n if (selectedOption.id == '-1') {\n this.$router.push({\n name: 'Home'\n });\n } else {\n this.$router.push({\n name: 'Home',\n query: {\n 'category': selectedOption.id\n }\n });\n }\n },\n\n handleCategoryRemove(selectedOption, id) {\n this.$router.push({\n name: 'Home'\n });\n this.selectedCategory = {\n id: -1,\n level: 0,\n name: this.__('All categories', 'wepos'),\n parent_id: null\n };\n },\n\n fetchCategories() {\n wepos.api.get(wepos.rest.root + wepos.rest.wcversion + '/products/categories?hide_empty=true&_fields=id,name,parent_id&per_page=100').then(response => {\n response.sort(function (a, b) {\n return a.name.localeCompare(b.name);\n });\n\n var tree = function (response, root) {\n var r = [],\n o = {};\n response.forEach(function (a) {\n o[a.id] = {\n response: a,\n children: o[a.id] && o[a.id].children\n };\n\n if (a.parent_id === root) {\n r.push(o[a.id]);\n } else {\n o[a.parent_id] = o[a.parent_id] || {};\n o[a.parent_id].children = o[a.parent_id].children || [];\n o[a.parent_id].children.push(o[a.id]);\n }\n });\n return r;\n }(response, null);\n\n var selectedCat = {\n id: -1,\n level: 0,\n name: this.__('All categories', 'wepos'),\n parent_id: null\n };\n var sorted = tree.reduce(function traverse(level) {\n return function (r, a) {\n a.response.level = level;\n return r.concat(a.response, (a.children || []).reduce(traverse(level + 1), []));\n };\n }(0), []);\n this.categories = sorted;\n this.categories.unshift(selectedCat);\n this.selectedCategory = selectedCat;\n\n if (this.$route.query.category !== undefined) {\n this.selectedCategory = weLo_.find(response, {\n id: parseInt(this.$route.query.category)\n });\n }\n });\n },\n\n filterProducts() {\n this.products = this.products.filter(product => {\n return weLo_.findIndex(product.categories, {\n id: this.$route.query.category\n }) > 0;\n });\n },\n\n fetchTaxSettings() {\n wepos.api.get(wepos.rest.root + wepos.rest.wcversion + '/settings/tax').done(response => {\n this.taxSettings = response;\n });\n },\n\n focusCashInput() {\n let inputCashAmount = document.querySelector('#input-cash-amount');\n inputCashAmount.focus();\n }\n\n },\n\n async created() {\n this.fetchSettings();\n this.fetchTaxes();\n this.fetchProducts();\n this.fetchGateway();\n this.fetchCategories(); // this.fetchTaxSettings();\n\n if (typeof localStorage != 'undefined') {\n try {\n var cartdata = JSON.parse(localStorage.getItem('cartdata'));\n var orderdata = JSON.parse(localStorage.getItem('orderdata'));\n cartdata = await this.maybeRemoveDeletedProduct(cartdata);\n this.$store.dispatch('Cart/setCartDataAction', cartdata);\n this.$store.dispatch('Order/setOrderDataAction', orderdata);\n } catch (cartdata) {\n var orderdata = JSON.parse(localStorage.getItem('orderdata'));\n this.$store.dispatch('Cart/setCartDataAction', cartdata);\n this.$store.dispatch('Order/setOrderDataAction', orderdata);\n }\n }\n\n window.addEventListener('beforeunload', () => {\n if (typeof localStorage != 'undefined') {\n localStorage.setItem('cartdata', JSON.stringify(this.$store.state.Cart.cartdata));\n localStorage.setItem('orderdata', JSON.stringify(this.$store.state.Order.orderdata));\n }\n }, false);\n }\n\n});\n\n//# sourceURL=webpack://wepos/./assets/src/frontend/components/Home.vue?./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/index.js??vue-loader-options")},"./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/index.js??vue-loader-options!./assets/src/frontend/components/Keyboard.vue?vue&type=script&lang=js&": + \******************************************************************************************************************************************************************************/(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _Overlay_vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Overlay.vue */ \"./assets/src/frontend/components/Overlay.vue\");\n/* harmony import */ var _ProductSearch_vue__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ProductSearch.vue */ \"./assets/src/frontend/components/ProductSearch.vue\");\n/* harmony import */ var _CustomerSearch_vue__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./CustomerSearch.vue */ \"./assets/src/frontend/components/CustomerSearch.vue\");\n/* harmony import */ var _FeeKeypad_vue__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./FeeKeypad.vue */ \"./assets/src/frontend/components/FeeKeypad.vue\");\n/* harmony import */ var vue_mugen_scroll__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! vue-mugen-scroll */ \"./node_modules/vue-mugen-scroll/dist/vue-mugen-scroll.common.js\");\n/* harmony import */ var vue_mugen_scroll__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(vue_mugen_scroll__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _PrintReceipt_vue__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./PrintReceipt.vue */ \"./assets/src/frontend/components/PrintReceipt.vue\");\n/* harmony import */ var _PrintReceiptHtml_vue__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./PrintReceiptHtml.vue */ \"./assets/src/frontend/components/PrintReceiptHtml.vue\");\n/* harmony import */ var _CustomerNote_vue__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./CustomerNote.vue */ \"./assets/src/frontend/components/CustomerNote.vue\");\n\n\n\n\n\n\n\n\nlet Modal = wepos_get_lib('Modal');\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({\n name: 'Home',\n components: {\n ProductSearch: _ProductSearch_vue__WEBPACK_IMPORTED_MODULE_1__[\"default\"],\n CustomerSearch: _CustomerSearch_vue__WEBPACK_IMPORTED_MODULE_2__[\"default\"],\n Overlay: _Overlay_vue__WEBPACK_IMPORTED_MODULE_0__[\"default\"],\n Modal,\n MugenScroll: (vue_mugen_scroll__WEBPACK_IMPORTED_MODULE_4___default()),\n FeeKeypad: _FeeKeypad_vue__WEBPACK_IMPORTED_MODULE_3__[\"default\"],\n PrintReceipt: _PrintReceipt_vue__WEBPACK_IMPORTED_MODULE_5__[\"default\"],\n PrintReceiptHtml: _PrintReceiptHtml_vue__WEBPACK_IMPORTED_MODULE_6__[\"default\"],\n CustomerNote: _CustomerNote_vue__WEBPACK_IMPORTED_MODULE_7__[\"default\"]\n },\n\n data() {\n return {\n showHelp: false,\n showQucikMenu: false,\n productView: 'grid',\n productLoading: false,\n viewVariationPopover: false,\n showModal: false,\n showPaymentReceipt: false,\n products: [],\n filteredProducts: [],\n totalPages: 1,\n page: 1,\n showOverlay: false,\n selectedVariationProduct: {},\n attributeDisabled: true,\n selectedAttribute: {},\n availableGateways: [],\n emptyGatewayDiv: 0,\n cashAmount: '',\n availableTax: [],\n settings: {},\n taxSettings: {},\n printdata: wepos.hooks.applyFilters('wepos_initial_print_data', {\n gateway: {\n id: '',\n title: ''\n }\n }),\n feeData: {},\n createprintreceipt: false,\n selectedCategory: '',\n selectedGateway: '',\n categories: [],\n showReceiptHtml: wepos.hooks.applyFilters('wepos_render_receipt_html', true),\n quickLinkList: wepos.hooks.applyFilters('wepos_quick_links', []),\n quickLinkListStart: wepos.hooks.applyFilters('wepos_quick_links_start', []),\n availableGatewayContent: wepos.hooks.applyFilters('wepos_avaialable_gateway_content', []),\n afterMainContents: wepos.hooks.applyFilters('wepos_after_main_content', []),\n beforCartPanels: wepos.hooks.applyFilters('wepos_before_cart_panel', []),\n couponData: {}\n };\n },\n\n computed: {\n cartdata() {\n return this.$store.state.Cart.cartdata;\n },\n\n orderdata() {\n return this.$store.state.Order.orderdata;\n },\n\n hotkeys() {\n return {\n 'f3': this.toggleProductView,\n 'f9': this.initPayment,\n 'f10': this.processPayment,\n 'f8': this.createNewSale,\n 'shift+f8': this.emptyCart,\n 'esc': this.backToSale,\n 'meta+/': this.openHelp,\n 'ctrl+/': this.openHelp\n };\n },\n\n getFilteredProduct() {\n if (this.$route.query.category !== undefined) {\n return this.products.filter(product => {\n var foundCat = weLo_.find(product.categories, {\n id: parseInt(this.$route.query.category)\n });\n return foundCat != undefined && Object.keys(foundCat).length > 0;\n });\n } else {\n return this.products;\n }\n },\n\n changeAmount() {\n var returnMoney = this.unFormat(this.cashAmount) - this.$store.getters['Cart/getTotal'];\n return returnMoney > 0 ? returnMoney : 0;\n },\n\n getBreadCrums() {\n if (this.$route.query.category !== undefined) {\n var categories = jQuery.extend(true, [], this.categories),\n selectedCat = weLo_.find(this.categories, {\n id: parseInt(this.$route.query.category)\n }),\n selectedCatIndex = weLo_.findIndex(this.categories, selectedCat);\n var categoriesLoop = categories.splice(0, selectedCatIndex + 1);\n var choosenCat = [];\n\n if (categoriesLoop.length > 0) {\n for (var i = categoriesLoop.length - 1; i >= 0; i--) {\n if (choosenCat.length > 0) {\n var foundCat = weLo_.find(categoriesLoop, {\n id: categoriesLoop[i + 1].parent_id\n });\n\n if (foundCat != undefined) {\n choosenCat.push(foundCat);\n\n if (foundCat.parent_id == null) {\n break;\n }\n }\n } else {\n choosenCat.push(categoriesLoop[i]);\n }\n }\n\n return choosenCat.slice().reverse();\n }\n }\n\n return [];\n }\n\n },\n watch: {\n selectedAttribute(newdata, olddata) {\n if (Object.keys(newdata).length == this.selectedVariationProduct.attributes.length) {\n this.attributeDisabled = false;\n }\n },\n\n '$route.query.order_key'() {\n if (this.$route.query.order_key != '' && this.$route.query.payment == 'success') {\n this.showModal = false;\n this.showPaymentReceipt = true;\n }\n\n ;\n },\n\n '$route.query.category'() {\n this.selectedCategory = {\n id: -1,\n level: 0,\n name: this.__('All categories', 'wepos'),\n parent_id: null\n };\n\n if (this.$route.query.category !== undefined) {\n this.selectedCategory = weLo_.find(this.categories, {\n id: parseInt(this.$route.query.category)\n });\n }\n },\n\n 'selectedGateway'(newdata, olddata) {\n var gateway = weLo_.find(this.availableGateways, {\n 'id': newdata\n });\n this.$store.dispatch('Order/setGatewayAction', gateway);\n },\n\n cashAmount(newdata, olddata) {\n this.ableToProcess();\n }\n\n },\n methods: {\n openQucikMenu() {\n this.showQucikMenu = true;\n },\n\n openHelp(e) {\n e.preventDefault();\n this.showHelp = true;\n this.showQucikMenu = false;\n },\n\n closeHelp() {\n this.showHelp = false;\n },\n\n addCustomerNote(note) {\n this.$store.dispatch('Order/setCustomerNoteAction', note);\n },\n\n removeCustomerNote() {\n this.$store.dispatch('Order/removeCustomerNoteAction');\n },\n\n removeBreadcrums() {\n this.$router.push({\n name: 'Home'\n });\n },\n\n logout() {\n wepos.hooks.doAction('wepos_before_logout');\n window.location.href = wepos.logout_url.toString();\n },\n\n emptyCart() {\n this.$store.dispatch('Cart/emptyCartAction');\n this.$store.dispatch('Order/emptyOrderdataAction');\n this.printdata = wepos.hooks.applyFilters('wepos_initial_print_data', {\n gateway: {\n id: '',\n title: ''\n }\n });\n this.showPaymentReceipt = false;\n this.cashAmount = '';\n this.eventBus.$emit('emptycart', this.orderdata);\n this.showQucikMenu = false;\n },\n\n toggleProductView(e) {\n e.preventDefault();\n this.productView = this.productView == 'grid' ? 'list' : 'grid';\n },\n\n createNewSale() {\n this.$router.push({\n name: 'Home'\n });\n this.emptyCart();\n },\n\n ableToProcess() {\n let canProcess = this.cartdata.line_items.length > 0 && this.isSelectGateway();\n\n if (this.selectedGateway === 'wepos_cash') {\n canProcess = this.unFormat(this.cashAmount) >= this.truncateNumber(this.$store.getters['Cart/getTotal']) && canProcess;\n }\n\n console.log(canProcess);\n this.$store.dispatch('Order/setCanProcessPaymentAction', canProcess);\n },\n\n processPayment(e) {\n if (!this.$store.getters['Order/getCanProcessPayment']) {\n return;\n }\n\n var self = this,\n gateway = weLo_.find(this.availableGateways, {\n 'id': this.orderdata.payment_method\n }),\n orderdata = wepos.hooks.applyFilters('wepos_order_form_data', {\n billing: this.orderdata.billing,\n shipping: this.orderdata.shipping,\n line_items: this.cartdata.line_items,\n fee_lines: this.cartdata.fee_lines,\n coupon_lines: this.cartdata.coupon_lines,\n customer_id: this.orderdata.customer_id,\n customer_note: this.orderdata.customer_note,\n payment_method: this.orderdata.payment_method,\n payment_method_title: this.orderdata.payment_method_title,\n meta_data: [{\n key: '_wepos_is_pos_order',\n value: true\n }, {\n key: '_wepos_cash_tendered_amount',\n value: self.cashAmount.toString()\n }, {\n key: '_wepos_cash_change_amount',\n value: self.changeAmount.toString()\n }]\n }, this.orderdata, this.cartdata);\n var $contentWrap = jQuery('.wepos-checkout-wrapper');\n $contentWrap.block({\n message: null,\n overlayCSS: {\n background: '#fff url(' + wepos.ajax_loader + ') no-repeat center',\n opacity: 0.4\n }\n });\n wepos.api.post(wepos.rest.root + wepos.rest.wcversion + '/orders', orderdata).done(response => {\n const orderResult = response;\n const totalTaxes = {}; // Looping through line items and get total tax for each items.\n\n orderResult.line_items.forEach(item => {\n totalTaxes[item.product_id] = item.total_tax;\n }); // Preserve total tax amount for each of the line items to the cart.\n\n this.cartdata.line_items.forEach(item => {\n item.total_tax = totalTaxes[item.product_id];\n });\n wepos.api.post(wepos.rest.root + wepos.rest.posversion + '/payment/process', response).done(data => {\n if (data.result == 'success') {\n this.$router.push({\n name: 'Home',\n query: {\n order_key: response.order_key,\n payment: 'success'\n }\n });\n this.printdata = wepos.hooks.applyFilters('wepos_after_payment_print_data', {\n line_items: this.cartdata.line_items,\n fee_lines: this.cartdata.fee_lines,\n coupon_lines: this.cartdata.coupon_lines,\n subtotal: this.$store.getters['Cart/getSubtotal'],\n taxtotal: this.$store.getters['Cart/getTotalTax'],\n ordertotal: this.$store.getters['Cart/getTotal'],\n gateway: {\n id: response.payment_method,\n title: response.payment_method_title\n },\n order_id: response.number,\n order_date: response.date_created,\n cashamount: this.cashAmount.toString(),\n changeamount: this.changeAmount.toString()\n }, orderdata);\n $contentWrap.unblock();\n } else {\n $contentWrap.unblock();\n }\n }).fail(data => {\n $contentWrap.unblock();\n alert(data.responseJSON.message);\n });\n }).fail(response => {\n $contentWrap.unblock();\n alert(response.responseJSON.message);\n });\n },\n\n initPayment() {\n if (this.$store.state.Cart.cartdata.line_items.length <= 0) {\n return;\n }\n\n this.showModal = true;\n this.$store.dispatch('Order/setGatewayAction', this.availableGateways[0]);\n this.selectedGateway = this.availableGateways[0].id;\n },\n\n backToSale() {\n this.showModal = false;\n this.showHelp = false; // Remove gateway selections\n },\n\n isSelectGateway() {\n return !(this.orderdata.payment_method == undefined || this.orderdata.payment_method == '');\n },\n\n getProductImage(product) {\n return product.images.length > 0 ? product.images[0].woocommerce_thumbnail : wepos.placeholder_image;\n },\n\n getProductImageName(product) {\n return product.images.length > 0 ? product.images[0].name : product.name;\n },\n\n setDiscount(value, type) {\n this.createCoupon(value, type, this.dispatchCoupon);\n },\n\n createCoupon(amount, discount_type, callback) {\n let self = this;\n let id = Date.now();\n let code = discount_type + id + amount;\n self.couponData = {};\n const discountdata = {\n code: code,\n amount: amount,\n usage_limit: 1,\n meta_data: [{\n key: 'wepos_cart_discount',\n value: 'yes'\n }]\n };\n\n if ('percent' === discount_type) {\n discountdata.discount_type = discount_type;\n }\n\n wepos.api.post(wepos.rest.root + wepos.rest.posversion + '/coupons', discountdata).done(data => {\n self.couponData = data;\n callback(data, discount_type);\n }).fail(data => {\n alert(data.responseJSON.message);\n });\n },\n\n dispatchCoupon(couponData, type) {\n this.$store.dispatch('Cart/addDiscountAction', {\n title: this.__('Discount', 'wepos'),\n value: couponData,\n type\n });\n },\n\n saveFee(key) {\n this.$store.dispatch('Cart/saveFeeValueAction', {\n key: key,\n feeData: this.feeData\n });\n this.feeData = {};\n },\n\n cancelEditFee(key) {\n this.$store.dispatch('Cart/cancelSaveFeeValueAction', key);\n this.feeData = {};\n },\n\n editFeeData(key) {\n this.$store.dispatch('Cart/editFeeValueAction', key);\n this.feeData = Object.assign({}, this.cartdata.fee_lines[key]);\n this.$nextTick(() => {\n jQuery(this.$refs.fee_name).focus();\n });\n },\n\n setFee(value, type) {\n this.$store.dispatch('Cart/addFeeAction', {\n title: this.__('Fee', 'wepos'),\n value: value,\n type: type\n });\n },\n\n removeCouponLine(key) {\n this.$store.dispatch('Cart/removeCouponLineItemsAction', key);\n },\n\n removeFeeLine(key) {\n this.$store.dispatch('Cart/removeFeeLineItemsAction', key);\n },\n\n getDiscountAmount(fee) {\n return fee.discount_type === 'percent' || fee.fee_type === 'percent' ? this.formatNumber(fee.value) + '%' : this.formatPrice(fee.total);\n },\n\n fetchProducts() {\n if (this.page == 1) {\n this.productLoading = true;\n }\n\n if (this.totalPages >= this.page) {\n wepos.api.get(wepos.rest.root + wepos.rest.posversion + '/products?status=publish&per_page=30&page=' + this.page).done((response, status, xhr) => {\n this.appendProducts(response);\n this.page += 1;\n this.totalPages = parseInt(xhr.getResponseHeader('X-WP-TotalPages'));\n this.productLoading = false;\n }).then((response, status, xhr) => {\n this.fetchProducts();\n });\n } else {\n this.productLoading = false;\n }\n },\n\n appendProducts(products) {\n products.forEach(product => {\n if (\"variable\" === product.type && this.isAllVariationsDisabled(product)) {\n return;\n }\n\n this.products = this.products.concat(product);\n });\n },\n\n isAllVariationsDisabled(product) {\n let isDisabled = true;\n product.attributes.forEach(attribute => {\n if (true === attribute.variation) {\n isDisabled = false;\n }\n });\n return isDisabled;\n },\n\n maybeRemoveDeletedProduct(cartData) {\n return new Promise((resolve, reject) => {\n if (!cartData) {\n return resolve(cartData);\n }\n\n if (!cartData.line_items || cartData.line_items.length < 1) {\n return resolve(cartData);\n }\n\n let productIds = cartData.line_items.map(lineItem => {\n return lineItem.product_id;\n });\n wepos.api.get(wepos.rest.root + wepos.rest.posversion + '/products?include=' + productIds.toString()).then(response => {\n let foundProducts = response.map(product => {\n return product.id;\n });\n cartData.line_items.forEach((product, key) => {\n if (!foundProducts.includes(product.product_id)) {\n cartData.line_items.splice(key, 1);\n localStorage.setItem('cartdata', JSON.stringify(cartData));\n }\n });\n return resolve(cartData);\n }).fail(() => {\n return reject(cartData);\n });\n });\n },\n\n selectCustomer(customer) {\n this.$store.dispatch('Order/setCustomerAction', customer);\n },\n\n selectVariationProduct(product) {\n this.viewVariationPopover = true;\n this.selectedVariationProduct = product;\n },\n\n addVariationProduct() {\n let chosenVariationProduct = this.findMatchingVariations(this.selectedVariationProduct.variations, this.selectedAttribute);\n let variationProduct = chosenVariationProduct[0];\n\n if (!this.hasStock(variationProduct)) {\n this.toast({\n title: this.__('This product is out of stock.', 'wepos'),\n type: 'error'\n });\n }\n\n variationProduct.parent_id = this.selectedVariationProduct.id;\n variationProduct.type = this.selectedVariationProduct.type;\n variationProduct.name = this.selectedVariationProduct.name;\n variationProduct.type = this.selectedVariationProduct.type;\n this.selectedAttribute = {};\n this.attributeDisabled = true;\n this.$store.dispatch('Cart/addToCartAction', variationProduct);\n },\n\n addToCart(product) {\n if (!this.hasStock(product)) {\n this.toast({\n title: this.__('Product is out of stock!', 'wepos-pro'),\n type: 'error'\n });\n return;\n }\n\n this.$store.dispatch('Cart/addToCartAction', product);\n },\n\n toggleEditQuantity(product, key) {\n this.$store.dispatch('Cart/toggleEditQuantityAction', key);\n },\n\n removeItem(key) {\n this.$store.dispatch('Cart/removeCartItemAction', key);\n },\n\n addQuantity(item, key) {\n this.$store.dispatch('Cart/addItemQuantityAction', key);\n },\n\n removeQuantity(item, key) {\n this.$store.dispatch('Cart/removeItemQuantityAction', key);\n },\n\n fetchGateway() {\n wepos.api.get(wepos.rest.root + wepos.rest.posversion + '/payment/gateways').done(response => {\n this.availableGateways = response;\n this.emptyGatewayDiv = 4 - this.availableGateways.length % 4;\n });\n },\n\n truncateTitle(text, length) {\n return weLo_.truncate(text, {\n 'length': length\n });\n },\n\n unSanitizeString(str) {\n return str.split('-').map(function capitalize(part) {\n return part.charAt(0).toUpperCase() + part.slice(1);\n }).join(' ');\n },\n\n fetchSettings() {\n wepos.api.get(wepos.rest.root + wepos.rest.posversion + '/settings').done(response => {\n this.settings = response;\n this.$store.dispatch('Cart/setSettingsAction', response);\n });\n },\n\n fetchTaxes() {\n wepos.api.get(wepos.rest.root + wepos.rest.posversion + '/taxes').done(response => {\n this.availableTax = response;\n this.$store.dispatch('Cart/setAvailableTaxAction', response);\n });\n },\n\n handleCategorySelect(selectedOption, id) {\n if (selectedOption.id == '-1') {\n this.$router.push({\n name: 'Home'\n });\n } else {\n this.$router.push({\n name: 'Home',\n query: {\n 'category': selectedOption.id\n }\n });\n }\n },\n\n handleCategoryRemove(selectedOption, id) {\n this.$router.push({\n name: 'Home'\n });\n this.selectedCategory = {\n id: -1,\n level: 0,\n name: this.__('All categories', 'wepos'),\n parent_id: null\n };\n },\n\n fetchCategories() {\n wepos.api.get(wepos.rest.root + wepos.rest.wcversion + '/products/categories?hide_empty=true&_fields=id,name,parent_id&per_page=100').then(response => {\n response.sort(function (a, b) {\n return a.name.localeCompare(b.name);\n });\n\n var tree = function (response, root) {\n var r = [],\n o = {};\n response.forEach(function (a) {\n o[a.id] = {\n response: a,\n children: o[a.id] && o[a.id].children\n };\n\n if (a.parent_id === root) {\n r.push(o[a.id]);\n } else {\n o[a.parent_id] = o[a.parent_id] || {};\n o[a.parent_id].children = o[a.parent_id].children || [];\n o[a.parent_id].children.push(o[a.id]);\n }\n });\n return r;\n }(response, null);\n\n var selectedCat = {\n id: -1,\n level: 0,\n name: this.__('All categories', 'wepos'),\n parent_id: null\n };\n var sorted = tree.reduce(function traverse(level) {\n return function (r, a) {\n a.response.level = level;\n return r.concat(a.response, (a.children || []).reduce(traverse(level + 1), []));\n };\n }(0), []);\n this.categories = sorted;\n this.categories.unshift(selectedCat);\n this.selectedCategory = selectedCat;\n\n if (this.$route.query.category !== undefined) {\n this.selectedCategory = weLo_.find(response, {\n id: parseInt(this.$route.query.category)\n });\n }\n });\n },\n\n filterProducts() {\n this.products = this.products.filter(product => {\n return weLo_.findIndex(product.categories, {\n id: this.$route.query.category\n }) > 0;\n });\n },\n\n fetchTaxSettings() {\n wepos.api.get(wepos.rest.root + wepos.rest.wcversion + '/settings/tax').done(response => {\n this.taxSettings = response;\n });\n },\n\n focusCashInput() {\n let inputCashAmount = document.querySelector('#input-cash-amount');\n inputCashAmount.focus();\n }\n\n },\n\n async created() {\n this.fetchSettings();\n this.fetchTaxes();\n this.fetchProducts();\n this.fetchGateway();\n this.fetchCategories(); // this.fetchTaxSettings();\n\n if (typeof localStorage != 'undefined') {\n try {\n var cartdata = JSON.parse(localStorage.getItem('cartdata'));\n var orderdata = JSON.parse(localStorage.getItem('orderdata'));\n cartdata = await this.maybeRemoveDeletedProduct(cartdata);\n this.$store.dispatch('Cart/setCartDataAction', cartdata);\n this.$store.dispatch('Order/setOrderDataAction', orderdata);\n } catch (cartdata) {\n var orderdata = JSON.parse(localStorage.getItem('orderdata'));\n this.$store.dispatch('Cart/setCartDataAction', cartdata);\n this.$store.dispatch('Order/setOrderDataAction', orderdata);\n }\n }\n\n window.addEventListener('beforeunload', () => {\n if (typeof localStorage != 'undefined') {\n localStorage.setItem('cartdata', JSON.stringify(this.$store.state.Cart.cartdata));\n localStorage.setItem('orderdata', JSON.stringify(this.$store.state.Order.orderdata));\n }\n }, false);\n }\n\n});\n\n//# sourceURL=webpack://wepos/./assets/src/frontend/components/Home.vue?./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/index.js??vue-loader-options")},"./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/index.js??vue-loader-options!./assets/src/frontend/components/Keyboard.vue?vue&type=script&lang=js&": /*!**********************************************************************************************************************************************************************************!*\ !*** ./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/index.js??vue-loader-options!./assets/src/frontend/components/Keyboard.vue?vue&type=script&lang=js& ***! \**********************************************************************************************************************************************************************************/(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\nconst Tokens = {\n // Sequences that no-one will ever put in their keyboards.\n PIPE: '7440011c983cf39ae730b1f831e2922ac5a76910',\n OPEN_BRACE: 'f630c4abcae620278f82e142a526ef325c2a773a',\n CLOSE_BRACE: 'ad982c66898e02a5dab419ea7568421b03f68ee2'\n};\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({\n name: 'keyboard',\n props: {\n value: {\n type: String,\n default: ''\n },\n layouts: {\n type: [String, Array],\n required: true\n },\n maxlength: {\n type: Number,\n default: 0,\n validator: value => value >= 0\n },\n pattern: {\n type: String,\n default: null\n }\n },\n\n data() {\n return {\n layout: 0\n };\n },\n\n computed: {\n /**\r\n * Whether or not the keyboard input has hit its maximum length.\r\n * @returns {Boolean}\r\n */\n full() {\n return this.maxlength > 0 && this.value.length >= this.maxlength;\n },\n\n /**\r\n * Whether or not the keyboard input is empty.\r\n * @return {Boolean}\r\n */\n empty() {\n return this.value.length === 0;\n },\n\n /**\r\n * Returns the lines that make up a layout.\r\n * @return {Array}\r\n */\n lines() {\n let layout = (Array.isArray(this.layouts) ? this.layouts : [this.layouts])[this.layout];\n return layout.replace('||', Tokens.PIPE).replace('{{', Tokens.OPEN_BRACE).replace('}}', Tokens.CLOSE_BRACE).split('|');\n },\n\n /**\r\n * Returns an array of buttons to render in the component.\r\n * @returns {Array[]}\r\n */\n buttons() {\n return this.lines.map(line => {\n // TODO: Could potentially rely on Object.values() here instead of being explicit.\n let stream = line.match(new RegExp(`(${Tokens.OPEN_BRACE}|${Tokens.CLOSE_BRACE}|${Tokens.PIPE}|.)`, 'g'));\n let buttons = [];\n let token = null;\n stream.forEach(char => {\n if (char === '{') {\n token = '';\n } else if (char === '}') {\n let command = token.split(':');\n let text = command.length > 1 ? command[0] : '';\n let action = command.length > 1 ? command[1] : command[0];\n let args = command.length > 2 ? command[2] : null;\n let method = null;\n if (['append', 'backspace', 'space', 'clear', 'goto'].indexOf(action) >= 0) method = this[action].bind(this, args);else method = this.$emit.bind(this, action, this);\n buttons.push({\n type: 'action',\n action: {\n name: action.replace(/\\s+/g, '-').toLowerCase(),\n callable: method\n },\n value: text,\n args\n });\n token = null;\n } else {\n if (token !== null) {\n token += char;\n } else {\n if (char === Tokens.PIPE) char = '|';\n if (char === Tokens.OPEN_BRACE) char = '{';\n if (char === Tokens.CLOSE_BRACE) char = '}';\n buttons.push({\n type: 'char',\n action: {\n name: null,\n callable: this.append.bind(this, char)\n },\n value: char,\n args: null\n });\n }\n }\n });\n return buttons;\n });\n },\n\n /**\r\n * Whether or not the current value matches the regex provided to pattern. Always\r\n * returns true if no pattern was provided.\r\n * @returns {Boolean}\r\n */\n valid() {\n return !this.pattern || this.value.match(new RegExp(this.pattern));\n }\n\n },\n methods: {\n /**\r\n * Mutates the keyboard value to a new value.\r\n * @param {String} value The new value.\r\n */\n mutate(value) {\n if (this.maxlength > 0) {\n value = value.slice(0, this.maxlength);\n }\n\n this.$emit('input', value);\n },\n\n /**\r\n * Appends a new value to the end of the current keyboard value.\r\n * @param {String} char The character(s) to append.\r\n */\n append(char) {\n this.mutate(this.value + char);\n },\n\n /**\r\n * Remove the last character from the current keyboard value.\r\n */\n backspace() {\n this.mutate(this.value.slice(0, this.value.length - 1));\n },\n\n /**\r\n * Add one whitespace character to the current keyboard value.\r\n */\n space() {\n this.append(' ');\n },\n\n /**\r\n * Go to a new layout.\r\n * @param {Number} The layout index.\r\n */\n goto(layout) {\n if (Array.isArray(this.layouts)) {\n if (layout >= 0 && layout < this.layouts.length) {\n this.layout = layout;\n } else {\n throw new Error('The requested layout does not exist.');\n }\n } else {\n throw new Error('A single non-array layout was provided.');\n }\n },\n\n /**\r\n * Clear the entire keyboard value.\r\n */\n clear() {\n this.mutate('');\n }\n\n }\n});\n\n//# sourceURL=webpack://wepos/./assets/src/frontend/components/Keyboard.vue?./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/index.js??vue-loader-options")},"./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/index.js??vue-loader-options!./assets/src/frontend/components/KeyboardControl.vue?vue&type=script&lang=js&": @@ -64,7 +64,7 @@ \**********************************************************************************************************************************************************************************************************************************************************************/(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";eval('__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ "render": () => (/* binding */ render),\n/* harmony export */ "staticRenderFns": () => (/* binding */ staticRenderFns)\n/* harmony export */ });\nvar render = function render() {\n var _vm = this,\n _c = _vm._self._c;\n\n return _c("div", {\n directives: [{\n name: "hotkey",\n rawName: "v-hotkey",\n value: _vm.hotkeys,\n expression: "hotkeys"\n }],\n staticClass: "wepos-fee-keypad-wrap",\n class: _vm.className\n }, [_c("v-popover", {\n attrs: {\n offset: "5",\n "popover-base-class": "fee-keypad tooltip popover",\n placement: "top",\n open: _vm.viewFeeKeypad\n }\n }, [_c("a", {\n attrs: {\n href: "#"\n },\n on: {\n click: _vm.showFeeKeypad\n }\n }, [_vm._v(_vm._s(_vm.__("Add", "wepos")) + " " + _vm._s(_vm.name))]), _vm._v(" "), _c("template", {\n slot: "popover"\n }, [_c("form", [_c("input", {\n directives: [{\n name: "model",\n rawName: "v-model",\n value: _vm.displayValue,\n expression: "displayValue"\n }],\n ref: "feeinput",\n attrs: {\n type: "text"\n },\n domProps: {\n value: _vm.displayValue\n },\n on: {\n input: function ($event) {\n if ($event.target.composing) return;\n _vm.displayValue = $event.target.value;\n }\n }\n })]), _vm._v(" "), _c("keyboard", {\n attrs: {\n layouts: _vm.layout()\n },\n on: {\n percent: _vm.percentFee,\n flat: _vm.flatFee\n },\n model: {\n value: _vm.displayValue,\n callback: function ($$v) {\n _vm.displayValue = $$v;\n },\n expression: "displayValue"\n }\n })], 1)], 2)], 1);\n};\n\nvar staticRenderFns = [];\nrender._withStripped = true;\n\n\n//# sourceURL=webpack://wepos/./assets/src/frontend/components/FeeKeypad.vue?./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/loaders/templateLoader.js??ruleSet%5B1%5D.rules%5B2%5D!./node_modules/vue-loader/lib/index.js??vue-loader-options')},"./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/loaders/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./assets/src/frontend/components/Home.vue?vue&type=template&id=76253014&": /*!*****************************************************************************************************************************************************************************************************************************************************************!*\ !*** ./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/loaders/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./assets/src/frontend/components/Home.vue?vue&type=template&id=76253014& ***! - \*****************************************************************************************************************************************************************************************************************************************************************/(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";eval('__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ "render": () => (/* binding */ render),\n/* harmony export */ "staticRenderFns": () => (/* binding */ staticRenderFns)\n/* harmony export */ });\nvar render = function render() {\n var _vm = this,\n _c = _vm._self._c;\n\n return _c("div", {\n directives: [{\n name: "hotkey",\n rawName: "v-hotkey",\n value: _vm.hotkeys,\n expression: "hotkeys"\n }],\n attrs: {\n id: "wepos-main"\n }\n }, [_c("div", {\n staticClass: "content-product"\n }, [_c("div", {\n staticClass: "top-panel wepos-clearfix"\n }, [_c("div", {\n staticClass: "search-bar"\n }, [_c("product-search", {\n attrs: {\n products: _vm.products,\n settings: _vm.settings\n },\n on: {\n onProductAdded: _vm.addToCart\n }\n })], 1), _vm._v(" "), _c("div", {\n staticClass: "category"\n }, [_c("multiselect", {\n staticClass: "wepos-multiselect",\n attrs: {\n options: _vm.categories,\n selectLabel: "",\n deselectLabel: "",\n selectedLabel: "",\n placeholder: _vm.__("Select a category", "wepos")\n },\n on: {\n select: _vm.handleCategorySelect,\n remove: _vm.handleCategoryRemove\n },\n scopedSlots: _vm._u([{\n key: "singleLabel",\n fn: function (props) {\n return [_vm._v("\\n " + _vm._s(props.option.name) + "\\n ")];\n }\n }, {\n key: "option",\n fn: function (props) {\n return [_c("span", [_vm._l(props.option.level, function (pad) {\n return [_vm._v("\\n  \\n ")];\n }), _vm._v("\\n " + _vm._s(props.option.name) + "\\n ")], 2)];\n }\n }]),\n model: {\n value: _vm.selectedCategory,\n callback: function ($$v) {\n _vm.selectedCategory = $$v;\n },\n expression: "selectedCategory"\n }\n }, [_vm._v(" "), _vm._v(" "), _c("template", {\n slot: "noResult"\n }, [_c("div", {\n staticClass: "no-data-found"\n }, [_vm._v(_vm._s(_vm.__("Not found", "wepos")))])])], 2)], 1), _vm._v(" "), _c("div", {\n staticClass: "toggle-view"\n }, [_c("div", {\n staticClass: "product-toggle"\n }, [_c("span", {\n staticClass: "toggle-icon list-view flaticon-menu-button-of-three-horizontal-lines",\n class: {\n active: _vm.productView == "list"\n },\n on: {\n click: function ($event) {\n _vm.productView = "list";\n }\n }\n }), _vm._v(" "), _c("span", {\n staticClass: "toggle-icon grid-view flaticon-menu",\n class: {\n active: _vm.productView == "grid"\n },\n on: {\n click: function ($event) {\n _vm.productView = "grid";\n }\n }\n })])])]), _vm._v(" "), _vm.getBreadCrums.length > 0 ? _c("div", {\n staticClass: "breadcrumb"\n }, [_c("ul", [_vm._l(_vm.getBreadCrums, function (breadcrumb) {\n return [_c("router-link", {\n attrs: {\n tag: "li",\n to: {\n name: "Home",\n query: {\n category: breadcrumb.id\n }\n }\n }\n }, [_c("a", [_vm._v(_vm._s(breadcrumb.name))])])];\n })], 2), _vm._v(" "), _c("span", {\n staticClass: "close-breadcrumb flaticon-cancel-music",\n on: {\n click: function ($event) {\n $event.preventDefault();\n return _vm.removeBreadcrums.apply(null, arguments);\n }\n }\n })]) : _vm._e(), _vm._v(" "), _c("div", {\n ref: "items-wrapper",\n staticClass: "items-wrapper",\n class: _vm.productView\n }, [!_vm.productLoading ? [_vm._l(_vm.getFilteredProduct, function (product) {\n return _vm.getFilteredProduct.length > 0 ? _c("div", {\n staticClass: "item"\n }, [product.type === "simple" ? [_c("div", {\n staticClass: "item-wrap",\n class: {\n disabled: !_vm.hasStock(product)\n },\n on: {\n click: function ($event) {\n $event.preventDefault();\n return _vm.addToCart(product);\n }\n }\n }, [_c("div", {\n staticClass: "img"\n }, [_c("img", {\n attrs: {\n src: _vm.getProductImage(product),\n alt: _vm.getProductImageName(product)\n }\n })]), _vm._v(" "), _vm.productView === "grid" ? _c("div", {\n staticClass: "title"\n }, [_vm._v("\\n " + _vm._s(_vm.truncateTitle(product.name, 20)) + "\\n ")]) : _c("div", {\n staticClass: "title"\n }, [_c("div", {\n staticClass: "product-name"\n }, [_vm._v(_vm._s(product.name))]), _vm._v(" "), _c("ul", {\n staticClass: "meta"\n }, [product.sku ? _c("li", [_c("span", {\n staticClass: "label"\n }, [_vm._v(_vm._s(_vm.__("Sku :", "wepos")))]), _vm._v(" "), _c("span", {\n staticClass: "value"\n }, [_vm._v(_vm._s(product.sku))])]) : _vm._e(), _vm._v(" "), _c("li", [_c("span", {\n staticClass: "label"\n }, [_vm._v(_vm._s(_vm.__("Price :", "wepos")))]), _vm._v(" "), _c("span", {\n staticClass: "value",\n domProps: {\n innerHTML: _vm._s(product.price_html)\n }\n })])])]), _vm._v(" "), _c("span", {\n staticClass: "add-product-icon flaticon-add",\n class: _vm.productView\n })])] : _vm._e(), _vm._v(" "), product.type === "variable" ? [_c("v-popover", {\n attrs: {\n offset: "10",\n "popover-base-class": "product-variation tooltip popover",\n placement: "left-end"\n }\n }, [_c("div", {\n staticClass: "item-wrap",\n on: {\n click: function ($event) {\n return _vm.selectVariationProduct(product);\n }\n }\n }, [_c("div", {\n staticClass: "img"\n }, [_c("img", {\n attrs: {\n src: _vm.getProductImage(product),\n alt: _vm.getProductImageName(product)\n }\n })]), _vm._v(" "), _vm.productView === "grid" ? _c("div", {\n staticClass: "title"\n }, [_vm._v("\\n " + _vm._s(_vm.truncateTitle(product.name, 20)) + "\\n ")]) : _c("div", {\n staticClass: "title"\n }, [_c("div", {\n staticClass: "product-name"\n }, [_vm._v(_vm._s(product.name))]), _vm._v(" "), _c("ul", {\n staticClass: "meta"\n }, [_c("li", [_c("span", {\n staticClass: "label"\n }, [_vm._v(_vm._s(_vm.__("Price :", "wepos")))]), _vm._v(" "), _c("span", {\n staticClass: "value",\n domProps: {\n innerHTML: _vm._s(product.price_html)\n }\n })])])]), _vm._v(" "), _c("span", {\n staticClass: "add-product-icon flaticon-add",\n class: _vm.productView\n })]), _vm._v(" "), _c("template", {\n slot: "popover"\n }, [_c("div", {\n staticClass: "variation-header"\n }, [_vm._v("\\n " + _vm._s(_vm.__("Select Variations", "wepos")) + "\\n ")]), _vm._v(" "), _c("div", {\n staticClass: "variation-body"\n }, [_vm._l(product.attributes, function (attribute) {\n return [_c("div", {\n staticClass: "attribute"\n }, [_c("p", [_vm._v(_vm._s(attribute.name))]), _vm._v(" "), _c("div", {\n staticClass: "options"\n }, [_vm._l(attribute.options, function (option) {\n return [_c("label", [_c("input", {\n directives: [{\n name: "model",\n rawName: "v-model",\n value: _vm.selectedAttribute[attribute.name],\n expression: "selectedAttribute[attribute.name]"\n }],\n attrs: {\n type: "radio"\n },\n domProps: {\n value: option,\n checked: _vm._q(_vm.selectedAttribute[attribute.name], option)\n },\n on: {\n change: function ($event) {\n return _vm.$set(_vm.selectedAttribute, attribute.name, option);\n }\n }\n }), _vm._v(" "), _c("div", {\n staticClass: "box"\n }, [_vm._v("\\n " + _vm._s(option) + "\\n ")])])];\n })], 2)])];\n })], 2), _vm._v(" "), _c("div", {\n staticClass: "variation-footer"\n }, [_c("button", {\n attrs: {\n disabled: _vm.attributeDisabled\n },\n on: {\n click: function ($event) {\n $event.preventDefault();\n return _vm.addVariationProduct.apply(null, arguments);\n }\n }\n }, [_vm._v(_vm._s(_vm.__("Add Product", "wepos")))])])])], 2)] : _vm._e()], 2) : _vm._e();\n }), _vm._v(" "), _vm.getFilteredProduct.length <= 0 ? _c("div", {\n staticClass: "no-product-found"\n }, [_c("img", {\n attrs: {\n src: _vm.wepos.assets_url + "/images/no-product.png",\n alt: "",\n width: "120px"\n }\n }), _vm._v(" "), _c("p", [_vm._v(_vm._s(_vm.__("No Product Found", "wepos")))])]) : _vm._e()] : _vm._e(), _vm._v(" "), _vm.productLoading ? _c("div", {\n staticClass: "product-loading"\n }, [_c("div", {\n staticClass: "spinner spinner-loading"\n })]) : _vm._e()], 2)]), _vm._v(" "), _c("div", {\n staticClass: "content-cart"\n }, [_c("div", {\n staticClass: "top-panel"\n }, [_c("customer-search", {\n on: {\n onCustomerSelected: _vm.selectCustomer\n }\n }), _vm._v(" "), _c("div", {\n staticClass: "action"\n }, [_c("div", {\n staticClass: "more-options"\n }, [_c("v-popover", {\n attrs: {\n offset: "5",\n "popover-base-class": "wepos-dropdown-menu tooltip popover",\n placement: "bottom-end",\n open: _vm.showQucikMenu\n }\n }, [_c("button", {\n staticClass: "wepos-button",\n on: {\n click: function ($event) {\n $event.preventDefault();\n return _vm.openQucikMenu();\n }\n }\n }, [_c("span", {\n staticClass: "more-icon flaticon-more"\n })]), _vm._v(" "), _c("template", {\n slot: "popover"\n }, [_c("ul", [_vm._l(_vm.quickLinkListStart, function (quickLinkListStartComponent, key) {\n return _c(quickLinkListStartComponent, {\n key: key - `1`,\n tag: "component"\n });\n }), _vm._v(" "), _c("li", [_c("a", {\n attrs: {\n href: "#"\n },\n on: {\n click: function ($event) {\n $event.preventDefault();\n return _vm.emptyCart.apply(null, arguments);\n }\n }\n }, [_c("span", {\n staticClass: "flaticon-empty-cart quick-menu-icon"\n }), _vm._v(_vm._s(_vm.__("Empty Cart", "wepos")))])]), _vm._v(" "), _c("li", [_c("a", {\n attrs: {\n href: "#"\n },\n on: {\n click: function ($event) {\n $event.preventDefault();\n return _vm.openHelp.apply(null, arguments);\n }\n }\n }, [_c("span", {\n staticClass: "flaticon-information quick-menu-icon"\n }), _vm._v(_vm._s(_vm.__("Help", "wepos")))])]), _vm._v(" "), _c("li", {\n staticClass: "divider"\n }), _vm._v(" "), _vm._l(_vm.quickLinkList, function (component, index) {\n return _c(component, {\n key: index,\n tag: "component"\n });\n }), _vm._v(" "), _c("li", [_c("a", {\n attrs: {\n href: "#"\n },\n on: {\n click: function ($event) {\n $event.preventDefault();\n return _vm.logout.apply(null, arguments);\n }\n }\n }, [_c("span", {\n staticClass: "flaticon-logout quick-menu-icon"\n }), _vm._v(_vm._s(_vm.__("Logout", "wepos")))])])], 2)])], 2)], 1)])], 1), _vm._v(" "), _vm._l(_vm.beforCartPanels, function (beforCartPanel, key) {\n return _c(beforCartPanel, {\n key: key,\n tag: "component"\n });\n }), _vm._v(" "), _vm.settings.wepos_general ? _c("div", {\n staticClass: "cart-panel"\n }, [_c("div", {\n staticClass: "cart-content"\n }, [_c("table", {\n staticClass: "cart-table"\n }, [_c("thead", [_c("tr", [_c("th", {\n attrs: {\n width: "65%"\n }\n }, [_vm._v(_vm._s(_vm.__("Product", "wepos")))]), _vm._v(" "), _c("th", {\n attrs: {\n width: "15%"\n }\n }, [_vm._v(_vm._s(_vm.__("Qty", "wepos")))]), _vm._v(" "), _c("th", {\n attrs: {\n width: "30%"\n }\n }, [_vm._v(_vm._s(_vm.__("Price", "wepos")))]), _vm._v(" "), _c("th"), _vm._v(" "), _c("th")])]), _vm._v(" "), _c("tbody", [_vm.cartdata.line_items.length > 0 ? [_vm._l(_vm.cartdata.line_items, function (item, key) {\n return [_c("tr", [_c("td", {\n staticClass: "name",\n on: {\n click: function ($event) {\n return _vm.toggleEditQuantity(item, key);\n }\n }\n }, [_vm._v("\\n " + _vm._s(item.name) + "\\n "), item.attribute.length > 0 && item.type === "variable" ? _c("div", {\n staticClass: "attribute"\n }, [_c("ul", _vm._l(item.attribute, function (attribute_item) {\n return _c("li", [_c("span", {\n staticClass: "attr_name"\n }, [_vm._v(_vm._s(attribute_item.name))]), _vm._v(": "), _c("span", {\n staticClass: "attr_value"\n }, [_vm._v(_vm._s(attribute_item.option))])]);\n }), 0)]) : _vm._e()]), _vm._v(" "), _c("td", {\n staticClass: "qty",\n on: {\n click: function ($event) {\n return _vm.toggleEditQuantity(item, key);\n }\n }\n }, [_vm._v(_vm._s(item.quantity))]), _vm._v(" "), _c("td", {\n staticClass: "price",\n on: {\n click: function ($event) {\n return _vm.toggleEditQuantity(item, key);\n }\n }\n }, [item.on_sale ? [_c("span", {\n staticClass: "sale-price"\n }, [_vm._v(_vm._s(_vm.formatPrice(item.quantity * item.sale_price)))]), _vm._v(" "), _c("span", {\n staticClass: "regular-price"\n }, [_vm._v(_vm._s(_vm.formatPrice(item.quantity * item.regular_price)))])] : [_c("span", {\n staticClass: "sale-price"\n }, [_vm._v(_vm._s(_vm.formatPrice(item.quantity * item.regular_price)))])]], 2), _vm._v(" "), _c("td", {\n staticClass: "action"\n }, [_c("span", {\n staticClass: "flaticon-right-arrow",\n class: {\n open: item.editQuantity\n },\n on: {\n click: function ($event) {\n $event.preventDefault();\n return _vm.toggleEditQuantity(item, key);\n }\n }\n })]), _vm._v(" "), _c("td", {\n staticClass: "remove"\n }, [_c("span", {\n staticClass: "flaticon-cancel-music",\n on: {\n click: function ($event) {\n $event.preventDefault();\n return _vm.removeItem(key);\n }\n }\n })])]), _vm._v(" "), item.editQuantity ? _c("tr", {\n staticClass: "update-quantity-wrap"\n }, [_c("td", {\n attrs: {\n colspan: "5"\n }\n }, [_c("span", {\n staticClass: "qty"\n }, [_vm._v(_vm._s(_vm.__("Quantity", "wepos")))]), _vm._v(" "), _c("span", {\n staticClass: "qty-number"\n }, [_c("input", {\n directives: [{\n name: "model",\n rawName: "v-model",\n value: item.quantity,\n expression: "item.quantity"\n }],\n attrs: {\n type: "number",\n min: "1",\n step: "1"\n },\n domProps: {\n value: item.quantity\n },\n on: {\n input: function ($event) {\n if ($event.target.composing) return;\n\n _vm.$set(item, "quantity", $event.target.value);\n }\n }\n })]), _vm._v(" "), _c("span", {\n staticClass: "qty-action"\n }, [_c("a", {\n staticClass: "add",\n attrs: {\n href: "#"\n },\n on: {\n click: function ($event) {\n $event.preventDefault();\n return _vm.addQuantity(item, key);\n }\n }\n }, [_vm._v("+")]), _vm._v(" "), _c("a", {\n staticClass: "minus",\n attrs: {\n href: "#"\n },\n on: {\n click: function ($event) {\n $event.preventDefault();\n return _vm.removeQuantity(item, key);\n }\n }\n }, [_vm._v("-")])])])]) : _vm._e()];\n })] : [_c("tr", {\n staticClass: "no-item"\n }, [_c("td", {\n attrs: {\n colspan: "5"\n }\n }, [_c("img", {\n attrs: {\n src: _vm.wepos.assets_url + "/images/empty-cart.png",\n alt: "",\n width: "120px"\n }\n }), _vm._v(" "), _c("p", [_vm._v(_vm._s(_vm.__("Empty Cart", "wepos")))])])])]], 2)])]), _vm._v(" "), _c("div", {\n staticClass: "cart-calculation"\n }, [_c("form", {\n attrs: {\n autocomplete: "off"\n }\n }, [_c("table", {\n staticClass: "cart-total-table"\n }, [_c("tbody", [_c("tr", {\n staticClass: "cart-meta-data"\n }, [_c("td", {\n staticClass: "label"\n }, [_vm._v("\\n " + _vm._s(_vm.__("Subtotal", "wepos")) + "\\n "), _vm.settings.woo_tax.wc_tax_display_cart == "incl" && _vm.$store.getters["Cart/getTotalLineTax"] > 0 ? _c("span", {\n staticClass: "name"\n }, [_vm._v("\\n " + _vm._s(_vm.__("Includes Tax", "wepos")) + " " + _vm._s(_vm.formatPrice(_vm.$store.getters["Cart/getTotalLineTax"])) + "\\n ")]) : _vm._e()]), _vm._v(" "), _c("td", {\n staticClass: "price"\n }, [_vm._v(_vm._s(_vm.formatPrice(_vm.$store.getters["Cart/getSubtotal"])))]), _vm._v(" "), _c("td", {\n staticClass: "action"\n })]), _vm._v(" "), _vm.cartdata.fee_lines.length > 0 ? _vm._l(_vm.cartdata.fee_lines, function (fee, key) {\n return _c("tr", {\n staticClass: "cart-meta-data"\n }, [fee.type == "discount" ? [_c("td", {\n staticClass: "label"\n }, [_vm._v(_vm._s(_vm.__("Discount", "wepos")) + " "), _c("span", {\n staticClass: "name"\n }, [_vm._v(_vm._s(_vm.getDiscountAmount(fee)))])]), _vm._v(" "), _c("td", {\n staticClass: "price"\n }, [_vm._v("−" + _vm._s(_vm.formatPrice(Math.abs(fee.total))))]), _vm._v(" "), _c("td", {\n staticClass: "action"\n }, [_c("span", {\n staticClass: "flaticon-cancel-music",\n on: {\n click: function ($event) {\n return _vm.removeFeeLine(key);\n }\n }\n })])] : [_vm.cartdata.fee_lines[key].isEdit ? [_c("td", {\n staticClass: "label",\n attrs: {\n colspan: "2"\n }\n }, [_c("input", {\n directives: [{\n name: "model",\n rawName: "v-model",\n value: _vm.feeData.name,\n expression: "feeData.name"\n }],\n ref: "fee_name",\n refInFor: true,\n staticClass: "fee-name",\n attrs: {\n type: "text",\n placeholder: _vm.__("Fee Name", "wepos")\n },\n domProps: {\n value: _vm.feeData.name\n },\n on: {\n input: function ($event) {\n if ($event.target.composing) return;\n\n _vm.$set(_vm.feeData, "name", $event.target.value);\n }\n }\n }), _vm._v(" "), _c("input", {\n directives: [{\n name: "model",\n rawName: "v-model",\n value: _vm.feeData.value,\n expression: "feeData.value"\n }],\n ref: "fee_total",\n refInFor: true,\n staticClass: "fee-amount",\n attrs: {\n type: "number",\n min: "0",\n step: "any",\n placeholder: _vm.__("Total", "wepos")\n },\n domProps: {\n value: _vm.feeData.value\n },\n on: {\n input: function ($event) {\n if ($event.target.composing) return;\n\n _vm.$set(_vm.feeData, "value", $event.target.value);\n }\n }\n }), _vm._v(" "), _vm.settings.wepos_general.enable_fee_tax == "yes" ? [_c("label", {\n attrs: {\n for: "fee-tax-status"\n }\n }, [_c("input", {\n directives: [{\n name: "model",\n rawName: "v-model",\n value: _vm.feeData.tax_status,\n expression: "feeData.tax_status"\n }],\n staticClass: "fee-tax-status",\n attrs: {\n type: "checkbox",\n id: "fee-tax-status",\n "true-value": "taxable",\n "false-value": "none"\n },\n domProps: {\n checked: Array.isArray(_vm.feeData.tax_status) ? _vm._i(_vm.feeData.tax_status, null) > -1 : _vm._q(_vm.feeData.tax_status, "taxable")\n },\n on: {\n change: function ($event) {\n var $$a = _vm.feeData.tax_status,\n $$el = $event.target,\n $$c = $$el.checked ? "taxable" : "none";\n\n if (Array.isArray($$a)) {\n var $$v = null,\n $$i = _vm._i($$a, $$v);\n\n if ($$el.checked) {\n $$i < 0 && _vm.$set(_vm.feeData, "tax_status", $$a.concat([$$v]));\n } else {\n $$i > -1 && _vm.$set(_vm.feeData, "tax_status", $$a.slice(0, $$i).concat($$a.slice($$i + 1)));\n }\n } else {\n _vm.$set(_vm.feeData, "tax_status", $$c);\n }\n }\n }\n }), _vm._v(" " + _vm._s(_vm.__("Taxable", "wepos")))]), _vm._v(" "), _vm.feeData.tax_status == "taxable" ? _c("select", {\n directives: [{\n name: "model",\n rawName: "v-model",\n value: _vm.feeData.tax_class,\n expression: "feeData.tax_class"\n }],\n staticClass: "fee-tax-class",\n on: {\n change: function ($event) {\n var $$selectedVal = Array.prototype.filter.call($event.target.options, function (o) {\n return o.selected;\n }).map(function (o) {\n var val = "_value" in o ? o._value : o.value;\n return val;\n });\n\n _vm.$set(_vm.feeData, "tax_class", $event.target.multiple ? $$selectedVal : $$selectedVal[0]);\n }\n }\n }, _vm._l(_vm.availableTax, function (feeTax) {\n return _c("option", {\n domProps: {\n value: feeTax.class == "standard" ? "" : feeTax.class\n }\n }, [_vm._v(_vm._s(_vm.unSanitizeString(feeTax.class)) + " - " + _vm._s(feeTax.percentage_rate))]);\n }), 0) : _vm._e()] : _vm._e(), _vm._v(" "), _c("button", {\n attrs: {\n disabled: _vm.feeData.name == ""\n },\n on: {\n click: function ($event) {\n $event.preventDefault();\n return _vm.saveFee(key);\n }\n }\n }, [_vm._v(_vm._s(_vm.__("Apply", "wepos")))]), _vm._v(" "), _c("button", {\n staticClass: "cancel",\n on: {\n click: function ($event) {\n $event.preventDefault();\n return _vm.cancelEditFee(key);\n }\n }\n }, [_vm._v(_vm._s(_vm.__("Cancel", "wepos")))])], 2), _vm._v(" "), _c("td", {\n staticClass: "action"\n }, [_c("span", {\n staticClass: "flaticon-cancel-music",\n on: {\n click: function ($event) {\n return _vm.removeFeeLine(key);\n }\n }\n })])] : [_c("td", {\n staticClass: "label",\n on: {\n dblclick: function ($event) {\n $event.preventDefault();\n return _vm.editFeeData(key);\n }\n }\n }, [_vm._v(_vm._s(_vm.__("Fee", "wepos")) + " "), _c("span", {\n staticClass: "name"\n }, [_vm._v(_vm._s(fee.name) + " " + _vm._s(_vm.getDiscountAmount(fee)))])]), _vm._v(" "), _c("td", {\n staticClass: "price"\n }, [_vm._v(_vm._s(_vm.formatPrice(Math.abs(fee.total))))]), _vm._v(" "), _c("td", {\n staticClass: "action"\n }, [_c("span", {\n staticClass: "flaticon-cancel-music",\n on: {\n click: function ($event) {\n return _vm.removeFeeLine(key);\n }\n }\n })])]]], 2);\n }) : _vm._e(), _vm._v(" "), _vm.$store.getters["Cart/getTotalTax"] ? _c("tr", {\n staticClass: "tax"\n }, [_c("td", {\n staticClass: "label"\n }, [_vm._v(_vm._s(_vm.__("Tax", "wepos")))]), _vm._v(" "), _c("td", {\n staticClass: "price"\n }, [_vm._v(_vm._s(_vm.formatPrice(_vm.$store.getters["Cart/getTotalTax"])))]), _vm._v(" "), _c("td", {\n staticClass: "action"\n })]) : _vm._e(), _vm._v(" "), _c("tr", {\n staticClass: "cart-action"\n }, [_c("td", {\n attrs: {\n colspan: "3"\n }\n }, [_c("fee-keypad", {\n attrs: {\n name: _vm.__("Discount", "wepos"),\n "short-key": "discount"\n },\n on: {\n inputfee: _vm.setDiscount\n }\n }), _vm._v(" "), _c("fee-keypad", {\n attrs: {\n name: _vm.__("Fee", "wepos"),\n "short-key": "fee"\n },\n on: {\n inputfee: _vm.setFee\n }\n }), _vm._v(" "), _vm.orderdata.customer_note == "" ? _c("customer-note", {\n on: {\n addnote: _vm.addCustomerNote\n }\n }) : _vm._e()], 1)]), _vm._v(" "), _vm.orderdata.customer_note ? _c("tr", {\n staticClass: "note"\n }, [_c("td", {\n staticClass: "note-text",\n attrs: {\n colspan: "2"\n }\n }, [_vm._v("\\n " + _vm._s(_vm.orderdata.customer_note) + "\\n ")]), _vm._v(" "), _c("td", {\n staticClass: "action"\n }, [_c("span", {\n staticClass: "flaticon-cancel-music",\n on: {\n click: function ($event) {\n $event.preventDefault();\n return _vm.removeCustomerNote.apply(null, arguments);\n }\n }\n })])]) : _vm._e(), _vm._v(" "), _c("tr", {\n staticClass: "pay-now",\n on: {\n click: function ($event) {\n return _vm.initPayment();\n }\n }\n }, [_c("td", [_vm._v(_vm._s(_vm.__("Pay Now", "wepos")))]), _vm._v(" "), _c("td", {\n staticClass: "amount"\n }, [_vm._v(_vm._s(_vm.formatPrice(_vm.$store.getters["Cart/getTotal"])))]), _vm._v(" "), _vm._m(0)])], 2)])])])]) : _vm._e()], 2), _vm._v(" "), _vm.showPaymentReceipt ? _c("modal", {\n attrs: {\n width: "600px",\n height: "400px"\n },\n on: {\n close: function ($event) {\n return _vm.createNewSale();\n }\n }\n }, [_c("template", {\n slot: "body"\n }, [_c("div", {\n staticClass: "wepos-payment-receipt"\n }, [_c("div", {\n staticClass: "sale-completed"\n }, [_c("img", {\n attrs: {\n src: _vm.wepos.assets_url + "/images/sale-completed.png",\n alt: "",\n width: "120px"\n }\n }), _vm._v(" "), _c("h2", [_vm._v(_vm._s(_vm.__("Sale Completed", "wepos")))])]), _vm._v(" "), _c("div", {\n staticClass: "print-section"\n }, [_c("print-receipt"), _vm._v(" "), _c("button", {\n staticClass: "new-sale-btn",\n on: {\n click: function ($event) {\n $event.preventDefault();\n return _vm.createNewSale();\n }\n }\n }, [_c("span", {\n staticClass: "icon flaticon-add"\n }), _vm._v(" "), _c("span", {\n staticClass: "label"\n }, [_vm._v(_vm._s(_vm.__("New Sale", "wepos")))])])], 1)])])], 2) : _vm._e(), _vm._v(" "), _vm.showHelp ? _c("modal", {\n attrs: {\n width: "700px",\n height: "500px"\n },\n on: {\n close: function ($event) {\n return _vm.closeHelp();\n }\n }\n }, [_c("template", {\n slot: "body"\n }, [_c("div", {\n staticClass: "wepos-help-wrapper"\n }, [_c("h2", [_vm._v(_vm._s(_vm.__("Shortcut Keys", "wepos")))]), _vm._v(" "), _c("ul", [_c("li", [_c("span", {\n staticClass: "code"\n }, [_c("code", [_vm._v("f1")])]), _vm._v(" "), _c("span", {\n staticClass: "title"\n }, [_vm._v(_vm._s(_vm.__("Search Product", "wepos")))])]), _vm._v(" "), _c("li", [_c("span", {\n staticClass: "code"\n }, [_c("code", [_vm._v("f2")])]), _vm._v(" "), _c("span", {\n staticClass: "title"\n }, [_vm._v(_vm._s(_vm.__("Scan Product", "wepos")))])]), _vm._v(" "), _c("li", [_c("span", {\n staticClass: "code"\n }, [_c("code", [_vm._v("f3")])]), _vm._v(" "), _c("span", {\n staticClass: "title"\n }, [_vm._v(_vm._s(_vm.__("Toggle Product View", "wepos")))])]), _vm._v(" "), _c("li", [_c("span", {\n staticClass: "code"\n }, [_c("code", [_vm._v("f4")])]), _vm._v(" "), _c("span", {\n staticClass: "title"\n }, [_vm._v(_vm._s(_vm.__("Add Fee in cart", "wepos")))])]), _vm._v(" "), _c("li", [_c("span", {\n staticClass: "code"\n }, [_c("code", [_vm._v("f5")])]), _vm._v(" "), _c("span", {\n staticClass: "title"\n }, [_vm._v(_vm._s(_vm.__("Add Discount in cart", "wepos")))])]), _vm._v(" "), _c("li", [_c("span", {\n staticClass: "code"\n }, [_c("code", [_vm._v("f6")])]), _vm._v(" "), _c("span", {\n staticClass: "title"\n }, [_vm._v(_vm._s(_vm.__("Add Customer note", "wepos")))])]), _vm._v(" "), _c("li", [_c("span", {\n staticClass: "code"\n }, [_c("code", [_vm._v("f7")])]), _vm._v(" "), _c("span", {\n staticClass: "title"\n }, [_vm._v(_vm._s(_vm.__("Customer Search", "wepos")))])]), _vm._v(" "), _c("li", [_c("span", {\n staticClass: "code"\n }, [_c("code", [_vm._v("shift+f7")])]), _vm._v(" "), _c("span", {\n staticClass: "title"\n }, [_vm._v(_vm._s(_vm.__("Add new Customer", "wepos")))])]), _vm._v(" "), _c("li", [_c("span", {\n staticClass: "code"\n }, [_c("code", [_vm._v("f8")])]), _vm._v(" "), _c("span", {\n staticClass: "title"\n }, [_vm._v(_vm._s(_vm.__("Create New Sale", "wepos")))])]), _vm._v(" "), _c("li", [_c("span", {\n staticClass: "code"\n }, [_c("code", [_vm._v("shift+f8")])]), _vm._v(" "), _c("span", {\n staticClass: "title"\n }, [_vm._v(_vm._s(_vm.__("Empty your cart", "wepos")))])]), _vm._v(" "), _c("li", [_c("span", {\n staticClass: "code"\n }, [_c("code", [_vm._v("f9")])]), _vm._v(" "), _c("span", {\n staticClass: "title"\n }, [_vm._v(_vm._s(_vm.__("Go to payment receipt", "wepos")))])]), _vm._v(" "), _c("li", [_c("span", {\n staticClass: "code"\n }, [_c("code", [_vm._v("f10")])]), _vm._v(" "), _c("span", {\n staticClass: "title"\n }, [_vm._v(_vm._s(_vm.__("Process Payment", "wepos")))])]), _vm._v(" "), _c("li", [_c("span", {\n staticClass: "code"\n }, [_c("code", [_vm._v("ctrl/cmd+p")])]), _vm._v(" "), _c("span", {\n staticClass: "title"\n }, [_vm._v(_vm._s(_vm.__("Print Receipt", "wepos")))])]), _vm._v(" "), _c("li", [_c("span", {\n staticClass: "code"\n }, [_c("code", [_vm._v("ctrl/cmd+?")])]), _vm._v(" "), _c("span", {\n staticClass: "title"\n }, [_vm._v(_vm._s(_vm.__("Show/Close(Toggle) Help", "wepos")))])]), _vm._v(" "), _c("li", [_c("span", {\n staticClass: "code"\n }, [_c("code", [_vm._v("esc")])]), _vm._v(" "), _c("span", {\n staticClass: "title"\n }, [_vm._v(_vm._s(_vm.__("Close anything", "wepos")))])])])])])], 2) : _vm._e(), _vm._v(" "), _vm.showModal ? _c("modal", {\n attrs: {\n width: "98%",\n height: "95vh"\n },\n on: {\n open: function ($event) {\n return _vm.focusCashInput();\n },\n close: function ($event) {\n return _vm.backToSale();\n },\n enterpressed: function ($event) {\n return _vm.processPayment();\n }\n }\n }, [_c("template", {\n slot: "body"\n }, [_c("div", {\n staticClass: "wepos-checkout-wrapper"\n }, [_c("div", {\n staticClass: "left-content"\n }, [_c("div", {\n staticClass: "header"\n }, [_vm._v("\\n " + _vm._s(_vm.__("Sale Summary", "wepos")) + "\\n ")]), _vm._v(" "), _c("div", {\n staticClass: "content"\n }, [_c("table", {\n staticClass: "sale-summary-cart"\n }, [_c("tbody", _vm._l(_vm.cartdata.line_items, function (item) {\n return _c("tr", [_c("td", {\n staticClass: "name"\n }, [_vm._v("\\n " + _vm._s(item.name) + "\\n "), item.attribute.length > 0 && item.type === "variable" ? _c("div", {\n staticClass: "attribute"\n }, [_c("ul", _vm._l(item.attribute, function (attribute_item) {\n return _c("li", [_c("span", {\n staticClass: "attr_name"\n }, [_vm._v(_vm._s(attribute_item.name))]), _vm._v(": "), _c("span", {\n staticClass: "attr_value"\n }, [_vm._v(_vm._s(attribute_item.option))])]);\n }), 0)]) : _vm._e()]), _vm._v(" "), _c("td", {\n staticClass: "quantity"\n }, [_vm._v(_vm._s(item.quantity))]), _vm._v(" "), _c("td", {\n staticClass: "price"\n }, [item.on_sale ? [_c("span", {\n staticClass: "sale-price"\n }, [_vm._v(_vm._s(_vm.formatPrice(item.quantity * item.sale_price)))]), _vm._v(" "), _c("span", {\n staticClass: "regular-price"\n }, [_vm._v(_vm._s(_vm.formatPrice(item.quantity * item.regular_price)))])] : [_c("span", {\n staticClass: "sale-price"\n }, [_vm._v(_vm._s(_vm.formatPrice(item.quantity * item.regular_price)))])]], 2)]);\n }), 0)])]), _vm._v(" "), _c("div", {\n staticClass: "footer"\n }, [_c("ul", [_c("li", {\n staticClass: "wepos-clearfix"\n }, [_c("span", {\n staticClass: "wepos-left"\n }, [_vm._v("\\n " + _vm._s(_vm.__("Subtotal", "wepos")) + "\\n "), _vm.settings.woo_tax.wc_tax_display_cart == "incl" ? _c("span", {\n staticClass: "metadata"\n }, [_vm._v("\\n " + _vm._s(_vm.__("Includes Tax", "wepos")) + " " + _vm._s(_vm.formatPrice(_vm.$store.getters["Cart/getTotalLineTax"])) + "\\n ")]) : _vm._e()]), _vm._v(" "), _c("span", {\n staticClass: "wepos-right"\n }, [_vm._v(_vm._s(_vm.formatPrice(_vm.$store.getters["Cart/getSubtotal"])))])]), _vm._v(" "), _vm.cartdata.fee_lines.length > 0 ? _vm._l(_vm.cartdata.fee_lines, function (fee, key) {\n return _c("li", {\n staticClass: "wepos-clearfix"\n }, [fee.type == "discount" ? [_c("span", {\n staticClass: "wepos-left"\n }, [_vm._v(_vm._s(_vm.__("Discount", "wepos")) + " "), _c("span", {\n staticClass: "metadata"\n }, [_vm._v(_vm._s(fee.name) + " " + _vm._s(_vm.getDiscountAmount(fee)))])]), _vm._v(" "), _c("span", {\n staticClass: "wepos-right"\n }, [_vm._v("-" + _vm._s(_vm.formatPrice(Math.abs(fee.total))))])] : [_c("span", {\n staticClass: "wepos-left"\n }, [_vm._v(_vm._s(_vm.__("Fee", "wepos")) + " "), _c("span", {\n staticClass: "metadata"\n }, [_vm._v(_vm._s(fee.name) + " " + _vm._s(_vm.getDiscountAmount(fee)))])]), _vm._v(" "), _c("span", {\n staticClass: "wepos-right"\n }, [_vm._v(_vm._s(_vm.formatPrice(fee.total)))])]], 2);\n }) : _vm._e(), _vm._v(" "), _vm.$store.getters["Cart/getTotalTax"] ? _c("li", {\n staticClass: "wepos-clearfix"\n }, [_c("span", {\n staticClass: "wepos-left"\n }, [_vm._v(_vm._s(_vm.__("Tax", "wepos")))]), _vm._v(" "), _c("span", {\n staticClass: "wepos-right"\n }, [_vm._v(_vm._s(_vm.formatPrice(_vm.$store.getters["Cart/getTotalTax"])))])]) : _vm._e(), _vm._v(" "), _c("li", {\n staticClass: "wepos-clearfix"\n }, [_c("span", {\n staticClass: "wepos-left"\n }, [_vm._v(_vm._s(_vm.__("Order Total", "wepos")))]), _vm._v(" "), _c("span", {\n staticClass: "wepos-right"\n }, [_vm._v(_vm._s(_vm.formatPrice(_vm.$store.getters["Cart/getTotal"])))])]), _vm._v(" "), _c("li", {\n staticClass: "wepos-clearfix"\n }, [_c("span", {\n staticClass: "wepos-left"\n }, [_vm._v(_vm._s(_vm.__("Pay", "wepos")))]), _vm._v(" "), _c("span", {\n staticClass: "wepos-right"\n }, [_vm._v(_vm._s(_vm.formatPrice(_vm.$store.getters["Cart/getTotal"])))])])], 2)])]), _vm._v(" "), _c("div", {\n staticClass: "right-content"\n }, [_c("div", {\n staticClass: "header wepos-clearfix"\n }, [_c("h2", {\n staticClass: "wepos-left"\n }, [_vm._v(_vm._s(_vm.__("Pay", "wepos")))]), _vm._v(" "), _c("span", {\n staticClass: "pay-amount wepos-right"\n }, [_vm._v(_vm._s(_vm.formatPrice(_vm.$store.getters["Cart/getTotal"])))])]), _vm._v(" "), _c("div", {\n staticClass: "content"\n }, [_c("div", {\n staticClass: "payment-gateway"\n }, [_vm.availableGateways.length > 0 ? [_vm._l(_vm.availableGateways, function (gateway) {\n return _c("label", [_c("input", {\n directives: [{\n name: "model",\n rawName: "v-model",\n value: _vm.selectedGateway,\n expression: "selectedGateway"\n }],\n attrs: {\n type: "radio",\n name: "gateway",\n checked: ""\n },\n domProps: {\n value: gateway.id,\n checked: _vm._q(_vm.selectedGateway, gateway.id)\n },\n on: {\n change: function ($event) {\n _vm.selectedGateway = gateway.id;\n }\n }\n }), _vm._v(" "), _c("span", {\n staticClass: "gateway",\n class: `gateway-${gateway.id}`\n }, [_vm._v("\\n " + _vm._s(gateway.title) + "\\n ")])]);\n }), _vm._v(" "), _vm.emptyGatewayDiv > 0 ? _vm._l(_vm.emptyGatewayDiv, function (n) {\n return _c("label", {\n key: n\n }, [_c("span", {\n staticClass: "grid-placeholder"\n })]);\n }) : _vm._e()] : [_c("p", [_vm._v(_vm._s(_vm.__("No gateway found", "wepos")))])]], 2), _vm._v(" "), _vm.orderdata.payment_method == "wepos_cash" ? [_c("div", {\n staticClass: "payment-option"\n }, [_c("div", {\n staticClass: "payment-amount"\n }, [_c("div", {\n staticClass: "input-part"\n }, [_c("div", {\n staticClass: "input-wrap"\n }, [_c("p", [_vm._v(_vm._s(_vm.__("Cash", "wepos")))]), _vm._v(" "), _c("div", {\n staticClass: "input-addon"\n }, [_c("span", {\n staticClass: "currency"\n }, [_vm._v(_vm._s(_vm.wepos.currency_format_symbol))]), _vm._v(" "), _c("input", {\n directives: [{\n name: "model",\n rawName: "v-model",\n value: _vm.cashAmount,\n expression: "cashAmount"\n }],\n ref: "cashamount",\n attrs: {\n id: "input-cash-amount",\n type: "text"\n },\n domProps: {\n value: _vm.cashAmount\n },\n on: {\n input: function ($event) {\n if ($event.target.composing) return;\n _vm.cashAmount = $event.target.value;\n }\n }\n })])])]), _vm._v(" "), _c("div", {\n staticClass: "change-money"\n }, [_c("p", [_vm._v(_vm._s(_vm.__("Change money", "wepos")) + ": " + _vm._s(_vm.formatPrice(_vm.changeAmount)))])])])])] : _vm._e(), _vm._v(" "), _vm._l(_vm.availableGatewayContent, function (availableGatewayComponent, key) {\n return _c(availableGatewayComponent, {\n key: key,\n tag: "component",\n attrs: {\n availablegateways: _vm.availableGateways\n }\n });\n })], 2), _vm._v(" "), _c("div", {\n staticClass: "footer wepos-clearfix"\n }, [_c("a", {\n staticClass: "back-btn wepos-left",\n attrs: {\n href: "#"\n },\n on: {\n click: function ($event) {\n $event.preventDefault();\n return _vm.backToSale();\n }\n }\n }, [_vm._v(_vm._s(_vm.__("Back to Sale", "wepos")))]), _vm._v(" "), _c("button", {\n staticClass: "process-checkout-btn wepos-right",\n attrs: {\n disabled: !_vm.$store.getters["Order/getCanProcessPayment"]\n },\n on: {\n click: function ($event) {\n $event.preventDefault();\n return _vm.processPayment.apply(null, arguments);\n }\n }\n }, [_vm._v(_vm._s(_vm.__("Process Payment", "wepos")))])])])])])], 2) : _vm._e(), _vm._v(" "), _c("overlay", {\n attrs: {\n show: _vm.showOverlay\n }\n }), _vm._v(" "), _vm.showReceiptHtml ? _c("print-receipt-html", {\n directives: [{\n name: "show",\n rawName: "v-show",\n value: _vm.createprintreceipt,\n expression: "createprintreceipt"\n }],\n attrs: {\n printdata: _vm.printdata,\n settings: _vm.settings\n }\n }) : _vm._e(), _vm._v(" "), _vm._l(_vm.afterMainContents, function (afterMainContent, key) {\n return _c(afterMainContent, {\n key: key,\n tag: "component",\n attrs: {\n orderdata: _vm.orderdata,\n printdata: _vm.printdata\n }\n });\n })], 2);\n};\n\nvar staticRenderFns = [function () {\n var _vm = this,\n _c = _vm._self._c;\n\n return _c("td", {\n staticClass: "icon"\n }, [_c("span", {\n staticClass: "flaticon-right-arrow"\n })]);\n}];\nrender._withStripped = true;\n\n\n//# sourceURL=webpack://wepos/./assets/src/frontend/components/Home.vue?./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/loaders/templateLoader.js??ruleSet%5B1%5D.rules%5B2%5D!./node_modules/vue-loader/lib/index.js??vue-loader-options')},"./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/loaders/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./assets/src/frontend/components/Keyboard.vue?vue&type=template&id=fbb6d6c8&": + \*****************************************************************************************************************************************************************************************************************************************************************/(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";eval('__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ "render": () => (/* binding */ render),\n/* harmony export */ "staticRenderFns": () => (/* binding */ staticRenderFns)\n/* harmony export */ });\nvar render = function render() {\n var _vm = this,\n _c = _vm._self._c;\n\n return _c("div", {\n directives: [{\n name: "hotkey",\n rawName: "v-hotkey",\n value: _vm.hotkeys,\n expression: "hotkeys"\n }],\n attrs: {\n id: "wepos-main"\n }\n }, [_c("div", {\n staticClass: "content-product"\n }, [_c("div", {\n staticClass: "top-panel wepos-clearfix"\n }, [_c("div", {\n staticClass: "search-bar"\n }, [_c("product-search", {\n attrs: {\n products: _vm.products,\n settings: _vm.settings\n },\n on: {\n onProductAdded: _vm.addToCart\n }\n })], 1), _vm._v(" "), _c("div", {\n staticClass: "category"\n }, [_c("multiselect", {\n staticClass: "wepos-multiselect",\n attrs: {\n options: _vm.categories,\n selectLabel: "",\n deselectLabel: "",\n selectedLabel: "",\n placeholder: _vm.__("Select a category", "wepos")\n },\n on: {\n select: _vm.handleCategorySelect,\n remove: _vm.handleCategoryRemove\n },\n scopedSlots: _vm._u([{\n key: "singleLabel",\n fn: function (props) {\n return [_vm._v("\\n " + _vm._s(props.option.name) + "\\n ")];\n }\n }, {\n key: "option",\n fn: function (props) {\n return [_c("span", [_vm._l(props.option.level, function (pad) {\n return [_vm._v("\\n  \\n ")];\n }), _vm._v("\\n " + _vm._s(props.option.name) + "\\n ")], 2)];\n }\n }]),\n model: {\n value: _vm.selectedCategory,\n callback: function ($$v) {\n _vm.selectedCategory = $$v;\n },\n expression: "selectedCategory"\n }\n }, [_vm._v(" "), _vm._v(" "), _c("template", {\n slot: "noResult"\n }, [_c("div", {\n staticClass: "no-data-found"\n }, [_vm._v(_vm._s(_vm.__("Not found", "wepos")))])])], 2)], 1), _vm._v(" "), _c("div", {\n staticClass: "toggle-view"\n }, [_c("div", {\n staticClass: "product-toggle"\n }, [_c("span", {\n staticClass: "toggle-icon list-view flaticon-menu-button-of-three-horizontal-lines",\n class: {\n active: _vm.productView == "list"\n },\n on: {\n click: function ($event) {\n _vm.productView = "list";\n }\n }\n }), _vm._v(" "), _c("span", {\n staticClass: "toggle-icon grid-view flaticon-menu",\n class: {\n active: _vm.productView == "grid"\n },\n on: {\n click: function ($event) {\n _vm.productView = "grid";\n }\n }\n })])])]), _vm._v(" "), _vm.getBreadCrums.length > 0 ? _c("div", {\n staticClass: "breadcrumb"\n }, [_c("ul", [_vm._l(_vm.getBreadCrums, function (breadcrumb) {\n return [_c("router-link", {\n attrs: {\n tag: "li",\n to: {\n name: "Home",\n query: {\n category: breadcrumb.id\n }\n }\n }\n }, [_c("a", [_vm._v(_vm._s(breadcrumb.name))])])];\n })], 2), _vm._v(" "), _c("span", {\n staticClass: "close-breadcrumb flaticon-cancel-music",\n on: {\n click: function ($event) {\n $event.preventDefault();\n return _vm.removeBreadcrums.apply(null, arguments);\n }\n }\n })]) : _vm._e(), _vm._v(" "), _c("div", {\n ref: "items-wrapper",\n staticClass: "items-wrapper",\n class: _vm.productView\n }, [!_vm.productLoading ? [_vm._l(_vm.getFilteredProduct, function (product) {\n return _vm.getFilteredProduct.length > 0 ? _c("div", {\n staticClass: "item"\n }, [product.type === "simple" ? [_c("div", {\n staticClass: "item-wrap",\n class: {\n disabled: !_vm.hasStock(product)\n },\n on: {\n click: function ($event) {\n $event.preventDefault();\n return _vm.addToCart(product);\n }\n }\n }, [_c("div", {\n staticClass: "img"\n }, [_c("img", {\n attrs: {\n src: _vm.getProductImage(product),\n alt: _vm.getProductImageName(product)\n }\n })]), _vm._v(" "), _vm.productView === "grid" ? _c("div", {\n staticClass: "title"\n }, [_vm._v("\\n " + _vm._s(_vm.truncateTitle(product.name, 20)) + "\\n ")]) : _c("div", {\n staticClass: "title"\n }, [_c("div", {\n staticClass: "product-name"\n }, [_vm._v(_vm._s(product.name))]), _vm._v(" "), _c("ul", {\n staticClass: "meta"\n }, [product.sku ? _c("li", [_c("span", {\n staticClass: "label"\n }, [_vm._v(_vm._s(_vm.__("Sku :", "wepos")))]), _vm._v(" "), _c("span", {\n staticClass: "value"\n }, [_vm._v(_vm._s(product.sku))])]) : _vm._e(), _vm._v(" "), _c("li", [_c("span", {\n staticClass: "label"\n }, [_vm._v(_vm._s(_vm.__("Price :", "wepos")))]), _vm._v(" "), _c("span", {\n staticClass: "value",\n domProps: {\n innerHTML: _vm._s(product.price_html)\n }\n })])])]), _vm._v(" "), _c("span", {\n staticClass: "add-product-icon flaticon-add",\n class: _vm.productView\n })])] : _vm._e(), _vm._v(" "), product.type === "variable" ? [_c("v-popover", {\n attrs: {\n offset: "10",\n "popover-base-class": "product-variation tooltip popover",\n placement: "left-end"\n }\n }, [_c("div", {\n staticClass: "item-wrap",\n on: {\n click: function ($event) {\n return _vm.selectVariationProduct(product);\n }\n }\n }, [_c("div", {\n staticClass: "img"\n }, [_c("img", {\n attrs: {\n src: _vm.getProductImage(product),\n alt: _vm.getProductImageName(product)\n }\n })]), _vm._v(" "), _vm.productView === "grid" ? _c("div", {\n staticClass: "title"\n }, [_vm._v("\\n " + _vm._s(_vm.truncateTitle(product.name, 20)) + "\\n ")]) : _c("div", {\n staticClass: "title"\n }, [_c("div", {\n staticClass: "product-name"\n }, [_vm._v(_vm._s(product.name))]), _vm._v(" "), _c("ul", {\n staticClass: "meta"\n }, [_c("li", [_c("span", {\n staticClass: "label"\n }, [_vm._v(_vm._s(_vm.__("Price :", "wepos")))]), _vm._v(" "), _c("span", {\n staticClass: "value",\n domProps: {\n innerHTML: _vm._s(product.price_html)\n }\n })])])]), _vm._v(" "), _c("span", {\n staticClass: "add-product-icon flaticon-add",\n class: _vm.productView\n })]), _vm._v(" "), _c("template", {\n slot: "popover"\n }, [_c("div", {\n staticClass: "variation-header"\n }, [_vm._v("\\n " + _vm._s(_vm.__("Select Variations", "wepos")) + "\\n ")]), _vm._v(" "), _c("div", {\n staticClass: "variation-body"\n }, [_vm._l(product.attributes, function (attribute) {\n return [_c("div", {\n staticClass: "attribute"\n }, [_c("p", [_vm._v(_vm._s(attribute.name))]), _vm._v(" "), _c("div", {\n staticClass: "options"\n }, [_vm._l(attribute.options, function (option) {\n return [_c("label", [_c("input", {\n directives: [{\n name: "model",\n rawName: "v-model",\n value: _vm.selectedAttribute[attribute.name],\n expression: "selectedAttribute[attribute.name]"\n }],\n attrs: {\n type: "radio"\n },\n domProps: {\n value: option,\n checked: _vm._q(_vm.selectedAttribute[attribute.name], option)\n },\n on: {\n change: function ($event) {\n return _vm.$set(_vm.selectedAttribute, attribute.name, option);\n }\n }\n }), _vm._v(" "), _c("div", {\n staticClass: "box"\n }, [_vm._v("\\n " + _vm._s(option) + "\\n ")])])];\n })], 2)])];\n })], 2), _vm._v(" "), _c("div", {\n staticClass: "variation-footer"\n }, [_c("button", {\n attrs: {\n disabled: _vm.attributeDisabled\n },\n on: {\n click: function ($event) {\n $event.preventDefault();\n return _vm.addVariationProduct.apply(null, arguments);\n }\n }\n }, [_vm._v(_vm._s(_vm.__("Add Product", "wepos")))])])])], 2)] : _vm._e()], 2) : _vm._e();\n }), _vm._v(" "), _vm.getFilteredProduct.length <= 0 ? _c("div", {\n staticClass: "no-product-found"\n }, [_c("img", {\n attrs: {\n src: _vm.wepos.assets_url + "/images/no-product.png",\n alt: "",\n width: "120px"\n }\n }), _vm._v(" "), _c("p", [_vm._v(_vm._s(_vm.__("No Product Found", "wepos")))])]) : _vm._e()] : _vm._e(), _vm._v(" "), _vm.productLoading ? _c("div", {\n staticClass: "product-loading"\n }, [_c("div", {\n staticClass: "spinner spinner-loading"\n })]) : _vm._e()], 2)]), _vm._v(" "), _c("div", {\n staticClass: "content-cart"\n }, [_c("div", {\n staticClass: "top-panel"\n }, [_c("customer-search", {\n on: {\n onCustomerSelected: _vm.selectCustomer\n }\n }), _vm._v(" "), _c("div", {\n staticClass: "action"\n }, [_c("div", {\n staticClass: "more-options"\n }, [_c("v-popover", {\n attrs: {\n offset: "5",\n "popover-base-class": "wepos-dropdown-menu tooltip popover",\n placement: "bottom-end",\n open: _vm.showQucikMenu\n }\n }, [_c("button", {\n staticClass: "wepos-button",\n on: {\n click: function ($event) {\n $event.preventDefault();\n return _vm.openQucikMenu();\n }\n }\n }, [_c("span", {\n staticClass: "more-icon flaticon-more"\n })]), _vm._v(" "), _c("template", {\n slot: "popover"\n }, [_c("ul", [_vm._l(_vm.quickLinkListStart, function (quickLinkListStartComponent, key) {\n return _c(quickLinkListStartComponent, {\n key: key - `1`,\n tag: "component"\n });\n }), _vm._v(" "), _c("li", [_c("a", {\n attrs: {\n href: "#"\n },\n on: {\n click: function ($event) {\n $event.preventDefault();\n return _vm.emptyCart.apply(null, arguments);\n }\n }\n }, [_c("span", {\n staticClass: "flaticon-empty-cart quick-menu-icon"\n }), _vm._v(_vm._s(_vm.__("Empty Cart", "wepos")))])]), _vm._v(" "), _c("li", [_c("a", {\n attrs: {\n href: "#"\n },\n on: {\n click: function ($event) {\n $event.preventDefault();\n return _vm.openHelp.apply(null, arguments);\n }\n }\n }, [_c("span", {\n staticClass: "flaticon-information quick-menu-icon"\n }), _vm._v(_vm._s(_vm.__("Help", "wepos")))])]), _vm._v(" "), _c("li", {\n staticClass: "divider"\n }), _vm._v(" "), _vm._l(_vm.quickLinkList, function (component, index) {\n return _c(component, {\n key: index,\n tag: "component"\n });\n }), _vm._v(" "), _c("li", [_c("a", {\n attrs: {\n href: "#"\n },\n on: {\n click: function ($event) {\n $event.preventDefault();\n return _vm.logout.apply(null, arguments);\n }\n }\n }, [_c("span", {\n staticClass: "flaticon-logout quick-menu-icon"\n }), _vm._v(_vm._s(_vm.__("Logout", "wepos")))])])], 2)])], 2)], 1)])], 1), _vm._v(" "), _vm._l(_vm.beforCartPanels, function (beforCartPanel, key) {\n return _c(beforCartPanel, {\n key: key,\n tag: "component"\n });\n }), _vm._v(" "), _vm.settings.wepos_general ? _c("div", {\n staticClass: "cart-panel"\n }, [_c("div", {\n staticClass: "cart-content"\n }, [_c("table", {\n staticClass: "cart-table"\n }, [_c("thead", [_c("tr", [_c("th", {\n attrs: {\n width: "65%"\n }\n }, [_vm._v(_vm._s(_vm.__("Product", "wepos")))]), _vm._v(" "), _c("th", {\n attrs: {\n width: "15%"\n }\n }, [_vm._v(_vm._s(_vm.__("Qty", "wepos")))]), _vm._v(" "), _c("th", {\n attrs: {\n width: "30%"\n }\n }, [_vm._v(_vm._s(_vm.__("Price", "wepos")))]), _vm._v(" "), _c("th"), _vm._v(" "), _c("th")])]), _vm._v(" "), _c("tbody", [_vm.cartdata.line_items.length > 0 ? [_vm._l(_vm.cartdata.line_items, function (item, key) {\n return [_c("tr", [_c("td", {\n staticClass: "name",\n on: {\n click: function ($event) {\n return _vm.toggleEditQuantity(item, key);\n }\n }\n }, [_vm._v("\\n " + _vm._s(item.name) + "\\n "), item.attribute.length > 0 && item.type === "variable" ? _c("div", {\n staticClass: "attribute"\n }, [_c("ul", _vm._l(item.attribute, function (attribute_item) {\n return _c("li", [_c("span", {\n staticClass: "attr_name"\n }, [_vm._v(_vm._s(attribute_item.name))]), _vm._v(": "), _c("span", {\n staticClass: "attr_value"\n }, [_vm._v(_vm._s(attribute_item.option))])]);\n }), 0)]) : _vm._e()]), _vm._v(" "), _c("td", {\n staticClass: "qty",\n on: {\n click: function ($event) {\n return _vm.toggleEditQuantity(item, key);\n }\n }\n }, [_vm._v(_vm._s(item.quantity))]), _vm._v(" "), _c("td", {\n staticClass: "price",\n on: {\n click: function ($event) {\n return _vm.toggleEditQuantity(item, key);\n }\n }\n }, [item.on_sale ? [_c("span", {\n staticClass: "sale-price"\n }, [_vm._v(_vm._s(_vm.formatPrice(item.quantity * item.sale_price)))]), _vm._v(" "), _c("span", {\n staticClass: "regular-price"\n }, [_vm._v(_vm._s(_vm.formatPrice(item.quantity * item.regular_price)))])] : [_c("span", {\n staticClass: "sale-price"\n }, [_vm._v(_vm._s(_vm.formatPrice(item.quantity * item.regular_price)))])]], 2), _vm._v(" "), _c("td", {\n staticClass: "action"\n }, [_c("span", {\n staticClass: "flaticon-right-arrow",\n class: {\n open: item.editQuantity\n },\n on: {\n click: function ($event) {\n $event.preventDefault();\n return _vm.toggleEditQuantity(item, key);\n }\n }\n })]), _vm._v(" "), _c("td", {\n staticClass: "remove"\n }, [_c("span", {\n staticClass: "flaticon-cancel-music",\n on: {\n click: function ($event) {\n $event.preventDefault();\n return _vm.removeItem(key);\n }\n }\n })])]), _vm._v(" "), item.editQuantity ? _c("tr", {\n staticClass: "update-quantity-wrap"\n }, [_c("td", {\n attrs: {\n colspan: "5"\n }\n }, [_c("span", {\n staticClass: "qty"\n }, [_vm._v(_vm._s(_vm.__("Quantity", "wepos")))]), _vm._v(" "), _c("span", {\n staticClass: "qty-number"\n }, [_c("input", {\n directives: [{\n name: "model",\n rawName: "v-model",\n value: item.quantity,\n expression: "item.quantity"\n }],\n attrs: {\n type: "number",\n min: "1",\n step: "1"\n },\n domProps: {\n value: item.quantity\n },\n on: {\n input: function ($event) {\n if ($event.target.composing) return;\n\n _vm.$set(item, "quantity", $event.target.value);\n }\n }\n })]), _vm._v(" "), _c("span", {\n staticClass: "qty-action"\n }, [_c("a", {\n staticClass: "add",\n attrs: {\n href: "#"\n },\n on: {\n click: function ($event) {\n $event.preventDefault();\n return _vm.addQuantity(item, key);\n }\n }\n }, [_vm._v("+")]), _vm._v(" "), _c("a", {\n staticClass: "minus",\n attrs: {\n href: "#"\n },\n on: {\n click: function ($event) {\n $event.preventDefault();\n return _vm.removeQuantity(item, key);\n }\n }\n }, [_vm._v("-")])])])]) : _vm._e()];\n })] : [_c("tr", {\n staticClass: "no-item"\n }, [_c("td", {\n attrs: {\n colspan: "5"\n }\n }, [_c("img", {\n attrs: {\n src: _vm.wepos.assets_url + "/images/empty-cart.png",\n alt: "",\n width: "120px"\n }\n }), _vm._v(" "), _c("p", [_vm._v(_vm._s(_vm.__("Empty Cart", "wepos")))])])])]], 2)])]), _vm._v(" "), _c("div", {\n staticClass: "cart-calculation"\n }, [_c("form", {\n attrs: {\n autocomplete: "off"\n }\n }, [_c("table", {\n staticClass: "cart-total-table"\n }, [_c("tbody", [_c("tr", {\n staticClass: "cart-meta-data"\n }, [_c("td", {\n staticClass: "label"\n }, [_vm._v("\\n " + _vm._s(_vm.__("Subtotal", "wepos")) + "\\n "), _vm.settings.woo_tax.wc_tax_display_cart == "incl" && _vm.$store.getters["Cart/getTotalLineTax"] > 0 ? _c("span", {\n staticClass: "name"\n }, [_vm._v("\\n " + _vm._s(_vm.__("Including Tax", "wepos")) + "\\n ")]) : _vm._e()]), _vm._v(" "), _c("td", {\n staticClass: "price"\n }, [_vm._v(_vm._s(_vm.formatPrice(_vm.$store.getters["Cart/getSubtotal"])))]), _vm._v(" "), _c("td", {\n staticClass: "action"\n })]), _vm._v(" "), _vm.cartdata.coupon_lines.length > 0 ? _vm._l(_vm.cartdata.coupon_lines, function (fee, key) {\n return _c("tr", {\n staticClass: "cart-meta-data"\n }, [fee.type == "discount" ? [_c("td", {\n staticClass: "label"\n }, [_vm._v(_vm._s(_vm.__("Discount", "wepos")) + " "), _c("span", {\n staticClass: "name"\n }, [_vm._v(_vm._s(_vm.getDiscountAmount(fee)))])]), _vm._v(" "), _c("td", {\n staticClass: "price"\n }, [_vm._v("−" + _vm._s(_vm.formatPrice(Math.abs(fee.total))))]), _vm._v(" "), _c("td", {\n staticClass: "action"\n }, [_c("span", {\n staticClass: "flaticon-cancel-music",\n on: {\n click: function ($event) {\n return _vm.removeCouponLine(key);\n }\n }\n })])] : [_vm.cartdata.coupon_lines[key].isEdit ? [_c("td", {\n staticClass: "label",\n attrs: {\n colspan: "2"\n }\n }, [_c("input", {\n directives: [{\n name: "model",\n rawName: "v-model",\n value: _vm.feeData.name,\n expression: "feeData.name"\n }],\n ref: "fee_name",\n refInFor: true,\n staticClass: "fee-name",\n attrs: {\n type: "text",\n placeholder: _vm.__("Fee Name", "wepos")\n },\n domProps: {\n value: _vm.feeData.name\n },\n on: {\n input: function ($event) {\n if ($event.target.composing) return;\n\n _vm.$set(_vm.feeData, "name", $event.target.value);\n }\n }\n }), _vm._v(" "), _c("input", {\n directives: [{\n name: "model",\n rawName: "v-model",\n value: _vm.feeData.value,\n expression: "feeData.value"\n }],\n ref: "fee_total",\n refInFor: true,\n staticClass: "fee-amount",\n attrs: {\n type: "number",\n min: "0",\n step: "any",\n placeholder: _vm.__("Total", "wepos")\n },\n domProps: {\n value: _vm.feeData.value\n },\n on: {\n input: function ($event) {\n if ($event.target.composing) return;\n\n _vm.$set(_vm.feeData, "value", $event.target.value);\n }\n }\n }), _vm._v(" "), _vm.settings.wepos_general.enable_fee_tax == "yes" ? [_c("label", {\n attrs: {\n for: "fee-tax-status"\n }\n }, [_c("input", {\n directives: [{\n name: "model",\n rawName: "v-model",\n value: _vm.feeData.tax_status,\n expression: "feeData.tax_status"\n }],\n staticClass: "fee-tax-status",\n attrs: {\n type: "checkbox",\n id: "fee-tax-status",\n "true-value": "taxable",\n "false-value": "none"\n },\n domProps: {\n checked: Array.isArray(_vm.feeData.tax_status) ? _vm._i(_vm.feeData.tax_status, null) > -1 : _vm._q(_vm.feeData.tax_status, "taxable")\n },\n on: {\n change: function ($event) {\n var $$a = _vm.feeData.tax_status,\n $$el = $event.target,\n $$c = $$el.checked ? "taxable" : "none";\n\n if (Array.isArray($$a)) {\n var $$v = null,\n $$i = _vm._i($$a, $$v);\n\n if ($$el.checked) {\n $$i < 0 && _vm.$set(_vm.feeData, "tax_status", $$a.concat([$$v]));\n } else {\n $$i > -1 && _vm.$set(_vm.feeData, "tax_status", $$a.slice(0, $$i).concat($$a.slice($$i + 1)));\n }\n } else {\n _vm.$set(_vm.feeData, "tax_status", $$c);\n }\n }\n }\n }), _vm._v(" " + _vm._s(_vm.__("Taxable", "wepos")))]), _vm._v(" "), _vm.feeData.tax_status == "taxable" ? _c("select", {\n directives: [{\n name: "model",\n rawName: "v-model",\n value: _vm.feeData.tax_class,\n expression: "feeData.tax_class"\n }],\n staticClass: "fee-tax-class",\n on: {\n change: function ($event) {\n var $$selectedVal = Array.prototype.filter.call($event.target.options, function (o) {\n return o.selected;\n }).map(function (o) {\n var val = "_value" in o ? o._value : o.value;\n return val;\n });\n\n _vm.$set(_vm.feeData, "tax_class", $event.target.multiple ? $$selectedVal : $$selectedVal[0]);\n }\n }\n }, _vm._l(_vm.availableTax, function (feeTax) {\n return _c("option", {\n domProps: {\n value: feeTax.class == "standard" ? "" : feeTax.class\n }\n }, [_vm._v(_vm._s(_vm.unSanitizeString(feeTax.class)) + " - " + _vm._s(feeTax.percentage_rate))]);\n }), 0) : _vm._e()] : _vm._e(), _vm._v(" "), _c("button", {\n attrs: {\n disabled: _vm.feeData.name == ""\n },\n on: {\n click: function ($event) {\n $event.preventDefault();\n return _vm.saveFee(key);\n }\n }\n }, [_vm._v(_vm._s(_vm.__("Apply", "wepos")))]), _vm._v(" "), _c("button", {\n staticClass: "cancel",\n on: {\n click: function ($event) {\n $event.preventDefault();\n return _vm.cancelEditFee(key);\n }\n }\n }, [_vm._v(_vm._s(_vm.__("Cancel", "wepos")))])], 2), _vm._v(" "), _c("td", {\n staticClass: "action"\n }, [_c("span", {\n staticClass: "flaticon-cancel-music",\n on: {\n click: function ($event) {\n return _vm.removeCouponLine(key);\n }\n }\n })])] : [_c("td", {\n staticClass: "label",\n on: {\n dblclick: function ($event) {\n $event.preventDefault();\n return _vm.editFeeData(key);\n }\n }\n }, [_vm._v(_vm._s(_vm.__("Fee", "wepos")) + " "), _c("span", {\n staticClass: "name"\n }, [_vm._v(_vm._s(fee.name) + " " + _vm._s(_vm.getDiscountAmount(fee)))])]), _vm._v(" "), _c("td", {\n staticClass: "price"\n }, [_vm._v(_vm._s(_vm.formatPrice(Math.abs(fee.total))))]), _vm._v(" "), _c("td", {\n staticClass: "action"\n }, [_c("span", {\n staticClass: "flaticon-cancel-music",\n on: {\n click: function ($event) {\n return _vm.removeCouponLine(key);\n }\n }\n })])]]], 2);\n }) : _vm._e(), _vm._v(" "), _vm.cartdata.fee_lines.length > 0 ? _vm._l(_vm.cartdata.fee_lines, function (fee, key) {\n return _c("tr", {\n staticClass: "cart-meta-data"\n }, [fee.type == "discount" ? [_c("td", {\n staticClass: "label"\n }, [_vm._v(_vm._s(_vm.__("Discount", "wepos")) + " "), _c("span", {\n staticClass: "name"\n }, [_vm._v(_vm._s(_vm.getDiscountAmount(fee)))])]), _vm._v(" "), _c("td", {\n staticClass: "price"\n }, [_vm._v("−" + _vm._s(_vm.formatPrice(Math.abs(fee.total))))]), _vm._v(" "), _c("td", {\n staticClass: "action"\n }, [_c("span", {\n staticClass: "flaticon-cancel-music",\n on: {\n click: function ($event) {\n return _vm.removeFeeLine(key);\n }\n }\n })])] : [_vm.cartdata.fee_lines[key].isEdit ? [_c("td", {\n staticClass: "label",\n attrs: {\n colspan: "2"\n }\n }, [_c("input", {\n directives: [{\n name: "model",\n rawName: "v-model",\n value: _vm.feeData.name,\n expression: "feeData.name"\n }],\n ref: "fee_name",\n refInFor: true,\n staticClass: "fee-name",\n attrs: {\n type: "text",\n placeholder: _vm.__("Fee Name", "wepos")\n },\n domProps: {\n value: _vm.feeData.name\n },\n on: {\n input: function ($event) {\n if ($event.target.composing) return;\n\n _vm.$set(_vm.feeData, "name", $event.target.value);\n }\n }\n }), _vm._v(" "), _c("input", {\n directives: [{\n name: "model",\n rawName: "v-model",\n value: _vm.feeData.value,\n expression: "feeData.value"\n }],\n ref: "fee_total",\n refInFor: true,\n staticClass: "fee-amount",\n attrs: {\n type: "number",\n min: "0",\n step: "any",\n placeholder: _vm.__("Total", "wepos")\n },\n domProps: {\n value: _vm.feeData.value\n },\n on: {\n input: function ($event) {\n if ($event.target.composing) return;\n\n _vm.$set(_vm.feeData, "value", $event.target.value);\n }\n }\n }), _vm._v(" "), _vm.settings.wepos_general.enable_fee_tax == "yes" ? [_c("label", {\n attrs: {\n for: "fee-tax-status"\n }\n }, [_c("input", {\n directives: [{\n name: "model",\n rawName: "v-model",\n value: _vm.feeData.tax_status,\n expression: "feeData.tax_status"\n }],\n staticClass: "fee-tax-status",\n attrs: {\n type: "checkbox",\n id: "fee-tax-status",\n "true-value": "taxable",\n "false-value": "none"\n },\n domProps: {\n checked: Array.isArray(_vm.feeData.tax_status) ? _vm._i(_vm.feeData.tax_status, null) > -1 : _vm._q(_vm.feeData.tax_status, "taxable")\n },\n on: {\n change: function ($event) {\n var $$a = _vm.feeData.tax_status,\n $$el = $event.target,\n $$c = $$el.checked ? "taxable" : "none";\n\n if (Array.isArray($$a)) {\n var $$v = null,\n $$i = _vm._i($$a, $$v);\n\n if ($$el.checked) {\n $$i < 0 && _vm.$set(_vm.feeData, "tax_status", $$a.concat([$$v]));\n } else {\n $$i > -1 && _vm.$set(_vm.feeData, "tax_status", $$a.slice(0, $$i).concat($$a.slice($$i + 1)));\n }\n } else {\n _vm.$set(_vm.feeData, "tax_status", $$c);\n }\n }\n }\n }), _vm._v(" " + _vm._s(_vm.__("Taxable", "wepos")))]), _vm._v(" "), _vm.feeData.tax_status == "taxable" ? _c("select", {\n directives: [{\n name: "model",\n rawName: "v-model",\n value: _vm.feeData.tax_class,\n expression: "feeData.tax_class"\n }],\n staticClass: "fee-tax-class",\n on: {\n change: function ($event) {\n var $$selectedVal = Array.prototype.filter.call($event.target.options, function (o) {\n return o.selected;\n }).map(function (o) {\n var val = "_value" in o ? o._value : o.value;\n return val;\n });\n\n _vm.$set(_vm.feeData, "tax_class", $event.target.multiple ? $$selectedVal : $$selectedVal[0]);\n }\n }\n }, _vm._l(_vm.availableTax, function (feeTax) {\n return _c("option", {\n domProps: {\n value: feeTax.class == "standard" ? "" : feeTax.class\n }\n }, [_vm._v(_vm._s(_vm.unSanitizeString(feeTax.class)) + " - " + _vm._s(feeTax.percentage_rate))]);\n }), 0) : _vm._e()] : _vm._e(), _vm._v(" "), _c("button", {\n attrs: {\n disabled: _vm.feeData.name == ""\n },\n on: {\n click: function ($event) {\n $event.preventDefault();\n return _vm.saveFee(key);\n }\n }\n }, [_vm._v(_vm._s(_vm.__("Apply", "wepos")))]), _vm._v(" "), _c("button", {\n staticClass: "cancel",\n on: {\n click: function ($event) {\n $event.preventDefault();\n return _vm.cancelEditFee(key);\n }\n }\n }, [_vm._v(_vm._s(_vm.__("Cancel", "wepos")))])], 2), _vm._v(" "), _c("td", {\n staticClass: "action"\n }, [_c("span", {\n staticClass: "flaticon-cancel-music",\n on: {\n click: function ($event) {\n return _vm.removeFeeLine(key);\n }\n }\n })])] : [_c("td", {\n staticClass: "label",\n on: {\n dblclick: function ($event) {\n $event.preventDefault();\n return _vm.editFeeData(key);\n }\n }\n }, [_vm._v(_vm._s(_vm.__("Fee", "wepos")) + " "), _c("span", {\n staticClass: "name"\n }, [_vm._v(_vm._s(fee.name) + " " + _vm._s(_vm.getDiscountAmount(fee)))])]), _vm._v(" "), _c("td", {\n staticClass: "price"\n }, [_vm._v(_vm._s(_vm.formatPrice(Math.abs(fee.total))))]), _vm._v(" "), _c("td", {\n staticClass: "action"\n }, [_c("span", {\n staticClass: "flaticon-cancel-music",\n on: {\n click: function ($event) {\n return _vm.removeFeeLine(key);\n }\n }\n })])]]], 2);\n }) : _vm._e(), _vm._v(" "), _vm.$store.getters["Cart/getTotalTax"] ? _c("tr", {\n staticClass: "tax"\n }, [_c("td", {\n staticClass: "label"\n }, [_vm._v(_vm._s(_vm.settings.woo_tax.wc_tax_display_cart === "incl" ? _vm.__("Fee Tax", "wepos") : _vm.__("Tax", "wepos")))]), _vm._v(" "), _c("td", {\n staticClass: "price"\n }, [_vm._v(_vm._s(_vm.formatPrice(_vm.$store.getters["Cart/getTotalTax"])))]), _vm._v(" "), _c("td", {\n staticClass: "action"\n })]) : _vm._e(), _vm._v(" "), _c("tr", {\n staticClass: "cart-action"\n }, [_c("td", {\n attrs: {\n colspan: "3"\n }\n }, [_c("fee-keypad", {\n attrs: {\n name: _vm.__("Discount", "wepos"),\n "short-key": "discount"\n },\n on: {\n inputfee: _vm.setDiscount\n }\n }), _vm._v(" "), _c("fee-keypad", {\n attrs: {\n name: _vm.__("Fee", "wepos"),\n "short-key": "fee"\n },\n on: {\n inputfee: _vm.setFee\n }\n }), _vm._v(" "), _vm.orderdata.customer_note == "" ? _c("customer-note", {\n on: {\n addnote: _vm.addCustomerNote\n }\n }) : _vm._e()], 1)]), _vm._v(" "), _vm.orderdata.customer_note ? _c("tr", {\n staticClass: "note"\n }, [_c("td", {\n staticClass: "note-text",\n attrs: {\n colspan: "2"\n }\n }, [_vm._v("\\n " + _vm._s(_vm.orderdata.customer_note) + "\\n ")]), _vm._v(" "), _c("td", {\n staticClass: "action"\n }, [_c("span", {\n staticClass: "flaticon-cancel-music",\n on: {\n click: function ($event) {\n $event.preventDefault();\n return _vm.removeCustomerNote.apply(null, arguments);\n }\n }\n })])]) : _vm._e(), _vm._v(" "), _c("tr", {\n staticClass: "pay-now",\n on: {\n click: function ($event) {\n return _vm.initPayment();\n }\n }\n }, [_c("td", [_vm._v(_vm._s(_vm.__("Pay Now", "wepos")))]), _vm._v(" "), _c("td", {\n staticClass: "amount"\n }, [_vm._v(_vm._s(_vm.formatPrice(_vm.$store.getters["Cart/getTotal"])))]), _vm._v(" "), _vm._m(0)])], 2)])])])]) : _vm._e()], 2), _vm._v(" "), _vm.showPaymentReceipt ? _c("modal", {\n attrs: {\n width: "600px",\n height: "400px"\n },\n on: {\n close: function ($event) {\n return _vm.createNewSale();\n }\n }\n }, [_c("template", {\n slot: "body"\n }, [_c("div", {\n staticClass: "wepos-payment-receipt"\n }, [_c("div", {\n staticClass: "sale-completed"\n }, [_c("img", {\n attrs: {\n src: _vm.wepos.assets_url + "/images/sale-completed.png",\n alt: "",\n width: "120px"\n }\n }), _vm._v(" "), _c("h2", [_vm._v(_vm._s(_vm.__("Sale Completed", "wepos")))])]), _vm._v(" "), _c("div", {\n staticClass: "print-section"\n }, [_c("print-receipt"), _vm._v(" "), _c("button", {\n staticClass: "new-sale-btn",\n on: {\n click: function ($event) {\n $event.preventDefault();\n return _vm.createNewSale();\n }\n }\n }, [_c("span", {\n staticClass: "icon flaticon-add"\n }), _vm._v(" "), _c("span", {\n staticClass: "label"\n }, [_vm._v(_vm._s(_vm.__("New Sale", "wepos")))])])], 1)])])], 2) : _vm._e(), _vm._v(" "), _vm.showHelp ? _c("modal", {\n attrs: {\n width: "700px",\n height: "500px"\n },\n on: {\n close: function ($event) {\n return _vm.closeHelp();\n }\n }\n }, [_c("template", {\n slot: "body"\n }, [_c("div", {\n staticClass: "wepos-help-wrapper"\n }, [_c("h2", [_vm._v(_vm._s(_vm.__("Shortcut Keys", "wepos")))]), _vm._v(" "), _c("ul", [_c("li", [_c("span", {\n staticClass: "code"\n }, [_c("code", [_vm._v("f1")])]), _vm._v(" "), _c("span", {\n staticClass: "title"\n }, [_vm._v(_vm._s(_vm.__("Search Product", "wepos")))])]), _vm._v(" "), _c("li", [_c("span", {\n staticClass: "code"\n }, [_c("code", [_vm._v("f2")])]), _vm._v(" "), _c("span", {\n staticClass: "title"\n }, [_vm._v(_vm._s(_vm.__("Scan Product", "wepos")))])]), _vm._v(" "), _c("li", [_c("span", {\n staticClass: "code"\n }, [_c("code", [_vm._v("f3")])]), _vm._v(" "), _c("span", {\n staticClass: "title"\n }, [_vm._v(_vm._s(_vm.__("Toggle Product View", "wepos")))])]), _vm._v(" "), _c("li", [_c("span", {\n staticClass: "code"\n }, [_c("code", [_vm._v("f4")])]), _vm._v(" "), _c("span", {\n staticClass: "title"\n }, [_vm._v(_vm._s(_vm.__("Add Fee in cart", "wepos")))])]), _vm._v(" "), _c("li", [_c("span", {\n staticClass: "code"\n }, [_c("code", [_vm._v("f5")])]), _vm._v(" "), _c("span", {\n staticClass: "title"\n }, [_vm._v(_vm._s(_vm.__("Add Discount in cart", "wepos")))])]), _vm._v(" "), _c("li", [_c("span", {\n staticClass: "code"\n }, [_c("code", [_vm._v("f6")])]), _vm._v(" "), _c("span", {\n staticClass: "title"\n }, [_vm._v(_vm._s(_vm.__("Add Customer note", "wepos")))])]), _vm._v(" "), _c("li", [_c("span", {\n staticClass: "code"\n }, [_c("code", [_vm._v("f7")])]), _vm._v(" "), _c("span", {\n staticClass: "title"\n }, [_vm._v(_vm._s(_vm.__("Customer Search", "wepos")))])]), _vm._v(" "), _c("li", [_c("span", {\n staticClass: "code"\n }, [_c("code", [_vm._v("shift+f7")])]), _vm._v(" "), _c("span", {\n staticClass: "title"\n }, [_vm._v(_vm._s(_vm.__("Add new Customer", "wepos")))])]), _vm._v(" "), _c("li", [_c("span", {\n staticClass: "code"\n }, [_c("code", [_vm._v("f8")])]), _vm._v(" "), _c("span", {\n staticClass: "title"\n }, [_vm._v(_vm._s(_vm.__("Create New Sale", "wepos")))])]), _vm._v(" "), _c("li", [_c("span", {\n staticClass: "code"\n }, [_c("code", [_vm._v("shift+f8")])]), _vm._v(" "), _c("span", {\n staticClass: "title"\n }, [_vm._v(_vm._s(_vm.__("Empty your cart", "wepos")))])]), _vm._v(" "), _c("li", [_c("span", {\n staticClass: "code"\n }, [_c("code", [_vm._v("f9")])]), _vm._v(" "), _c("span", {\n staticClass: "title"\n }, [_vm._v(_vm._s(_vm.__("Go to payment receipt", "wepos")))])]), _vm._v(" "), _c("li", [_c("span", {\n staticClass: "code"\n }, [_c("code", [_vm._v("f10")])]), _vm._v(" "), _c("span", {\n staticClass: "title"\n }, [_vm._v(_vm._s(_vm.__("Process Payment", "wepos")))])]), _vm._v(" "), _c("li", [_c("span", {\n staticClass: "code"\n }, [_c("code", [_vm._v("ctrl/cmd+p")])]), _vm._v(" "), _c("span", {\n staticClass: "title"\n }, [_vm._v(_vm._s(_vm.__("Print Receipt", "wepos")))])]), _vm._v(" "), _c("li", [_c("span", {\n staticClass: "code"\n }, [_c("code", [_vm._v("ctrl/cmd+?")])]), _vm._v(" "), _c("span", {\n staticClass: "title"\n }, [_vm._v(_vm._s(_vm.__("Show/Close(Toggle) Help", "wepos")))])]), _vm._v(" "), _c("li", [_c("span", {\n staticClass: "code"\n }, [_c("code", [_vm._v("esc")])]), _vm._v(" "), _c("span", {\n staticClass: "title"\n }, [_vm._v(_vm._s(_vm.__("Close anything", "wepos")))])])])])])], 2) : _vm._e(), _vm._v(" "), _vm.showModal ? _c("modal", {\n attrs: {\n width: "98%",\n height: "95vh"\n },\n on: {\n open: function ($event) {\n return _vm.focusCashInput();\n },\n close: function ($event) {\n return _vm.backToSale();\n },\n enterpressed: function ($event) {\n return _vm.processPayment();\n }\n }\n }, [_c("template", {\n slot: "body"\n }, [_c("div", {\n staticClass: "wepos-checkout-wrapper"\n }, [_c("div", {\n staticClass: "left-content"\n }, [_c("div", {\n staticClass: "header"\n }, [_vm._v("\\n " + _vm._s(_vm.__("Sale Summary", "wepos")) + "\\n ")]), _vm._v(" "), _c("div", {\n staticClass: "content"\n }, [_c("table", {\n staticClass: "sale-summary-cart"\n }, [_c("tbody", _vm._l(_vm.cartdata.line_items, function (item) {\n return _c("tr", [_c("td", {\n staticClass: "name"\n }, [_vm._v("\\n " + _vm._s(item.name) + "\\n "), item.attribute.length > 0 && item.type === "variable" ? _c("div", {\n staticClass: "attribute"\n }, [_c("ul", _vm._l(item.attribute, function (attribute_item) {\n return _c("li", [_c("span", {\n staticClass: "attr_name"\n }, [_vm._v(_vm._s(attribute_item.name))]), _vm._v(": "), _c("span", {\n staticClass: "attr_value"\n }, [_vm._v(_vm._s(attribute_item.option))])]);\n }), 0)]) : _vm._e()]), _vm._v(" "), _c("td", {\n staticClass: "quantity"\n }, [_vm._v(_vm._s(item.quantity))]), _vm._v(" "), _c("td", {\n staticClass: "price"\n }, [item.on_sale ? [_c("span", {\n staticClass: "sale-price"\n }, [_vm._v(_vm._s(_vm.formatPrice(item.quantity * item.sale_price)))]), _vm._v(" "), _c("span", {\n staticClass: "regular-price"\n }, [_vm._v(_vm._s(_vm.formatPrice(item.quantity * item.regular_price)))])] : [_c("span", {\n staticClass: "sale-price"\n }, [_vm._v(_vm._s(_vm.formatPrice(item.quantity * item.regular_price)))])]], 2)]);\n }), 0)])]), _vm._v(" "), _c("div", {\n staticClass: "footer"\n }, [_c("ul", [_c("li", {\n staticClass: "wepos-clearfix"\n }, [_c("span", {\n staticClass: "wepos-left"\n }, [_vm._v("\\n " + _vm._s(_vm.__("Subtotal", "wepos")) + "\\n "), _vm.settings.woo_tax.wc_tax_display_cart == "incl" ? _c("span", {\n staticClass: "metadata"\n }, [_vm._v("\\n " + _vm._s(_vm.__("Including Tax", "wepos")) + "\\n ")]) : _vm._e()]), _vm._v(" "), _c("span", {\n staticClass: "wepos-right"\n }, [_vm._v(_vm._s(_vm.formatPrice(_vm.$store.getters["Cart/getSubtotal"])))])]), _vm._v(" "), _vm.cartdata.coupon_lines.length > 0 ? _vm._l(_vm.cartdata.coupon_lines, function (fee, key) {\n return _c("li", {\n staticClass: "wepos-clearfix"\n }, [fee.type == "discount" ? [_c("span", {\n staticClass: "wepos-left"\n }, [_vm._v(_vm._s(_vm.__("Discount", "wepos")) + " "), _c("span", {\n staticClass: "metadata"\n }, [_vm._v(_vm._s(fee.name) + " " + _vm._s(_vm.getDiscountAmount(fee)))])]), _vm._v(" "), _c("span", {\n staticClass: "wepos-right"\n }, [_vm._v("-" + _vm._s(_vm.formatPrice(Math.abs(fee.total))))])] : [_c("span", {\n staticClass: "wepos-left"\n }, [_vm._v(_vm._s(_vm.__("Fee", "wepos")) + " "), _c("span", {\n staticClass: "metadata"\n }, [_vm._v(_vm._s(fee.name) + " " + _vm._s(_vm.getDiscountAmount(fee)))])]), _vm._v(" "), _c("span", {\n staticClass: "wepos-right"\n }, [_vm._v(_vm._s(_vm.formatPrice(fee.total)))])]], 2);\n }) : _vm._e(), _vm._v(" "), _vm.cartdata.fee_lines.length > 0 ? _vm._l(_vm.cartdata.fee_lines, function (fee, key) {\n return _c("li", {\n staticClass: "wepos-clearfix"\n }, [fee.type == "discount" ? [_c("span", {\n staticClass: "wepos-left"\n }, [_vm._v(_vm._s(_vm.__("Discount", "wepos")) + " "), _c("span", {\n staticClass: "metadata"\n }, [_vm._v(_vm._s(fee.name) + " " + _vm._s(_vm.getDiscountAmount(fee)))])]), _vm._v(" "), _c("span", {\n staticClass: "wepos-right"\n }, [_vm._v("-" + _vm._s(_vm.formatPrice(Math.abs(fee.total))))])] : [_c("span", {\n staticClass: "wepos-left"\n }, [_vm._v(_vm._s(_vm.__("Fee", "wepos")) + " "), _c("span", {\n staticClass: "metadata"\n }, [_vm._v(_vm._s(fee.name) + " " + _vm._s(_vm.getDiscountAmount(fee)))])]), _vm._v(" "), _c("span", {\n staticClass: "wepos-right"\n }, [_vm._v(_vm._s(_vm.formatPrice(fee.total)))])]], 2);\n }) : _vm._e(), _vm._v(" "), _vm.$store.getters["Cart/getTotalTax"] ? _c("li", {\n staticClass: "wepos-clearfix"\n }, [_c("span", {\n staticClass: "wepos-left"\n }, [_vm._v(_vm._s(_vm.__("Tax", "wepos")))]), _vm._v(" "), _c("span", {\n staticClass: "wepos-right"\n }, [_vm._v(_vm._s(_vm.formatPrice(_vm.$store.getters["Cart/getTotalTax"])))])]) : _vm._e(), _vm._v(" "), _c("li", {\n staticClass: "wepos-clearfix"\n }, [_c("span", {\n staticClass: "wepos-left"\n }, [_vm._v(_vm._s(_vm.__("Order Total", "wepos")))]), _vm._v(" "), _c("span", {\n staticClass: "wepos-right"\n }, [_vm._v(_vm._s(_vm.formatPrice(_vm.$store.getters["Cart/getTotal"])))])]), _vm._v(" "), _c("li", {\n staticClass: "wepos-clearfix"\n }, [_c("span", {\n staticClass: "wepos-left"\n }, [_vm._v(_vm._s(_vm.__("Pay", "wepos")))]), _vm._v(" "), _c("span", {\n staticClass: "wepos-right"\n }, [_vm._v(_vm._s(_vm.formatPrice(_vm.$store.getters["Cart/getTotal"])))])])], 2)])]), _vm._v(" "), _c("div", {\n staticClass: "right-content"\n }, [_c("div", {\n staticClass: "header wepos-clearfix"\n }, [_c("h2", {\n staticClass: "wepos-left"\n }, [_vm._v(_vm._s(_vm.__("Pay", "wepos")))]), _vm._v(" "), _c("span", {\n staticClass: "pay-amount wepos-right"\n }, [_vm._v(_vm._s(_vm.formatPrice(_vm.$store.getters["Cart/getTotal"])))])]), _vm._v(" "), _c("div", {\n staticClass: "content"\n }, [_c("div", {\n staticClass: "payment-gateway"\n }, [_vm.availableGateways.length > 0 ? [_vm._l(_vm.availableGateways, function (gateway) {\n return _c("label", [_c("input", {\n directives: [{\n name: "model",\n rawName: "v-model",\n value: _vm.selectedGateway,\n expression: "selectedGateway"\n }],\n attrs: {\n type: "radio",\n name: "gateway",\n checked: ""\n },\n domProps: {\n value: gateway.id,\n checked: _vm._q(_vm.selectedGateway, gateway.id)\n },\n on: {\n change: function ($event) {\n _vm.selectedGateway = gateway.id;\n }\n }\n }), _vm._v(" "), _c("span", {\n staticClass: "gateway",\n class: `gateway-${gateway.id}`\n }, [_vm._v("\\n " + _vm._s(gateway.title) + "\\n ")])]);\n }), _vm._v(" "), _vm.emptyGatewayDiv > 0 ? _vm._l(_vm.emptyGatewayDiv, function (n) {\n return _c("label", {\n key: n\n }, [_c("span", {\n staticClass: "grid-placeholder"\n })]);\n }) : _vm._e()] : [_c("p", [_vm._v(_vm._s(_vm.__("No gateway found", "wepos")))])]], 2), _vm._v(" "), _vm.orderdata.payment_method == "wepos_cash" ? [_c("div", {\n staticClass: "payment-option"\n }, [_c("div", {\n staticClass: "payment-amount"\n }, [_c("div", {\n staticClass: "input-part"\n }, [_c("div", {\n staticClass: "input-wrap"\n }, [_c("p", [_vm._v(_vm._s(_vm.__("Cash", "wepos")))]), _vm._v(" "), _c("div", {\n staticClass: "input-addon"\n }, [_c("span", {\n staticClass: "currency"\n }, [_vm._v(_vm._s(_vm.wepos.currency_format_symbol))]), _vm._v(" "), _c("input", {\n directives: [{\n name: "model",\n rawName: "v-model",\n value: _vm.cashAmount,\n expression: "cashAmount"\n }],\n ref: "cashamount",\n attrs: {\n id: "input-cash-amount",\n type: "text"\n },\n domProps: {\n value: _vm.cashAmount\n },\n on: {\n input: function ($event) {\n if ($event.target.composing) return;\n _vm.cashAmount = $event.target.value;\n }\n }\n })])])]), _vm._v(" "), _c("div", {\n staticClass: "change-money"\n }, [_c("p", [_vm._v(_vm._s(_vm.__("Change money", "wepos")) + ": " + _vm._s(_vm.formatPrice(_vm.changeAmount)))])])])])] : _vm._e(), _vm._v(" "), _vm._l(_vm.availableGatewayContent, function (availableGatewayComponent, key) {\n return _c(availableGatewayComponent, {\n key: key,\n tag: "component",\n attrs: {\n availablegateways: _vm.availableGateways\n }\n });\n })], 2), _vm._v(" "), _c("div", {\n staticClass: "footer wepos-clearfix"\n }, [_c("a", {\n staticClass: "back-btn wepos-left",\n attrs: {\n href: "#"\n },\n on: {\n click: function ($event) {\n $event.preventDefault();\n return _vm.backToSale();\n }\n }\n }, [_vm._v(_vm._s(_vm.__("Back to Sale", "wepos")))]), _vm._v(" "), _c("button", {\n staticClass: "process-checkout-btn wepos-right",\n attrs: {\n disabled: !_vm.$store.getters["Order/getCanProcessPayment"]\n },\n on: {\n click: function ($event) {\n $event.preventDefault();\n return _vm.processPayment.apply(null, arguments);\n }\n }\n }, [_vm._v(_vm._s(_vm.__("Process Payment", "wepos")))])])])])])], 2) : _vm._e(), _vm._v(" "), _c("overlay", {\n attrs: {\n show: _vm.showOverlay\n }\n }), _vm._v(" "), _vm.showReceiptHtml ? _c("print-receipt-html", {\n directives: [{\n name: "show",\n rawName: "v-show",\n value: _vm.createprintreceipt,\n expression: "createprintreceipt"\n }],\n attrs: {\n printdata: _vm.printdata,\n settings: _vm.settings\n }\n }) : _vm._e(), _vm._v(" "), _vm._l(_vm.afterMainContents, function (afterMainContent, key) {\n return _c(afterMainContent, {\n key: key,\n tag: "component",\n attrs: {\n orderdata: _vm.orderdata,\n printdata: _vm.printdata\n }\n });\n })], 2);\n};\n\nvar staticRenderFns = [function () {\n var _vm = this,\n _c = _vm._self._c;\n\n return _c("td", {\n staticClass: "icon"\n }, [_c("span", {\n staticClass: "flaticon-right-arrow"\n })]);\n}];\nrender._withStripped = true;\n\n\n//# sourceURL=webpack://wepos/./assets/src/frontend/components/Home.vue?./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/loaders/templateLoader.js??ruleSet%5B1%5D.rules%5B2%5D!./node_modules/vue-loader/lib/index.js??vue-loader-options')},"./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/loaders/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./assets/src/frontend/components/Keyboard.vue?vue&type=template&id=fbb6d6c8&": /*!*********************************************************************************************************************************************************************************************************************************************************************!*\ !*** ./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/loaders/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./assets/src/frontend/components/Keyboard.vue?vue&type=template&id=fbb6d6c8& ***! \*********************************************************************************************************************************************************************************************************************************************************************/(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";eval('__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ "render": () => (/* binding */ render),\n/* harmony export */ "staticRenderFns": () => (/* binding */ staticRenderFns)\n/* harmony export */ });\nvar render = function render() {\n var _vm = this,\n _c = _vm._self._c;\n\n return _c("aside", {\n staticClass: "vue-keyboard",\n class: {\n full: _vm.full,\n empty: _vm.empty,\n valid: _vm.valid,\n invalid: !_vm.valid\n },\n attrs: {\n role: "application",\n "data-value": _vm.value,\n "data-layout": _vm.layout\n }\n }, _vm._l(_vm.buttons, function (row) {\n return _c("div", {\n staticClass: "vue-keyboard-row",\n attrs: {\n role: "row",\n "data-keys": row.length\n }\n }, _vm._l(row, function (btn) {\n return _c("button", {\n staticClass: "vue-keyboard-key",\n class: btn.type,\n attrs: {\n role: "button",\n "data-args": btn.args,\n "data-text": btn.value,\n "data-action": btn.action.name\n },\n domProps: {\n innerHTML: _vm._s(btn.value)\n },\n on: {\n click: function ($event) {\n $event.preventDefault();\n return btn.action.callable.apply(null, arguments);\n }\n }\n });\n }), 0);\n }), 0);\n};\n\nvar staticRenderFns = [];\nrender._withStripped = true;\n\n\n//# sourceURL=webpack://wepos/./assets/src/frontend/components/Keyboard.vue?./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/loaders/templateLoader.js??ruleSet%5B1%5D.rules%5B2%5D!./node_modules/vue-loader/lib/index.js??vue-loader-options')},"./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/loaders/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./assets/src/frontend/components/Overlay.vue?vue&type=template&id=7b9b24aa&": @@ -76,7 +76,7 @@ \*************************************************************************************************************************************************************************************************************************************************************************/(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";eval('__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ "render": () => (/* binding */ render),\n/* harmony export */ "staticRenderFns": () => (/* binding */ staticRenderFns)\n/* harmony export */ });\nvar render = function render() {\n var _vm = this,\n _c = _vm._self._c;\n\n return _c("div", {\n attrs: {\n id: "wepos-print-receipt"\n }\n }, [_c("button", {\n staticClass: "print-btn",\n on: {\n click: function ($event) {\n $event.preventDefault();\n return _vm.printReceipt();\n }\n }\n }, [_c("span", {\n staticClass: "icon flaticon-printer"\n }), _vm._v(" "), _c("span", {\n staticClass: "label"\n }, [_vm._v(_vm._s(_vm.__("Print Receipt", "wepos")))])])]);\n};\n\nvar staticRenderFns = [];\nrender._withStripped = true;\n\n\n//# sourceURL=webpack://wepos/./assets/src/frontend/components/PrintReceipt.vue?./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/loaders/templateLoader.js??ruleSet%5B1%5D.rules%5B2%5D!./node_modules/vue-loader/lib/index.js??vue-loader-options')},"./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/loaders/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./assets/src/frontend/components/PrintReceiptHtml.vue?vue&type=template&id=2db58d4b&": /*!*****************************************************************************************************************************************************************************************************************************************************************************!*\ !*** ./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/loaders/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./assets/src/frontend/components/PrintReceiptHtml.vue?vue&type=template&id=2db58d4b& ***! - \*****************************************************************************************************************************************************************************************************************************************************************************/(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";eval('__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ "render": () => (/* binding */ render),\n/* harmony export */ "staticRenderFns": () => (/* binding */ staticRenderFns)\n/* harmony export */ });\nvar render = function render() {\n var _vm = this,\n _c = _vm._self._c;\n\n return _vm.settings.wepos_receipts ? _c("div", {\n staticClass: "wepos-checkout-print-wrapper"\n }, [_c("div", {\n staticClass: "header",\n domProps: {\n innerHTML: _vm._s(_vm.settings.wepos_receipts.receipt_header)\n }\n }), _vm._v(" "), _c("div", {\n staticClass: "order-info"\n }, [_c("span", {\n staticClass: "wepos-left"\n }, [_c("strong", [_vm._v(_vm._s(_vm.__("Order ID", "wepos")) + ": #" + _vm._s(_vm.printdata.order_id))])]), _vm._v(" "), _c("span", {\n staticClass: "wepos-right"\n }, [_c("strong", [_vm._v(_vm._s(_vm.__("Order Date", "wepos")) + ": " + _vm._s(_vm.formatDate(_vm.printdata.order_date)))])]), _vm._v(" "), _c("div", {\n staticClass: "wepos-clearfix"\n })]), _vm._v(" "), _c("div", {\n staticClass: "content"\n }, [_c("table", {\n staticClass: "sale-summary"\n }, [_c("tbody", [_vm._l(_vm.printdata.line_items, function (item) {\n return _c("tr", [_c("td", {\n staticClass: "name"\n }, [_vm._v("\\n " + _vm._s(item.name) + "\\n "), item.attribute.length > 0 ? _c("div", {\n staticClass: "attribute"\n }, [_c("ul", _vm._l(item.attribute, function (attribute_item) {\n return _c("li", [_c("span", {\n staticClass: "attr_name"\n }, [_vm._v(_vm._s(attribute_item.name))]), _vm._v(": "), _c("span", {\n staticClass: "attr_value"\n }, [_vm._v(_vm._s(attribute_item.option))])]);\n }), 0)]) : _vm._e()]), _vm._v(" "), _c("td", {\n staticClass: "quantity"\n }, [_vm._v(_vm._s(item.quantity))]), _vm._v(" "), _c("td", {\n staticClass: "price"\n }, [item.on_sale ? [_c("span", {\n staticClass: "regular-price"\n }, [_vm._v(_vm._s(_vm.formatPrice(item.quantity * item.regular_price)))]), _vm._v(" "), _c("span", {\n staticClass: "sale-price"\n }, [_vm._v(_vm._s(_vm.formatPrice(item.quantity * item.sale_price)))])] : [_c("span", {\n staticClass: "sale-price"\n }, [_vm._v(_vm._s(_vm.formatPrice(item.quantity * item.regular_price)))])]], 2)]);\n }), _vm._v(" "), _c("tr", {\n staticClass: "cart-meta-data"\n }, [_c("td", {\n staticClass: "name",\n attrs: {\n colspan: "2"\n }\n }, [_vm._v("\\n " + _vm._s(_vm.__("Subtotal", "wepos")) + "\\n "), _vm.settings.woo_tax.wc_tax_display_cart == "incl" ? _c("span", {\n staticClass: "metadata"\n }, [_vm._v("\\n " + _vm._s(_vm.__("Includes Tax", "wepos")) + " " + _vm._s(_vm.formatPrice(_vm.$store.getters["Cart/getTotalLineTax"])) + "\\n ")]) : _vm._e()]), _vm._v(" "), _c("td", {\n staticClass: "price"\n }, [_vm._v(_vm._s(_vm.formatPrice(_vm.printdata.subtotal)))])]), _vm._v(" "), _vm._l(_vm.printdata.fee_lines, function (fee, key) {\n return _c("tr", {\n staticClass: "cart-meta-data"\n }, [fee.type == "discount" ? [_c("td", {\n staticClass: "name",\n attrs: {\n colspan: "2"\n }\n }, [_vm._v(_vm._s(_vm.__("Discount", "wepos")) + " "), _c("span", {\n staticClass: "metadata"\n }, [_vm._v(_vm._s(fee.discount_type == "percent" ? fee.value + "%" : _vm.formatPrice(fee.value)))])]), _vm._v(" "), _c("td", {\n staticClass: "price"\n }, [_vm._v("-" + _vm._s(_vm.formatPrice(Math.abs(fee.total))))])] : [_c("td", {\n staticClass: "name",\n attrs: {\n colspan: "2"\n }\n }, [_vm._v(_vm._s(_vm.__("Fee", "wepos")) + " "), _c("span", {\n staticClass: "metadata"\n }, [_vm._v(_vm._s(fee.name) + " " + _vm._s(fee.fee_type == "percent" ? fee.value + "%" : _vm.formatPrice(fee.value)))])]), _vm._v(" "), _c("td", {\n staticClass: "price"\n }, [_vm._v("-" + _vm._s(_vm.formatPrice(Math.abs(fee.total))))])]], 2);\n }), _vm._v(" "), _vm.printdata.taxtotal ? _c("tr", [_c("td", {\n staticClass: "name",\n attrs: {\n colspan: "2"\n }\n }, [_vm._v(_vm._s(_vm.__("Tax", "wepos")))]), _vm._v(" "), _c("td", {\n staticClass: "price"\n }, [_vm._v(_vm._s(_vm.formatPrice(_vm.printdata.taxtotal)))])]) : _vm._e(), _vm._v(" "), _c("tr", [_c("td", {\n staticClass: "name",\n attrs: {\n colspan: "2"\n }\n }, [_vm._v(_vm._s(_vm.__("Order Total", "wepos")))]), _vm._v(" "), _c("td", {\n staticClass: "price"\n }, [_vm._v(_vm._s(_vm.formatPrice(_vm.printdata.ordertotal)))])]), _vm._v(" "), _vm._m(0), _vm._v(" "), _c("tr", [_c("td", {\n attrs: {\n colspan: "2"\n }\n }, [_vm._v(_vm._s(_vm.__("Payment method", "wepos")))]), _vm._v(" "), _c("td", {\n staticClass: "price"\n }, [_vm._v(_vm._s(_vm.printdata.gateway.title || ""))])]), _vm._v(" "), (_vm.printdata.gateway.id = "wepos_cash") ? [_c("tr", [_c("td", {\n attrs: {\n colspan: "2"\n }\n }, [_vm._v(_vm._s(_vm.__("Cash Given", "wepos")))]), _vm._v(" "), _c("td", {\n staticClass: "price"\n }, [_vm._v(_vm._s(_vm.formatPrice(_vm.printdata.cashamount)))])]), _vm._v(" "), _c("tr", [_c("td", {\n attrs: {\n colspan: "2"\n }\n }, [_vm._v(_vm._s(_vm.__("Change Money", "wepos")))]), _vm._v(" "), _c("td", {\n staticClass: "price"\n }, [_vm._v(_vm._s(_vm.formatPrice(_vm.printdata.changeamount)))])])] : _vm._e()], 2)])]), _vm._v(" "), _c("div", {\n staticClass: "footer",\n domProps: {\n innerHTML: _vm._s(_vm.settings.wepos_receipts.receipt_footer)\n }\n })]) : _vm._e();\n};\n\nvar staticRenderFns = [function () {\n var _vm = this,\n _c = _vm._self._c;\n\n return _c("tr", {\n staticClass: "divider"\n }, [_c("td", {\n attrs: {\n colspan: "3"\n }\n })]);\n}];\nrender._withStripped = true;\n\n\n//# sourceURL=webpack://wepos/./assets/src/frontend/components/PrintReceiptHtml.vue?./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/loaders/templateLoader.js??ruleSet%5B1%5D.rules%5B2%5D!./node_modules/vue-loader/lib/index.js??vue-loader-options')},"./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/loaders/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./assets/src/frontend/components/ProductSearch.vue?vue&type=template&id=64fc4f12&": + \*****************************************************************************************************************************************************************************************************************************************************************************/(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";eval('__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ "render": () => (/* binding */ render),\n/* harmony export */ "staticRenderFns": () => (/* binding */ staticRenderFns)\n/* harmony export */ });\nvar render = function render() {\n var _vm = this,\n _c = _vm._self._c;\n\n return _vm.settings.wepos_receipts ? _c("div", {\n staticClass: "wepos-checkout-print-wrapper"\n }, [_c("div", {\n staticClass: "header",\n domProps: {\n innerHTML: _vm._s(_vm.settings.wepos_receipts.receipt_header)\n }\n }), _vm._v(" "), _c("div", {\n staticClass: "order-info"\n }, [_c("span", {\n staticClass: "wepos-left"\n }, [_c("strong", [_vm._v(_vm._s(_vm.__("Order ID", "wepos")) + ": #" + _vm._s(_vm.printdata.order_id))])]), _vm._v(" "), _c("span", {\n staticClass: "wepos-right"\n }, [_c("strong", [_vm._v(_vm._s(_vm.__("Order Date", "wepos")) + ": " + _vm._s(_vm.formatDate(_vm.printdata.order_date)))])]), _vm._v(" "), _c("div", {\n staticClass: "wepos-clearfix"\n })]), _vm._v(" "), _c("div", {\n staticClass: "content"\n }, [_c("table", {\n staticClass: "sale-summary"\n }, [_c("tbody", [_vm._l(_vm.printdata.line_items, function (item) {\n return _c("tr", [_c("td", {\n staticClass: "name"\n }, [_vm._v("\\n " + _vm._s(item.name) + "\\n "), _vm.settings.woo_tax.wc_tax_display_cart === "incl" ? _c("span", {\n staticClass: "tax-info"\n }, [_vm._v(_vm._s(_vm.__("Tax includes", "wepos")) + ": " + _vm._s(_vm.formatPrice(item.total_tax)))]) : _vm._e(), _vm._v(" "), item.attribute.length > 0 ? _c("div", {\n staticClass: "attribute"\n }, [_c("ul", _vm._l(item.attribute, function (attribute_item) {\n return _c("li", [_c("span", {\n staticClass: "attr_name"\n }, [_vm._v(_vm._s(attribute_item.name))]), _vm._v(": "), _c("span", {\n staticClass: "attr_value"\n }, [_vm._v(_vm._s(attribute_item.option))])]);\n }), 0)]) : _vm._e()]), _vm._v(" "), _c("td", {\n staticClass: "quantity"\n }, [_vm._v(_vm._s(item.quantity))]), _vm._v(" "), _c("td", {\n staticClass: "price"\n }, [item.on_sale ? [_c("span", {\n staticClass: "regular-price"\n }, [_vm._v(_vm._s(_vm.formatPrice(item.quantity * item.regular_price)))]), _vm._v(" "), _c("span", {\n staticClass: "sale-price"\n }, [_vm._v(_vm._s(_vm.formatPrice(item.quantity * item.sale_price)))])] : [_c("span", {\n staticClass: "sale-price"\n }, [_vm._v(_vm._s(_vm.formatPrice(item.quantity * item.regular_price)))])]], 2)]);\n }), _vm._v(" "), _c("tr", {\n staticClass: "cart-meta-data"\n }, [_c("td", {\n staticClass: "name",\n attrs: {\n colspan: "2"\n }\n }, [_vm._v("\\n " + _vm._s(_vm.__("Subtotal", "wepos")) + "\\n "), _vm.settings.woo_tax.wc_tax_display_cart == "incl" ? _c("span", {\n staticClass: "metadata"\n }, [_vm._v("\\n " + _vm._s(_vm.__("Including Tax", "wepos")) + "\\n ")]) : _vm._e()]), _vm._v(" "), _c("td", {\n staticClass: "price"\n }, [_vm._v(_vm._s(_vm.formatPrice(_vm.printdata.subtotal)))])]), _vm._v(" "), _vm._l(_vm.printdata.coupon_lines, function (fee, key) {\n return _c("tr", {\n staticClass: "cart-meta-data"\n }, [_c("td", {\n staticClass: "name",\n attrs: {\n colspan: "2"\n }\n }, [_vm._v(_vm._s(_vm.__("Discount", "wepos")) + " "), _c("span", {\n staticClass: "metadata"\n }, [_vm._v(_vm._s(fee.discount_type == "percent" ? fee.value + "%" : _vm.formatPrice(fee.value)))])]), _vm._v(" "), _c("td", {\n staticClass: "price"\n }, [_vm._v("-" + _vm._s(_vm.formatPrice(Math.abs(fee.total))))])]);\n }), _vm._v(" "), _vm._l(_vm.printdata.fee_lines, function (fee, key) {\n return _c("tr", {\n staticClass: "cart-meta-data"\n }, [_c("td", {\n staticClass: "name",\n attrs: {\n colspan: "2"\n }\n }, [_vm._v(_vm._s(_vm.__("Fee", "wepos")) + " "), _c("span", {\n staticClass: "metadata"\n }, [_vm._v(_vm._s(fee.fee_type == "percent" ? fee.value + "%" : _vm.formatPrice(fee.value)))])]), _vm._v(" "), _c("td", {\n staticClass: "price"\n }, [_vm._v(_vm._s(_vm.formatPrice(Math.abs(fee.total))))])]);\n }), _vm._v(" "), _vm.printdata.taxtotal ? _c("tr", [_c("td", {\n staticClass: "name",\n attrs: {\n colspan: "2"\n }\n }, [_vm._v(_vm._s(_vm.settings.woo_tax.wc_tax_display_cart === "incl" && _vm.settings.wepos_general.enable_fee_tax === "yes" ? _vm.__("Fee Tax", "wepos") : _vm.__("Tax", "wepos")))]), _vm._v(" "), _c("td", {\n staticClass: "price"\n }, [_vm._v(_vm._s(_vm.formatPrice(_vm.printdata.taxtotal)))])]) : _vm._e(), _vm._v(" "), _c("tr", [_c("td", {\n staticClass: "name",\n attrs: {\n colspan: "2"\n }\n }, [_vm._v(_vm._s(_vm.__("Order Total", "wepos")))]), _vm._v(" "), _c("td", {\n staticClass: "price"\n }, [_vm._v(_vm._s(_vm.formatPrice(_vm.printdata.ordertotal)))])]), _vm._v(" "), _vm._m(0), _vm._v(" "), _c("tr", [_c("td", {\n attrs: {\n colspan: "2"\n }\n }, [_vm._v(_vm._s(_vm.__("Payment method", "wepos")))]), _vm._v(" "), _c("td", {\n staticClass: "price"\n }, [_vm._v(_vm._s(_vm.printdata.gateway.title || ""))])]), _vm._v(" "), (_vm.printdata.gateway.id = "wepos_cash") ? [_c("tr", [_c("td", {\n attrs: {\n colspan: "2"\n }\n }, [_vm._v(_vm._s(_vm.__("Cash Given", "wepos")))]), _vm._v(" "), _c("td", {\n staticClass: "price"\n }, [_vm._v(_vm._s(_vm.formatPrice(_vm.printdata.cashamount)))])]), _vm._v(" "), _c("tr", [_c("td", {\n attrs: {\n colspan: "2"\n }\n }, [_vm._v(_vm._s(_vm.__("Change Money", "wepos")))]), _vm._v(" "), _c("td", {\n staticClass: "price"\n }, [_vm._v(_vm._s(_vm.formatPrice(_vm.printdata.changeamount)))])])] : _vm._e()], 2)])]), _vm._v(" "), _c("div", {\n staticClass: "footer",\n domProps: {\n innerHTML: _vm._s(_vm.settings.wepos_receipts.receipt_footer)\n }\n })]) : _vm._e();\n};\n\nvar staticRenderFns = [function () {\n var _vm = this,\n _c = _vm._self._c;\n\n return _c("tr", {\n staticClass: "divider"\n }, [_c("td", {\n attrs: {\n colspan: "3"\n }\n })]);\n}];\nrender._withStripped = true;\n\n\n//# sourceURL=webpack://wepos/./assets/src/frontend/components/PrintReceiptHtml.vue?./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/loaders/templateLoader.js??ruleSet%5B1%5D.rules%5B2%5D!./node_modules/vue-loader/lib/index.js??vue-loader-options')},"./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/loaders/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./assets/src/frontend/components/ProductSearch.vue?vue&type=template&id=64fc4f12&": /*!**************************************************************************************************************************************************************************************************************************************************************************!*\ !*** ./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/loaders/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./assets/src/frontend/components/ProductSearch.vue?vue&type=template&id=64fc4f12& ***! \**************************************************************************************************************************************************************************************************************************************************************************/(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";eval('__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ "render": () => (/* binding */ render),\n/* harmony export */ "staticRenderFns": () => (/* binding */ staticRenderFns)\n/* harmony export */ });\nvar render = function render() {\n var _vm = this,\n _c = _vm._self._c;\n\n return _c("div", {\n directives: [{\n name: "click-outside",\n rawName: "v-click-outside",\n value: _vm.outside,\n expression: "outside"\n }],\n staticClass: "search-box"\n }, [_c("form", {\n attrs: {\n action: "",\n autocomplete: "off"\n },\n on: {\n submit: function ($event) {\n $event.preventDefault();\n return _vm.handleProductScan.apply(null, arguments);\n }\n }\n }, [_c("input", {\n directives: [{\n name: "model",\n rawName: "v-model",\n value: _vm.serachInput,\n expression: "serachInput"\n }],\n ref: "productSearch",\n attrs: {\n type: "text",\n name: "search",\n id: "product-search",\n placeholder: _vm.placeholder\n },\n domProps: {\n value: _vm.serachInput\n },\n on: {\n focus: function ($event) {\n $event.preventDefault();\n return _vm.triggerFocus.apply(null, arguments);\n },\n keyup: function ($event) {\n $event.preventDefault();\n return _vm.searchProduct.apply(null, arguments);\n },\n input: function ($event) {\n if ($event.target.composing) return;\n _vm.serachInput = $event.target.value;\n }\n }\n }), _vm._v(" "), _vm.mode == "product" ? _c("span", {\n staticClass: "search-icon flaticon-musica-searcher"\n }) : _vm._e(), _vm._v(" "), _vm.mode == "scan" ? _c("span", {\n staticClass: "search-icon flaticon-supermarket-scanner"\n }) : _vm._e(), _vm._v(" "), _c("div", {\n directives: [{\n name: "hotkey",\n rawName: "v-hotkey",\n value: _vm.hotkeys,\n expression: "hotkeys"\n }],\n staticClass: "search-type"\n }, [_c("a", {\n class: {\n active: _vm.mode == "product"\n },\n attrs: {\n href: "#"\n },\n on: {\n click: function ($event) {\n $event.preventDefault();\n return _vm.changeMode("product");\n }\n }\n }, [_vm._v(_vm._s(_vm.__("Product", "wepos")))]), _vm._v(" "), _c("a", {\n class: {\n active: _vm.mode == "scan"\n },\n attrs: {\n href: "#"\n },\n on: {\n click: function ($event) {\n $event.preventDefault();\n return _vm.changeMode("scan");\n }\n }\n }, [_vm._v(_vm._s(_vm.__("Scan", "wepos")))])]), _vm._v(" "), _c("div", {\n directives: [{\n name: "show",\n rawName: "v-show",\n value: _vm.showResults && _vm.mode == "product",\n expression: "showResults && mode==\'product\'"\n }],\n staticClass: "search-result"\n }, [_vm.searchableProduct.length ? _c("div", [_c("keyboard-control", {\n attrs: {\n listLength: _vm.searchableProduct.length\n },\n on: {\n "key-down": _vm.onKeyDown,\n "key-up": _vm.onKeyUp\n },\n scopedSlots: _vm._u([{\n key: "default",\n fn: function (_ref) {\n let {\n selectedIndex\n } = _ref;\n return _vm._l(_vm.searchableProduct, function (product, index) {\n return _c("li", {\n key: index,\n staticClass: "product-search-item",\n class: {\n selected: index === selectedIndex\n }\n }, [product.type == "simple" ? [_c("a", {\n staticClass: "wepos-clearfix",\n attrs: {\n href: "#"\n },\n on: {\n click: function ($event) {\n return _vm.addToCartAction(product);\n }\n }\n }, [_vm._v(_vm._s(product.name) + "\\n "), _c("span", {\n staticClass: "price"\n }, [_vm._v(_vm._s(_vm.formatPrice(product.price)))]), _vm._v(" "), product.sku ? _c("span", {\n staticClass: "sku"\n }, [_vm._v(_vm._s(product.sku))]) : _vm._e(), _vm._v(" "), _c("span", {\n staticClass: "action flaticon-enter-arrow wepos-right"\n })])] : _vm._e(), _vm._v(" "), product.type == "variable" ? [_c("a", {\n attrs: {\n href: "#"\n },\n on: {\n click: function ($event) {\n $event.preventDefault();\n return _vm.selectVariation(product);\n }\n }\n }, [_vm._v(_vm._s(product.name) + "\\n "), _c("span", {\n staticClass: "price"\n }, [_vm._v(_vm._s(_vm.formatPrice(product.price)))]), _vm._v(" "), product.sku ? _c("span", {\n staticClass: "sku"\n }, [_vm._v(_vm._s(product.sku))]) : _vm._e(), _vm._v(" "), _c("span", {\n staticClass: "action flaticon-enter-arrow wepos-right"\n })])] : _vm._e()], 2);\n });\n }\n }], null, false, 2881840290)\n })], 1) : _c("div", {\n staticClass: "no-data-found"\n }, [_vm._v("\\n " + _vm._s(_vm.__("No product found", "wepos")) + "\\n ")]), _vm._v(" "), _c("div", {\n staticClass: "suggession"\n }, [_c("span", {\n staticClass: "term"\n }, [_c("span", {\n staticClass: "flaticon-swap"\n }), _vm._v(" " + _vm._s(_vm.__("to navigate", "wepos")) + "\\n ")]), _vm._v(" "), _c("span", {\n staticClass: "term"\n }, [_c("span", {\n staticClass: "flaticon-enter-arrow"\n }), _vm._v(" " + _vm._s(_vm.__("to select", "wepos")) + "\\n ")]), _vm._v(" "), _c("span", {\n staticClass: "term"\n }, [_c("strong", [_vm._v("esc")]), _vm._v(" " + _vm._s(_vm.__("to dismiss", "wepos")) + "\\n ")])])])]), _vm._v(" "), _vm.showVariationModal ? _c("modal", {\n attrs: {\n title: _vm.__("Select Variations", "wepos"),\n width: "500px",\n height: "auto",\n footer: true,\n header: true\n },\n on: {\n close: function ($event) {\n _vm.showVariationModal = false;\n }\n }\n }, [_c("template", {\n slot: "body"\n }, _vm._l(_vm.selectedVariationProduct.attributes, function (attribute) {\n return _c("div", {\n staticClass: "variation-attribute-wrapper"\n }, [_c("div", {\n staticClass: "attribute"\n }, [_c("p", [_vm._v(_vm._s(attribute.name))]), _vm._v(" "), _c("div", {\n staticClass: "options"\n }, [_vm._l(attribute.options, function (option) {\n return [_c("label", [_c("input", {\n directives: [{\n name: "model",\n rawName: "v-model",\n value: _vm.chosenAttribute[attribute.name],\n expression: "chosenAttribute[attribute.name]"\n }],\n attrs: {\n type: "radio"\n },\n domProps: {\n value: option,\n checked: _vm._q(_vm.chosenAttribute[attribute.name], option)\n },\n on: {\n change: function ($event) {\n return _vm.$set(_vm.chosenAttribute, attribute.name, option);\n }\n }\n }), _vm._v(" "), _c("div", {\n staticClass: "box"\n }, [_vm._v("\\n " + _vm._s(option) + "\\n ")])])];\n })], 2)])]);\n }), 0), _vm._v(" "), _c("template", {\n slot: "footer"\n }, [_c("button", {\n staticClass: "add-variation-btn",\n attrs: {\n disabled: _vm.attributeDisabled\n },\n on: {\n click: function ($event) {\n return _vm.addVariationProduct();\n }\n }\n }, [_vm._v(_vm._s(_vm.__("Add Product", "wepos")))])])], 2) : _vm._e()], 1);\n};\n\nvar staticRenderFns = [];\nrender._withStripped = true;\n\n\n//# sourceURL=webpack://wepos/./assets/src/frontend/components/ProductSearch.vue?./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/loaders/templateLoader.js??ruleSet%5B1%5D.rules%5B2%5D!./node_modules/vue-loader/lib/index.js??vue-loader-options')},"./node_modules/element-in-view/dist/element-in-view.common.js": diff --git a/assets/js/frontend.min.js b/assets/js/frontend.min.js index 6c02ef88..386c2e87 100644 --- a/assets/js/frontend.min.js +++ b/assets/js/frontend.min.js @@ -1 +1 @@ -(()=>{var t={4577:t=>{"use strict";t.exports=function(t,e){void 0===e&&(e={});var a=e.offset;void 0===a&&(a=0);var s=e.threshold;void 0===s&&(s=0);var o=t.getBoundingClientRect(),r=o.top,i=o.right,n=o.bottom,c=o.left,l=o.width,u=o.height,d=n,p=window.innerWidth-c,_=window.innerHeight-r,m=i,h=s*l,v=s*u;return d>=(a.top||a+v)&&p>=(a.right||a+h)&&_>=(a.bottom||a+v)&&m>=(a.left||a+h)}},9623:t=>{t.exports=function(t,e){var a,s,o,r,i=0;return function(){a=this,s=arguments;var t=new Date-i;return r||(t>=e?n():r=setTimeout(n,e-t)),o};function n(){r=0,i=+new Date,o=t.apply(a,s),a=null,s=null}}},671:t=>{t.exports=function(t){var e={};function a(s){if(e[s])return e[s].exports;var o=e[s]={i:s,l:!1,exports:{}};return t[s].call(o.exports,o,o.exports,a),o.l=!0,o.exports}return a.m=t,a.c=e,a.d=function(t,e,s){a.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:s})},a.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},a.t=function(t,e){if(1&e&&(t=a(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var s=Object.create(null);if(a.r(s),Object.defineProperty(s,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)a.d(s,o,function(e){return t[e]}.bind(null,o));return s},a.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return a.d(e,"a",e),e},a.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},a.p="",a(a.s="fb15")}({f6fd:function(t,e){!function(t){var e="currentScript",a=t.getElementsByTagName("script");e in t||Object.defineProperty(t,e,{get:function(){try{throw new Error}catch(s){var t,e=(/.*at [^\(]*\((.*):.+:.+\)$/gi.exec(s.stack)||[!1])[1];for(t in a)if(a[t].src==e||"interactive"==a[t].readyState)return a[t];return null}}})}(document)},fb15:function(t,e,a){"use strict";var s;(a.r(e),"undefined"!=typeof window)&&(a("f6fd"),(s=window.document.currentScript)&&(s=s.src.match(/(.+\/)[^/]+\.js(\?.*)?$/))&&(a.p=s[1]));function o(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);e&&(s=s.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),a.push.apply(a,s)}return a}function r(t,e,a){return e in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}var i=function(t){for(var e=1;e":190,"?":191,"~":192,"{":219,"|":220,"}":221,'"':222},{a:65,b:66,c:67,d:68,e:69,f:70,g:71,h:72,i:73,j:74,k:75,l:76,m:77,n:78,o:79,p:80,q:81,r:82,s:83,t:84,u:85,v:86,w:87,x:88,y:89,z:90},{},{"numpad*":106,"numpad+":43,numpadadd:43,"numpad-":109,"numpad.":110,"numpad/":111,numlock:144,numpad0:96,numpad1:97,numpad2:98,numpad3:99,numpad4:100,numpad5:101,numpad6:102,numpad7:103,numpad8:104,numpad9:105},{},{f1:112,f2:113,f3:114,f4:115,f5:116,f6:117,f7:118,f8:119,f9:120,f10:121,f11:122,f12:123},{},{windows:91,"⇧":16,"⌥":18,"⌃":17,"⌘":91,ctl:17,control:17,option:18,pause:19,break:19,caps:20,return:13,escape:27,spc:32,pgup:33,pgdn:34,ins:45,del:46,cmd:91});function n(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if(!(Symbol.iterator in Object(t))&&"[object Arguments]"!==Object.prototype.toString.call(t))return;var a=[],s=!0,o=!1,r=void 0;try{for(var i,n=t[Symbol.iterator]();!(s=(i=n.next()).done)&&(a.push(i.value),!e||a.length!==e);s=!0);}catch(t){o=!0,r=t}finally{try{s||null==n.return||n.return()}finally{if(o)throw r}}return a}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var c=["INPUT","TEXTAREA","SELECT"],l=function(t,e,a){var s=t.find((function(t){var s,o,r=t.code,i=t.modifiers;return r===e&&(s=a,o=i,Object.entries(s).every((function(t){var e=n(t,2),a=e[0],s=e[1];return o[a]===s})))}));return!!s&&s.callback};function u(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);e&&(s=s.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),a.push.apply(a,s)}return a}function d(t){for(var e=1;e1)return t.reduce((function(t,a){return a=h[a]||a,m.hasOwnProperty("".concat(a,"Key"))?t.modifiers=d({},t.modifiers,p({},"".concat(a,"Key"),!0)):t.code=e[a]||f(a),t}),{modifiers:a});var s=h[t[0]]||t[0];return m.hasOwnProperty("".concat(s,"Key"))&&(a=d({},a,p({},"".concat(s,"Key"),!0))),{modifiers:a,code:e[s]||f(s)}},f=function(t){return i[t.toLowerCase()]||function(t){return 1===t.length?t.charCodeAt(0):void 0}(t)};function y(t,e,a){var s=e.value,o=e.modifiers;t._keyMap=function(t,e){var a=[];return Object.keys(t).forEach((function(s){var o=t[s],r=o.keyup,i={keydown:o.keydown||(r?_:t[s]),keyup:r||_},n=function(t){return(t=(t=(t=t.replace(/\s/g,"")).includes("numpad+")?t.replace("numpad+","numpadadd"):t).includes("++")?t.replace("++","+="):t).split(/\+{1}/)}(s),c=v(n,e),l=c.code,u=c.modifiers;a.push({code:l,modifiers:u,callback:i})})),a}(s,a),t._keyHandler=function(e){return function(t,e,a){var s=t.keyCode,o={ctrlKey:t.ctrlKey,altKey:t.altKey,shiftKey:t.shiftKey,metaKey:t.metaKey};a.prevent&&t.preventDefault(),a.stop&&t.stopPropagation();var r=document.activeElement,i=r.nodeName;if(!r.isContentEditable&&!c.includes(i)){var n=l(e,s,o);if(!n)return t;t.preventDefault(),n[t.type](t)}}(e,t._keyMap,o)},document.addEventListener("keydown",t._keyHandler),document.addEventListener("keyup",t._keyHandler)}function g(t){document.removeEventListener("keydown",t._keyHandler),document.removeEventListener("keyup",t._keyHandler)}var w=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{bind:function(e,a){y(e,a,t)},componentUpdated:function(e,a){a.value!==a.oldValue&&(g(e),y(e,a,t))},unbind:g}},C={install:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t.directive("hotkey",w(e))},directive:w()},b=C;e.default=b}})},2377:(t,e,a)=>{"use strict";function s(t){return t&&"object"==typeof t&&"default"in t?t.default:t}var o=s(a(9623)),r=s(a(4577)),i=["scroll","resize"],n={name:"mugen-scroll",props:{handler:{type:Function,required:!0},shouldHandle:{type:Boolean,default:!0},threshold:{type:Number,default:0},handleOnMount:{type:Boolean,default:!0},scrollContainer:{type:String}},mounted:function(){this.checkInView()},methods:{checkInView:function(){var t=this,e=function(){if(t.$refs.scroll){var e=r(t.$refs.scroll,{threshold:t.threshold});t.shouldHandle&&e&&t.handler()}};if(this.handleOnMount&&e(),this.scrollContainer){for(var a=this;(a=a.$parent)&&!this._scrollContainer;)t._scrollContainer=a.$refs[t.scrollContainer];this._scrollContainer&&this._scrollContainer.$el&&(this._scrollContainer=this._scrollContainer.$el)}this._scrollContainer=this._scrollContainer||window,this.check=o(e,200),i.forEach((function(e){return t._scrollContainer.addEventListener(e,t.check)}))}},render:function(t){return t("div",{staticClass:"mugen-scroll",ref:"scroll"},this.$slots.default)},beforeDestroy:function(){var t=this;i.forEach((function(e){return t._scrollContainer.removeEventListener(e,t.check)}))}};"undefined"!=typeof window&&window.Vue&&window.Vue.component(n.name,n),t.exports=n}},e={};function a(s){var o=e[s];if(void 0!==o)return o.exports;var r=e[s]={exports:{}};return t[s](r,r.exports,a),r.exports}a.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return a.d(e,{a:e}),e},a.d=(t,e)=>{for(var s in e)a.o(e,s)&&!a.o(t,s)&&Object.defineProperty(t,s,{enumerable:!0,get:e[s]})},a.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),(()=>{"use strict";var t=function(){var t=this._self._c;return t("div",{attrs:{id:"vue-frontend-app"}},[t("router-view")],1)};t._withStripped=!0;function e(t,e,a,s,o,r,i,n){var c,l="function"==typeof t?t.options:t;if(e&&(l.render=e,l.staticRenderFns=a,l._compiled=!0),s&&(l.functional=!0),r&&(l._scopeId="data-v-"+r),i?(c=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),o&&o.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(i)},l._ssrRegister=c):o&&(c=n?function(){o.call(this,(l.functional?this.parent:this).$root.$options.shadowRoot)}:o),c)if(l.functional){l._injectStyles=c;var u=l.render;l.render=function(t,e){return c.call(e),u(t,e)}}else{var d=l.beforeCreate;l.beforeCreate=d?[].concat(d,c):[c]}return{exports:t,options:l}}const s=e({name:"App"},t,[],!1,null,null,null).exports;var o=function(){var t=this,e=t._self._c;return e("div",{directives:[{name:"hotkey",rawName:"v-hotkey",value:t.hotkeys,expression:"hotkeys"}],attrs:{id:"wepos-main"}},[e("div",{staticClass:"content-product"},[e("div",{staticClass:"top-panel wepos-clearfix"},[e("div",{staticClass:"search-bar"},[e("product-search",{attrs:{products:t.products,settings:t.settings},on:{onProductAdded:t.addToCart}})],1),t._v(" "),e("div",{staticClass:"category"},[e("multiselect",{staticClass:"wepos-multiselect",attrs:{options:t.categories,selectLabel:"",deselectLabel:"",selectedLabel:"",placeholder:t.__("Select a category","wepos")},on:{select:t.handleCategorySelect,remove:t.handleCategoryRemove},scopedSlots:t._u([{key:"singleLabel",fn:function(e){return[t._v("\n "+t._s(e.option.name)+"\n ")]}},{key:"option",fn:function(a){return[e("span",[t._l(a.option.level,(function(e){return[t._v("\n  \n ")]})),t._v("\n "+t._s(a.option.name)+"\n ")],2)]}}]),model:{value:t.selectedCategory,callback:function(e){t.selectedCategory=e},expression:"selectedCategory"}},[t._v(" "),t._v(" "),e("template",{slot:"noResult"},[e("div",{staticClass:"no-data-found"},[t._v(t._s(t.__("Not found","wepos")))])])],2)],1),t._v(" "),e("div",{staticClass:"toggle-view"},[e("div",{staticClass:"product-toggle"},[e("span",{staticClass:"toggle-icon list-view flaticon-menu-button-of-three-horizontal-lines",class:{active:"list"==t.productView},on:{click:function(e){t.productView="list"}}}),t._v(" "),e("span",{staticClass:"toggle-icon grid-view flaticon-menu",class:{active:"grid"==t.productView},on:{click:function(e){t.productView="grid"}}})])])]),t._v(" "),t.getBreadCrums.length>0?e("div",{staticClass:"breadcrumb"},[e("ul",[t._l(t.getBreadCrums,(function(a){return[e("router-link",{attrs:{tag:"li",to:{name:"Home",query:{category:a.id}}}},[e("a",[t._v(t._s(a.name))])])]}))],2),t._v(" "),e("span",{staticClass:"close-breadcrumb flaticon-cancel-music",on:{click:function(e){return e.preventDefault(),t.removeBreadcrums.apply(null,arguments)}}})]):t._e(),t._v(" "),e("div",{ref:"items-wrapper",staticClass:"items-wrapper",class:t.productView},[t.productLoading?t._e():[t._l(t.getFilteredProduct,(function(a){return t.getFilteredProduct.length>0?e("div",{staticClass:"item"},["simple"===a.type?[e("div",{staticClass:"item-wrap",class:{disabled:!t.hasStock(a)},on:{click:function(e){return e.preventDefault(),t.addToCart(a)}}},[e("div",{staticClass:"img"},[e("img",{attrs:{src:t.getProductImage(a),alt:t.getProductImageName(a)}})]),t._v(" "),"grid"===t.productView?e("div",{staticClass:"title"},[t._v("\n "+t._s(t.truncateTitle(a.name,20))+"\n ")]):e("div",{staticClass:"title"},[e("div",{staticClass:"product-name"},[t._v(t._s(a.name))]),t._v(" "),e("ul",{staticClass:"meta"},[a.sku?e("li",[e("span",{staticClass:"label"},[t._v(t._s(t.__("Sku :","wepos")))]),t._v(" "),e("span",{staticClass:"value"},[t._v(t._s(a.sku))])]):t._e(),t._v(" "),e("li",[e("span",{staticClass:"label"},[t._v(t._s(t.__("Price :","wepos")))]),t._v(" "),e("span",{staticClass:"value",domProps:{innerHTML:t._s(a.price_html)}})])])]),t._v(" "),e("span",{staticClass:"add-product-icon flaticon-add",class:t.productView})])]:t._e(),t._v(" "),"variable"===a.type?[e("v-popover",{attrs:{offset:"10","popover-base-class":"product-variation tooltip popover",placement:"left-end"}},[e("div",{staticClass:"item-wrap",on:{click:function(e){return t.selectVariationProduct(a)}}},[e("div",{staticClass:"img"},[e("img",{attrs:{src:t.getProductImage(a),alt:t.getProductImageName(a)}})]),t._v(" "),"grid"===t.productView?e("div",{staticClass:"title"},[t._v("\n "+t._s(t.truncateTitle(a.name,20))+"\n ")]):e("div",{staticClass:"title"},[e("div",{staticClass:"product-name"},[t._v(t._s(a.name))]),t._v(" "),e("ul",{staticClass:"meta"},[e("li",[e("span",{staticClass:"label"},[t._v(t._s(t.__("Price :","wepos")))]),t._v(" "),e("span",{staticClass:"value",domProps:{innerHTML:t._s(a.price_html)}})])])]),t._v(" "),e("span",{staticClass:"add-product-icon flaticon-add",class:t.productView})]),t._v(" "),e("template",{slot:"popover"},[e("div",{staticClass:"variation-header"},[t._v("\n "+t._s(t.__("Select Variations","wepos"))+"\n ")]),t._v(" "),e("div",{staticClass:"variation-body"},[t._l(a.attributes,(function(a){return[e("div",{staticClass:"attribute"},[e("p",[t._v(t._s(a.name))]),t._v(" "),e("div",{staticClass:"options"},[t._l(a.options,(function(s){return[e("label",[e("input",{directives:[{name:"model",rawName:"v-model",value:t.selectedAttribute[a.name],expression:"selectedAttribute[attribute.name]"}],attrs:{type:"radio"},domProps:{value:s,checked:t._q(t.selectedAttribute[a.name],s)},on:{change:function(e){return t.$set(t.selectedAttribute,a.name,s)}}}),t._v(" "),e("div",{staticClass:"box"},[t._v("\n "+t._s(s)+"\n ")])])]}))],2)])]}))],2),t._v(" "),e("div",{staticClass:"variation-footer"},[e("button",{attrs:{disabled:t.attributeDisabled},on:{click:function(e){return e.preventDefault(),t.addVariationProduct.apply(null,arguments)}}},[t._v(t._s(t.__("Add Product","wepos")))])])])],2)]:t._e()],2):t._e()})),t._v(" "),t.getFilteredProduct.length<=0?e("div",{staticClass:"no-product-found"},[e("img",{attrs:{src:t.wepos.assets_url+"/images/no-product.png",alt:"",width:"120px"}}),t._v(" "),e("p",[t._v(t._s(t.__("No Product Found","wepos")))])]):t._e()],t._v(" "),t.productLoading?e("div",{staticClass:"product-loading"},[e("div",{staticClass:"spinner spinner-loading"})]):t._e()],2)]),t._v(" "),e("div",{staticClass:"content-cart"},[e("div",{staticClass:"top-panel"},[e("customer-search",{on:{onCustomerSelected:t.selectCustomer}}),t._v(" "),e("div",{staticClass:"action"},[e("div",{staticClass:"more-options"},[e("v-popover",{attrs:{offset:"5","popover-base-class":"wepos-dropdown-menu tooltip popover",placement:"bottom-end",open:t.showQucikMenu}},[e("button",{staticClass:"wepos-button",on:{click:function(e){return e.preventDefault(),t.openQucikMenu()}}},[e("span",{staticClass:"more-icon flaticon-more"})]),t._v(" "),e("template",{slot:"popover"},[e("ul",[t._l(t.quickLinkListStart,(function(t,a){return e(t,{key:a-"1",tag:"component"})})),t._v(" "),e("li",[e("a",{attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.emptyCart.apply(null,arguments)}}},[e("span",{staticClass:"flaticon-empty-cart quick-menu-icon"}),t._v(t._s(t.__("Empty Cart","wepos")))])]),t._v(" "),e("li",[e("a",{attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.openHelp.apply(null,arguments)}}},[e("span",{staticClass:"flaticon-information quick-menu-icon"}),t._v(t._s(t.__("Help","wepos")))])]),t._v(" "),e("li",{staticClass:"divider"}),t._v(" "),t._l(t.quickLinkList,(function(t,a){return e(t,{key:a,tag:"component"})})),t._v(" "),e("li",[e("a",{attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.logout.apply(null,arguments)}}},[e("span",{staticClass:"flaticon-logout quick-menu-icon"}),t._v(t._s(t.__("Logout","wepos")))])])],2)])],2)],1)])],1),t._v(" "),t._l(t.beforCartPanels,(function(t,a){return e(t,{key:a,tag:"component"})})),t._v(" "),t.settings.wepos_general?e("div",{staticClass:"cart-panel"},[e("div",{staticClass:"cart-content"},[e("table",{staticClass:"cart-table"},[e("thead",[e("tr",[e("th",{attrs:{width:"65%"}},[t._v(t._s(t.__("Product","wepos")))]),t._v(" "),e("th",{attrs:{width:"15%"}},[t._v(t._s(t.__("Qty","wepos")))]),t._v(" "),e("th",{attrs:{width:"30%"}},[t._v(t._s(t.__("Price","wepos")))]),t._v(" "),e("th"),t._v(" "),e("th")])]),t._v(" "),e("tbody",[t.cartdata.line_items.length>0?[t._l(t.cartdata.line_items,(function(a,s){return[e("tr",[e("td",{staticClass:"name",on:{click:function(e){return t.toggleEditQuantity(a,s)}}},[t._v("\n "+t._s(a.name)+"\n "),a.attribute.length>0&&"variable"===a.type?e("div",{staticClass:"attribute"},[e("ul",t._l(a.attribute,(function(a){return e("li",[e("span",{staticClass:"attr_name"},[t._v(t._s(a.name))]),t._v(": "),e("span",{staticClass:"attr_value"},[t._v(t._s(a.option))])])})),0)]):t._e()]),t._v(" "),e("td",{staticClass:"qty",on:{click:function(e){return t.toggleEditQuantity(a,s)}}},[t._v(t._s(a.quantity))]),t._v(" "),e("td",{staticClass:"price",on:{click:function(e){return t.toggleEditQuantity(a,s)}}},[a.on_sale?[e("span",{staticClass:"sale-price"},[t._v(t._s(t.formatPrice(a.quantity*a.sale_price)))]),t._v(" "),e("span",{staticClass:"regular-price"},[t._v(t._s(t.formatPrice(a.quantity*a.regular_price)))])]:[e("span",{staticClass:"sale-price"},[t._v(t._s(t.formatPrice(a.quantity*a.regular_price)))])]],2),t._v(" "),e("td",{staticClass:"action"},[e("span",{staticClass:"flaticon-right-arrow",class:{open:a.editQuantity},on:{click:function(e){return e.preventDefault(),t.toggleEditQuantity(a,s)}}})]),t._v(" "),e("td",{staticClass:"remove"},[e("span",{staticClass:"flaticon-cancel-music",on:{click:function(e){return e.preventDefault(),t.removeItem(s)}}})])]),t._v(" "),a.editQuantity?e("tr",{staticClass:"update-quantity-wrap"},[e("td",{attrs:{colspan:"5"}},[e("span",{staticClass:"qty"},[t._v(t._s(t.__("Quantity","wepos")))]),t._v(" "),e("span",{staticClass:"qty-number"},[e("input",{directives:[{name:"model",rawName:"v-model",value:a.quantity,expression:"item.quantity"}],attrs:{type:"number",min:"1",step:"1"},domProps:{value:a.quantity},on:{input:function(e){e.target.composing||t.$set(a,"quantity",e.target.value)}}})]),t._v(" "),e("span",{staticClass:"qty-action"},[e("a",{staticClass:"add",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.addQuantity(a,s)}}},[t._v("+")]),t._v(" "),e("a",{staticClass:"minus",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.removeQuantity(a,s)}}},[t._v("-")])])])]):t._e()]}))]:[e("tr",{staticClass:"no-item"},[e("td",{attrs:{colspan:"5"}},[e("img",{attrs:{src:t.wepos.assets_url+"/images/empty-cart.png",alt:"",width:"120px"}}),t._v(" "),e("p",[t._v(t._s(t.__("Empty Cart","wepos")))])])])]],2)])]),t._v(" "),e("div",{staticClass:"cart-calculation"},[e("form",{attrs:{autocomplete:"off"}},[e("table",{staticClass:"cart-total-table"},[e("tbody",[e("tr",{staticClass:"cart-meta-data"},[e("td",{staticClass:"label"},[t._v("\n "+t._s(t.__("Subtotal","wepos"))+"\n "),"incl"==t.settings.woo_tax.wc_tax_display_cart&&t.$store.getters["Cart/getTotalLineTax"]>0?e("span",{staticClass:"name"},[t._v("\n "+t._s(t.__("Includes Tax","wepos"))+" "+t._s(t.formatPrice(t.$store.getters["Cart/getTotalLineTax"]))+"\n ")]):t._e()]),t._v(" "),e("td",{staticClass:"price"},[t._v(t._s(t.formatPrice(t.$store.getters["Cart/getSubtotal"])))]),t._v(" "),e("td",{staticClass:"action"})]),t._v(" "),t.cartdata.fee_lines.length>0?t._l(t.cartdata.fee_lines,(function(a,s){return e("tr",{staticClass:"cart-meta-data"},["discount"==a.type?[e("td",{staticClass:"label"},[t._v(t._s(t.__("Discount","wepos"))+" "),e("span",{staticClass:"name"},[t._v(t._s(t.getDiscountAmount(a)))])]),t._v(" "),e("td",{staticClass:"price"},[t._v("−"+t._s(t.formatPrice(Math.abs(a.total))))]),t._v(" "),e("td",{staticClass:"action"},[e("span",{staticClass:"flaticon-cancel-music",on:{click:function(e){return t.removeFeeLine(s)}}})])]:[t.cartdata.fee_lines[s].isEdit?[e("td",{staticClass:"label",attrs:{colspan:"2"}},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.feeData.name,expression:"feeData.name"}],ref:"fee_name",refInFor:!0,staticClass:"fee-name",attrs:{type:"text",placeholder:t.__("Fee Name","wepos")},domProps:{value:t.feeData.name},on:{input:function(e){e.target.composing||t.$set(t.feeData,"name",e.target.value)}}}),t._v(" "),e("input",{directives:[{name:"model",rawName:"v-model",value:t.feeData.value,expression:"feeData.value"}],ref:"fee_total",refInFor:!0,staticClass:"fee-amount",attrs:{type:"number",min:"0",step:"any",placeholder:t.__("Total","wepos")},domProps:{value:t.feeData.value},on:{input:function(e){e.target.composing||t.$set(t.feeData,"value",e.target.value)}}}),t._v(" "),"yes"==t.settings.wepos_general.enable_fee_tax?[e("label",{attrs:{for:"fee-tax-status"}},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.feeData.tax_status,expression:"feeData.tax_status"}],staticClass:"fee-tax-status",attrs:{type:"checkbox",id:"fee-tax-status","true-value":"taxable","false-value":"none"},domProps:{checked:Array.isArray(t.feeData.tax_status)?t._i(t.feeData.tax_status,null)>-1:t._q(t.feeData.tax_status,"taxable")},on:{change:function(e){var a=t.feeData.tax_status,s=e.target,o=s.checked?"taxable":"none";if(Array.isArray(a)){var r=t._i(a,null);s.checked?r<0&&t.$set(t.feeData,"tax_status",a.concat([null])):r>-1&&t.$set(t.feeData,"tax_status",a.slice(0,r).concat(a.slice(r+1)))}else t.$set(t.feeData,"tax_status",o)}}}),t._v(" "+t._s(t.__("Taxable","wepos")))]),t._v(" "),"taxable"==t.feeData.tax_status?e("select",{directives:[{name:"model",rawName:"v-model",value:t.feeData.tax_class,expression:"feeData.tax_class"}],staticClass:"fee-tax-class",on:{change:function(e){var a=Array.prototype.filter.call(e.target.options,(function(t){return t.selected})).map((function(t){return"_value"in t?t._value:t.value}));t.$set(t.feeData,"tax_class",e.target.multiple?a:a[0])}}},t._l(t.availableTax,(function(a){return e("option",{domProps:{value:"standard"==a.class?"":a.class}},[t._v(t._s(t.unSanitizeString(a.class))+" - "+t._s(a.percentage_rate))])})),0):t._e()]:t._e(),t._v(" "),e("button",{attrs:{disabled:""==t.feeData.name},on:{click:function(e){return e.preventDefault(),t.saveFee(s)}}},[t._v(t._s(t.__("Apply","wepos")))]),t._v(" "),e("button",{staticClass:"cancel",on:{click:function(e){return e.preventDefault(),t.cancelEditFee(s)}}},[t._v(t._s(t.__("Cancel","wepos")))])],2),t._v(" "),e("td",{staticClass:"action"},[e("span",{staticClass:"flaticon-cancel-music",on:{click:function(e){return t.removeFeeLine(s)}}})])]:[e("td",{staticClass:"label",on:{dblclick:function(e){return e.preventDefault(),t.editFeeData(s)}}},[t._v(t._s(t.__("Fee","wepos"))+" "),e("span",{staticClass:"name"},[t._v(t._s(a.name)+" "+t._s(t.getDiscountAmount(a)))])]),t._v(" "),e("td",{staticClass:"price"},[t._v(t._s(t.formatPrice(Math.abs(a.total))))]),t._v(" "),e("td",{staticClass:"action"},[e("span",{staticClass:"flaticon-cancel-music",on:{click:function(e){return t.removeFeeLine(s)}}})])]]],2)})):t._e(),t._v(" "),t.$store.getters["Cart/getTotalTax"]?e("tr",{staticClass:"tax"},[e("td",{staticClass:"label"},[t._v(t._s(t.__("Tax","wepos")))]),t._v(" "),e("td",{staticClass:"price"},[t._v(t._s(t.formatPrice(t.$store.getters["Cart/getTotalTax"])))]),t._v(" "),e("td",{staticClass:"action"})]):t._e(),t._v(" "),e("tr",{staticClass:"cart-action"},[e("td",{attrs:{colspan:"3"}},[e("fee-keypad",{attrs:{name:t.__("Discount","wepos"),"short-key":"discount"},on:{inputfee:t.setDiscount}}),t._v(" "),e("fee-keypad",{attrs:{name:t.__("Fee","wepos"),"short-key":"fee"},on:{inputfee:t.setFee}}),t._v(" "),""==t.orderdata.customer_note?e("customer-note",{on:{addnote:t.addCustomerNote}}):t._e()],1)]),t._v(" "),t.orderdata.customer_note?e("tr",{staticClass:"note"},[e("td",{staticClass:"note-text",attrs:{colspan:"2"}},[t._v("\n "+t._s(t.orderdata.customer_note)+"\n ")]),t._v(" "),e("td",{staticClass:"action"},[e("span",{staticClass:"flaticon-cancel-music",on:{click:function(e){return e.preventDefault(),t.removeCustomerNote.apply(null,arguments)}}})])]):t._e(),t._v(" "),e("tr",{staticClass:"pay-now",on:{click:function(e){return t.initPayment()}}},[e("td",[t._v(t._s(t.__("Pay Now","wepos")))]),t._v(" "),e("td",{staticClass:"amount"},[t._v(t._s(t.formatPrice(t.$store.getters["Cart/getTotal"])))]),t._v(" "),t._m(0)])],2)])])])]):t._e()],2),t._v(" "),t.showPaymentReceipt?e("modal",{attrs:{width:"600px",height:"400px"},on:{close:function(e){return t.createNewSale()}}},[e("template",{slot:"body"},[e("div",{staticClass:"wepos-payment-receipt"},[e("div",{staticClass:"sale-completed"},[e("img",{attrs:{src:t.wepos.assets_url+"/images/sale-completed.png",alt:"",width:"120px"}}),t._v(" "),e("h2",[t._v(t._s(t.__("Sale Completed","wepos")))])]),t._v(" "),e("div",{staticClass:"print-section"},[e("print-receipt"),t._v(" "),e("button",{staticClass:"new-sale-btn",on:{click:function(e){return e.preventDefault(),t.createNewSale()}}},[e("span",{staticClass:"icon flaticon-add"}),t._v(" "),e("span",{staticClass:"label"},[t._v(t._s(t.__("New Sale","wepos")))])])],1)])])],2):t._e(),t._v(" "),t.showHelp?e("modal",{attrs:{width:"700px",height:"500px"},on:{close:function(e){return t.closeHelp()}}},[e("template",{slot:"body"},[e("div",{staticClass:"wepos-help-wrapper"},[e("h2",[t._v(t._s(t.__("Shortcut Keys","wepos")))]),t._v(" "),e("ul",[e("li",[e("span",{staticClass:"code"},[e("code",[t._v("f1")])]),t._v(" "),e("span",{staticClass:"title"},[t._v(t._s(t.__("Search Product","wepos")))])]),t._v(" "),e("li",[e("span",{staticClass:"code"},[e("code",[t._v("f2")])]),t._v(" "),e("span",{staticClass:"title"},[t._v(t._s(t.__("Scan Product","wepos")))])]),t._v(" "),e("li",[e("span",{staticClass:"code"},[e("code",[t._v("f3")])]),t._v(" "),e("span",{staticClass:"title"},[t._v(t._s(t.__("Toggle Product View","wepos")))])]),t._v(" "),e("li",[e("span",{staticClass:"code"},[e("code",[t._v("f4")])]),t._v(" "),e("span",{staticClass:"title"},[t._v(t._s(t.__("Add Fee in cart","wepos")))])]),t._v(" "),e("li",[e("span",{staticClass:"code"},[e("code",[t._v("f5")])]),t._v(" "),e("span",{staticClass:"title"},[t._v(t._s(t.__("Add Discount in cart","wepos")))])]),t._v(" "),e("li",[e("span",{staticClass:"code"},[e("code",[t._v("f6")])]),t._v(" "),e("span",{staticClass:"title"},[t._v(t._s(t.__("Add Customer note","wepos")))])]),t._v(" "),e("li",[e("span",{staticClass:"code"},[e("code",[t._v("f7")])]),t._v(" "),e("span",{staticClass:"title"},[t._v(t._s(t.__("Customer Search","wepos")))])]),t._v(" "),e("li",[e("span",{staticClass:"code"},[e("code",[t._v("shift+f7")])]),t._v(" "),e("span",{staticClass:"title"},[t._v(t._s(t.__("Add new Customer","wepos")))])]),t._v(" "),e("li",[e("span",{staticClass:"code"},[e("code",[t._v("f8")])]),t._v(" "),e("span",{staticClass:"title"},[t._v(t._s(t.__("Create New Sale","wepos")))])]),t._v(" "),e("li",[e("span",{staticClass:"code"},[e("code",[t._v("shift+f8")])]),t._v(" "),e("span",{staticClass:"title"},[t._v(t._s(t.__("Empty your cart","wepos")))])]),t._v(" "),e("li",[e("span",{staticClass:"code"},[e("code",[t._v("f9")])]),t._v(" "),e("span",{staticClass:"title"},[t._v(t._s(t.__("Go to payment receipt","wepos")))])]),t._v(" "),e("li",[e("span",{staticClass:"code"},[e("code",[t._v("f10")])]),t._v(" "),e("span",{staticClass:"title"},[t._v(t._s(t.__("Process Payment","wepos")))])]),t._v(" "),e("li",[e("span",{staticClass:"code"},[e("code",[t._v("ctrl/cmd+p")])]),t._v(" "),e("span",{staticClass:"title"},[t._v(t._s(t.__("Print Receipt","wepos")))])]),t._v(" "),e("li",[e("span",{staticClass:"code"},[e("code",[t._v("ctrl/cmd+?")])]),t._v(" "),e("span",{staticClass:"title"},[t._v(t._s(t.__("Show/Close(Toggle) Help","wepos")))])]),t._v(" "),e("li",[e("span",{staticClass:"code"},[e("code",[t._v("esc")])]),t._v(" "),e("span",{staticClass:"title"},[t._v(t._s(t.__("Close anything","wepos")))])])])])])],2):t._e(),t._v(" "),t.showModal?e("modal",{attrs:{width:"98%",height:"95vh"},on:{open:function(e){return t.focusCashInput()},close:function(e){return t.backToSale()},enterpressed:function(e){return t.processPayment()}}},[e("template",{slot:"body"},[e("div",{staticClass:"wepos-checkout-wrapper"},[e("div",{staticClass:"left-content"},[e("div",{staticClass:"header"},[t._v("\n "+t._s(t.__("Sale Summary","wepos"))+"\n ")]),t._v(" "),e("div",{staticClass:"content"},[e("table",{staticClass:"sale-summary-cart"},[e("tbody",t._l(t.cartdata.line_items,(function(a){return e("tr",[e("td",{staticClass:"name"},[t._v("\n "+t._s(a.name)+"\n "),a.attribute.length>0&&"variable"===a.type?e("div",{staticClass:"attribute"},[e("ul",t._l(a.attribute,(function(a){return e("li",[e("span",{staticClass:"attr_name"},[t._v(t._s(a.name))]),t._v(": "),e("span",{staticClass:"attr_value"},[t._v(t._s(a.option))])])})),0)]):t._e()]),t._v(" "),e("td",{staticClass:"quantity"},[t._v(t._s(a.quantity))]),t._v(" "),e("td",{staticClass:"price"},[a.on_sale?[e("span",{staticClass:"sale-price"},[t._v(t._s(t.formatPrice(a.quantity*a.sale_price)))]),t._v(" "),e("span",{staticClass:"regular-price"},[t._v(t._s(t.formatPrice(a.quantity*a.regular_price)))])]:[e("span",{staticClass:"sale-price"},[t._v(t._s(t.formatPrice(a.quantity*a.regular_price)))])]],2)])})),0)])]),t._v(" "),e("div",{staticClass:"footer"},[e("ul",[e("li",{staticClass:"wepos-clearfix"},[e("span",{staticClass:"wepos-left"},[t._v("\n "+t._s(t.__("Subtotal","wepos"))+"\n "),"incl"==t.settings.woo_tax.wc_tax_display_cart?e("span",{staticClass:"metadata"},[t._v("\n "+t._s(t.__("Includes Tax","wepos"))+" "+t._s(t.formatPrice(t.$store.getters["Cart/getTotalLineTax"]))+"\n ")]):t._e()]),t._v(" "),e("span",{staticClass:"wepos-right"},[t._v(t._s(t.formatPrice(t.$store.getters["Cart/getSubtotal"])))])]),t._v(" "),t.cartdata.fee_lines.length>0?t._l(t.cartdata.fee_lines,(function(a,s){return e("li",{staticClass:"wepos-clearfix"},["discount"==a.type?[e("span",{staticClass:"wepos-left"},[t._v(t._s(t.__("Discount","wepos"))+" "),e("span",{staticClass:"metadata"},[t._v(t._s(a.name)+" "+t._s(t.getDiscountAmount(a)))])]),t._v(" "),e("span",{staticClass:"wepos-right"},[t._v("-"+t._s(t.formatPrice(Math.abs(a.total))))])]:[e("span",{staticClass:"wepos-left"},[t._v(t._s(t.__("Fee","wepos"))+" "),e("span",{staticClass:"metadata"},[t._v(t._s(a.name)+" "+t._s(t.getDiscountAmount(a)))])]),t._v(" "),e("span",{staticClass:"wepos-right"},[t._v(t._s(t.formatPrice(a.total)))])]],2)})):t._e(),t._v(" "),t.$store.getters["Cart/getTotalTax"]?e("li",{staticClass:"wepos-clearfix"},[e("span",{staticClass:"wepos-left"},[t._v(t._s(t.__("Tax","wepos")))]),t._v(" "),e("span",{staticClass:"wepos-right"},[t._v(t._s(t.formatPrice(t.$store.getters["Cart/getTotalTax"])))])]):t._e(),t._v(" "),e("li",{staticClass:"wepos-clearfix"},[e("span",{staticClass:"wepos-left"},[t._v(t._s(t.__("Order Total","wepos")))]),t._v(" "),e("span",{staticClass:"wepos-right"},[t._v(t._s(t.formatPrice(t.$store.getters["Cart/getTotal"])))])]),t._v(" "),e("li",{staticClass:"wepos-clearfix"},[e("span",{staticClass:"wepos-left"},[t._v(t._s(t.__("Pay","wepos")))]),t._v(" "),e("span",{staticClass:"wepos-right"},[t._v(t._s(t.formatPrice(t.$store.getters["Cart/getTotal"])))])])],2)])]),t._v(" "),e("div",{staticClass:"right-content"},[e("div",{staticClass:"header wepos-clearfix"},[e("h2",{staticClass:"wepos-left"},[t._v(t._s(t.__("Pay","wepos")))]),t._v(" "),e("span",{staticClass:"pay-amount wepos-right"},[t._v(t._s(t.formatPrice(t.$store.getters["Cart/getTotal"])))])]),t._v(" "),e("div",{staticClass:"content"},[e("div",{staticClass:"payment-gateway"},[t.availableGateways.length>0?[t._l(t.availableGateways,(function(a){return e("label",[e("input",{directives:[{name:"model",rawName:"v-model",value:t.selectedGateway,expression:"selectedGateway"}],attrs:{type:"radio",name:"gateway",checked:""},domProps:{value:a.id,checked:t._q(t.selectedGateway,a.id)},on:{change:function(e){t.selectedGateway=a.id}}}),t._v(" "),e("span",{staticClass:"gateway",class:`gateway-${a.id}`},[t._v("\n "+t._s(a.title)+"\n ")])])})),t._v(" "),t.emptyGatewayDiv>0?t._l(t.emptyGatewayDiv,(function(t){return e("label",{key:t},[e("span",{staticClass:"grid-placeholder"})])})):t._e()]:[e("p",[t._v(t._s(t.__("No gateway found","wepos")))])]],2),t._v(" "),"wepos_cash"==t.orderdata.payment_method?[e("div",{staticClass:"payment-option"},[e("div",{staticClass:"payment-amount"},[e("div",{staticClass:"input-part"},[e("div",{staticClass:"input-wrap"},[e("p",[t._v(t._s(t.__("Cash","wepos")))]),t._v(" "),e("div",{staticClass:"input-addon"},[e("span",{staticClass:"currency"},[t._v(t._s(t.wepos.currency_format_symbol))]),t._v(" "),e("input",{directives:[{name:"model",rawName:"v-model",value:t.cashAmount,expression:"cashAmount"}],ref:"cashamount",attrs:{id:"input-cash-amount",type:"text"},domProps:{value:t.cashAmount},on:{input:function(e){e.target.composing||(t.cashAmount=e.target.value)}}})])])]),t._v(" "),e("div",{staticClass:"change-money"},[e("p",[t._v(t._s(t.__("Change money","wepos"))+": "+t._s(t.formatPrice(t.changeAmount)))])])])])]:t._e(),t._v(" "),t._l(t.availableGatewayContent,(function(a,s){return e(a,{key:s,tag:"component",attrs:{availablegateways:t.availableGateways}})}))],2),t._v(" "),e("div",{staticClass:"footer wepos-clearfix"},[e("a",{staticClass:"back-btn wepos-left",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.backToSale()}}},[t._v(t._s(t.__("Back to Sale","wepos")))]),t._v(" "),e("button",{staticClass:"process-checkout-btn wepos-right",attrs:{disabled:!t.$store.getters["Order/getCanProcessPayment"]},on:{click:function(e){return e.preventDefault(),t.processPayment.apply(null,arguments)}}},[t._v(t._s(t.__("Process Payment","wepos")))])])])])])],2):t._e(),t._v(" "),e("overlay",{attrs:{show:t.showOverlay}}),t._v(" "),t.showReceiptHtml?e("print-receipt-html",{directives:[{name:"show",rawName:"v-show",value:t.createprintreceipt,expression:"createprintreceipt"}],attrs:{printdata:t.printdata,settings:t.settings}}):t._e(),t._v(" "),t._l(t.afterMainContents,(function(a,s){return e(a,{key:s,tag:"component",attrs:{orderdata:t.orderdata,printdata:t.printdata}})}))],2)};o._withStripped=!0;var r=function(){var t=this,e=t._self._c;return t.show?e("div",{staticClass:"overlay"}):t._e()};r._withStripped=!0;const i=e({name:"Overlay",props:{show:{type:Boolean}}},r,[],!1,null,null,null).exports;var n=function(){var t=this,e=t._self._c;return e("div",{directives:[{name:"click-outside",rawName:"v-click-outside",value:t.outside,expression:"outside"}],staticClass:"search-box"},[e("form",{attrs:{action:"",autocomplete:"off"},on:{submit:function(e){return e.preventDefault(),t.handleProductScan.apply(null,arguments)}}},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.serachInput,expression:"serachInput"}],ref:"productSearch",attrs:{type:"text",name:"search",id:"product-search",placeholder:t.placeholder},domProps:{value:t.serachInput},on:{focus:function(e){return e.preventDefault(),t.triggerFocus.apply(null,arguments)},keyup:function(e){return e.preventDefault(),t.searchProduct.apply(null,arguments)},input:function(e){e.target.composing||(t.serachInput=e.target.value)}}}),t._v(" "),"product"==t.mode?e("span",{staticClass:"search-icon flaticon-musica-searcher"}):t._e(),t._v(" "),"scan"==t.mode?e("span",{staticClass:"search-icon flaticon-supermarket-scanner"}):t._e(),t._v(" "),e("div",{directives:[{name:"hotkey",rawName:"v-hotkey",value:t.hotkeys,expression:"hotkeys"}],staticClass:"search-type"},[e("a",{class:{active:"product"==t.mode},attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.changeMode("product")}}},[t._v(t._s(t.__("Product","wepos")))]),t._v(" "),e("a",{class:{active:"scan"==t.mode},attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.changeMode("scan")}}},[t._v(t._s(t.__("Scan","wepos")))])]),t._v(" "),e("div",{directives:[{name:"show",rawName:"v-show",value:t.showResults&&"product"==t.mode,expression:"showResults && mode=='product'"}],staticClass:"search-result"},[t.searchableProduct.length?e("div",[e("keyboard-control",{attrs:{listLength:t.searchableProduct.length},on:{"key-down":t.onKeyDown,"key-up":t.onKeyUp},scopedSlots:t._u([{key:"default",fn:function(a){let{selectedIndex:s}=a;return t._l(t.searchableProduct,(function(a,o){return e("li",{key:o,staticClass:"product-search-item",class:{selected:o===s}},["simple"==a.type?[e("a",{staticClass:"wepos-clearfix",attrs:{href:"#"},on:{click:function(e){return t.addToCartAction(a)}}},[t._v(t._s(a.name)+"\n "),e("span",{staticClass:"price"},[t._v(t._s(t.formatPrice(a.price)))]),t._v(" "),a.sku?e("span",{staticClass:"sku"},[t._v(t._s(a.sku))]):t._e(),t._v(" "),e("span",{staticClass:"action flaticon-enter-arrow wepos-right"})])]:t._e(),t._v(" "),"variable"==a.type?[e("a",{attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.selectVariation(a)}}},[t._v(t._s(a.name)+"\n "),e("span",{staticClass:"price"},[t._v(t._s(t.formatPrice(a.price)))]),t._v(" "),a.sku?e("span",{staticClass:"sku"},[t._v(t._s(a.sku))]):t._e(),t._v(" "),e("span",{staticClass:"action flaticon-enter-arrow wepos-right"})])]:t._e()],2)}))}}],null,!1,2881840290)})],1):e("div",{staticClass:"no-data-found"},[t._v("\n "+t._s(t.__("No product found","wepos"))+"\n ")]),t._v(" "),e("div",{staticClass:"suggession"},[e("span",{staticClass:"term"},[e("span",{staticClass:"flaticon-swap"}),t._v(" "+t._s(t.__("to navigate","wepos"))+"\n ")]),t._v(" "),e("span",{staticClass:"term"},[e("span",{staticClass:"flaticon-enter-arrow"}),t._v(" "+t._s(t.__("to select","wepos"))+"\n ")]),t._v(" "),e("span",{staticClass:"term"},[e("strong",[t._v("esc")]),t._v(" "+t._s(t.__("to dismiss","wepos"))+"\n ")])])])]),t._v(" "),t.showVariationModal?e("modal",{attrs:{title:t.__("Select Variations","wepos"),width:"500px",height:"auto",footer:!0,header:!0},on:{close:function(e){t.showVariationModal=!1}}},[e("template",{slot:"body"},t._l(t.selectedVariationProduct.attributes,(function(a){return e("div",{staticClass:"variation-attribute-wrapper"},[e("div",{staticClass:"attribute"},[e("p",[t._v(t._s(a.name))]),t._v(" "),e("div",{staticClass:"options"},[t._l(a.options,(function(s){return[e("label",[e("input",{directives:[{name:"model",rawName:"v-model",value:t.chosenAttribute[a.name],expression:"chosenAttribute[attribute.name]"}],attrs:{type:"radio"},domProps:{value:s,checked:t._q(t.chosenAttribute[a.name],s)},on:{change:function(e){return t.$set(t.chosenAttribute,a.name,s)}}}),t._v(" "),e("div",{staticClass:"box"},[t._v("\n "+t._s(s)+"\n ")])])]}))],2)])])})),0),t._v(" "),e("template",{slot:"footer"},[e("button",{staticClass:"add-variation-btn",attrs:{disabled:t.attributeDisabled},on:{click:function(e){return t.addVariationProduct()}}},[t._v(t._s(t.__("Add Product","wepos")))])])],2):t._e()],1)};n._withStripped=!0;const c=e({props:{listLength:Number},data:()=>({selectedIndex:0}),render(t){return t("ul",this.$scopedSlots.default({selectedIndex:this.selectedIndex}))},methods:{keyHandler(t){const e=t.which||t.keyCode;38===e||t.shiftKey&&9===e?(this.handleKeyUp(t),this.$emit("key-up")):40!==e&&9!==e||(this.handleKeyDown(t),this.$emit("key-down"))},handleKeyUp(t){t.preventDefault(),this.selectedIndex<=0?this.selectedIndex=this.listLength-1:this.selectedIndex>0&&this.selectedIndex<=this.listLength-1&&this.selectedIndex--},handleKeyDown(t){t.preventDefault(),this.selectedIndex<0||this.selectedIndex===this.listLength-1?this.selectedIndex=0:this.selectedIndex>=0&&this.selectedIndex[]},settings:{type:Object,default:()=>({})}},components:{Modal:l,KeyboardControl:c},data:()=>({showResults:!1,showVariationModal:!1,mode:"scan",serachInput:"",searchableProduct:[],selectedVariationProduct:{},attributeDisabled:!0,chosenAttribute:{}}),computed:{placeholder(){return"scan"==this.mode?this.__("Scan your product","wepos"):this.__("Search product by typing","wepos")},hotkeys(){return{f1:this.changeProductSearch,f2:this.changeScan,esc:this.searchClose}}},watch:{chosenAttribute(t,e){Object.keys(t).length==this.selectedVariationProduct.attributes.length&&(this.attributeDisabled=!1)}},methods:{changeScan(t){t.preventDefault(),this.changeMode("scan")},changeProductSearch(t){t.preventDefault(),this.changeMode("product")},searchClose(){this.showResults=!1,this.showVariationModal=!1,this.changeMode("scan"),this.$refs.productSearch.blur()},onKeyDown(){jQuery(".product-search-item.selected").next().children("a").focus()},onKeyUp(){jQuery(".product-search-item.selected").prev().children("a").focus()},triggerFocus(){this.showResults=!0,this.$emit("onfocus")},outside(){this.showResults=!1,this.$emit("onblur")},changeMode(t){this.mode=t,"scan"==this.mode&&(this.searchableProduct=[],this.showResults=!1),this.$refs.productSearch.focus()},handleProductScan(){if("product"!=this.mode){var t=this.settings.wepos_general,e="custom"==t.barcode_scanner_field?"barcode":t.barcode_scanner_field,a={},s=this.products.filter((t=>{if("simple"==t.type&&t[e].toString()==this.serachInput)return!0;if("variable"==t.type){var a=!1;if(t.variations.length>0&&weLo_.forEach(t.variations,((t,s)=>{t[e].toString()==this.serachInput&&(a=!0)})),a)return!0}return!1}));if(s.length>0)if("variable"==(s=s[0]).type)(a=s.variations.filter((t=>t[e].toString()==this.serachInput))[0]).parent_id=s.id,a.type=s.type,a.name=s.name,this.$emit("onProductAdded",a);else this.$emit("onProductAdded",s);this.serachInput=""}},searchProduct(t){this.serachInput&&"product"==this.mode&&(this.searchableProduct=this.products.filter((t=>-1!=t.id.toString().indexOf(this.serachInput)||(-1!=t.name.toString().toLowerCase().indexOf(this.serachInput.toLowerCase())||-1!=t.sku.indexOf(this.serachInput)))))},selectVariation(t){this.selectedVariationProduct=t,this.showVariationModal=!0},addVariationProduct(){var t=this.findMatchingVariations(this.selectedVariationProduct.variations,this.chosenAttribute)[0];t.parent_id=this.selectedVariationProduct.id,t.type=this.selectedVariationProduct.type,t.name=this.selectedVariationProduct.name,this.$emit("onProductAdded",t),this.showVariationModal=!1,this.chosenAttribute={}},addToCartAction(t){this.$emit("onProductAdded",t)}},mounted(){this.$refs.productSearch.focus()}},n,[],!1,null,null,null).exports;var d=function(){var t=this,e=t._self._c;return e("div",{directives:[{name:"click-outside",rawName:"v-click-outside",value:t.onblur,expression:"onblur"},{name:"hotkey",rawName:"v-hotkey",value:t.hotkeys,expression:"hotkeys"}],staticClass:"customer-search-box"},[e("form",{attrs:{action:"",autocomplete:"off"}},[e("svg",{staticClass:"customer-icon",attrs:{width:"19px",height:"19px",viewBox:"0 0 19 19",version:"1.1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"}},[e("defs",[e("linearGradient",{attrs:{x1:"14.5524094%",y1:"14.6909544%",x2:"82.7722259%",y2:"85.2519444%",id:"linearGradient-1"}},[e("stop",{attrs:{"stop-color":"#C444FB",offset:"0%"}}),t._v(" "),e("stop",{attrs:{"stop-color":"#5B56D7",offset:"100%"}})],1)],1),t._v(" "),e("g",{attrs:{id:"Page-1",stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"}},[e("g",{attrs:{id:"POS-Design---Dokan-P2",transform:"translate(-759.000000, -27.000000)"}},[e("g",{attrs:{id:"Group",transform:"translate(759.000000, 27.000000)"}},[e("circle",{attrs:{id:"Oval",fill:"url(#linearGradient-1)","fill-rule":"nonzero",cx:"9.5",cy:"9.5",r:"9.5"}}),t._v(" "),e("g",{attrs:{id:"flaticon1543304699-svg-2",transform:"translate(9.500000, 9.500000) scale(-1, 1) translate(-9.500000, -9.500000) translate(6.000000, 5.000000)"}},[e("g",{attrs:{id:"flaticon1543304699-svg"}},[e("path",{attrs:{d:"M3.31578947,4.40159143 C4.27870463,4.40159143 5.0593751,3.41627143 5.0593751,2.20080857 C5.0593751,0.98532 4.80306952,0 3.31578947,0 C1.82850943,0 1.57215436,0.98532 1.57215436,2.20080857 C1.57215436,3.41627143 2.35282482,4.40159143 3.31578947,4.40159143 Z",id:"Path",fill:"#FFFFFF"}}),t._v(" "),e("path",{attrs:{d:"M0.0616980658,7.82884897 C0.0604730658,7.62453402 0.0592480658,7.77128348 0.0616980658,7.82884897 Z",id:"Path",fill:"#000000"}}),t._v(" "),e("path",{attrs:{d:"M6.64682715,7.85749962 C6.65070632,7.82585407 6.64815424,7.63794608 6.64682715,7.85749962 Z",id:"Path",fill:"#000000"}}),t._v(" "),e("path",{attrs:{d:"M6.60522584,7.67306571 C6.57293401,5.5557 6.30682954,4.95236571 4.27051414,4.57045714 C4.27051414,4.57045714 3.98387156,4.95002571 3.31576473,4.95002571 C2.64765789,4.95002571 2.36096583,4.57045714 2.36096583,4.57045714 C0.34687117,4.9482 0.0645836606,5.54258571 0.0274666143,7.60428 C0.0244230165,7.77263143 0.0230125687,7.78147714 0.0224681854,7.76193429 C0.0225919089,7.79855143 0.0227403771,7.86628286 0.0227403771,7.98438857 C0.0227403771,7.98438857 0.507538492,9 3.31576473,9 C6.12394148,9 6.60878908,7.98438857 6.60878908,7.98438857 C6.60878908,7.90850571 6.60883857,7.85574 6.6089128,7.81984286 C6.60836842,7.83192857 6.60727965,7.80850286 6.60522584,7.67306571 Z",id:"Path",fill:"#FFFFFF"}})])])])])])]),t._v(" "),e("input",{directives:[{name:"model",rawName:"v-model",value:t.serachInput,expression:"serachInput"}],ref:"customerSearch",attrs:{type:"text",name:"customer_search",id:"customer-search",placeholder:t.__("Search customer","wepos")},domProps:{value:t.serachInput},on:{focus:function(e){return e.preventDefault(),t.triggerFocus.apply(null,arguments)},keyup:t.searchCustomer,input:function(e){e.target.composing||(t.serachInput=e.target.value)}}}),t._v(" "),e("span",{staticClass:"add-new-customer flaticon-add",on:{click:function(e){return e.preventDefault(),t.addNewCustomer()}}}),t._v(" "),e("div",{directives:[{name:"show",rawName:"v-show",value:t.showCustomerResults,expression:"showCustomerResults"}],staticClass:"search-result"},[t.customers.length?e("div",[e("keyboard-control",{attrs:{listLength:t.customers.length},on:{"key-down":t.onKeyDown,"key-up":t.onKeyUp},scopedSlots:t._u([{key:"default",fn:function(a){let{selectedIndex:s}=a;return t._l(t.customers,(function(a,o){return e("li",{key:o,staticClass:"customer-search-item",class:{selected:o===s}},[e("a",{staticClass:"wepos-clearfix",attrs:{href:"#"},on:{click:function(e){return t.selectCustomer(a)}}},[e("span",{staticClass:"avatar wepos-left"},[e("img",{attrs:{src:a.avatar_url,alt:a.first_name+" "+a.last_name}})]),t._v(" "),e("span",{staticClass:"name wepos-left"},[t._v(t._s(a.first_name+" "+a.last_name)),e("span",{staticClass:"metadata"},[t._v(t._s(a.email))])]),t._v(" "),e("span",{staticClass:"action flaticon-enter-arrow wepos-right"})])])}))}}],null,!1,1035729388)})],1):e("div",{staticClass:"no-data-found"},[t._v("\n "+t._s(t.__("No customer found","wepos"))+"\n ")]),t._v(" "),e("div",{staticClass:"suggession"},[e("span",{staticClass:"term"},[e("span",{staticClass:"flaticon-swap"}),t._v(" "+t._s(t.__("to navigate","wepos"))+"\n ")]),t._v(" "),e("span",{staticClass:"term"},[e("span",{staticClass:"flaticon-enter-arrow"}),t._v(" "+t._s(t.__("to select","wepos"))+"\n ")]),t._v(" "),e("span",{staticClass:"term"},[e("strong",[t._v("esc")]),t._v(" "+t._s(t.__("to dismiss","wepos"))+"\n ")])])])]),t._v(" "),t.showNewCustomerModal?e("modal",{attrs:{title:t.__("Add New Customer","wepos"),width:"700px",footer:!0,header:!0},on:{close:t.closeNewCustomerModal}},[e("template",{slot:"body"},[e("div",{staticClass:"wepos-new-customer-form"},[e("form",{staticClass:"wepos-form",attrs:{action:"",autocomplete:"off"}},[e("div",{staticClass:"form-row col-2"},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.customer.first_name,expression:"customer.first_name"}],attrs:{type:"text",placeholder:t.__("First Name","wepos")},domProps:{value:t.customer.first_name},on:{input:function(e){e.target.composing||t.$set(t.customer,"first_name",e.target.value)}}}),t._v(" "),e("input",{directives:[{name:"model",rawName:"v-model",value:t.customer.last_name,expression:"customer.last_name"}],attrs:{type:"text",placeholder:t.__("Last Name","wepos")},domProps:{value:t.customer.last_name},on:{input:function(e){e.target.composing||t.$set(t.customer,"last_name",e.target.value)}}})]),t._v(" "),e("div",{staticClass:"form-row"},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.customer.email,expression:"customer.email"}],attrs:{type:"email",placeholder:t.__("Email","wepos")},domProps:{value:t.customer.email},on:{input:function(e){e.target.composing||t.$set(t.customer,"email",e.target.value)}}})]),t._v(" "),e("div",{staticClass:"form-row col-2"},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.customer.address_1,expression:"customer.address_1"}],attrs:{type:"text",placeholder:t.__("Address 1","wepos")},domProps:{value:t.customer.address_1},on:{input:function(e){e.target.composing||t.$set(t.customer,"address_1",e.target.value)}}}),t._v(" "),e("input",{directives:[{name:"model",rawName:"v-model",value:t.customer.address_2,expression:"customer.address_2"}],attrs:{type:"text",placeholder:t.__("Address 2 (optional)","wepos")},domProps:{value:t.customer.address_2},on:{input:function(e){e.target.composing||t.$set(t.customer,"address_2",e.target.value)}}})]),t._v(" "),e("div",{staticClass:"form-row col-2"},[e("multiselect",{staticClass:"wepos-multiselect customer-country",staticStyle:{width:"48.5%","margin-right":"20px"},attrs:{options:t.getCountryList,selectLabel:"",deselectLabel:"",selectedLabel:"",placeholder:t.__("Select a country","wepos"),"track-by":"code",label:"name"},on:{select:t.handleCountrySelect,remove:t.removeCountrySelect},scopedSlots:t._u([{key:"singleLabel",fn:function(a){return[e("span",{domProps:{innerHTML:t._s(a.option.name)}})]}},{key:"option",fn:function(a){return[e("span",{domProps:{innerHTML:t._s(a.option.name)}})]}}],null,!1,568765526),model:{value:t.selectedCountry,callback:function(e){t.selectedCountry=e},expression:"selectedCountry"}},[t._v(" "),t._v(" "),e("template",{slot:"noResult"},[e("div",{staticClass:"no-data-found"},[t._v(t._s(t.__("No country found","wepos")))])])],2),t._v(" "),t.stateList.length>0?[e("multiselect",{staticClass:"wepos-multiselect customer-state",staticStyle:{width:"48.5%"},attrs:{options:t.stateList,selectLabel:"",deselectLabel:"",selectedLabel:"",placeholder:t.__("Select a state","wepos"),"track-by":"code",label:"name"},on:{remove:t.removeStateSelect},scopedSlots:t._u([{key:"singleLabel",fn:function(a){return[e("span",{domProps:{innerHTML:t._s(a.option.name)}})]}},{key:"option",fn:function(a){return[e("span",{domProps:{innerHTML:t._s(a.option.name)}})]}}],null,!1,568765526),model:{value:t.selectedState,callback:function(e){t.selectedState=e},expression:"selectedState"}},[t._v(" "),t._v(" "),e("template",{slot:"noResult"},[e("div",{staticClass:"no-data-found"},[t._v(t._s(t.__("No country found","wepos")))])])],2)]:[e("input",{directives:[{name:"model",rawName:"v-model",value:t.customer.state,expression:"customer.state"}],attrs:{type:"text",placeholder:t.__("States (optional)","wepos")},domProps:{value:t.customer.state},on:{input:function(e){e.target.composing||t.$set(t.customer,"state",e.target.value)}}})]],2),t._v(" "),e("div",{staticClass:"form-row col-2"},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.customer.city,expression:"customer.city"}],attrs:{type:"text",placeholder:t.__("City (optional)","wepos")},domProps:{value:t.customer.city},on:{input:function(e){e.target.composing||t.$set(t.customer,"city",e.target.value)}}}),t._v(" "),e("input",{directives:[{name:"model",rawName:"v-model",value:t.customer.postcode,expression:"customer.postcode"}],attrs:{type:"text",placeholder:t.__("Zip/Postal Code (optional)","wepos")},domProps:{value:t.customer.postcode},on:{input:function(e){e.target.composing||t.$set(t.customer,"postcode",e.target.value)}}})]),t._v(" "),e("div",{staticClass:"form-row"},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.customer.phone,expression:"customer.phone"}],attrs:{type:"text",placeholder:t.__("Phone (optional)","wepos")},domProps:{value:t.customer.phone},on:{input:function(e){e.target.composing||t.$set(t.customer,"phone",e.target.value)}}})])])])]),t._v(" "),e("template",{slot:"footer"},[e("button",{staticClass:"add-new-customer-btn add-variation-btn",attrs:{disabled:t.isDisabled},on:{click:function(e){return t.createCustomer()}}},[t._v(t._s(t.__("Add Customer","wepos")))])])],2):t._e()],1)};d._withStripped=!0;const p=e({name:"CustomerSearch",components:{Modal:wepos_get_lib("Modal"),KeyboardControl:c},data:()=>({submitDisable:!1,customers:[],customer:{email:"",first_name:"",last_name:"",address_1:"",address_2:"",country:"",state:"",postcode:"",city:"",phone:""},showCustomerResults:!1,serachInput:"",showNewCustomerModal:!1,stateList:[],selectedState:null,selectedCountry:null,isDisabled:!0}),computed:{hotkeys(){return{f7:this.focusCustomerSearch,"shift+f7":this.addNewCustomer,esc:this.searchClose}},getCountryList:()=>Object.keys(wepos.countries).map((t=>({code:t,name:wepos.countries[t]}))),orderdata(){return this.$store.state.Order.orderdata}},watch:{customer:{handler(t){this.isDisabled=!0,void 0!==t.first_name&&""!=t.first_name.trim()&&void 0!==t.last_name&&""!=t.last_name.trim()&&void 0!==t.email&&""!=t.email.trim()&&(this.isDisabled=!1)},deep:!0},"orderdata.customer_id"(t){this.serachInput=t?this.orderdata.billing.first_name+" "+this.orderdata.billing.last_name:""}},methods:{focusCustomerSearch(t){t.preventDefault(),this.$refs.customerSearch.focus()},searchClose(){this.showCustomerResults=!1,this.serachInput="",this.showNewCustomerModal=!1,this.$refs.customerSearch.blur()},addNewCustomer(){this.showNewCustomerModal=!0},onKeyDown(){jQuery(".customer-search-item.selected").next().children("a").focus()},onKeyUp(){jQuery(".customer-search-item.selected").prev().children("a").focus()},triggerFocus(){this.showCustomerResults=!0,this.$emit("onfocus")},onblur(){this.showCustomerResults=!1,this.$emit("onblur")},closeNewCustomerModal(){this.customer={email:"",first_name:"",last_name:"",address_1:"",address_2:"",country:"",state:"",postcode:"",city:"",phone:""},this.selectedState=null,this.selectedCountry=null,this.showNewCustomerModal=!1},searchCustomer(){this.serachInput?wepos.api.get(wepos.rest.root+wepos.rest.posversion+"/customers?search="+this.serachInput).done((t=>{this.customers=t})):this.$emit("onCustomerSelected",{})},selectCustomer(t){this.$emit("onCustomerSelected",t),this.serachInput=t.first_name+" "+t.last_name,this.showCustomerResults=!1},createCustomer(){if(this.customer.email){var t={email:this.customer.email,first_name:this.customer.first_name,last_name:this.customer.last_name,username:this.customer.email,password:this.generatePassword(20),billing:{first_name:this.customer.first_name,last_name:this.customer.last_name,address_1:this.customer.address_1,address_2:this.customer.address_2,country:null!==this.selectedCountry?this.selectedCountry.code:"",state:null!==this.selectedState?this.selectedState.code:this.customer.state,postcode:this.customer.postcode,city:this.customer.city,phone:this.customer.phone,email:this.customer.email}},e=jQuery(".wepos-new-customer-form");e.block({message:null,overlayCSS:{background:"#fff url("+wepos.ajax_loader+") no-repeat center",opacity:.4}}),wepos.api.post(wepos.rest.root+wepos.rest.posversion+"/customers",t).done((t=>{this.serachInput=t.first_name+" "+t.last_name,this.$emit("onCustomerSelected",t),e.unblock(),this.closeNewCustomerModal()})).fail((t=>{e.unblock(),alert(t.responseJSON.message)}))}else alert(this.__("Please enter an email address for customer","wepos"))},removeCountrySelect(t,e){this.selectedState=null,this.selectedCountry=null,this.stateList=[],this.customer.country="",this.customer.state=""},removeStateSelect(t,e){this.selectedState=null,this.customer.state=""},handleCountrySelect(t,e){var a=void 0!==wepos.states[t.code]?wepos.states[t.code]:[],s=Object.keys(a);s.length>0?this.stateList=s.map((t=>({code:t,name:a[t]}))):(this.stateList=a,this.selectedState=null)},generatePassword(t){for(var e="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789",a="",s=0,o=e.length;s{this.serachInput=""}));var t=JSON.parse(localStorage.getItem("orderdata"));"undefined"!=t.customer_id&&0!=t.customer_id&&(this.serachInput=t.billing.first_name+" "+t.billing.last_name)}},d,[],!1,null,null,null).exports;var _=function(){var t=this,e=t._self._c;return e("div",{directives:[{name:"hotkey",rawName:"v-hotkey",value:t.hotkeys,expression:"hotkeys"}],staticClass:"wepos-fee-keypad-wrap",class:t.className},[e("v-popover",{attrs:{offset:"5","popover-base-class":"fee-keypad tooltip popover",placement:"top",open:t.viewFeeKeypad}},[e("a",{attrs:{href:"#"},on:{click:t.showFeeKeypad}},[t._v(t._s(t.__("Add","wepos"))+" "+t._s(t.name))]),t._v(" "),e("template",{slot:"popover"},[e("form",[e("input",{directives:[{name:"model",rawName:"v-model",value:t.displayValue,expression:"displayValue"}],ref:"feeinput",attrs:{type:"text"},domProps:{value:t.displayValue},on:{input:function(e){e.target.composing||(t.displayValue=e.target.value)}}})]),t._v(" "),e("keyboard",{attrs:{layouts:t.layout()},on:{percent:t.percentFee,flat:t.flatFee},model:{value:t.displayValue,callback:function(e){t.displayValue=e},expression:"displayValue"}})],1)],2)],1)};_._withStripped=!0;var m=function(){var t=this,e=t._self._c;return e("aside",{staticClass:"vue-keyboard",class:{full:t.full,empty:t.empty,valid:t.valid,invalid:!t.valid},attrs:{role:"application","data-value":t.value,"data-layout":t.layout}},t._l(t.buttons,(function(a){return e("div",{staticClass:"vue-keyboard-row",attrs:{role:"row","data-keys":a.length}},t._l(a,(function(a){return e("button",{staticClass:"vue-keyboard-key",class:a.type,attrs:{role:"button","data-args":a.args,"data-text":a.value,"data-action":a.action.name},domProps:{innerHTML:t._s(a.value)},on:{click:function(t){return t.preventDefault(),a.action.callable.apply(null,arguments)}}})})),0)})),0)};m._withStripped=!0;const h="7440011c983cf39ae730b1f831e2922ac5a76910",v="f630c4abcae620278f82e142a526ef325c2a773a",f="ad982c66898e02a5dab419ea7568421b03f68ee2";var y=e({name:"keyboard",props:{value:{type:String,default:""},layouts:{type:[String,Array],required:!0},maxlength:{type:Number,default:0,validator:t=>t>=0},pattern:{type:String,default:null}},data:()=>({layout:0}),computed:{full(){return this.maxlength>0&&this.value.length>=this.maxlength},empty(){return 0===this.value.length},lines(){return(Array.isArray(this.layouts)?this.layouts:[this.layouts])[this.layout].replace("||",h).replace("{{",v).replace("}}",f).split("|")},buttons(){return this.lines.map((t=>{let e=t.match(new RegExp(`(${v}|${f}|${h}|.)`,"g")),a=[],s=null;return e.forEach((t=>{if("{"===t)s="";else if("}"===t){let t=s.split(":"),e=t.length>1?t[0]:"",o=t.length>1?t[1]:t[0],r=t.length>2?t[2]:null,i=null;i=["append","backspace","space","clear","goto"].indexOf(o)>=0?this[o].bind(this,r):this.$emit.bind(this,o,this),a.push({type:"action",action:{name:o.replace(/\s+/g,"-").toLowerCase(),callable:i},value:e,args:r}),s=null}else null!==s?s+=t:(t===h&&(t="|"),t===v&&(t="{"),t===f&&(t="}"),a.push({type:"char",action:{name:null,callable:this.append.bind(this,t)},value:t,args:null}))})),a}))},valid(){return!this.pattern||this.value.match(new RegExp(this.pattern))}},methods:{mutate(t){this.maxlength>0&&(t=t.slice(0,this.maxlength)),this.$emit("input",t)},append(t){this.mutate(this.value+t)},backspace(){this.mutate(this.value.slice(0,this.value.length-1))},space(){this.append(" ")},goto(t){if(!Array.isArray(this.layouts))throw new Error("A single non-array layout was provided.");if(!(t>=0&&t({input:"",displayValue:"",viewFeeKeypad:!1}),watch:{displayValue(t,e){this.inputChange()}},methods:{hideFeeKepad(t){this.viewFeeKeypad=!1},layout(){return'123|456|789|{:backspace}0'+wepos.currency_format_decimal_sep+"|{% "+this.name+":percent}{"+wepos.currency_format_symbol+" "+this.name+":flat}"},percentFee(){this.$emit("inputfee",this.input,"percent"),this.viewFeeKeypad=!1,this.input="",this.displayValue=""},flatFee(){this.$emit("inputfee",this.input,"flat"),this.viewFeeKeypad=!1,this.input="",this.displayValue=""},inputChange(){this.isValidAmount(this.displayValue)?this.input=this.getFormattedValue(this.displayValue,wepos.currency_format_decimal_sep,"."):this.displayValue=this.getFormattedValue(this.input,".",wepos.currency_format_decimal_sep),jQuery(this.$refs.feeinput).focus()},getFormattedValue(t,e,a){let s=t;return"."!==wepos.currency_format_decimal_sep&&(s=t.replace(e,a)),s},isValidAmount(t){const e=wepos.currency_format_decimal_sep,a=new RegExp("^[0-9]*["+e+"]{0,1}[0-9]*$","gi");return t.match(a)},showFeeKeypad(t){t.preventDefault(),this.viewFeeKeypad=!0,setTimeout((()=>{jQuery(this.$refs.feeinput).focus()}),500)}}},_,[],!1,null,null,null).exports;var w=a(2377),C=a.n(w),b=function(){var t=this,e=t._self._c;return e("div",{attrs:{id:"wepos-print-receipt"}},[e("button",{staticClass:"print-btn",on:{click:function(e){return e.preventDefault(),t.printReceipt()}}},[e("span",{staticClass:"icon flaticon-printer"}),t._v(" "),e("span",{staticClass:"label"},[t._v(t._s(t.__("Print Receipt","wepos")))])])])};b._withStripped=!0;const k=e({name:"ReceiptPrint",methods:{printReceipt(){setTimeout((()=>{window.print()}),500)},handlePrintingPopup(t){let e=this;"Enter"===t.code&&e.$store.getters["Order/getCanProcessPayment"]&&e.printReceipt()},handlePrintReceiptSubmit(){document.addEventListener("keypress",this.handlePrintingPopup)}},mounted(){this.handlePrintReceiptSubmit()},destroyed(){document.removeEventListener("keypress",this.handlePrintingPopup)}},b,[],!1,null,null,null).exports;var P=function(){var t=this,e=t._self._c;return t.settings.wepos_receipts?e("div",{staticClass:"wepos-checkout-print-wrapper"},[e("div",{staticClass:"header",domProps:{innerHTML:t._s(t.settings.wepos_receipts.receipt_header)}}),t._v(" "),e("div",{staticClass:"order-info"},[e("span",{staticClass:"wepos-left"},[e("strong",[t._v(t._s(t.__("Order ID","wepos"))+": #"+t._s(t.printdata.order_id))])]),t._v(" "),e("span",{staticClass:"wepos-right"},[e("strong",[t._v(t._s(t.__("Order Date","wepos"))+": "+t._s(t.formatDate(t.printdata.order_date)))])]),t._v(" "),e("div",{staticClass:"wepos-clearfix"})]),t._v(" "),e("div",{staticClass:"content"},[e("table",{staticClass:"sale-summary"},[e("tbody",[t._l(t.printdata.line_items,(function(a){return e("tr",[e("td",{staticClass:"name"},[t._v("\n "+t._s(a.name)+"\n "),a.attribute.length>0?e("div",{staticClass:"attribute"},[e("ul",t._l(a.attribute,(function(a){return e("li",[e("span",{staticClass:"attr_name"},[t._v(t._s(a.name))]),t._v(": "),e("span",{staticClass:"attr_value"},[t._v(t._s(a.option))])])})),0)]):t._e()]),t._v(" "),e("td",{staticClass:"quantity"},[t._v(t._s(a.quantity))]),t._v(" "),e("td",{staticClass:"price"},[a.on_sale?[e("span",{staticClass:"regular-price"},[t._v(t._s(t.formatPrice(a.quantity*a.regular_price)))]),t._v(" "),e("span",{staticClass:"sale-price"},[t._v(t._s(t.formatPrice(a.quantity*a.sale_price)))])]:[e("span",{staticClass:"sale-price"},[t._v(t._s(t.formatPrice(a.quantity*a.regular_price)))])]],2)])})),t._v(" "),e("tr",{staticClass:"cart-meta-data"},[e("td",{staticClass:"name",attrs:{colspan:"2"}},[t._v("\n "+t._s(t.__("Subtotal","wepos"))+"\n "),"incl"==t.settings.woo_tax.wc_tax_display_cart?e("span",{staticClass:"metadata"},[t._v("\n "+t._s(t.__("Includes Tax","wepos"))+" "+t._s(t.formatPrice(t.$store.getters["Cart/getTotalLineTax"]))+"\n ")]):t._e()]),t._v(" "),e("td",{staticClass:"price"},[t._v(t._s(t.formatPrice(t.printdata.subtotal)))])]),t._v(" "),t._l(t.printdata.fee_lines,(function(a,s){return e("tr",{staticClass:"cart-meta-data"},["discount"==a.type?[e("td",{staticClass:"name",attrs:{colspan:"2"}},[t._v(t._s(t.__("Discount","wepos"))+" "),e("span",{staticClass:"metadata"},[t._v(t._s("percent"==a.discount_type?a.value+"%":t.formatPrice(a.value)))])]),t._v(" "),e("td",{staticClass:"price"},[t._v("-"+t._s(t.formatPrice(Math.abs(a.total))))])]:[e("td",{staticClass:"name",attrs:{colspan:"2"}},[t._v(t._s(t.__("Fee","wepos"))+" "),e("span",{staticClass:"metadata"},[t._v(t._s(a.name)+" "+t._s("percent"==a.fee_type?a.value+"%":t.formatPrice(a.value)))])]),t._v(" "),e("td",{staticClass:"price"},[t._v("-"+t._s(t.formatPrice(Math.abs(a.total))))])]],2)})),t._v(" "),t.printdata.taxtotal?e("tr",[e("td",{staticClass:"name",attrs:{colspan:"2"}},[t._v(t._s(t.__("Tax","wepos")))]),t._v(" "),e("td",{staticClass:"price"},[t._v(t._s(t.formatPrice(t.printdata.taxtotal)))])]):t._e(),t._v(" "),e("tr",[e("td",{staticClass:"name",attrs:{colspan:"2"}},[t._v(t._s(t.__("Order Total","wepos")))]),t._v(" "),e("td",{staticClass:"price"},[t._v(t._s(t.formatPrice(t.printdata.ordertotal)))])]),t._v(" "),t._m(0),t._v(" "),e("tr",[e("td",{attrs:{colspan:"2"}},[t._v(t._s(t.__("Payment method","wepos")))]),t._v(" "),e("td",{staticClass:"price"},[t._v(t._s(t.printdata.gateway.title||""))])]),t._v(" "),(t.printdata.gateway.id="wepos_cash")?[e("tr",[e("td",{attrs:{colspan:"2"}},[t._v(t._s(t.__("Cash Given","wepos")))]),t._v(" "),e("td",{staticClass:"price"},[t._v(t._s(t.formatPrice(t.printdata.cashamount)))])]),t._v(" "),e("tr",[e("td",{attrs:{colspan:"2"}},[t._v(t._s(t.__("Change Money","wepos")))]),t._v(" "),e("td",{staticClass:"price"},[t._v(t._s(t.formatPrice(t.printdata.changeamount)))])])]:t._e()],2)])]),t._v(" "),e("div",{staticClass:"footer",domProps:{innerHTML:t._s(t.settings.wepos_receipts.receipt_footer)}})]):t._e()};P._withStripped=!0;const x=e({name:"ReceiptPrintHtml",props:{printdata:{type:Object,default:()=>({})},settings:{type:Object,default:()=>({})}},methods:{formatDate:t=>(t=new Date(t)).toLocaleString()}},P,[function(){var t=this._self._c;return t("tr",{staticClass:"divider"},[t("td",{attrs:{colspan:"3"}})])}],!1,null,null,null).exports;var S=function(){var t=this,e=t._self._c;return e("div",{directives:[{name:"hotkey",rawName:"v-hotkey",value:t.hotkeys,expression:"hotkeys"}],staticClass:"wepos-custom-note-wrap"},[e("v-popover",{attrs:{offset:"5","popover-base-class":"customer-note tooltip popover",placement:"top",open:t.viewNotePopover}},[e("a",{attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.openNote.apply(null,arguments)}}},[t._v(t._s(t.__("Add Note","wepos")))]),t._v(" "),e("template",{slot:"popover"},[e("form",{on:{submit:function(e){return e.preventDefault(),t.addCustomerNote.apply(null,arguments)}}},[e("textarea",{directives:[{name:"model",rawName:"v-model",value:t.customerNote,expression:"customerNote"}],ref:"customernote",attrs:{id:"",cols:"30",rows:"5"},domProps:{value:t.customerNote},on:{input:function(e){e.target.composing||(t.customerNote=e.target.value)}}}),t._v(" "),e("button",{staticClass:"add-note-btn",attrs:{type:"submit",disabled:""==t.customerNote}},[t._v(t._s(t.__("Add Note","wepos")))])])])],2)],1)};S._withStripped=!0;const D=e({data:()=>({viewNotePopover:!1,customerNote:""}),computed:{hotkeys(){return{f6:this.openNote,esc:this.closeNote}}},methods:{openNote(t){t.preventDefault(),this.viewNotePopover=!0,setTimeout((()=>{jQuery(this.$refs.customernote).focus()}),500)},closeNote(){this.viewNotePopover=!1},addCustomerNote(){this.$emit("addnote",this.customerNote),this.viewNotePopover=!1,this.customerNote=""}}},S,[],!1,null,null,null).exports;const $=e({name:"Home",components:{ProductSearch:u,CustomerSearch:p,Overlay:i,Modal:wepos_get_lib("Modal"),MugenScroll:C(),FeeKeypad:g,PrintReceipt:k,PrintReceiptHtml:x,CustomerNote:D},data:()=>({showHelp:!1,showQucikMenu:!1,productView:"grid",productLoading:!1,viewVariationPopover:!1,showModal:!1,showPaymentReceipt:!1,products:[],filteredProducts:[],totalPages:1,page:1,showOverlay:!1,selectedVariationProduct:{},attributeDisabled:!0,selectedAttribute:{},availableGateways:[],emptyGatewayDiv:0,cashAmount:"",availableTax:[],settings:{},taxSettings:{},printdata:wepos.hooks.applyFilters("wepos_initial_print_data",{gateway:{id:"",title:""}}),feeData:{},createprintreceipt:!1,selectedCategory:"",selectedGateway:"",categories:[],showReceiptHtml:wepos.hooks.applyFilters("wepos_render_receipt_html",!0),quickLinkList:wepos.hooks.applyFilters("wepos_quick_links",[]),quickLinkListStart:wepos.hooks.applyFilters("wepos_quick_links_start",[]),availableGatewayContent:wepos.hooks.applyFilters("wepos_avaialable_gateway_content",[]),afterMainContents:wepos.hooks.applyFilters("wepos_after_main_content",[]),beforCartPanels:wepos.hooks.applyFilters("wepos_before_cart_panel",[])}),computed:{cartdata(){return this.$store.state.Cart.cartdata},orderdata(){return this.$store.state.Order.orderdata},hotkeys(){return{f3:this.toggleProductView,f9:this.initPayment,f10:this.processPayment,f8:this.createNewSale,"shift+f8":this.emptyCart,esc:this.backToSale,"meta+/":this.openHelp,"ctrl+/":this.openHelp}},getFilteredProduct(){return void 0!==this.$route.query.category?this.products.filter((t=>{var e=weLo_.find(t.categories,{id:parseInt(this.$route.query.category)});return null!=e&&Object.keys(e).length>0})):this.products},changeAmount(){var t=this.unFormat(this.cashAmount)-this.$store.getters["Cart/getTotal"];return t>0?t:0},getBreadCrums(){if(void 0!==this.$route.query.category){var t=jQuery.extend(!0,[],this.categories),e=weLo_.find(this.categories,{id:parseInt(this.$route.query.category)}),a=weLo_.findIndex(this.categories,e),s=t.splice(0,a+1),o=[];if(s.length>0){for(var r=s.length-1;r>=0;r--)if(o.length>0){var i=weLo_.find(s,{id:s[r+1].parent_id});if(null!=i&&(o.push(i),null==i.parent_id))break}else o.push(s[r]);return o.slice().reverse()}}return[]}},watch:{selectedAttribute(t,e){Object.keys(t).length==this.selectedVariationProduct.attributes.length&&(this.attributeDisabled=!1)},"$route.query.order_key"(){""!=this.$route.query.order_key&&"success"==this.$route.query.payment&&(this.showModal=!1,this.showPaymentReceipt=!0)},"$route.query.category"(){this.selectedCategory={id:-1,level:0,name:this.__("All categories","wepos"),parent_id:null},void 0!==this.$route.query.category&&(this.selectedCategory=weLo_.find(this.categories,{id:parseInt(this.$route.query.category)}))},selectedGateway(t,e){var a=weLo_.find(this.availableGateways,{id:t});this.$store.dispatch("Order/setGatewayAction",a)},cashAmount(t,e){this.ableToProcess()}},methods:{openQucikMenu(){this.showQucikMenu=!0},openHelp(t){t.preventDefault(),this.showHelp=!0,this.showQucikMenu=!1},closeHelp(){this.showHelp=!1},addCustomerNote(t){this.$store.dispatch("Order/setCustomerNoteAction",t)},removeCustomerNote(){this.$store.dispatch("Order/removeCustomerNoteAction")},removeBreadcrums(){this.$router.push({name:"Home"})},logout(){wepos.hooks.doAction("wepos_before_logout"),window.location.href=wepos.logout_url.toString()},emptyCart(){this.$store.dispatch("Cart/emptyCartAction"),this.$store.dispatch("Order/emptyOrderdataAction"),this.printdata=wepos.hooks.applyFilters("wepos_initial_print_data",{gateway:{id:"",title:""}}),this.showPaymentReceipt=!1,this.cashAmount="",this.eventBus.$emit("emptycart",this.orderdata),this.showQucikMenu=!1},toggleProductView(t){t.preventDefault(),this.productView="grid"==this.productView?"list":"grid"},createNewSale(){this.$router.push({name:"Home"}),this.emptyCart()},ableToProcess(){let t=this.cartdata.line_items.length>0&&this.isSelectGateway();"wepos_cash"===this.selectedGateway&&(t=this.unFormat(this.cashAmount)>=this.truncateNumber(this.$store.getters["Cart/getTotal"])&&t),console.log(t),this.$store.dispatch("Order/setCanProcessPaymentAction",t)},processPayment(t){if(this.$store.getters["Order/getCanProcessPayment"]){weLo_.find(this.availableGateways,{id:this.orderdata.payment_method});var e=wepos.hooks.applyFilters("wepos_order_form_data",{billing:this.orderdata.billing,shipping:this.orderdata.shipping,line_items:this.cartdata.line_items,fee_lines:this.cartdata.fee_lines,customer_id:this.orderdata.customer_id,customer_note:this.orderdata.customer_note,payment_method:this.orderdata.payment_method,payment_method_title:this.orderdata.payment_method_title,meta_data:[{key:"_wepos_is_pos_order",value:!0},{key:"_wepos_cash_tendered_amount",value:this.cashAmount.toString()},{key:"_wepos_cash_change_amount",value:this.changeAmount.toString()}]},this.orderdata,this.cartdata),a=jQuery(".wepos-checkout-wrapper");a.block({message:null,overlayCSS:{background:"#fff url("+wepos.ajax_loader+") no-repeat center",opacity:.4}}),wepos.api.post(wepos.rest.root+wepos.rest.wcversion+"/orders",e).done((t=>{wepos.api.post(wepos.rest.root+wepos.rest.posversion+"/payment/process",t).done((s=>{"success"==s.result?(this.$router.push({name:"Home",query:{order_key:t.order_key,payment:"success"}}),this.printdata=wepos.hooks.applyFilters("wepos_after_payment_print_data",{line_items:this.cartdata.line_items,fee_lines:this.cartdata.fee_lines,subtotal:this.$store.getters["Cart/getSubtotal"],taxtotal:this.$store.getters["Cart/getTotalTax"],ordertotal:this.$store.getters["Cart/getTotal"],gateway:{id:t.payment_method,title:t.payment_method_title},order_id:t.id,order_date:t.date_created,cashamount:this.cashAmount.toString(),changeamount:this.changeAmount.toString()},e),a.unblock()):a.unblock()})).fail((t=>{a.unblock(),alert(t.responseJSON.message)}))})).fail((t=>{a.unblock(),alert(t.responseJSON.message)}))}},initPayment(){this.$store.state.Cart.cartdata.line_items.length<=0||(this.showModal=!0,this.$store.dispatch("Order/setGatewayAction",this.availableGateways[0]),this.selectedGateway=this.availableGateways[0].id)},backToSale(){this.showModal=!1,this.showHelp=!1},isSelectGateway(){return!(null==this.orderdata.payment_method||""==this.orderdata.payment_method)},getProductImage:t=>t.images.length>0?t.images[0].woocommerce_thumbnail:wepos.placeholder_image,getProductImageName:t=>t.images.length>0?t.images[0].name:t.name,setDiscount(t,e){this.$store.dispatch("Cart/addDiscountAction",{title:this.__("Discount","wepos"),value:t,type:e})},saveFee(t){this.$store.dispatch("Cart/saveFeeValueAction",{key:t,feeData:this.feeData}),this.feeData={}},cancelEditFee(t){this.$store.dispatch("Cart/cancelSaveFeeValueAction",t),this.feeData={}},editFeeData(t){this.$store.dispatch("Cart/editFeeValueAction",t),this.feeData=Object.assign({},this.cartdata.fee_lines[t]),this.$nextTick((()=>{jQuery(this.$refs.fee_name).focus()}))},setFee(t,e){this.$store.dispatch("Cart/addFeeAction",{title:this.__("Fee","wepos"),value:t,type:e})},removeFeeLine(t){this.$store.dispatch("Cart/removeFeeLineItemsAction",t)},getDiscountAmount(t){return"percent"===t.discount_type||"percent"===t.fee_type?this.formatNumber(t.value)+"%":this.formatPrice(t.total)},fetchProducts(){1==this.page&&(this.productLoading=!0),this.totalPages>=this.page?wepos.api.get(wepos.rest.root+wepos.rest.posversion+"/products?status=publish&per_page=30&page="+this.page).done(((t,e,a)=>{this.appendProducts(t),this.page+=1,this.totalPages=parseInt(a.getResponseHeader("X-WP-TotalPages")),this.productLoading=!1})).then(((t,e,a)=>{this.fetchProducts()})):this.productLoading=!1},appendProducts(t){t.forEach((t=>{"variable"===t.type&&this.isAllVariationsDisabled(t)||(this.products=this.products.concat(t))}))},isAllVariationsDisabled(t){let e=!0;return t.attributes.forEach((t=>{!0===t.variation&&(e=!1)})),e},maybeRemoveDeletedProduct:t=>new Promise(((e,a)=>{if(!t)return e(t);if(!t.line_items||t.line_items.length<1)return e(t);let s=t.line_items.map((t=>t.product_id));wepos.api.get(wepos.rest.root+wepos.rest.posversion+"/products?include="+s.toString()).then((a=>{let s=a.map((t=>t.id));return t.line_items.forEach(((e,a)=>{s.includes(e.product_id)||(t.line_items.splice(a,1),localStorage.setItem("cartdata",JSON.stringify(t)))})),e(t)})).fail((()=>a(t)))})),selectCustomer(t){this.$store.dispatch("Order/setCustomerAction",t)},selectVariationProduct(t){this.viewVariationPopover=!0,this.selectedVariationProduct=t},addVariationProduct(){let t=this.findMatchingVariations(this.selectedVariationProduct.variations,this.selectedAttribute)[0];this.hasStock(t)||this.toast({title:this.__("This product is out of stock.","wepos"),type:"error"}),t.parent_id=this.selectedVariationProduct.id,t.type=this.selectedVariationProduct.type,t.name=this.selectedVariationProduct.name,t.type=this.selectedVariationProduct.type,this.selectedAttribute={},this.attributeDisabled=!0,this.$store.dispatch("Cart/addToCartAction",t)},addToCart(t){this.hasStock(t)?this.$store.dispatch("Cart/addToCartAction",t):this.toast({title:this.__("Product is out of stock!","wepos-pro"),type:"error"})},toggleEditQuantity(t,e){this.$store.dispatch("Cart/toggleEditQuantityAction",e)},removeItem(t){this.$store.dispatch("Cart/removeCartItemAction",t)},addQuantity(t,e){this.$store.dispatch("Cart/addItemQuantityAction",e)},removeQuantity(t,e){this.$store.dispatch("Cart/removeItemQuantityAction",e)},fetchGateway(){wepos.api.get(wepos.rest.root+wepos.rest.posversion+"/payment/gateways").done((t=>{this.availableGateways=t,this.emptyGatewayDiv=4-this.availableGateways.length%4}))},truncateTitle:(t,e)=>weLo_.truncate(t,{length:e}),unSanitizeString:t=>t.split("-").map((function(t){return t.charAt(0).toUpperCase()+t.slice(1)})).join(" "),fetchSettings(){wepos.api.get(wepos.rest.root+wepos.rest.posversion+"/settings").done((t=>{this.settings=t,this.$store.dispatch("Cart/setSettingsAction",t)}))},fetchTaxes(){wepos.api.get(wepos.rest.root+wepos.rest.posversion+"/taxes").done((t=>{this.availableTax=t,this.$store.dispatch("Cart/setAvailableTaxAction",t)}))},handleCategorySelect(t,e){"-1"==t.id?this.$router.push({name:"Home"}):this.$router.push({name:"Home",query:{category:t.id}})},handleCategoryRemove(t,e){this.$router.push({name:"Home"}),this.selectedCategory={id:-1,level:0,name:this.__("All categories","wepos"),parent_id:null}},fetchCategories(){wepos.api.get(wepos.rest.root+wepos.rest.wcversion+"/products/categories?hide_empty=true&_fields=id,name,parent_id&per_page=100").then((t=>{t.sort((function(t,e){return t.name.localeCompare(e.name)}));var e=function(t,e){var a=[],s={};return t.forEach((function(t){s[t.id]={response:t,children:s[t.id]&&s[t.id].children},null===t.parent_id?a.push(s[t.id]):(s[t.parent_id]=s[t.parent_id]||{},s[t.parent_id].children=s[t.parent_id].children||[],s[t.parent_id].children.push(s[t.id]))})),a}(t),a={id:-1,level:0,name:this.__("All categories","wepos"),parent_id:null},s=e.reduce(function t(e){return function(a,s){return s.response.level=e,a.concat(s.response,(s.children||[]).reduce(t(e+1),[]))}}(0),[]);this.categories=s,this.categories.unshift(a),this.selectedCategory=a,void 0!==this.$route.query.category&&(this.selectedCategory=weLo_.find(t,{id:parseInt(this.$route.query.category)}))}))},filterProducts(){this.products=this.products.filter((t=>weLo_.findIndex(t.categories,{id:this.$route.query.category})>0))},fetchTaxSettings(){wepos.api.get(wepos.rest.root+wepos.rest.wcversion+"/settings/tax").done((t=>{this.taxSettings=t}))},focusCashInput(){document.querySelector("#input-cash-amount").focus()}},async created(){if(this.fetchSettings(),this.fetchTaxes(),this.fetchProducts(),this.fetchGateway(),this.fetchCategories(),"undefined"!=typeof localStorage)try{var t=JSON.parse(localStorage.getItem("cartdata")),e=JSON.parse(localStorage.getItem("orderdata"));t=await this.maybeRemoveDeletedProduct(t),this.$store.dispatch("Cart/setCartDataAction",t),this.$store.dispatch("Order/setOrderDataAction",e)}catch(t){e=JSON.parse(localStorage.getItem("orderdata"));this.$store.dispatch("Cart/setCartDataAction",t),this.$store.dispatch("Order/setOrderDataAction",e)}window.addEventListener("beforeunload",(()=>{"undefined"!=typeof localStorage&&(localStorage.setItem("cartdata",JSON.stringify(this.$store.state.Cart.cartdata)),localStorage.setItem("orderdata",JSON.stringify(this.$store.state.Order.orderdata)))}),!1)}},o,[function(){var t=this._self._c;return t("td",{staticClass:"icon"},[t("span",{staticClass:"flaticon-right-arrow"})])}],!1,null,null,null).exports;let A=wepos_get_lib("Vue"),N=wepos_get_lib("Router");A.use(N);const F=new N({routes:wepos.hooks.applyFilters("wepos_frontend_routes",[{path:"/",name:"Home",component:$}])}),O={hasStock(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return t.manage_stock?!!t.backorders_allowed||t.stock_quantity>e:"outofstock"!=t.stock_status}},T={namespaced:!0,state:{settings:{},availableTax:{},cartdata:{line_items:[],fee_lines:[]}},getters:{getSubtotal(t){var e=0;return weLo_.forEach(t.cartdata.line_items,(function(t,a){t.on_sale?e+=t.quantity*t.sale_price:e+=t.quantity*t.regular_price})),e},getTotalFee(t){var e=0;return weLo_.forEach(t.cartdata.fee_lines,(function(t,a){"fee"==t.type&&(e+=Math.abs(t.total))})),e},getTotalDiscount(t){var e=0;return weLo_.forEach(t.cartdata.fee_lines,(function(t,a){"discount"==t.type&&(e+=Number(Math.abs(t.total)))})),e},getTotalLineTax(t){var e=0;return weLo_.forEach(t.cartdata.line_items,(function(t,a){e+=Math.abs(t.tax_amount*t.quantity)})),e},getTotalTax(t){let e=0,a=0;return weLo_.forEach(t.cartdata.line_items,(function(t,a){e+=Math.abs(t.tax_amount*t.quantity)})),null!=t.settings.woo_tax&&"incl"==t.settings.woo_tax.wc_tax_display_cart&&(e=0),weLo_.forEach(t.cartdata.fee_lines,(function(s,o){if("taxable"!==s.tax_status)return;let r=""===s.tax_class?"standard":s.tax_class,i=weLo_.find(t.availableTax,{class:r.toString()});i&&("discount"===s.type&&(e+=s.total/i.rate),"fee"===s.type&&(a+=Math.abs(s.total)*Math.abs(i.rate)/100))})),e+a},getOrderTotal:(t,e)=>e.getSubtotal+e.getTotalFee+e.getTotalTax,getTotal:(t,e)=>e.getOrderTotal-e.getTotalDiscount,getSettings:(t,e)=>t.settings},mutations:{setSettings(t,e){t.settings=e},setAvailableTax(t,e){t.availableTax=e},setCartData(t,e){weLo_.isEmpty(e)?t.cartdata={line_items:[],fee_lines:[]}:t.cartdata=Object.assign({},e)},addToCartItem(t,e){var a={};a.product_id=0===e.parent_id?e.id:e.parent_id,a.name=e.name,a.quantity=1,a.regular_price=e.regular_display_price,a.sale_price=e.sales_display_price,a.on_sale=e.on_sale,a.attribute=e.attributes,a.variation_id=0!==e.parent_id?e.id:0,a.editQuantity=!1,a.type=e.type,a.tax_amount=e.tax_amount,a.manage_stock=e.manage_stock,a.stock_status=e.stock_status,a.backorders_allowed=e.backorders_allowed,a.stock_quantity=e.stock_quantity;var s=weLo_.findIndex(t.cartdata.line_items,{product_id:a.product_id,variation_id:a.variation_id});s<0?O.hasStock(e)&&t.cartdata.line_items.push(a):O.hasStock(e,t.cartdata.line_items[s].quantity)&&(t.cartdata.line_items[s].quantity+=1)},removeCartItem(t,e){t.cartdata.line_items.splice(e,1)},addCartItemQuantity(t,e){var a=t.cartdata.line_items[e];O.hasStock(a,a.quantity)&&t.cartdata.line_items[e].quantity++},removeCartItemQuantity(t,e){t.cartdata.line_items[e].quantity<=1?t.cartdata.line_items[e].quantity=1:t.cartdata.line_items[e].quantity--},toggleEditQuantity(t,e){t.cartdata.line_items[e].editQuantity=!t.cartdata.line_items[e].editQuantity},addDiscount(t,e){t.cartdata.fee_lines.push({name:e.title,type:"discount",value:e.value.toString(),isEdit:!1,discount_type:e.type,tax_status:"taxable",tax_class:"",total:0})},addFee(t,e){t.cartdata.fee_lines.push({name:e.title,type:"fee",value:e.value.toString(),isEdit:!1,fee_type:e.type,tax_status:"taxable",tax_class:"",total:0})},saveFeeValue(t,e){t.cartdata.fee_lines.splice(e.key,1,e.feeData),t.cartdata.fee_lines[e.key].isEdit=!1},editFeeValue(t,e){t.cartdata.fee_lines[e].isEdit=!0},cancelSaveFeeValue(t,e){t.cartdata.fee_lines[e].isEdit=!1},removeFeeLineItems(t,e){t.cartdata.fee_lines.splice(e,1)},emptyCart(t){t.cartdata={line_items:[],fee_lines:[]}},calculateDiscount(t,e){t.cartdata.fee_lines.length>0&&weLo_.forEach(t.cartdata.fee_lines,((a,s)=>{"discount"==a.type&&("percent"==a.discount_type?t.cartdata.fee_lines[s].total="-"+e.getSubtotal*Math.abs(a.value)/100:t.cartdata.fee_lines[s].total="-"+Math.abs(a.value))}))},calculateFee(t,e){t.cartdata.fee_lines.length>0&&weLo_.forEach(t.cartdata.fee_lines,((a,s)=>{"fee"==a.type&&("percent"==a.fee_type?t.cartdata.fee_lines[s].total=(e.getSubtotal*Math.abs(a.value)/100).toString():t.cartdata.fee_lines[s].total=Math.abs(a.value).toString())}))}},actions:{setSettingsAction(t,e){t.commit("setSettings",e)},setAvailableTaxAction(t,e){t.commit("setAvailableTax",e)},setCartDataAction(t,e){t.commit("setCartData",e),t.commit("calculateDiscount",t.getters),t.commit("calculateFee",t.getters)},addToCartAction(t,e){t.commit("addToCartItem",e),t.commit("calculateDiscount",t.getters),t.commit("calculateFee",t.getters)},removeCartItemAction(t,e){t.commit("removeCartItem",e),t.commit("calculateDiscount",t.getters),t.commit("calculateFee",t.getters)},addItemQuantityAction(t,e){t.commit("addCartItemQuantity",e),t.commit("calculateDiscount",t.getters),t.commit("calculateFee",t.getters)},removeItemQuantityAction(t,e){t.commit("removeCartItemQuantity",e),t.commit("calculateDiscount",t.getters),t.commit("calculateFee",t.getters)},toggleEditQuantityAction(t,e){t.commit("toggleEditQuantity",e)},addDiscountAction(t,e){t.commit("addDiscount",e),t.commit("calculateDiscount",t.getters),t.commit("calculateFee",t.getters)},addFeeAction(t,e){t.commit("addFee",e),t.commit("calculateDiscount",t.getters),t.commit("calculateFee",t.getters)},removeFeeLineItemsAction(t,e){t.commit("removeFeeLineItems",e),t.commit("calculateDiscount",t.getters),t.commit("calculateFee",t.getters)},saveFeeValueAction(t,e){t.commit("saveFeeValue",e),t.commit("calculateDiscount",t.getters),t.commit("calculateFee",t.getters)},editFeeValueAction(t,e){t.commit("editFeeValue",e)},cancelSaveFeeValueAction(t,e){t.commit("cancelSaveFeeValue",e)},emptyCartAction(t){t.commit("emptyCart")},calculateDiscount(t){t.commit("calculateDiscount",t.getters)},calculateFee(t){t.commit("calculateFee",t.getters)}}},L={namespaced:!0,state:{orderdata:{billing:{},shipping:{},customer_id:0,customer_note:"",payment_method:"",payment_method_title:""},canProcessPayment:!1},getters:{getCanProcessPayment:t=>t.canProcessPayment},mutations:{setOrderData(t,e){weLo_.isEmpty(e)?t.orderdata={billing:{},shipping:{},customer_id:0,customer_note:"",payment_method:"",payment_method_title:""}:t.orderdata=e},setCustomer(t,e){Object.keys(e).length>0?(t.orderdata.billing=e.billing,t.orderdata.shipping=e.shipping,t.orderdata.customer_id=e.id):(t.orderdata.billing={},t.orderdata.shipping={},t.orderdata.customer_id=0)},emptyOrderdata(t){t.orderdata={billing:{},shipping:{},customer_id:0,customer_note:"",payment_method:"",payment_method_title:""}},setCustomerNote(t,e){t.orderdata.customer_note=e.trim()},removeCustomerNote(t){t.orderdata.customer_note=""},setGateway(t,e){t.orderdata.payment_method=e.id,t.orderdata.payment_method_title=e.title},setCanProcessPayment(t,e){t.canProcessPayment=e}},actions:{setOrderDataAction(t,e){t.commit("setOrderData",e)},setCustomerAction(t,e){t.commit("setCustomer",e)},emptyOrderdataAction(t){t.commit("emptyOrderdata")},setCustomerNoteAction(t,e){t.commit("setCustomerNote",e)},removeCustomerNoteAction(t){t.commit("removeCustomerNote")},setGatewayAction(t,e){t.commit("setGateway",e)},setCanProcessPaymentAction(t,e){t.commit("setCanProcessPayment",e)}}};let I=wepos_get_lib("Vue"),V=wepos_get_lib("Vuex");I.use(V);const M=new V.Store({modules:{Cart:T,Order:L}});let E=wepos_get_lib("Vue");E.config.productionTip=!1,new E({el:"#vue-frontend-app",router:F,store:M,render:t=>t(s),created(){this.setLocaleData(wepos.i18n.wepos),wepos.i18n["wepos-pro"]&&this.setLocaleData(wepos.i18n["wepos-pro"])}})})()})(); \ No newline at end of file +(()=>{var t={4577:t=>{"use strict";t.exports=function(t,e){void 0===e&&(e={});var a=e.offset;void 0===a&&(a=0);var s=e.threshold;void 0===s&&(s=0);var o=t.getBoundingClientRect(),i=o.top,r=o.right,n=o.bottom,c=o.left,l=o.width,u=o.height,d=n,p=window.innerWidth-c,_=window.innerHeight-i,m=r,h=s*l,v=s*u;return d>=(a.top||a+v)&&p>=(a.right||a+h)&&_>=(a.bottom||a+v)&&m>=(a.left||a+h)}},9623:t=>{t.exports=function(t,e){var a,s,o,i,r=0;return function(){a=this,s=arguments;var t=new Date-r;return i||(t>=e?n():i=setTimeout(n,e-t)),o};function n(){i=0,r=+new Date,o=t.apply(a,s),a=null,s=null}}},671:t=>{t.exports=function(t){var e={};function a(s){if(e[s])return e[s].exports;var o=e[s]={i:s,l:!1,exports:{}};return t[s].call(o.exports,o,o.exports,a),o.l=!0,o.exports}return a.m=t,a.c=e,a.d=function(t,e,s){a.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:s})},a.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},a.t=function(t,e){if(1&e&&(t=a(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var s=Object.create(null);if(a.r(s),Object.defineProperty(s,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)a.d(s,o,function(e){return t[e]}.bind(null,o));return s},a.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return a.d(e,"a",e),e},a.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},a.p="",a(a.s="fb15")}({f6fd:function(t,e){!function(t){var e="currentScript",a=t.getElementsByTagName("script");e in t||Object.defineProperty(t,e,{get:function(){try{throw new Error}catch(s){var t,e=(/.*at [^\(]*\((.*):.+:.+\)$/gi.exec(s.stack)||[!1])[1];for(t in a)if(a[t].src==e||"interactive"==a[t].readyState)return a[t];return null}}})}(document)},fb15:function(t,e,a){"use strict";var s;(a.r(e),"undefined"!=typeof window)&&(a("f6fd"),(s=window.document.currentScript)&&(s=s.src.match(/(.+\/)[^/]+\.js(\?.*)?$/))&&(a.p=s[1]));function o(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);e&&(s=s.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),a.push.apply(a,s)}return a}function i(t,e,a){return e in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}var r=function(t){for(var e=1;e":190,"?":191,"~":192,"{":219,"|":220,"}":221,'"':222},{a:65,b:66,c:67,d:68,e:69,f:70,g:71,h:72,i:73,j:74,k:75,l:76,m:77,n:78,o:79,p:80,q:81,r:82,s:83,t:84,u:85,v:86,w:87,x:88,y:89,z:90},{},{"numpad*":106,"numpad+":43,numpadadd:43,"numpad-":109,"numpad.":110,"numpad/":111,numlock:144,numpad0:96,numpad1:97,numpad2:98,numpad3:99,numpad4:100,numpad5:101,numpad6:102,numpad7:103,numpad8:104,numpad9:105},{},{f1:112,f2:113,f3:114,f4:115,f5:116,f6:117,f7:118,f8:119,f9:120,f10:121,f11:122,f12:123},{},{windows:91,"⇧":16,"⌥":18,"⌃":17,"⌘":91,ctl:17,control:17,option:18,pause:19,break:19,caps:20,return:13,escape:27,spc:32,pgup:33,pgdn:34,ins:45,del:46,cmd:91});function n(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if(!(Symbol.iterator in Object(t))&&"[object Arguments]"!==Object.prototype.toString.call(t))return;var a=[],s=!0,o=!1,i=void 0;try{for(var r,n=t[Symbol.iterator]();!(s=(r=n.next()).done)&&(a.push(r.value),!e||a.length!==e);s=!0);}catch(t){o=!0,i=t}finally{try{s||null==n.return||n.return()}finally{if(o)throw i}}return a}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var c=["INPUT","TEXTAREA","SELECT"],l=function(t,e,a){var s=t.find((function(t){var s,o,i=t.code,r=t.modifiers;return i===e&&(s=a,o=r,Object.entries(s).every((function(t){var e=n(t,2),a=e[0],s=e[1];return o[a]===s})))}));return!!s&&s.callback};function u(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);e&&(s=s.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),a.push.apply(a,s)}return a}function d(t){for(var e=1;e1)return t.reduce((function(t,a){return a=h[a]||a,m.hasOwnProperty("".concat(a,"Key"))?t.modifiers=d({},t.modifiers,p({},"".concat(a,"Key"),!0)):t.code=e[a]||f(a),t}),{modifiers:a});var s=h[t[0]]||t[0];return m.hasOwnProperty("".concat(s,"Key"))&&(a=d({},a,p({},"".concat(s,"Key"),!0))),{modifiers:a,code:e[s]||f(s)}},f=function(t){return r[t.toLowerCase()]||function(t){return 1===t.length?t.charCodeAt(0):void 0}(t)};function y(t,e,a){var s=e.value,o=e.modifiers;t._keyMap=function(t,e){var a=[];return Object.keys(t).forEach((function(s){var o=t[s],i=o.keyup,r={keydown:o.keydown||(i?_:t[s]),keyup:i||_},n=function(t){return(t=(t=(t=t.replace(/\s/g,"")).includes("numpad+")?t.replace("numpad+","numpadadd"):t).includes("++")?t.replace("++","+="):t).split(/\+{1}/)}(s),c=v(n,e),l=c.code,u=c.modifiers;a.push({code:l,modifiers:u,callback:r})})),a}(s,a),t._keyHandler=function(e){return function(t,e,a){var s=t.keyCode,o={ctrlKey:t.ctrlKey,altKey:t.altKey,shiftKey:t.shiftKey,metaKey:t.metaKey};a.prevent&&t.preventDefault(),a.stop&&t.stopPropagation();var i=document.activeElement,r=i.nodeName;if(!i.isContentEditable&&!c.includes(r)){var n=l(e,s,o);if(!n)return t;t.preventDefault(),n[t.type](t)}}(e,t._keyMap,o)},document.addEventListener("keydown",t._keyHandler),document.addEventListener("keyup",t._keyHandler)}function w(t){document.removeEventListener("keydown",t._keyHandler),document.removeEventListener("keyup",t._keyHandler)}var g=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{bind:function(e,a){y(e,a,t)},componentUpdated:function(e,a){a.value!==a.oldValue&&(w(e),y(e,a,t))},unbind:w}},C={install:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t.directive("hotkey",g(e))},directive:g()},b=C;e.default=b}})},2377:(t,e,a)=>{"use strict";function s(t){return t&&"object"==typeof t&&"default"in t?t.default:t}var o=s(a(9623)),i=s(a(4577)),r=["scroll","resize"],n={name:"mugen-scroll",props:{handler:{type:Function,required:!0},shouldHandle:{type:Boolean,default:!0},threshold:{type:Number,default:0},handleOnMount:{type:Boolean,default:!0},scrollContainer:{type:String}},mounted:function(){this.checkInView()},methods:{checkInView:function(){var t=this,e=function(){if(t.$refs.scroll){var e=i(t.$refs.scroll,{threshold:t.threshold});t.shouldHandle&&e&&t.handler()}};if(this.handleOnMount&&e(),this.scrollContainer){for(var a=this;(a=a.$parent)&&!this._scrollContainer;)t._scrollContainer=a.$refs[t.scrollContainer];this._scrollContainer&&this._scrollContainer.$el&&(this._scrollContainer=this._scrollContainer.$el)}this._scrollContainer=this._scrollContainer||window,this.check=o(e,200),r.forEach((function(e){return t._scrollContainer.addEventListener(e,t.check)}))}},render:function(t){return t("div",{staticClass:"mugen-scroll",ref:"scroll"},this.$slots.default)},beforeDestroy:function(){var t=this;r.forEach((function(e){return t._scrollContainer.removeEventListener(e,t.check)}))}};"undefined"!=typeof window&&window.Vue&&window.Vue.component(n.name,n),t.exports=n}},e={};function a(s){var o=e[s];if(void 0!==o)return o.exports;var i=e[s]={exports:{}};return t[s](i,i.exports,a),i.exports}a.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return a.d(e,{a:e}),e},a.d=(t,e)=>{for(var s in e)a.o(e,s)&&!a.o(t,s)&&Object.defineProperty(t,s,{enumerable:!0,get:e[s]})},a.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),(()=>{"use strict";var t=function(){var t=this._self._c;return t("div",{attrs:{id:"vue-frontend-app"}},[t("router-view")],1)};t._withStripped=!0;function e(t,e,a,s,o,i,r,n){var c,l="function"==typeof t?t.options:t;if(e&&(l.render=e,l.staticRenderFns=a,l._compiled=!0),s&&(l.functional=!0),i&&(l._scopeId="data-v-"+i),r?(c=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),o&&o.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(r)},l._ssrRegister=c):o&&(c=n?function(){o.call(this,(l.functional?this.parent:this).$root.$options.shadowRoot)}:o),c)if(l.functional){l._injectStyles=c;var u=l.render;l.render=function(t,e){return c.call(e),u(t,e)}}else{var d=l.beforeCreate;l.beforeCreate=d?[].concat(d,c):[c]}return{exports:t,options:l}}const s=e({name:"App"},t,[],!1,null,null,null).exports;var o=function(){var t=this,e=t._self._c;return e("div",{directives:[{name:"hotkey",rawName:"v-hotkey",value:t.hotkeys,expression:"hotkeys"}],attrs:{id:"wepos-main"}},[e("div",{staticClass:"content-product"},[e("div",{staticClass:"top-panel wepos-clearfix"},[e("div",{staticClass:"search-bar"},[e("product-search",{attrs:{products:t.products,settings:t.settings},on:{onProductAdded:t.addToCart}})],1),t._v(" "),e("div",{staticClass:"category"},[e("multiselect",{staticClass:"wepos-multiselect",attrs:{options:t.categories,selectLabel:"",deselectLabel:"",selectedLabel:"",placeholder:t.__("Select a category","wepos")},on:{select:t.handleCategorySelect,remove:t.handleCategoryRemove},scopedSlots:t._u([{key:"singleLabel",fn:function(e){return[t._v("\n "+t._s(e.option.name)+"\n ")]}},{key:"option",fn:function(a){return[e("span",[t._l(a.option.level,(function(e){return[t._v("\n  \n ")]})),t._v("\n "+t._s(a.option.name)+"\n ")],2)]}}]),model:{value:t.selectedCategory,callback:function(e){t.selectedCategory=e},expression:"selectedCategory"}},[t._v(" "),t._v(" "),e("template",{slot:"noResult"},[e("div",{staticClass:"no-data-found"},[t._v(t._s(t.__("Not found","wepos")))])])],2)],1),t._v(" "),e("div",{staticClass:"toggle-view"},[e("div",{staticClass:"product-toggle"},[e("span",{staticClass:"toggle-icon list-view flaticon-menu-button-of-three-horizontal-lines",class:{active:"list"==t.productView},on:{click:function(e){t.productView="list"}}}),t._v(" "),e("span",{staticClass:"toggle-icon grid-view flaticon-menu",class:{active:"grid"==t.productView},on:{click:function(e){t.productView="grid"}}})])])]),t._v(" "),t.getBreadCrums.length>0?e("div",{staticClass:"breadcrumb"},[e("ul",[t._l(t.getBreadCrums,(function(a){return[e("router-link",{attrs:{tag:"li",to:{name:"Home",query:{category:a.id}}}},[e("a",[t._v(t._s(a.name))])])]}))],2),t._v(" "),e("span",{staticClass:"close-breadcrumb flaticon-cancel-music",on:{click:function(e){return e.preventDefault(),t.removeBreadcrums.apply(null,arguments)}}})]):t._e(),t._v(" "),e("div",{ref:"items-wrapper",staticClass:"items-wrapper",class:t.productView},[t.productLoading?t._e():[t._l(t.getFilteredProduct,(function(a){return t.getFilteredProduct.length>0?e("div",{staticClass:"item"},["simple"===a.type?[e("div",{staticClass:"item-wrap",class:{disabled:!t.hasStock(a)},on:{click:function(e){return e.preventDefault(),t.addToCart(a)}}},[e("div",{staticClass:"img"},[e("img",{attrs:{src:t.getProductImage(a),alt:t.getProductImageName(a)}})]),t._v(" "),"grid"===t.productView?e("div",{staticClass:"title"},[t._v("\n "+t._s(t.truncateTitle(a.name,20))+"\n ")]):e("div",{staticClass:"title"},[e("div",{staticClass:"product-name"},[t._v(t._s(a.name))]),t._v(" "),e("ul",{staticClass:"meta"},[a.sku?e("li",[e("span",{staticClass:"label"},[t._v(t._s(t.__("Sku :","wepos")))]),t._v(" "),e("span",{staticClass:"value"},[t._v(t._s(a.sku))])]):t._e(),t._v(" "),e("li",[e("span",{staticClass:"label"},[t._v(t._s(t.__("Price :","wepos")))]),t._v(" "),e("span",{staticClass:"value",domProps:{innerHTML:t._s(a.price_html)}})])])]),t._v(" "),e("span",{staticClass:"add-product-icon flaticon-add",class:t.productView})])]:t._e(),t._v(" "),"variable"===a.type?[e("v-popover",{attrs:{offset:"10","popover-base-class":"product-variation tooltip popover",placement:"left-end"}},[e("div",{staticClass:"item-wrap",on:{click:function(e){return t.selectVariationProduct(a)}}},[e("div",{staticClass:"img"},[e("img",{attrs:{src:t.getProductImage(a),alt:t.getProductImageName(a)}})]),t._v(" "),"grid"===t.productView?e("div",{staticClass:"title"},[t._v("\n "+t._s(t.truncateTitle(a.name,20))+"\n ")]):e("div",{staticClass:"title"},[e("div",{staticClass:"product-name"},[t._v(t._s(a.name))]),t._v(" "),e("ul",{staticClass:"meta"},[e("li",[e("span",{staticClass:"label"},[t._v(t._s(t.__("Price :","wepos")))]),t._v(" "),e("span",{staticClass:"value",domProps:{innerHTML:t._s(a.price_html)}})])])]),t._v(" "),e("span",{staticClass:"add-product-icon flaticon-add",class:t.productView})]),t._v(" "),e("template",{slot:"popover"},[e("div",{staticClass:"variation-header"},[t._v("\n "+t._s(t.__("Select Variations","wepos"))+"\n ")]),t._v(" "),e("div",{staticClass:"variation-body"},[t._l(a.attributes,(function(a){return[e("div",{staticClass:"attribute"},[e("p",[t._v(t._s(a.name))]),t._v(" "),e("div",{staticClass:"options"},[t._l(a.options,(function(s){return[e("label",[e("input",{directives:[{name:"model",rawName:"v-model",value:t.selectedAttribute[a.name],expression:"selectedAttribute[attribute.name]"}],attrs:{type:"radio"},domProps:{value:s,checked:t._q(t.selectedAttribute[a.name],s)},on:{change:function(e){return t.$set(t.selectedAttribute,a.name,s)}}}),t._v(" "),e("div",{staticClass:"box"},[t._v("\n "+t._s(s)+"\n ")])])]}))],2)])]}))],2),t._v(" "),e("div",{staticClass:"variation-footer"},[e("button",{attrs:{disabled:t.attributeDisabled},on:{click:function(e){return e.preventDefault(),t.addVariationProduct.apply(null,arguments)}}},[t._v(t._s(t.__("Add Product","wepos")))])])])],2)]:t._e()],2):t._e()})),t._v(" "),t.getFilteredProduct.length<=0?e("div",{staticClass:"no-product-found"},[e("img",{attrs:{src:t.wepos.assets_url+"/images/no-product.png",alt:"",width:"120px"}}),t._v(" "),e("p",[t._v(t._s(t.__("No Product Found","wepos")))])]):t._e()],t._v(" "),t.productLoading?e("div",{staticClass:"product-loading"},[e("div",{staticClass:"spinner spinner-loading"})]):t._e()],2)]),t._v(" "),e("div",{staticClass:"content-cart"},[e("div",{staticClass:"top-panel"},[e("customer-search",{on:{onCustomerSelected:t.selectCustomer}}),t._v(" "),e("div",{staticClass:"action"},[e("div",{staticClass:"more-options"},[e("v-popover",{attrs:{offset:"5","popover-base-class":"wepos-dropdown-menu tooltip popover",placement:"bottom-end",open:t.showQucikMenu}},[e("button",{staticClass:"wepos-button",on:{click:function(e){return e.preventDefault(),t.openQucikMenu()}}},[e("span",{staticClass:"more-icon flaticon-more"})]),t._v(" "),e("template",{slot:"popover"},[e("ul",[t._l(t.quickLinkListStart,(function(t,a){return e(t,{key:a-"1",tag:"component"})})),t._v(" "),e("li",[e("a",{attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.emptyCart.apply(null,arguments)}}},[e("span",{staticClass:"flaticon-empty-cart quick-menu-icon"}),t._v(t._s(t.__("Empty Cart","wepos")))])]),t._v(" "),e("li",[e("a",{attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.openHelp.apply(null,arguments)}}},[e("span",{staticClass:"flaticon-information quick-menu-icon"}),t._v(t._s(t.__("Help","wepos")))])]),t._v(" "),e("li",{staticClass:"divider"}),t._v(" "),t._l(t.quickLinkList,(function(t,a){return e(t,{key:a,tag:"component"})})),t._v(" "),e("li",[e("a",{attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.logout.apply(null,arguments)}}},[e("span",{staticClass:"flaticon-logout quick-menu-icon"}),t._v(t._s(t.__("Logout","wepos")))])])],2)])],2)],1)])],1),t._v(" "),t._l(t.beforCartPanels,(function(t,a){return e(t,{key:a,tag:"component"})})),t._v(" "),t.settings.wepos_general?e("div",{staticClass:"cart-panel"},[e("div",{staticClass:"cart-content"},[e("table",{staticClass:"cart-table"},[e("thead",[e("tr",[e("th",{attrs:{width:"65%"}},[t._v(t._s(t.__("Product","wepos")))]),t._v(" "),e("th",{attrs:{width:"15%"}},[t._v(t._s(t.__("Qty","wepos")))]),t._v(" "),e("th",{attrs:{width:"30%"}},[t._v(t._s(t.__("Price","wepos")))]),t._v(" "),e("th"),t._v(" "),e("th")])]),t._v(" "),e("tbody",[t.cartdata.line_items.length>0?[t._l(t.cartdata.line_items,(function(a,s){return[e("tr",[e("td",{staticClass:"name",on:{click:function(e){return t.toggleEditQuantity(a,s)}}},[t._v("\n "+t._s(a.name)+"\n "),a.attribute.length>0&&"variable"===a.type?e("div",{staticClass:"attribute"},[e("ul",t._l(a.attribute,(function(a){return e("li",[e("span",{staticClass:"attr_name"},[t._v(t._s(a.name))]),t._v(": "),e("span",{staticClass:"attr_value"},[t._v(t._s(a.option))])])})),0)]):t._e()]),t._v(" "),e("td",{staticClass:"qty",on:{click:function(e){return t.toggleEditQuantity(a,s)}}},[t._v(t._s(a.quantity))]),t._v(" "),e("td",{staticClass:"price",on:{click:function(e){return t.toggleEditQuantity(a,s)}}},[a.on_sale?[e("span",{staticClass:"sale-price"},[t._v(t._s(t.formatPrice(a.quantity*a.sale_price)))]),t._v(" "),e("span",{staticClass:"regular-price"},[t._v(t._s(t.formatPrice(a.quantity*a.regular_price)))])]:[e("span",{staticClass:"sale-price"},[t._v(t._s(t.formatPrice(a.quantity*a.regular_price)))])]],2),t._v(" "),e("td",{staticClass:"action"},[e("span",{staticClass:"flaticon-right-arrow",class:{open:a.editQuantity},on:{click:function(e){return e.preventDefault(),t.toggleEditQuantity(a,s)}}})]),t._v(" "),e("td",{staticClass:"remove"},[e("span",{staticClass:"flaticon-cancel-music",on:{click:function(e){return e.preventDefault(),t.removeItem(s)}}})])]),t._v(" "),a.editQuantity?e("tr",{staticClass:"update-quantity-wrap"},[e("td",{attrs:{colspan:"5"}},[e("span",{staticClass:"qty"},[t._v(t._s(t.__("Quantity","wepos")))]),t._v(" "),e("span",{staticClass:"qty-number"},[e("input",{directives:[{name:"model",rawName:"v-model",value:a.quantity,expression:"item.quantity"}],attrs:{type:"number",min:"1",step:"1"},domProps:{value:a.quantity},on:{input:function(e){e.target.composing||t.$set(a,"quantity",e.target.value)}}})]),t._v(" "),e("span",{staticClass:"qty-action"},[e("a",{staticClass:"add",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.addQuantity(a,s)}}},[t._v("+")]),t._v(" "),e("a",{staticClass:"minus",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.removeQuantity(a,s)}}},[t._v("-")])])])]):t._e()]}))]:[e("tr",{staticClass:"no-item"},[e("td",{attrs:{colspan:"5"}},[e("img",{attrs:{src:t.wepos.assets_url+"/images/empty-cart.png",alt:"",width:"120px"}}),t._v(" "),e("p",[t._v(t._s(t.__("Empty Cart","wepos")))])])])]],2)])]),t._v(" "),e("div",{staticClass:"cart-calculation"},[e("form",{attrs:{autocomplete:"off"}},[e("table",{staticClass:"cart-total-table"},[e("tbody",[e("tr",{staticClass:"cart-meta-data"},[e("td",{staticClass:"label"},[t._v("\n "+t._s(t.__("Subtotal","wepos"))+"\n "),"incl"==t.settings.woo_tax.wc_tax_display_cart&&t.$store.getters["Cart/getTotalLineTax"]>0?e("span",{staticClass:"name"},[t._v("\n "+t._s(t.__("Including Tax","wepos"))+"\n ")]):t._e()]),t._v(" "),e("td",{staticClass:"price"},[t._v(t._s(t.formatPrice(t.$store.getters["Cart/getSubtotal"])))]),t._v(" "),e("td",{staticClass:"action"})]),t._v(" "),t.cartdata.coupon_lines.length>0?t._l(t.cartdata.coupon_lines,(function(a,s){return e("tr",{staticClass:"cart-meta-data"},["discount"==a.type?[e("td",{staticClass:"label"},[t._v(t._s(t.__("Discount","wepos"))+" "),e("span",{staticClass:"name"},[t._v(t._s(t.getDiscountAmount(a)))])]),t._v(" "),e("td",{staticClass:"price"},[t._v("−"+t._s(t.formatPrice(Math.abs(a.total))))]),t._v(" "),e("td",{staticClass:"action"},[e("span",{staticClass:"flaticon-cancel-music",on:{click:function(e){return t.removeCouponLine(s)}}})])]:[t.cartdata.coupon_lines[s].isEdit?[e("td",{staticClass:"label",attrs:{colspan:"2"}},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.feeData.name,expression:"feeData.name"}],ref:"fee_name",refInFor:!0,staticClass:"fee-name",attrs:{type:"text",placeholder:t.__("Fee Name","wepos")},domProps:{value:t.feeData.name},on:{input:function(e){e.target.composing||t.$set(t.feeData,"name",e.target.value)}}}),t._v(" "),e("input",{directives:[{name:"model",rawName:"v-model",value:t.feeData.value,expression:"feeData.value"}],ref:"fee_total",refInFor:!0,staticClass:"fee-amount",attrs:{type:"number",min:"0",step:"any",placeholder:t.__("Total","wepos")},domProps:{value:t.feeData.value},on:{input:function(e){e.target.composing||t.$set(t.feeData,"value",e.target.value)}}}),t._v(" "),"yes"==t.settings.wepos_general.enable_fee_tax?[e("label",{attrs:{for:"fee-tax-status"}},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.feeData.tax_status,expression:"feeData.tax_status"}],staticClass:"fee-tax-status",attrs:{type:"checkbox",id:"fee-tax-status","true-value":"taxable","false-value":"none"},domProps:{checked:Array.isArray(t.feeData.tax_status)?t._i(t.feeData.tax_status,null)>-1:t._q(t.feeData.tax_status,"taxable")},on:{change:function(e){var a=t.feeData.tax_status,s=e.target,o=s.checked?"taxable":"none";if(Array.isArray(a)){var i=t._i(a,null);s.checked?i<0&&t.$set(t.feeData,"tax_status",a.concat([null])):i>-1&&t.$set(t.feeData,"tax_status",a.slice(0,i).concat(a.slice(i+1)))}else t.$set(t.feeData,"tax_status",o)}}}),t._v(" "+t._s(t.__("Taxable","wepos")))]),t._v(" "),"taxable"==t.feeData.tax_status?e("select",{directives:[{name:"model",rawName:"v-model",value:t.feeData.tax_class,expression:"feeData.tax_class"}],staticClass:"fee-tax-class",on:{change:function(e){var a=Array.prototype.filter.call(e.target.options,(function(t){return t.selected})).map((function(t){return"_value"in t?t._value:t.value}));t.$set(t.feeData,"tax_class",e.target.multiple?a:a[0])}}},t._l(t.availableTax,(function(a){return e("option",{domProps:{value:"standard"==a.class?"":a.class}},[t._v(t._s(t.unSanitizeString(a.class))+" - "+t._s(a.percentage_rate))])})),0):t._e()]:t._e(),t._v(" "),e("button",{attrs:{disabled:""==t.feeData.name},on:{click:function(e){return e.preventDefault(),t.saveFee(s)}}},[t._v(t._s(t.__("Apply","wepos")))]),t._v(" "),e("button",{staticClass:"cancel",on:{click:function(e){return e.preventDefault(),t.cancelEditFee(s)}}},[t._v(t._s(t.__("Cancel","wepos")))])],2),t._v(" "),e("td",{staticClass:"action"},[e("span",{staticClass:"flaticon-cancel-music",on:{click:function(e){return t.removeCouponLine(s)}}})])]:[e("td",{staticClass:"label",on:{dblclick:function(e){return e.preventDefault(),t.editFeeData(s)}}},[t._v(t._s(t.__("Fee","wepos"))+" "),e("span",{staticClass:"name"},[t._v(t._s(a.name)+" "+t._s(t.getDiscountAmount(a)))])]),t._v(" "),e("td",{staticClass:"price"},[t._v(t._s(t.formatPrice(Math.abs(a.total))))]),t._v(" "),e("td",{staticClass:"action"},[e("span",{staticClass:"flaticon-cancel-music",on:{click:function(e){return t.removeCouponLine(s)}}})])]]],2)})):t._e(),t._v(" "),t.cartdata.fee_lines.length>0?t._l(t.cartdata.fee_lines,(function(a,s){return e("tr",{staticClass:"cart-meta-data"},["discount"==a.type?[e("td",{staticClass:"label"},[t._v(t._s(t.__("Discount","wepos"))+" "),e("span",{staticClass:"name"},[t._v(t._s(t.getDiscountAmount(a)))])]),t._v(" "),e("td",{staticClass:"price"},[t._v("−"+t._s(t.formatPrice(Math.abs(a.total))))]),t._v(" "),e("td",{staticClass:"action"},[e("span",{staticClass:"flaticon-cancel-music",on:{click:function(e){return t.removeFeeLine(s)}}})])]:[t.cartdata.fee_lines[s].isEdit?[e("td",{staticClass:"label",attrs:{colspan:"2"}},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.feeData.name,expression:"feeData.name"}],ref:"fee_name",refInFor:!0,staticClass:"fee-name",attrs:{type:"text",placeholder:t.__("Fee Name","wepos")},domProps:{value:t.feeData.name},on:{input:function(e){e.target.composing||t.$set(t.feeData,"name",e.target.value)}}}),t._v(" "),e("input",{directives:[{name:"model",rawName:"v-model",value:t.feeData.value,expression:"feeData.value"}],ref:"fee_total",refInFor:!0,staticClass:"fee-amount",attrs:{type:"number",min:"0",step:"any",placeholder:t.__("Total","wepos")},domProps:{value:t.feeData.value},on:{input:function(e){e.target.composing||t.$set(t.feeData,"value",e.target.value)}}}),t._v(" "),"yes"==t.settings.wepos_general.enable_fee_tax?[e("label",{attrs:{for:"fee-tax-status"}},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.feeData.tax_status,expression:"feeData.tax_status"}],staticClass:"fee-tax-status",attrs:{type:"checkbox",id:"fee-tax-status","true-value":"taxable","false-value":"none"},domProps:{checked:Array.isArray(t.feeData.tax_status)?t._i(t.feeData.tax_status,null)>-1:t._q(t.feeData.tax_status,"taxable")},on:{change:function(e){var a=t.feeData.tax_status,s=e.target,o=s.checked?"taxable":"none";if(Array.isArray(a)){var i=t._i(a,null);s.checked?i<0&&t.$set(t.feeData,"tax_status",a.concat([null])):i>-1&&t.$set(t.feeData,"tax_status",a.slice(0,i).concat(a.slice(i+1)))}else t.$set(t.feeData,"tax_status",o)}}}),t._v(" "+t._s(t.__("Taxable","wepos")))]),t._v(" "),"taxable"==t.feeData.tax_status?e("select",{directives:[{name:"model",rawName:"v-model",value:t.feeData.tax_class,expression:"feeData.tax_class"}],staticClass:"fee-tax-class",on:{change:function(e){var a=Array.prototype.filter.call(e.target.options,(function(t){return t.selected})).map((function(t){return"_value"in t?t._value:t.value}));t.$set(t.feeData,"tax_class",e.target.multiple?a:a[0])}}},t._l(t.availableTax,(function(a){return e("option",{domProps:{value:"standard"==a.class?"":a.class}},[t._v(t._s(t.unSanitizeString(a.class))+" - "+t._s(a.percentage_rate))])})),0):t._e()]:t._e(),t._v(" "),e("button",{attrs:{disabled:""==t.feeData.name},on:{click:function(e){return e.preventDefault(),t.saveFee(s)}}},[t._v(t._s(t.__("Apply","wepos")))]),t._v(" "),e("button",{staticClass:"cancel",on:{click:function(e){return e.preventDefault(),t.cancelEditFee(s)}}},[t._v(t._s(t.__("Cancel","wepos")))])],2),t._v(" "),e("td",{staticClass:"action"},[e("span",{staticClass:"flaticon-cancel-music",on:{click:function(e){return t.removeFeeLine(s)}}})])]:[e("td",{staticClass:"label",on:{dblclick:function(e){return e.preventDefault(),t.editFeeData(s)}}},[t._v(t._s(t.__("Fee","wepos"))+" "),e("span",{staticClass:"name"},[t._v(t._s(a.name)+" "+t._s(t.getDiscountAmount(a)))])]),t._v(" "),e("td",{staticClass:"price"},[t._v(t._s(t.formatPrice(Math.abs(a.total))))]),t._v(" "),e("td",{staticClass:"action"},[e("span",{staticClass:"flaticon-cancel-music",on:{click:function(e){return t.removeFeeLine(s)}}})])]]],2)})):t._e(),t._v(" "),t.$store.getters["Cart/getTotalTax"]?e("tr",{staticClass:"tax"},[e("td",{staticClass:"label"},[t._v(t._s("incl"===t.settings.woo_tax.wc_tax_display_cart?t.__("Fee Tax","wepos"):t.__("Tax","wepos")))]),t._v(" "),e("td",{staticClass:"price"},[t._v(t._s(t.formatPrice(t.$store.getters["Cart/getTotalTax"])))]),t._v(" "),e("td",{staticClass:"action"})]):t._e(),t._v(" "),e("tr",{staticClass:"cart-action"},[e("td",{attrs:{colspan:"3"}},[e("fee-keypad",{attrs:{name:t.__("Discount","wepos"),"short-key":"discount"},on:{inputfee:t.setDiscount}}),t._v(" "),e("fee-keypad",{attrs:{name:t.__("Fee","wepos"),"short-key":"fee"},on:{inputfee:t.setFee}}),t._v(" "),""==t.orderdata.customer_note?e("customer-note",{on:{addnote:t.addCustomerNote}}):t._e()],1)]),t._v(" "),t.orderdata.customer_note?e("tr",{staticClass:"note"},[e("td",{staticClass:"note-text",attrs:{colspan:"2"}},[t._v("\n "+t._s(t.orderdata.customer_note)+"\n ")]),t._v(" "),e("td",{staticClass:"action"},[e("span",{staticClass:"flaticon-cancel-music",on:{click:function(e){return e.preventDefault(),t.removeCustomerNote.apply(null,arguments)}}})])]):t._e(),t._v(" "),e("tr",{staticClass:"pay-now",on:{click:function(e){return t.initPayment()}}},[e("td",[t._v(t._s(t.__("Pay Now","wepos")))]),t._v(" "),e("td",{staticClass:"amount"},[t._v(t._s(t.formatPrice(t.$store.getters["Cart/getTotal"])))]),t._v(" "),t._m(0)])],2)])])])]):t._e()],2),t._v(" "),t.showPaymentReceipt?e("modal",{attrs:{width:"600px",height:"400px"},on:{close:function(e){return t.createNewSale()}}},[e("template",{slot:"body"},[e("div",{staticClass:"wepos-payment-receipt"},[e("div",{staticClass:"sale-completed"},[e("img",{attrs:{src:t.wepos.assets_url+"/images/sale-completed.png",alt:"",width:"120px"}}),t._v(" "),e("h2",[t._v(t._s(t.__("Sale Completed","wepos")))])]),t._v(" "),e("div",{staticClass:"print-section"},[e("print-receipt"),t._v(" "),e("button",{staticClass:"new-sale-btn",on:{click:function(e){return e.preventDefault(),t.createNewSale()}}},[e("span",{staticClass:"icon flaticon-add"}),t._v(" "),e("span",{staticClass:"label"},[t._v(t._s(t.__("New Sale","wepos")))])])],1)])])],2):t._e(),t._v(" "),t.showHelp?e("modal",{attrs:{width:"700px",height:"500px"},on:{close:function(e){return t.closeHelp()}}},[e("template",{slot:"body"},[e("div",{staticClass:"wepos-help-wrapper"},[e("h2",[t._v(t._s(t.__("Shortcut Keys","wepos")))]),t._v(" "),e("ul",[e("li",[e("span",{staticClass:"code"},[e("code",[t._v("f1")])]),t._v(" "),e("span",{staticClass:"title"},[t._v(t._s(t.__("Search Product","wepos")))])]),t._v(" "),e("li",[e("span",{staticClass:"code"},[e("code",[t._v("f2")])]),t._v(" "),e("span",{staticClass:"title"},[t._v(t._s(t.__("Scan Product","wepos")))])]),t._v(" "),e("li",[e("span",{staticClass:"code"},[e("code",[t._v("f3")])]),t._v(" "),e("span",{staticClass:"title"},[t._v(t._s(t.__("Toggle Product View","wepos")))])]),t._v(" "),e("li",[e("span",{staticClass:"code"},[e("code",[t._v("f4")])]),t._v(" "),e("span",{staticClass:"title"},[t._v(t._s(t.__("Add Fee in cart","wepos")))])]),t._v(" "),e("li",[e("span",{staticClass:"code"},[e("code",[t._v("f5")])]),t._v(" "),e("span",{staticClass:"title"},[t._v(t._s(t.__("Add Discount in cart","wepos")))])]),t._v(" "),e("li",[e("span",{staticClass:"code"},[e("code",[t._v("f6")])]),t._v(" "),e("span",{staticClass:"title"},[t._v(t._s(t.__("Add Customer note","wepos")))])]),t._v(" "),e("li",[e("span",{staticClass:"code"},[e("code",[t._v("f7")])]),t._v(" "),e("span",{staticClass:"title"},[t._v(t._s(t.__("Customer Search","wepos")))])]),t._v(" "),e("li",[e("span",{staticClass:"code"},[e("code",[t._v("shift+f7")])]),t._v(" "),e("span",{staticClass:"title"},[t._v(t._s(t.__("Add new Customer","wepos")))])]),t._v(" "),e("li",[e("span",{staticClass:"code"},[e("code",[t._v("f8")])]),t._v(" "),e("span",{staticClass:"title"},[t._v(t._s(t.__("Create New Sale","wepos")))])]),t._v(" "),e("li",[e("span",{staticClass:"code"},[e("code",[t._v("shift+f8")])]),t._v(" "),e("span",{staticClass:"title"},[t._v(t._s(t.__("Empty your cart","wepos")))])]),t._v(" "),e("li",[e("span",{staticClass:"code"},[e("code",[t._v("f9")])]),t._v(" "),e("span",{staticClass:"title"},[t._v(t._s(t.__("Go to payment receipt","wepos")))])]),t._v(" "),e("li",[e("span",{staticClass:"code"},[e("code",[t._v("f10")])]),t._v(" "),e("span",{staticClass:"title"},[t._v(t._s(t.__("Process Payment","wepos")))])]),t._v(" "),e("li",[e("span",{staticClass:"code"},[e("code",[t._v("ctrl/cmd+p")])]),t._v(" "),e("span",{staticClass:"title"},[t._v(t._s(t.__("Print Receipt","wepos")))])]),t._v(" "),e("li",[e("span",{staticClass:"code"},[e("code",[t._v("ctrl/cmd+?")])]),t._v(" "),e("span",{staticClass:"title"},[t._v(t._s(t.__("Show/Close(Toggle) Help","wepos")))])]),t._v(" "),e("li",[e("span",{staticClass:"code"},[e("code",[t._v("esc")])]),t._v(" "),e("span",{staticClass:"title"},[t._v(t._s(t.__("Close anything","wepos")))])])])])])],2):t._e(),t._v(" "),t.showModal?e("modal",{attrs:{width:"98%",height:"95vh"},on:{open:function(e){return t.focusCashInput()},close:function(e){return t.backToSale()},enterpressed:function(e){return t.processPayment()}}},[e("template",{slot:"body"},[e("div",{staticClass:"wepos-checkout-wrapper"},[e("div",{staticClass:"left-content"},[e("div",{staticClass:"header"},[t._v("\n "+t._s(t.__("Sale Summary","wepos"))+"\n ")]),t._v(" "),e("div",{staticClass:"content"},[e("table",{staticClass:"sale-summary-cart"},[e("tbody",t._l(t.cartdata.line_items,(function(a){return e("tr",[e("td",{staticClass:"name"},[t._v("\n "+t._s(a.name)+"\n "),a.attribute.length>0&&"variable"===a.type?e("div",{staticClass:"attribute"},[e("ul",t._l(a.attribute,(function(a){return e("li",[e("span",{staticClass:"attr_name"},[t._v(t._s(a.name))]),t._v(": "),e("span",{staticClass:"attr_value"},[t._v(t._s(a.option))])])})),0)]):t._e()]),t._v(" "),e("td",{staticClass:"quantity"},[t._v(t._s(a.quantity))]),t._v(" "),e("td",{staticClass:"price"},[a.on_sale?[e("span",{staticClass:"sale-price"},[t._v(t._s(t.formatPrice(a.quantity*a.sale_price)))]),t._v(" "),e("span",{staticClass:"regular-price"},[t._v(t._s(t.formatPrice(a.quantity*a.regular_price)))])]:[e("span",{staticClass:"sale-price"},[t._v(t._s(t.formatPrice(a.quantity*a.regular_price)))])]],2)])})),0)])]),t._v(" "),e("div",{staticClass:"footer"},[e("ul",[e("li",{staticClass:"wepos-clearfix"},[e("span",{staticClass:"wepos-left"},[t._v("\n "+t._s(t.__("Subtotal","wepos"))+"\n "),"incl"==t.settings.woo_tax.wc_tax_display_cart?e("span",{staticClass:"metadata"},[t._v("\n "+t._s(t.__("Including Tax","wepos"))+"\n ")]):t._e()]),t._v(" "),e("span",{staticClass:"wepos-right"},[t._v(t._s(t.formatPrice(t.$store.getters["Cart/getSubtotal"])))])]),t._v(" "),t.cartdata.coupon_lines.length>0?t._l(t.cartdata.coupon_lines,(function(a,s){return e("li",{staticClass:"wepos-clearfix"},["discount"==a.type?[e("span",{staticClass:"wepos-left"},[t._v(t._s(t.__("Discount","wepos"))+" "),e("span",{staticClass:"metadata"},[t._v(t._s(a.name)+" "+t._s(t.getDiscountAmount(a)))])]),t._v(" "),e("span",{staticClass:"wepos-right"},[t._v("-"+t._s(t.formatPrice(Math.abs(a.total))))])]:[e("span",{staticClass:"wepos-left"},[t._v(t._s(t.__("Fee","wepos"))+" "),e("span",{staticClass:"metadata"},[t._v(t._s(a.name)+" "+t._s(t.getDiscountAmount(a)))])]),t._v(" "),e("span",{staticClass:"wepos-right"},[t._v(t._s(t.formatPrice(a.total)))])]],2)})):t._e(),t._v(" "),t.cartdata.fee_lines.length>0?t._l(t.cartdata.fee_lines,(function(a,s){return e("li",{staticClass:"wepos-clearfix"},["discount"==a.type?[e("span",{staticClass:"wepos-left"},[t._v(t._s(t.__("Discount","wepos"))+" "),e("span",{staticClass:"metadata"},[t._v(t._s(a.name)+" "+t._s(t.getDiscountAmount(a)))])]),t._v(" "),e("span",{staticClass:"wepos-right"},[t._v("-"+t._s(t.formatPrice(Math.abs(a.total))))])]:[e("span",{staticClass:"wepos-left"},[t._v(t._s(t.__("Fee","wepos"))+" "),e("span",{staticClass:"metadata"},[t._v(t._s(a.name)+" "+t._s(t.getDiscountAmount(a)))])]),t._v(" "),e("span",{staticClass:"wepos-right"},[t._v(t._s(t.formatPrice(a.total)))])]],2)})):t._e(),t._v(" "),t.$store.getters["Cart/getTotalTax"]?e("li",{staticClass:"wepos-clearfix"},[e("span",{staticClass:"wepos-left"},[t._v(t._s(t.__("Tax","wepos")))]),t._v(" "),e("span",{staticClass:"wepos-right"},[t._v(t._s(t.formatPrice(t.$store.getters["Cart/getTotalTax"])))])]):t._e(),t._v(" "),e("li",{staticClass:"wepos-clearfix"},[e("span",{staticClass:"wepos-left"},[t._v(t._s(t.__("Order Total","wepos")))]),t._v(" "),e("span",{staticClass:"wepos-right"},[t._v(t._s(t.formatPrice(t.$store.getters["Cart/getTotal"])))])]),t._v(" "),e("li",{staticClass:"wepos-clearfix"},[e("span",{staticClass:"wepos-left"},[t._v(t._s(t.__("Pay","wepos")))]),t._v(" "),e("span",{staticClass:"wepos-right"},[t._v(t._s(t.formatPrice(t.$store.getters["Cart/getTotal"])))])])],2)])]),t._v(" "),e("div",{staticClass:"right-content"},[e("div",{staticClass:"header wepos-clearfix"},[e("h2",{staticClass:"wepos-left"},[t._v(t._s(t.__("Pay","wepos")))]),t._v(" "),e("span",{staticClass:"pay-amount wepos-right"},[t._v(t._s(t.formatPrice(t.$store.getters["Cart/getTotal"])))])]),t._v(" "),e("div",{staticClass:"content"},[e("div",{staticClass:"payment-gateway"},[t.availableGateways.length>0?[t._l(t.availableGateways,(function(a){return e("label",[e("input",{directives:[{name:"model",rawName:"v-model",value:t.selectedGateway,expression:"selectedGateway"}],attrs:{type:"radio",name:"gateway",checked:""},domProps:{value:a.id,checked:t._q(t.selectedGateway,a.id)},on:{change:function(e){t.selectedGateway=a.id}}}),t._v(" "),e("span",{staticClass:"gateway",class:`gateway-${a.id}`},[t._v("\n "+t._s(a.title)+"\n ")])])})),t._v(" "),t.emptyGatewayDiv>0?t._l(t.emptyGatewayDiv,(function(t){return e("label",{key:t},[e("span",{staticClass:"grid-placeholder"})])})):t._e()]:[e("p",[t._v(t._s(t.__("No gateway found","wepos")))])]],2),t._v(" "),"wepos_cash"==t.orderdata.payment_method?[e("div",{staticClass:"payment-option"},[e("div",{staticClass:"payment-amount"},[e("div",{staticClass:"input-part"},[e("div",{staticClass:"input-wrap"},[e("p",[t._v(t._s(t.__("Cash","wepos")))]),t._v(" "),e("div",{staticClass:"input-addon"},[e("span",{staticClass:"currency"},[t._v(t._s(t.wepos.currency_format_symbol))]),t._v(" "),e("input",{directives:[{name:"model",rawName:"v-model",value:t.cashAmount,expression:"cashAmount"}],ref:"cashamount",attrs:{id:"input-cash-amount",type:"text"},domProps:{value:t.cashAmount},on:{input:function(e){e.target.composing||(t.cashAmount=e.target.value)}}})])])]),t._v(" "),e("div",{staticClass:"change-money"},[e("p",[t._v(t._s(t.__("Change money","wepos"))+": "+t._s(t.formatPrice(t.changeAmount)))])])])])]:t._e(),t._v(" "),t._l(t.availableGatewayContent,(function(a,s){return e(a,{key:s,tag:"component",attrs:{availablegateways:t.availableGateways}})}))],2),t._v(" "),e("div",{staticClass:"footer wepos-clearfix"},[e("a",{staticClass:"back-btn wepos-left",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.backToSale()}}},[t._v(t._s(t.__("Back to Sale","wepos")))]),t._v(" "),e("button",{staticClass:"process-checkout-btn wepos-right",attrs:{disabled:!t.$store.getters["Order/getCanProcessPayment"]},on:{click:function(e){return e.preventDefault(),t.processPayment.apply(null,arguments)}}},[t._v(t._s(t.__("Process Payment","wepos")))])])])])])],2):t._e(),t._v(" "),e("overlay",{attrs:{show:t.showOverlay}}),t._v(" "),t.showReceiptHtml?e("print-receipt-html",{directives:[{name:"show",rawName:"v-show",value:t.createprintreceipt,expression:"createprintreceipt"}],attrs:{printdata:t.printdata,settings:t.settings}}):t._e(),t._v(" "),t._l(t.afterMainContents,(function(a,s){return e(a,{key:s,tag:"component",attrs:{orderdata:t.orderdata,printdata:t.printdata}})}))],2)};o._withStripped=!0;var i=function(){var t=this,e=t._self._c;return t.show?e("div",{staticClass:"overlay"}):t._e()};i._withStripped=!0;const r=e({name:"Overlay",props:{show:{type:Boolean}}},i,[],!1,null,null,null).exports;var n=function(){var t=this,e=t._self._c;return e("div",{directives:[{name:"click-outside",rawName:"v-click-outside",value:t.outside,expression:"outside"}],staticClass:"search-box"},[e("form",{attrs:{action:"",autocomplete:"off"},on:{submit:function(e){return e.preventDefault(),t.handleProductScan.apply(null,arguments)}}},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.serachInput,expression:"serachInput"}],ref:"productSearch",attrs:{type:"text",name:"search",id:"product-search",placeholder:t.placeholder},domProps:{value:t.serachInput},on:{focus:function(e){return e.preventDefault(),t.triggerFocus.apply(null,arguments)},keyup:function(e){return e.preventDefault(),t.searchProduct.apply(null,arguments)},input:function(e){e.target.composing||(t.serachInput=e.target.value)}}}),t._v(" "),"product"==t.mode?e("span",{staticClass:"search-icon flaticon-musica-searcher"}):t._e(),t._v(" "),"scan"==t.mode?e("span",{staticClass:"search-icon flaticon-supermarket-scanner"}):t._e(),t._v(" "),e("div",{directives:[{name:"hotkey",rawName:"v-hotkey",value:t.hotkeys,expression:"hotkeys"}],staticClass:"search-type"},[e("a",{class:{active:"product"==t.mode},attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.changeMode("product")}}},[t._v(t._s(t.__("Product","wepos")))]),t._v(" "),e("a",{class:{active:"scan"==t.mode},attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.changeMode("scan")}}},[t._v(t._s(t.__("Scan","wepos")))])]),t._v(" "),e("div",{directives:[{name:"show",rawName:"v-show",value:t.showResults&&"product"==t.mode,expression:"showResults && mode=='product'"}],staticClass:"search-result"},[t.searchableProduct.length?e("div",[e("keyboard-control",{attrs:{listLength:t.searchableProduct.length},on:{"key-down":t.onKeyDown,"key-up":t.onKeyUp},scopedSlots:t._u([{key:"default",fn:function(a){let{selectedIndex:s}=a;return t._l(t.searchableProduct,(function(a,o){return e("li",{key:o,staticClass:"product-search-item",class:{selected:o===s}},["simple"==a.type?[e("a",{staticClass:"wepos-clearfix",attrs:{href:"#"},on:{click:function(e){return t.addToCartAction(a)}}},[t._v(t._s(a.name)+"\n "),e("span",{staticClass:"price"},[t._v(t._s(t.formatPrice(a.price)))]),t._v(" "),a.sku?e("span",{staticClass:"sku"},[t._v(t._s(a.sku))]):t._e(),t._v(" "),e("span",{staticClass:"action flaticon-enter-arrow wepos-right"})])]:t._e(),t._v(" "),"variable"==a.type?[e("a",{attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.selectVariation(a)}}},[t._v(t._s(a.name)+"\n "),e("span",{staticClass:"price"},[t._v(t._s(t.formatPrice(a.price)))]),t._v(" "),a.sku?e("span",{staticClass:"sku"},[t._v(t._s(a.sku))]):t._e(),t._v(" "),e("span",{staticClass:"action flaticon-enter-arrow wepos-right"})])]:t._e()],2)}))}}],null,!1,2881840290)})],1):e("div",{staticClass:"no-data-found"},[t._v("\n "+t._s(t.__("No product found","wepos"))+"\n ")]),t._v(" "),e("div",{staticClass:"suggession"},[e("span",{staticClass:"term"},[e("span",{staticClass:"flaticon-swap"}),t._v(" "+t._s(t.__("to navigate","wepos"))+"\n ")]),t._v(" "),e("span",{staticClass:"term"},[e("span",{staticClass:"flaticon-enter-arrow"}),t._v(" "+t._s(t.__("to select","wepos"))+"\n ")]),t._v(" "),e("span",{staticClass:"term"},[e("strong",[t._v("esc")]),t._v(" "+t._s(t.__("to dismiss","wepos"))+"\n ")])])])]),t._v(" "),t.showVariationModal?e("modal",{attrs:{title:t.__("Select Variations","wepos"),width:"500px",height:"auto",footer:!0,header:!0},on:{close:function(e){t.showVariationModal=!1}}},[e("template",{slot:"body"},t._l(t.selectedVariationProduct.attributes,(function(a){return e("div",{staticClass:"variation-attribute-wrapper"},[e("div",{staticClass:"attribute"},[e("p",[t._v(t._s(a.name))]),t._v(" "),e("div",{staticClass:"options"},[t._l(a.options,(function(s){return[e("label",[e("input",{directives:[{name:"model",rawName:"v-model",value:t.chosenAttribute[a.name],expression:"chosenAttribute[attribute.name]"}],attrs:{type:"radio"},domProps:{value:s,checked:t._q(t.chosenAttribute[a.name],s)},on:{change:function(e){return t.$set(t.chosenAttribute,a.name,s)}}}),t._v(" "),e("div",{staticClass:"box"},[t._v("\n "+t._s(s)+"\n ")])])]}))],2)])])})),0),t._v(" "),e("template",{slot:"footer"},[e("button",{staticClass:"add-variation-btn",attrs:{disabled:t.attributeDisabled},on:{click:function(e){return t.addVariationProduct()}}},[t._v(t._s(t.__("Add Product","wepos")))])])],2):t._e()],1)};n._withStripped=!0;const c=e({props:{listLength:Number},data:()=>({selectedIndex:0}),render(t){return t("ul",this.$scopedSlots.default({selectedIndex:this.selectedIndex}))},methods:{keyHandler(t){const e=t.which||t.keyCode;38===e||t.shiftKey&&9===e?(this.handleKeyUp(t),this.$emit("key-up")):40!==e&&9!==e||(this.handleKeyDown(t),this.$emit("key-down"))},handleKeyUp(t){t.preventDefault(),this.selectedIndex<=0?this.selectedIndex=this.listLength-1:this.selectedIndex>0&&this.selectedIndex<=this.listLength-1&&this.selectedIndex--},handleKeyDown(t){t.preventDefault(),this.selectedIndex<0||this.selectedIndex===this.listLength-1?this.selectedIndex=0:this.selectedIndex>=0&&this.selectedIndex[]},settings:{type:Object,default:()=>({})}},components:{Modal:l,KeyboardControl:c},data:()=>({showResults:!1,showVariationModal:!1,mode:"scan",serachInput:"",searchableProduct:[],selectedVariationProduct:{},attributeDisabled:!0,chosenAttribute:{}}),computed:{placeholder(){return"scan"==this.mode?this.__("Scan your product","wepos"):this.__("Search product by typing","wepos")},hotkeys(){return{f1:this.changeProductSearch,f2:this.changeScan,esc:this.searchClose}}},watch:{chosenAttribute(t,e){Object.keys(t).length==this.selectedVariationProduct.attributes.length&&(this.attributeDisabled=!1)}},methods:{changeScan(t){t.preventDefault(),this.changeMode("scan")},changeProductSearch(t){t.preventDefault(),this.changeMode("product")},searchClose(){this.showResults=!1,this.showVariationModal=!1,this.changeMode("scan"),this.$refs.productSearch.blur()},onKeyDown(){jQuery(".product-search-item.selected").next().children("a").focus()},onKeyUp(){jQuery(".product-search-item.selected").prev().children("a").focus()},triggerFocus(){this.showResults=!0,this.$emit("onfocus")},outside(){this.showResults=!1,this.$emit("onblur")},changeMode(t){this.mode=t,"scan"==this.mode&&(this.searchableProduct=[],this.showResults=!1),this.$refs.productSearch.focus()},handleProductScan(){if("product"!=this.mode){var t=this.settings.wepos_general,e="custom"==t.barcode_scanner_field?"barcode":t.barcode_scanner_field,a={},s=this.products.filter((t=>{if("simple"==t.type&&t[e].toString()==this.serachInput)return!0;if("variable"==t.type){var a=!1;if(t.variations.length>0&&weLo_.forEach(t.variations,((t,s)=>{t[e].toString()==this.serachInput&&(a=!0)})),a)return!0}return!1}));if(s.length>0)if("variable"==(s=s[0]).type)(a=s.variations.filter((t=>t[e].toString()==this.serachInput))[0]).parent_id=s.id,a.type=s.type,a.name=s.name,this.$emit("onProductAdded",a);else this.$emit("onProductAdded",s);this.serachInput=""}},searchProduct(t){this.serachInput&&"product"==this.mode&&(this.searchableProduct=this.products.filter((t=>-1!=t.id.toString().indexOf(this.serachInput)||(-1!=t.name.toString().toLowerCase().indexOf(this.serachInput.toLowerCase())||-1!=t.sku.indexOf(this.serachInput)))))},selectVariation(t){this.selectedVariationProduct=t,this.showVariationModal=!0},addVariationProduct(){var t=this.findMatchingVariations(this.selectedVariationProduct.variations,this.chosenAttribute)[0];t.parent_id=this.selectedVariationProduct.id,t.type=this.selectedVariationProduct.type,t.name=this.selectedVariationProduct.name,this.$emit("onProductAdded",t),this.showVariationModal=!1,this.chosenAttribute={}},addToCartAction(t){this.$emit("onProductAdded",t)}},mounted(){this.$refs.productSearch.focus()}},n,[],!1,null,null,null).exports;var d=function(){var t=this,e=t._self._c;return e("div",{directives:[{name:"click-outside",rawName:"v-click-outside",value:t.onblur,expression:"onblur"},{name:"hotkey",rawName:"v-hotkey",value:t.hotkeys,expression:"hotkeys"}],staticClass:"customer-search-box"},[e("form",{attrs:{action:"",autocomplete:"off"}},[e("svg",{staticClass:"customer-icon",attrs:{width:"19px",height:"19px",viewBox:"0 0 19 19",version:"1.1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"}},[e("defs",[e("linearGradient",{attrs:{x1:"14.5524094%",y1:"14.6909544%",x2:"82.7722259%",y2:"85.2519444%",id:"linearGradient-1"}},[e("stop",{attrs:{"stop-color":"#C444FB",offset:"0%"}}),t._v(" "),e("stop",{attrs:{"stop-color":"#5B56D7",offset:"100%"}})],1)],1),t._v(" "),e("g",{attrs:{id:"Page-1",stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"}},[e("g",{attrs:{id:"POS-Design---Dokan-P2",transform:"translate(-759.000000, -27.000000)"}},[e("g",{attrs:{id:"Group",transform:"translate(759.000000, 27.000000)"}},[e("circle",{attrs:{id:"Oval",fill:"url(#linearGradient-1)","fill-rule":"nonzero",cx:"9.5",cy:"9.5",r:"9.5"}}),t._v(" "),e("g",{attrs:{id:"flaticon1543304699-svg-2",transform:"translate(9.500000, 9.500000) scale(-1, 1) translate(-9.500000, -9.500000) translate(6.000000, 5.000000)"}},[e("g",{attrs:{id:"flaticon1543304699-svg"}},[e("path",{attrs:{d:"M3.31578947,4.40159143 C4.27870463,4.40159143 5.0593751,3.41627143 5.0593751,2.20080857 C5.0593751,0.98532 4.80306952,0 3.31578947,0 C1.82850943,0 1.57215436,0.98532 1.57215436,2.20080857 C1.57215436,3.41627143 2.35282482,4.40159143 3.31578947,4.40159143 Z",id:"Path",fill:"#FFFFFF"}}),t._v(" "),e("path",{attrs:{d:"M0.0616980658,7.82884897 C0.0604730658,7.62453402 0.0592480658,7.77128348 0.0616980658,7.82884897 Z",id:"Path",fill:"#000000"}}),t._v(" "),e("path",{attrs:{d:"M6.64682715,7.85749962 C6.65070632,7.82585407 6.64815424,7.63794608 6.64682715,7.85749962 Z",id:"Path",fill:"#000000"}}),t._v(" "),e("path",{attrs:{d:"M6.60522584,7.67306571 C6.57293401,5.5557 6.30682954,4.95236571 4.27051414,4.57045714 C4.27051414,4.57045714 3.98387156,4.95002571 3.31576473,4.95002571 C2.64765789,4.95002571 2.36096583,4.57045714 2.36096583,4.57045714 C0.34687117,4.9482 0.0645836606,5.54258571 0.0274666143,7.60428 C0.0244230165,7.77263143 0.0230125687,7.78147714 0.0224681854,7.76193429 C0.0225919089,7.79855143 0.0227403771,7.86628286 0.0227403771,7.98438857 C0.0227403771,7.98438857 0.507538492,9 3.31576473,9 C6.12394148,9 6.60878908,7.98438857 6.60878908,7.98438857 C6.60878908,7.90850571 6.60883857,7.85574 6.6089128,7.81984286 C6.60836842,7.83192857 6.60727965,7.80850286 6.60522584,7.67306571 Z",id:"Path",fill:"#FFFFFF"}})])])])])])]),t._v(" "),e("input",{directives:[{name:"model",rawName:"v-model",value:t.serachInput,expression:"serachInput"}],ref:"customerSearch",attrs:{type:"text",name:"customer_search",id:"customer-search",placeholder:t.__("Search customer","wepos")},domProps:{value:t.serachInput},on:{focus:function(e){return e.preventDefault(),t.triggerFocus.apply(null,arguments)},keyup:t.searchCustomer,input:function(e){e.target.composing||(t.serachInput=e.target.value)}}}),t._v(" "),e("span",{staticClass:"add-new-customer flaticon-add",on:{click:function(e){return e.preventDefault(),t.addNewCustomer()}}}),t._v(" "),e("div",{directives:[{name:"show",rawName:"v-show",value:t.showCustomerResults,expression:"showCustomerResults"}],staticClass:"search-result"},[t.customers.length?e("div",[e("keyboard-control",{attrs:{listLength:t.customers.length},on:{"key-down":t.onKeyDown,"key-up":t.onKeyUp},scopedSlots:t._u([{key:"default",fn:function(a){let{selectedIndex:s}=a;return t._l(t.customers,(function(a,o){return e("li",{key:o,staticClass:"customer-search-item",class:{selected:o===s}},[e("a",{staticClass:"wepos-clearfix",attrs:{href:"#"},on:{click:function(e){return t.selectCustomer(a)}}},[e("span",{staticClass:"avatar wepos-left"},[e("img",{attrs:{src:a.avatar_url,alt:a.first_name+" "+a.last_name}})]),t._v(" "),e("span",{staticClass:"name wepos-left"},[t._v(t._s(a.first_name+" "+a.last_name)),e("span",{staticClass:"metadata"},[t._v(t._s(a.email))])]),t._v(" "),e("span",{staticClass:"action flaticon-enter-arrow wepos-right"})])])}))}}],null,!1,1035729388)})],1):e("div",{staticClass:"no-data-found"},[t._v("\n "+t._s(t.__("No customer found","wepos"))+"\n ")]),t._v(" "),e("div",{staticClass:"suggession"},[e("span",{staticClass:"term"},[e("span",{staticClass:"flaticon-swap"}),t._v(" "+t._s(t.__("to navigate","wepos"))+"\n ")]),t._v(" "),e("span",{staticClass:"term"},[e("span",{staticClass:"flaticon-enter-arrow"}),t._v(" "+t._s(t.__("to select","wepos"))+"\n ")]),t._v(" "),e("span",{staticClass:"term"},[e("strong",[t._v("esc")]),t._v(" "+t._s(t.__("to dismiss","wepos"))+"\n ")])])])]),t._v(" "),t.showNewCustomerModal?e("modal",{attrs:{title:t.__("Add New Customer","wepos"),width:"700px",footer:!0,header:!0},on:{close:t.closeNewCustomerModal}},[e("template",{slot:"body"},[e("div",{staticClass:"wepos-new-customer-form"},[e("form",{staticClass:"wepos-form",attrs:{action:"",autocomplete:"off"}},[e("div",{staticClass:"form-row col-2"},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.customer.first_name,expression:"customer.first_name"}],attrs:{type:"text",placeholder:t.__("First Name","wepos")},domProps:{value:t.customer.first_name},on:{input:function(e){e.target.composing||t.$set(t.customer,"first_name",e.target.value)}}}),t._v(" "),e("input",{directives:[{name:"model",rawName:"v-model",value:t.customer.last_name,expression:"customer.last_name"}],attrs:{type:"text",placeholder:t.__("Last Name","wepos")},domProps:{value:t.customer.last_name},on:{input:function(e){e.target.composing||t.$set(t.customer,"last_name",e.target.value)}}})]),t._v(" "),e("div",{staticClass:"form-row"},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.customer.email,expression:"customer.email"}],attrs:{type:"email",placeholder:t.__("Email","wepos")},domProps:{value:t.customer.email},on:{input:function(e){e.target.composing||t.$set(t.customer,"email",e.target.value)}}})]),t._v(" "),e("div",{staticClass:"form-row col-2"},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.customer.address_1,expression:"customer.address_1"}],attrs:{type:"text",placeholder:t.__("Address 1","wepos")},domProps:{value:t.customer.address_1},on:{input:function(e){e.target.composing||t.$set(t.customer,"address_1",e.target.value)}}}),t._v(" "),e("input",{directives:[{name:"model",rawName:"v-model",value:t.customer.address_2,expression:"customer.address_2"}],attrs:{type:"text",placeholder:t.__("Address 2 (optional)","wepos")},domProps:{value:t.customer.address_2},on:{input:function(e){e.target.composing||t.$set(t.customer,"address_2",e.target.value)}}})]),t._v(" "),e("div",{staticClass:"form-row col-2"},[e("multiselect",{staticClass:"wepos-multiselect customer-country",staticStyle:{width:"48.5%","margin-right":"20px"},attrs:{options:t.getCountryList,selectLabel:"",deselectLabel:"",selectedLabel:"",placeholder:t.__("Select a country","wepos"),"track-by":"code",label:"name"},on:{select:t.handleCountrySelect,remove:t.removeCountrySelect},scopedSlots:t._u([{key:"singleLabel",fn:function(a){return[e("span",{domProps:{innerHTML:t._s(a.option.name)}})]}},{key:"option",fn:function(a){return[e("span",{domProps:{innerHTML:t._s(a.option.name)}})]}}],null,!1,568765526),model:{value:t.selectedCountry,callback:function(e){t.selectedCountry=e},expression:"selectedCountry"}},[t._v(" "),t._v(" "),e("template",{slot:"noResult"},[e("div",{staticClass:"no-data-found"},[t._v(t._s(t.__("No country found","wepos")))])])],2),t._v(" "),t.stateList.length>0?[e("multiselect",{staticClass:"wepos-multiselect customer-state",staticStyle:{width:"48.5%"},attrs:{options:t.stateList,selectLabel:"",deselectLabel:"",selectedLabel:"",placeholder:t.__("Select a state","wepos"),"track-by":"code",label:"name"},on:{remove:t.removeStateSelect},scopedSlots:t._u([{key:"singleLabel",fn:function(a){return[e("span",{domProps:{innerHTML:t._s(a.option.name)}})]}},{key:"option",fn:function(a){return[e("span",{domProps:{innerHTML:t._s(a.option.name)}})]}}],null,!1,568765526),model:{value:t.selectedState,callback:function(e){t.selectedState=e},expression:"selectedState"}},[t._v(" "),t._v(" "),e("template",{slot:"noResult"},[e("div",{staticClass:"no-data-found"},[t._v(t._s(t.__("No country found","wepos")))])])],2)]:[e("input",{directives:[{name:"model",rawName:"v-model",value:t.customer.state,expression:"customer.state"}],attrs:{type:"text",placeholder:t.__("States (optional)","wepos")},domProps:{value:t.customer.state},on:{input:function(e){e.target.composing||t.$set(t.customer,"state",e.target.value)}}})]],2),t._v(" "),e("div",{staticClass:"form-row col-2"},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.customer.city,expression:"customer.city"}],attrs:{type:"text",placeholder:t.__("City (optional)","wepos")},domProps:{value:t.customer.city},on:{input:function(e){e.target.composing||t.$set(t.customer,"city",e.target.value)}}}),t._v(" "),e("input",{directives:[{name:"model",rawName:"v-model",value:t.customer.postcode,expression:"customer.postcode"}],attrs:{type:"text",placeholder:t.__("Zip/Postal Code (optional)","wepos")},domProps:{value:t.customer.postcode},on:{input:function(e){e.target.composing||t.$set(t.customer,"postcode",e.target.value)}}})]),t._v(" "),e("div",{staticClass:"form-row"},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.customer.phone,expression:"customer.phone"}],attrs:{type:"text",placeholder:t.__("Phone (optional)","wepos")},domProps:{value:t.customer.phone},on:{input:function(e){e.target.composing||t.$set(t.customer,"phone",e.target.value)}}})])])])]),t._v(" "),e("template",{slot:"footer"},[e("button",{staticClass:"add-new-customer-btn add-variation-btn",attrs:{disabled:t.isDisabled},on:{click:function(e){return t.createCustomer()}}},[t._v(t._s(t.__("Add Customer","wepos")))])])],2):t._e()],1)};d._withStripped=!0;const p=e({name:"CustomerSearch",components:{Modal:wepos_get_lib("Modal"),KeyboardControl:c},data:()=>({submitDisable:!1,customers:[],customer:{email:"",first_name:"",last_name:"",address_1:"",address_2:"",country:"",state:"",postcode:"",city:"",phone:""},showCustomerResults:!1,serachInput:"",showNewCustomerModal:!1,stateList:[],selectedState:null,selectedCountry:null,isDisabled:!0}),computed:{hotkeys(){return{f7:this.focusCustomerSearch,"shift+f7":this.addNewCustomer,esc:this.searchClose}},getCountryList:()=>Object.keys(wepos.countries).map((t=>({code:t,name:wepos.countries[t]}))),orderdata(){return this.$store.state.Order.orderdata}},watch:{customer:{handler(t){this.isDisabled=!0,void 0!==t.first_name&&""!=t.first_name.trim()&&void 0!==t.last_name&&""!=t.last_name.trim()&&void 0!==t.email&&""!=t.email.trim()&&(this.isDisabled=!1)},deep:!0},"orderdata.customer_id"(t){this.serachInput=t?this.orderdata.billing.first_name+" "+this.orderdata.billing.last_name:""}},methods:{focusCustomerSearch(t){t.preventDefault(),this.$refs.customerSearch.focus()},searchClose(){this.showCustomerResults=!1,this.serachInput="",this.showNewCustomerModal=!1,this.$refs.customerSearch.blur()},addNewCustomer(){this.showNewCustomerModal=!0},onKeyDown(){jQuery(".customer-search-item.selected").next().children("a").focus()},onKeyUp(){jQuery(".customer-search-item.selected").prev().children("a").focus()},triggerFocus(){this.showCustomerResults=!0,this.$emit("onfocus")},onblur(){this.showCustomerResults=!1,this.$emit("onblur")},closeNewCustomerModal(){this.customer={email:"",first_name:"",last_name:"",address_1:"",address_2:"",country:"",state:"",postcode:"",city:"",phone:""},this.selectedState=null,this.selectedCountry=null,this.showNewCustomerModal=!1},searchCustomer(){this.serachInput?wepos.api.get(wepos.rest.root+wepos.rest.posversion+"/customers?search="+this.serachInput).done((t=>{this.customers=t})):this.$emit("onCustomerSelected",{})},selectCustomer(t){this.$emit("onCustomerSelected",t),this.serachInput=t.first_name+" "+t.last_name,this.showCustomerResults=!1},createCustomer(){if(this.customer.email){var t={email:this.customer.email,first_name:this.customer.first_name,last_name:this.customer.last_name,username:this.customer.email,password:this.generatePassword(20),billing:{first_name:this.customer.first_name,last_name:this.customer.last_name,address_1:this.customer.address_1,address_2:this.customer.address_2,country:null!==this.selectedCountry?this.selectedCountry.code:"",state:null!==this.selectedState?this.selectedState.code:this.customer.state,postcode:this.customer.postcode,city:this.customer.city,phone:this.customer.phone,email:this.customer.email}},e=jQuery(".wepos-new-customer-form");e.block({message:null,overlayCSS:{background:"#fff url("+wepos.ajax_loader+") no-repeat center",opacity:.4}}),wepos.api.post(wepos.rest.root+wepos.rest.posversion+"/customers",t).done((t=>{this.serachInput=t.first_name+" "+t.last_name,this.$emit("onCustomerSelected",t),e.unblock(),this.closeNewCustomerModal()})).fail((t=>{e.unblock(),alert(t.responseJSON.message)}))}else alert(this.__("Please enter an email address for customer","wepos"))},removeCountrySelect(t,e){this.selectedState=null,this.selectedCountry=null,this.stateList=[],this.customer.country="",this.customer.state=""},removeStateSelect(t,e){this.selectedState=null,this.customer.state=""},handleCountrySelect(t,e){var a=void 0!==wepos.states[t.code]?wepos.states[t.code]:[],s=Object.keys(a);s.length>0?this.stateList=s.map((t=>({code:t,name:a[t]}))):(this.stateList=a,this.selectedState=null)},generatePassword(t){for(var e="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789",a="",s=0,o=e.length;s{this.serachInput=""}));var t=JSON.parse(localStorage.getItem("orderdata"));"undefined"!=t.customer_id&&0!=t.customer_id&&(this.serachInput=t.billing.first_name+" "+t.billing.last_name)}},d,[],!1,null,null,null).exports;var _=function(){var t=this,e=t._self._c;return e("div",{directives:[{name:"hotkey",rawName:"v-hotkey",value:t.hotkeys,expression:"hotkeys"}],staticClass:"wepos-fee-keypad-wrap",class:t.className},[e("v-popover",{attrs:{offset:"5","popover-base-class":"fee-keypad tooltip popover",placement:"top",open:t.viewFeeKeypad}},[e("a",{attrs:{href:"#"},on:{click:t.showFeeKeypad}},[t._v(t._s(t.__("Add","wepos"))+" "+t._s(t.name))]),t._v(" "),e("template",{slot:"popover"},[e("form",[e("input",{directives:[{name:"model",rawName:"v-model",value:t.displayValue,expression:"displayValue"}],ref:"feeinput",attrs:{type:"text"},domProps:{value:t.displayValue},on:{input:function(e){e.target.composing||(t.displayValue=e.target.value)}}})]),t._v(" "),e("keyboard",{attrs:{layouts:t.layout()},on:{percent:t.percentFee,flat:t.flatFee},model:{value:t.displayValue,callback:function(e){t.displayValue=e},expression:"displayValue"}})],1)],2)],1)};_._withStripped=!0;var m=function(){var t=this,e=t._self._c;return e("aside",{staticClass:"vue-keyboard",class:{full:t.full,empty:t.empty,valid:t.valid,invalid:!t.valid},attrs:{role:"application","data-value":t.value,"data-layout":t.layout}},t._l(t.buttons,(function(a){return e("div",{staticClass:"vue-keyboard-row",attrs:{role:"row","data-keys":a.length}},t._l(a,(function(a){return e("button",{staticClass:"vue-keyboard-key",class:a.type,attrs:{role:"button","data-args":a.args,"data-text":a.value,"data-action":a.action.name},domProps:{innerHTML:t._s(a.value)},on:{click:function(t){return t.preventDefault(),a.action.callable.apply(null,arguments)}}})})),0)})),0)};m._withStripped=!0;const h="7440011c983cf39ae730b1f831e2922ac5a76910",v="f630c4abcae620278f82e142a526ef325c2a773a",f="ad982c66898e02a5dab419ea7568421b03f68ee2";var y=e({name:"keyboard",props:{value:{type:String,default:""},layouts:{type:[String,Array],required:!0},maxlength:{type:Number,default:0,validator:t=>t>=0},pattern:{type:String,default:null}},data:()=>({layout:0}),computed:{full(){return this.maxlength>0&&this.value.length>=this.maxlength},empty(){return 0===this.value.length},lines(){return(Array.isArray(this.layouts)?this.layouts:[this.layouts])[this.layout].replace("||",h).replace("{{",v).replace("}}",f).split("|")},buttons(){return this.lines.map((t=>{let e=t.match(new RegExp(`(${v}|${f}|${h}|.)`,"g")),a=[],s=null;return e.forEach((t=>{if("{"===t)s="";else if("}"===t){let t=s.split(":"),e=t.length>1?t[0]:"",o=t.length>1?t[1]:t[0],i=t.length>2?t[2]:null,r=null;r=["append","backspace","space","clear","goto"].indexOf(o)>=0?this[o].bind(this,i):this.$emit.bind(this,o,this),a.push({type:"action",action:{name:o.replace(/\s+/g,"-").toLowerCase(),callable:r},value:e,args:i}),s=null}else null!==s?s+=t:(t===h&&(t="|"),t===v&&(t="{"),t===f&&(t="}"),a.push({type:"char",action:{name:null,callable:this.append.bind(this,t)},value:t,args:null}))})),a}))},valid(){return!this.pattern||this.value.match(new RegExp(this.pattern))}},methods:{mutate(t){this.maxlength>0&&(t=t.slice(0,this.maxlength)),this.$emit("input",t)},append(t){this.mutate(this.value+t)},backspace(){this.mutate(this.value.slice(0,this.value.length-1))},space(){this.append(" ")},goto(t){if(!Array.isArray(this.layouts))throw new Error("A single non-array layout was provided.");if(!(t>=0&&t({input:"",displayValue:"",viewFeeKeypad:!1}),watch:{displayValue(t,e){this.inputChange()}},methods:{hideFeeKepad(t){this.viewFeeKeypad=!1},layout(){return'123|456|789|{:backspace}0'+wepos.currency_format_decimal_sep+"|{% "+this.name+":percent}{"+wepos.currency_format_symbol+" "+this.name+":flat}"},percentFee(){this.$emit("inputfee",this.input,"percent"),this.viewFeeKeypad=!1,this.input="",this.displayValue=""},flatFee(){this.$emit("inputfee",this.input,"flat"),this.viewFeeKeypad=!1,this.input="",this.displayValue=""},inputChange(){this.isValidAmount(this.displayValue)?this.input=this.getFormattedValue(this.displayValue,wepos.currency_format_decimal_sep,"."):this.displayValue=this.getFormattedValue(this.input,".",wepos.currency_format_decimal_sep),jQuery(this.$refs.feeinput).focus()},getFormattedValue(t,e,a){let s=t;return"."!==wepos.currency_format_decimal_sep&&(s=t.replace(e,a)),s},isValidAmount(t){const e=wepos.currency_format_decimal_sep,a=new RegExp("^[0-9]*["+e+"]{0,1}[0-9]*$","gi");return t.match(a)},showFeeKeypad(t){t.preventDefault(),this.viewFeeKeypad=!0,setTimeout((()=>{jQuery(this.$refs.feeinput).focus()}),500)}}},_,[],!1,null,null,null).exports;var g=a(2377),C=a.n(g),b=function(){var t=this,e=t._self._c;return e("div",{attrs:{id:"wepos-print-receipt"}},[e("button",{staticClass:"print-btn",on:{click:function(e){return e.preventDefault(),t.printReceipt()}}},[e("span",{staticClass:"icon flaticon-printer"}),t._v(" "),e("span",{staticClass:"label"},[t._v(t._s(t.__("Print Receipt","wepos")))])])])};b._withStripped=!0;const k=e({name:"ReceiptPrint",methods:{printReceipt(){setTimeout((()=>{window.print()}),500)},handlePrintingPopup(t){let e=this;"Enter"===t.code&&e.$store.getters["Order/getCanProcessPayment"]&&e.printReceipt()},handlePrintReceiptSubmit(){document.addEventListener("keypress",this.handlePrintingPopup)}},mounted(){this.handlePrintReceiptSubmit()},destroyed(){document.removeEventListener("keypress",this.handlePrintingPopup)}},b,[],!1,null,null,null).exports;var x=function(){var t=this,e=t._self._c;return t.settings.wepos_receipts?e("div",{staticClass:"wepos-checkout-print-wrapper"},[e("div",{staticClass:"header",domProps:{innerHTML:t._s(t.settings.wepos_receipts.receipt_header)}}),t._v(" "),e("div",{staticClass:"order-info"},[e("span",{staticClass:"wepos-left"},[e("strong",[t._v(t._s(t.__("Order ID","wepos"))+": #"+t._s(t.printdata.order_id))])]),t._v(" "),e("span",{staticClass:"wepos-right"},[e("strong",[t._v(t._s(t.__("Order Date","wepos"))+": "+t._s(t.formatDate(t.printdata.order_date)))])]),t._v(" "),e("div",{staticClass:"wepos-clearfix"})]),t._v(" "),e("div",{staticClass:"content"},[e("table",{staticClass:"sale-summary"},[e("tbody",[t._l(t.printdata.line_items,(function(a){return e("tr",[e("td",{staticClass:"name"},[t._v("\n "+t._s(a.name)+"\n "),"incl"===t.settings.woo_tax.wc_tax_display_cart?e("span",{staticClass:"tax-info"},[t._v(t._s(t.__("Tax includes","wepos"))+": "+t._s(t.formatPrice(a.total_tax)))]):t._e(),t._v(" "),a.attribute.length>0?e("div",{staticClass:"attribute"},[e("ul",t._l(a.attribute,(function(a){return e("li",[e("span",{staticClass:"attr_name"},[t._v(t._s(a.name))]),t._v(": "),e("span",{staticClass:"attr_value"},[t._v(t._s(a.option))])])})),0)]):t._e()]),t._v(" "),e("td",{staticClass:"quantity"},[t._v(t._s(a.quantity))]),t._v(" "),e("td",{staticClass:"price"},[a.on_sale?[e("span",{staticClass:"regular-price"},[t._v(t._s(t.formatPrice(a.quantity*a.regular_price)))]),t._v(" "),e("span",{staticClass:"sale-price"},[t._v(t._s(t.formatPrice(a.quantity*a.sale_price)))])]:[e("span",{staticClass:"sale-price"},[t._v(t._s(t.formatPrice(a.quantity*a.regular_price)))])]],2)])})),t._v(" "),e("tr",{staticClass:"cart-meta-data"},[e("td",{staticClass:"name",attrs:{colspan:"2"}},[t._v("\n "+t._s(t.__("Subtotal","wepos"))+"\n "),"incl"==t.settings.woo_tax.wc_tax_display_cart?e("span",{staticClass:"metadata"},[t._v("\n "+t._s(t.__("Including Tax","wepos"))+"\n ")]):t._e()]),t._v(" "),e("td",{staticClass:"price"},[t._v(t._s(t.formatPrice(t.printdata.subtotal)))])]),t._v(" "),t._l(t.printdata.coupon_lines,(function(a,s){return e("tr",{staticClass:"cart-meta-data"},[e("td",{staticClass:"name",attrs:{colspan:"2"}},[t._v(t._s(t.__("Discount","wepos"))+" "),e("span",{staticClass:"metadata"},[t._v(t._s("percent"==a.discount_type?a.value+"%":t.formatPrice(a.value)))])]),t._v(" "),e("td",{staticClass:"price"},[t._v("-"+t._s(t.formatPrice(Math.abs(a.total))))])])})),t._v(" "),t._l(t.printdata.fee_lines,(function(a,s){return e("tr",{staticClass:"cart-meta-data"},[e("td",{staticClass:"name",attrs:{colspan:"2"}},[t._v(t._s(t.__("Fee","wepos"))+" "),e("span",{staticClass:"metadata"},[t._v(t._s("percent"==a.fee_type?a.value+"%":t.formatPrice(a.value)))])]),t._v(" "),e("td",{staticClass:"price"},[t._v(t._s(t.formatPrice(Math.abs(a.total))))])])})),t._v(" "),t.printdata.taxtotal?e("tr",[e("td",{staticClass:"name",attrs:{colspan:"2"}},[t._v(t._s("incl"===t.settings.woo_tax.wc_tax_display_cart&&"yes"===t.settings.wepos_general.enable_fee_tax?t.__("Fee Tax","wepos"):t.__("Tax","wepos")))]),t._v(" "),e("td",{staticClass:"price"},[t._v(t._s(t.formatPrice(t.printdata.taxtotal)))])]):t._e(),t._v(" "),e("tr",[e("td",{staticClass:"name",attrs:{colspan:"2"}},[t._v(t._s(t.__("Order Total","wepos")))]),t._v(" "),e("td",{staticClass:"price"},[t._v(t._s(t.formatPrice(t.printdata.ordertotal)))])]),t._v(" "),t._m(0),t._v(" "),e("tr",[e("td",{attrs:{colspan:"2"}},[t._v(t._s(t.__("Payment method","wepos")))]),t._v(" "),e("td",{staticClass:"price"},[t._v(t._s(t.printdata.gateway.title||""))])]),t._v(" "),(t.printdata.gateway.id="wepos_cash")?[e("tr",[e("td",{attrs:{colspan:"2"}},[t._v(t._s(t.__("Cash Given","wepos")))]),t._v(" "),e("td",{staticClass:"price"},[t._v(t._s(t.formatPrice(t.printdata.cashamount)))])]),t._v(" "),e("tr",[e("td",{attrs:{colspan:"2"}},[t._v(t._s(t.__("Change Money","wepos")))]),t._v(" "),e("td",{staticClass:"price"},[t._v(t._s(t.formatPrice(t.printdata.changeamount)))])])]:t._e()],2)])]),t._v(" "),e("div",{staticClass:"footer",domProps:{innerHTML:t._s(t.settings.wepos_receipts.receipt_footer)}})]):t._e()};x._withStripped=!0;const P=e({name:"ReceiptPrintHtml",props:{printdata:{type:Object,default:()=>({})},settings:{type:Object,default:()=>({})}},methods:{formatDate:t=>(t=new Date(t)).toLocaleString()}},x,[function(){var t=this._self._c;return t("tr",{staticClass:"divider"},[t("td",{attrs:{colspan:"3"}})])}],!1,null,null,null).exports;var S=function(){var t=this,e=t._self._c;return e("div",{directives:[{name:"hotkey",rawName:"v-hotkey",value:t.hotkeys,expression:"hotkeys"}],staticClass:"wepos-custom-note-wrap"},[e("v-popover",{attrs:{offset:"5","popover-base-class":"customer-note tooltip popover",placement:"top",open:t.viewNotePopover}},[e("a",{attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.openNote.apply(null,arguments)}}},[t._v(t._s(t.__("Add Note","wepos")))]),t._v(" "),e("template",{slot:"popover"},[e("form",{on:{submit:function(e){return e.preventDefault(),t.addCustomerNote.apply(null,arguments)}}},[e("textarea",{directives:[{name:"model",rawName:"v-model",value:t.customerNote,expression:"customerNote"}],ref:"customernote",attrs:{id:"",cols:"30",rows:"5"},domProps:{value:t.customerNote},on:{input:function(e){e.target.composing||(t.customerNote=e.target.value)}}}),t._v(" "),e("button",{staticClass:"add-note-btn",attrs:{type:"submit",disabled:""==t.customerNote}},[t._v(t._s(t.__("Add Note","wepos")))])])])],2)],1)};S._withStripped=!0;const D=e({data:()=>({viewNotePopover:!1,customerNote:""}),computed:{hotkeys(){return{f6:this.openNote,esc:this.closeNote}}},methods:{openNote(t){t.preventDefault(),this.viewNotePopover=!0,setTimeout((()=>{jQuery(this.$refs.customernote).focus()}),500)},closeNote(){this.viewNotePopover=!1},addCustomerNote(){this.$emit("addnote",this.customerNote),this.viewNotePopover=!1,this.customerNote=""}}},S,[],!1,null,null,null).exports;const A=e({name:"Home",components:{ProductSearch:u,CustomerSearch:p,Overlay:r,Modal:wepos_get_lib("Modal"),MugenScroll:C(),FeeKeypad:w,PrintReceipt:k,PrintReceiptHtml:P,CustomerNote:D},data:()=>({showHelp:!1,showQucikMenu:!1,productView:"grid",productLoading:!1,viewVariationPopover:!1,showModal:!1,showPaymentReceipt:!1,products:[],filteredProducts:[],totalPages:1,page:1,showOverlay:!1,selectedVariationProduct:{},attributeDisabled:!0,selectedAttribute:{},availableGateways:[],emptyGatewayDiv:0,cashAmount:"",availableTax:[],settings:{},taxSettings:{},printdata:wepos.hooks.applyFilters("wepos_initial_print_data",{gateway:{id:"",title:""}}),feeData:{},createprintreceipt:!1,selectedCategory:"",selectedGateway:"",categories:[],showReceiptHtml:wepos.hooks.applyFilters("wepos_render_receipt_html",!0),quickLinkList:wepos.hooks.applyFilters("wepos_quick_links",[]),quickLinkListStart:wepos.hooks.applyFilters("wepos_quick_links_start",[]),availableGatewayContent:wepos.hooks.applyFilters("wepos_avaialable_gateway_content",[]),afterMainContents:wepos.hooks.applyFilters("wepos_after_main_content",[]),beforCartPanels:wepos.hooks.applyFilters("wepos_before_cart_panel",[]),couponData:{}}),computed:{cartdata(){return this.$store.state.Cart.cartdata},orderdata(){return this.$store.state.Order.orderdata},hotkeys(){return{f3:this.toggleProductView,f9:this.initPayment,f10:this.processPayment,f8:this.createNewSale,"shift+f8":this.emptyCart,esc:this.backToSale,"meta+/":this.openHelp,"ctrl+/":this.openHelp}},getFilteredProduct(){return void 0!==this.$route.query.category?this.products.filter((t=>{var e=weLo_.find(t.categories,{id:parseInt(this.$route.query.category)});return null!=e&&Object.keys(e).length>0})):this.products},changeAmount(){var t=this.unFormat(this.cashAmount)-this.$store.getters["Cart/getTotal"];return t>0?t:0},getBreadCrums(){if(void 0!==this.$route.query.category){var t=jQuery.extend(!0,[],this.categories),e=weLo_.find(this.categories,{id:parseInt(this.$route.query.category)}),a=weLo_.findIndex(this.categories,e),s=t.splice(0,a+1),o=[];if(s.length>0){for(var i=s.length-1;i>=0;i--)if(o.length>0){var r=weLo_.find(s,{id:s[i+1].parent_id});if(null!=r&&(o.push(r),null==r.parent_id))break}else o.push(s[i]);return o.slice().reverse()}}return[]}},watch:{selectedAttribute(t,e){Object.keys(t).length==this.selectedVariationProduct.attributes.length&&(this.attributeDisabled=!1)},"$route.query.order_key"(){""!=this.$route.query.order_key&&"success"==this.$route.query.payment&&(this.showModal=!1,this.showPaymentReceipt=!0)},"$route.query.category"(){this.selectedCategory={id:-1,level:0,name:this.__("All categories","wepos"),parent_id:null},void 0!==this.$route.query.category&&(this.selectedCategory=weLo_.find(this.categories,{id:parseInt(this.$route.query.category)}))},selectedGateway(t,e){var a=weLo_.find(this.availableGateways,{id:t});this.$store.dispatch("Order/setGatewayAction",a)},cashAmount(t,e){this.ableToProcess()}},methods:{openQucikMenu(){this.showQucikMenu=!0},openHelp(t){t.preventDefault(),this.showHelp=!0,this.showQucikMenu=!1},closeHelp(){this.showHelp=!1},addCustomerNote(t){this.$store.dispatch("Order/setCustomerNoteAction",t)},removeCustomerNote(){this.$store.dispatch("Order/removeCustomerNoteAction")},removeBreadcrums(){this.$router.push({name:"Home"})},logout(){wepos.hooks.doAction("wepos_before_logout"),window.location.href=wepos.logout_url.toString()},emptyCart(){this.$store.dispatch("Cart/emptyCartAction"),this.$store.dispatch("Order/emptyOrderdataAction"),this.printdata=wepos.hooks.applyFilters("wepos_initial_print_data",{gateway:{id:"",title:""}}),this.showPaymentReceipt=!1,this.cashAmount="",this.eventBus.$emit("emptycart",this.orderdata),this.showQucikMenu=!1},toggleProductView(t){t.preventDefault(),this.productView="grid"==this.productView?"list":"grid"},createNewSale(){this.$router.push({name:"Home"}),this.emptyCart()},ableToProcess(){let t=this.cartdata.line_items.length>0&&this.isSelectGateway();"wepos_cash"===this.selectedGateway&&(t=this.unFormat(this.cashAmount)>=this.truncateNumber(this.$store.getters["Cart/getTotal"])&&t),console.log(t),this.$store.dispatch("Order/setCanProcessPaymentAction",t)},processPayment(t){if(this.$store.getters["Order/getCanProcessPayment"]){weLo_.find(this.availableGateways,{id:this.orderdata.payment_method});var e=wepos.hooks.applyFilters("wepos_order_form_data",{billing:this.orderdata.billing,shipping:this.orderdata.shipping,line_items:this.cartdata.line_items,fee_lines:this.cartdata.fee_lines,coupon_lines:this.cartdata.coupon_lines,customer_id:this.orderdata.customer_id,customer_note:this.orderdata.customer_note,payment_method:this.orderdata.payment_method,payment_method_title:this.orderdata.payment_method_title,meta_data:[{key:"_wepos_is_pos_order",value:!0},{key:"_wepos_cash_tendered_amount",value:this.cashAmount.toString()},{key:"_wepos_cash_change_amount",value:this.changeAmount.toString()}]},this.orderdata,this.cartdata),a=jQuery(".wepos-checkout-wrapper");a.block({message:null,overlayCSS:{background:"#fff url("+wepos.ajax_loader+") no-repeat center",opacity:.4}}),wepos.api.post(wepos.rest.root+wepos.rest.wcversion+"/orders",e).done((t=>{const s={};t.line_items.forEach((t=>{s[t.product_id]=t.total_tax})),this.cartdata.line_items.forEach((t=>{t.total_tax=s[t.product_id]})),wepos.api.post(wepos.rest.root+wepos.rest.posversion+"/payment/process",t).done((s=>{"success"==s.result?(this.$router.push({name:"Home",query:{order_key:t.order_key,payment:"success"}}),this.printdata=wepos.hooks.applyFilters("wepos_after_payment_print_data",{line_items:this.cartdata.line_items,fee_lines:this.cartdata.fee_lines,coupon_lines:this.cartdata.coupon_lines,subtotal:this.$store.getters["Cart/getSubtotal"],taxtotal:this.$store.getters["Cart/getTotalTax"],ordertotal:this.$store.getters["Cart/getTotal"],gateway:{id:t.payment_method,title:t.payment_method_title},order_id:t.number,order_date:t.date_created,cashamount:this.cashAmount.toString(),changeamount:this.changeAmount.toString()},e),a.unblock()):a.unblock()})).fail((t=>{a.unblock(),alert(t.responseJSON.message)}))})).fail((t=>{a.unblock(),alert(t.responseJSON.message)}))}},initPayment(){this.$store.state.Cart.cartdata.line_items.length<=0||(this.showModal=!0,this.$store.dispatch("Order/setGatewayAction",this.availableGateways[0]),this.selectedGateway=this.availableGateways[0].id)},backToSale(){this.showModal=!1,this.showHelp=!1},isSelectGateway(){return!(null==this.orderdata.payment_method||""==this.orderdata.payment_method)},getProductImage:t=>t.images.length>0?t.images[0].woocommerce_thumbnail:wepos.placeholder_image,getProductImageName:t=>t.images.length>0?t.images[0].name:t.name,setDiscount(t,e){this.createCoupon(t,e,this.dispatchCoupon)},createCoupon(t,e,a){let s=this,o=Date.now(),i=e+o+t;s.couponData={};const r={code:i,amount:t,usage_limit:1,meta_data:[{key:"wepos_cart_discount",value:"yes"}]};"percent"===e&&(r.discount_type=e),wepos.api.post(wepos.rest.root+wepos.rest.posversion+"/coupons",r).done((t=>{s.couponData=t,a(t,e)})).fail((t=>{alert(t.responseJSON.message)}))},dispatchCoupon(t,e){this.$store.dispatch("Cart/addDiscountAction",{title:this.__("Discount","wepos"),value:t,type:e})},saveFee(t){this.$store.dispatch("Cart/saveFeeValueAction",{key:t,feeData:this.feeData}),this.feeData={}},cancelEditFee(t){this.$store.dispatch("Cart/cancelSaveFeeValueAction",t),this.feeData={}},editFeeData(t){this.$store.dispatch("Cart/editFeeValueAction",t),this.feeData=Object.assign({},this.cartdata.fee_lines[t]),this.$nextTick((()=>{jQuery(this.$refs.fee_name).focus()}))},setFee(t,e){this.$store.dispatch("Cart/addFeeAction",{title:this.__("Fee","wepos"),value:t,type:e})},removeCouponLine(t){this.$store.dispatch("Cart/removeCouponLineItemsAction",t)},removeFeeLine(t){this.$store.dispatch("Cart/removeFeeLineItemsAction",t)},getDiscountAmount(t){return"percent"===t.discount_type||"percent"===t.fee_type?this.formatNumber(t.value)+"%":this.formatPrice(t.total)},fetchProducts(){1==this.page&&(this.productLoading=!0),this.totalPages>=this.page?wepos.api.get(wepos.rest.root+wepos.rest.posversion+"/products?status=publish&per_page=30&page="+this.page).done(((t,e,a)=>{this.appendProducts(t),this.page+=1,this.totalPages=parseInt(a.getResponseHeader("X-WP-TotalPages")),this.productLoading=!1})).then(((t,e,a)=>{this.fetchProducts()})):this.productLoading=!1},appendProducts(t){t.forEach((t=>{"variable"===t.type&&this.isAllVariationsDisabled(t)||(this.products=this.products.concat(t))}))},isAllVariationsDisabled(t){let e=!0;return t.attributes.forEach((t=>{!0===t.variation&&(e=!1)})),e},maybeRemoveDeletedProduct:t=>new Promise(((e,a)=>{if(!t)return e(t);if(!t.line_items||t.line_items.length<1)return e(t);let s=t.line_items.map((t=>t.product_id));wepos.api.get(wepos.rest.root+wepos.rest.posversion+"/products?include="+s.toString()).then((a=>{let s=a.map((t=>t.id));return t.line_items.forEach(((e,a)=>{s.includes(e.product_id)||(t.line_items.splice(a,1),localStorage.setItem("cartdata",JSON.stringify(t)))})),e(t)})).fail((()=>a(t)))})),selectCustomer(t){this.$store.dispatch("Order/setCustomerAction",t)},selectVariationProduct(t){this.viewVariationPopover=!0,this.selectedVariationProduct=t},addVariationProduct(){let t=this.findMatchingVariations(this.selectedVariationProduct.variations,this.selectedAttribute)[0];this.hasStock(t)||this.toast({title:this.__("This product is out of stock.","wepos"),type:"error"}),t.parent_id=this.selectedVariationProduct.id,t.type=this.selectedVariationProduct.type,t.name=this.selectedVariationProduct.name,t.type=this.selectedVariationProduct.type,this.selectedAttribute={},this.attributeDisabled=!0,this.$store.dispatch("Cart/addToCartAction",t)},addToCart(t){this.hasStock(t)?this.$store.dispatch("Cart/addToCartAction",t):this.toast({title:this.__("Product is out of stock!","wepos-pro"),type:"error"})},toggleEditQuantity(t,e){this.$store.dispatch("Cart/toggleEditQuantityAction",e)},removeItem(t){this.$store.dispatch("Cart/removeCartItemAction",t)},addQuantity(t,e){this.$store.dispatch("Cart/addItemQuantityAction",e)},removeQuantity(t,e){this.$store.dispatch("Cart/removeItemQuantityAction",e)},fetchGateway(){wepos.api.get(wepos.rest.root+wepos.rest.posversion+"/payment/gateways").done((t=>{this.availableGateways=t,this.emptyGatewayDiv=4-this.availableGateways.length%4}))},truncateTitle:(t,e)=>weLo_.truncate(t,{length:e}),unSanitizeString:t=>t.split("-").map((function(t){return t.charAt(0).toUpperCase()+t.slice(1)})).join(" "),fetchSettings(){wepos.api.get(wepos.rest.root+wepos.rest.posversion+"/settings").done((t=>{this.settings=t,this.$store.dispatch("Cart/setSettingsAction",t)}))},fetchTaxes(){wepos.api.get(wepos.rest.root+wepos.rest.posversion+"/taxes").done((t=>{this.availableTax=t,this.$store.dispatch("Cart/setAvailableTaxAction",t)}))},handleCategorySelect(t,e){"-1"==t.id?this.$router.push({name:"Home"}):this.$router.push({name:"Home",query:{category:t.id}})},handleCategoryRemove(t,e){this.$router.push({name:"Home"}),this.selectedCategory={id:-1,level:0,name:this.__("All categories","wepos"),parent_id:null}},fetchCategories(){wepos.api.get(wepos.rest.root+wepos.rest.wcversion+"/products/categories?hide_empty=true&_fields=id,name,parent_id&per_page=100").then((t=>{t.sort((function(t,e){return t.name.localeCompare(e.name)}));var e=function(t,e){var a=[],s={};return t.forEach((function(t){s[t.id]={response:t,children:s[t.id]&&s[t.id].children},null===t.parent_id?a.push(s[t.id]):(s[t.parent_id]=s[t.parent_id]||{},s[t.parent_id].children=s[t.parent_id].children||[],s[t.parent_id].children.push(s[t.id]))})),a}(t),a={id:-1,level:0,name:this.__("All categories","wepos"),parent_id:null},s=e.reduce(function t(e){return function(a,s){return s.response.level=e,a.concat(s.response,(s.children||[]).reduce(t(e+1),[]))}}(0),[]);this.categories=s,this.categories.unshift(a),this.selectedCategory=a,void 0!==this.$route.query.category&&(this.selectedCategory=weLo_.find(t,{id:parseInt(this.$route.query.category)}))}))},filterProducts(){this.products=this.products.filter((t=>weLo_.findIndex(t.categories,{id:this.$route.query.category})>0))},fetchTaxSettings(){wepos.api.get(wepos.rest.root+wepos.rest.wcversion+"/settings/tax").done((t=>{this.taxSettings=t}))},focusCashInput(){document.querySelector("#input-cash-amount").focus()}},async created(){if(this.fetchSettings(),this.fetchTaxes(),this.fetchProducts(),this.fetchGateway(),this.fetchCategories(),"undefined"!=typeof localStorage)try{var t=JSON.parse(localStorage.getItem("cartdata")),e=JSON.parse(localStorage.getItem("orderdata"));t=await this.maybeRemoveDeletedProduct(t),this.$store.dispatch("Cart/setCartDataAction",t),this.$store.dispatch("Order/setOrderDataAction",e)}catch(t){e=JSON.parse(localStorage.getItem("orderdata"));this.$store.dispatch("Cart/setCartDataAction",t),this.$store.dispatch("Order/setOrderDataAction",e)}window.addEventListener("beforeunload",(()=>{"undefined"!=typeof localStorage&&(localStorage.setItem("cartdata",JSON.stringify(this.$store.state.Cart.cartdata)),localStorage.setItem("orderdata",JSON.stringify(this.$store.state.Order.orderdata)))}),!1)}},o,[function(){var t=this._self._c;return t("td",{staticClass:"icon"},[t("span",{staticClass:"flaticon-right-arrow"})])}],!1,null,null,null).exports;let $=wepos_get_lib("Vue"),N=wepos_get_lib("Router");$.use(N);const F=new N({routes:wepos.hooks.applyFilters("wepos_frontend_routes",[{path:"/",name:"Home",component:A}])}),O={hasStock(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return t.manage_stock?!!t.backorders_allowed||t.stock_quantity>e:"outofstock"!=t.stock_status}},L={namespaced:!0,state:{settings:{},availableTax:{},cartdata:{line_items:[],fee_lines:[],coupon_lines:[]}},getters:{getSubtotal(t){var e=0;return weLo_.forEach(t.cartdata.line_items,(function(t,a){t.on_sale?e+=t.quantity*t.sale_price:e+=t.quantity*t.regular_price})),e},getTotalFee(t){var e=0;return weLo_.forEach(t.cartdata.fee_lines,(function(t,a){e+=Math.abs(t.total)})),e},getTotalDiscount(t){var e=0;return weLo_.forEach(t.cartdata.coupon_lines,(function(t,a){e+=Number(Math.abs(t.total))})),e},getTotalLineTax(t){var e=0;return weLo_.forEach(t.cartdata.line_items,(function(t,a){e+=Math.abs(t.tax_amount*t.quantity)})),e},getTotalTax(t,e){let a=0,s=0,o=0,i=0;return weLo_.forEach(t.cartdata.line_items,(function(t,e){a+=Math.abs(t.tax_amount*t.quantity)})),null!=t.settings.woo_tax&&"incl"==t.settings.woo_tax.wc_tax_display_cart&&(a=0),weLo_.forEach(t.cartdata.fee_lines,(function(e,a){if("taxable"!==e.tax_status)return;let o=""===e.tax_class?"standard":e.tax_class,i=weLo_.find(t.availableTax,{class:o.toString()});i&&(s+=Math.abs(e.total)*Math.abs(i.rate)/100)})),weLo_.forEach(t.cartdata.coupon_lines,(function(s,r){if("taxable"!==s.tax_status)return;let n=""===s.tax_class?"standard":s.tax_class;weLo_.find(t.availableTax,{class:n.toString()})&&(o=s.total/e.getSubtotal*100,i+=o/100*a)})),a+=i,a+s},getOrderTotal:(t,e)=>e.getSubtotal+e.getTotalFee+e.getTotalTax,getTotal:(t,e)=>e.getOrderTotal-e.getTotalDiscount,getSettings:(t,e)=>t.settings},mutations:{setSettings(t,e){t.settings=e},setAvailableTax(t,e){t.availableTax=e},setCartData(t,e){weLo_.isEmpty(e)?t.cartdata={line_items:[],fee_lines:[],coupon_lines:[]}:t.cartdata=Object.assign({},e)},addToCartItem(t,e){var a={};a.product_id=0===e.parent_id?e.id:e.parent_id,a.name=e.name,a.quantity=1,a.regular_price=e.regular_display_price,a.sale_price=e.sales_display_price,a.on_sale=e.on_sale,a.attribute=e.attributes,a.variation_id=0!==e.parent_id?e.id:0,a.editQuantity=!1,a.type=e.type,a.tax_amount=e.tax_amount,a.manage_stock=e.manage_stock,a.stock_status=e.stock_status,a.backorders_allowed=e.backorders_allowed,a.stock_quantity=e.stock_quantity;var s=weLo_.findIndex(t.cartdata.line_items,{product_id:a.product_id,variation_id:a.variation_id});s<0?O.hasStock(e)&&t.cartdata.line_items.push(a):O.hasStock(e,t.cartdata.line_items[s].quantity)&&(t.cartdata.line_items[s].quantity+=1)},removeCartItem(t,e){t.cartdata.line_items.splice(e,1)},addCartItemQuantity(t,e){var a=t.cartdata.line_items[e];O.hasStock(a,a.quantity)&&t.cartdata.line_items[e].quantity++},removeCartItemQuantity(t,e){t.cartdata.line_items[e].quantity<=1?t.cartdata.line_items[e].quantity=1:t.cartdata.line_items[e].quantity--},toggleEditQuantity(t,e){t.cartdata.line_items[e].editQuantity=!t.cartdata.line_items[e].editQuantity},addDiscount(t,e){t.cartdata.coupon_lines.push({name:e.title,type:"discount",isEdit:!1,value:e.value.amount,discount_type:e.value.discount_type,tax_status:"incl"!==t.settings.woo_tax.wc_tax_display_shop?"taxable":"none",tax_class:"",total:0,code:e.value.code})},addFee(t,e){t.cartdata.fee_lines.push({name:e.title,type:"fee",value:e.value.toString(),isEdit:!1,fee_type:e.type,tax_status:"yes"===t.settings.wepos_general.enable_fee_tax?"taxable":"none",tax_class:"",total:0})},saveFeeValue(t,e){t.cartdata.fee_lines.splice(e.key,1,e.feeData),t.cartdata.fee_lines[e.key].isEdit=!1},editFeeValue(t,e){t.cartdata.fee_lines[e].isEdit=!0},cancelSaveFeeValue(t,e){t.cartdata.fee_lines[e].isEdit=!1},removeCouponLineItems(t,e){t.cartdata.coupon_lines.splice(e,1)},removeFeeLineItems(t,e){t.cartdata.fee_lines.splice(e,1)},emptyCart(t){t.cartdata={line_items:[],fee_lines:[],coupon_lines:[]}},calculateDiscount(t,e){t.cartdata.coupon_lines.length>0&&weLo_.forEach(t.cartdata.coupon_lines,((a,s)=>{"discount"==a.type&&("percent"==a.discount_type?t.cartdata.coupon_lines[s].total="-"+e.getSubtotal*Math.abs(a.value)/100:t.cartdata.coupon_lines[s].total="-"+Math.abs(a.value))}))},calculateFee(t,e){t.cartdata.fee_lines.length>0&&weLo_.forEach(t.cartdata.fee_lines,((a,s)=>{"fee"==a.type&&("percent"==a.fee_type?t.cartdata.fee_lines[s].total=(e.getSubtotal*Math.abs(a.value)/100).toString():t.cartdata.fee_lines[s].total=Math.abs(a.value).toString())}))}},actions:{setSettingsAction(t,e){t.commit("setSettings",e)},setAvailableTaxAction(t,e){t.commit("setAvailableTax",e)},setCartDataAction(t,e){t.commit("setCartData",e),t.commit("calculateDiscount",t.getters),t.commit("calculateFee",t.getters)},addToCartAction(t,e){t.commit("addToCartItem",e),t.commit("calculateDiscount",t.getters),t.commit("calculateFee",t.getters)},removeCartItemAction(t,e){t.commit("removeCartItem",e),t.commit("calculateDiscount",t.getters),t.commit("calculateFee",t.getters)},addItemQuantityAction(t,e){t.commit("addCartItemQuantity",e),t.commit("calculateDiscount",t.getters),t.commit("calculateFee",t.getters)},removeItemQuantityAction(t,e){t.commit("removeCartItemQuantity",e),t.commit("calculateDiscount",t.getters),t.commit("calculateFee",t.getters)},toggleEditQuantityAction(t,e){t.commit("toggleEditQuantity",e)},addDiscountAction(t,e){t.commit("addDiscount",e),t.commit("calculateDiscount",t.getters)},addFeeAction(t,e){t.commit("addFee",e),t.commit("calculateFee",t.getters)},removeCouponLineItemsAction(t,e){t.commit("removeCouponLineItems",e),t.commit("calculateDiscount",t.getters)},removeFeeLineItemsAction(t,e){t.commit("removeFeeLineItems",e),t.commit("calculateFee",t.getters)},saveFeeValueAction(t,e){t.commit("saveFeeValue",e),t.commit("calculateDiscount",t.getters),t.commit("calculateFee",t.getters)},editFeeValueAction(t,e){t.commit("editFeeValue",e)},cancelSaveFeeValueAction(t,e){t.commit("cancelSaveFeeValue",e)},emptyCartAction(t){t.commit("emptyCart")},calculateDiscount(t){t.commit("calculateDiscount",t.getters)},calculateFee(t){t.commit("calculateFee",t.getters)}}},T={namespaced:!0,state:{orderdata:{billing:{},shipping:{},customer_id:0,customer_note:"",payment_method:"",payment_method_title:""},canProcessPayment:!1},getters:{getCanProcessPayment:t=>t.canProcessPayment},mutations:{setOrderData(t,e){weLo_.isEmpty(e)?t.orderdata={billing:{},shipping:{},customer_id:0,customer_note:"",payment_method:"",payment_method_title:""}:t.orderdata=e},setCustomer(t,e){Object.keys(e).length>0?(t.orderdata.billing=e.billing,t.orderdata.shipping=e.shipping,t.orderdata.customer_id=e.id):(t.orderdata.billing={},t.orderdata.shipping={},t.orderdata.customer_id=0)},emptyOrderdata(t){t.orderdata={billing:{},shipping:{},customer_id:0,customer_note:"",payment_method:"",payment_method_title:""}},setCustomerNote(t,e){t.orderdata.customer_note=e.trim()},removeCustomerNote(t){t.orderdata.customer_note=""},setGateway(t,e){t.orderdata.payment_method=e.id,t.orderdata.payment_method_title=e.title},setCanProcessPayment(t,e){t.canProcessPayment=e}},actions:{setOrderDataAction(t,e){t.commit("setOrderData",e)},setCustomerAction(t,e){t.commit("setCustomer",e)},emptyOrderdataAction(t){t.commit("emptyOrderdata")},setCustomerNoteAction(t,e){t.commit("setCustomerNote",e)},removeCustomerNoteAction(t){t.commit("removeCustomerNote")},setGatewayAction(t,e){t.commit("setGateway",e)},setCanProcessPaymentAction(t,e){t.commit("setCanProcessPayment",e)}}};let I=wepos_get_lib("Vue"),V=wepos_get_lib("Vuex");I.use(V);const M=new V.Store({modules:{Cart:L,Order:T}});let E=wepos_get_lib("Vue");E.config.productionTip=!1,new E({el:"#vue-frontend-app",router:F,store:M,render:t=>t(s),created(){this.setLocaleData(wepos.i18n.wepos),wepos.i18n["wepos-pro"]&&this.setLocaleData(wepos.i18n["wepos-pro"])}})})()})(); \ No newline at end of file diff --git a/assets/src/frontend/components/Home.vue b/assets/src/frontend/components/Home.vue index 39432906..ac95dfea 100644 --- a/assets/src/frontend/components/Home.vue +++ b/assets/src/frontend/components/Home.vue @@ -247,12 +247,45 @@ {{ __( 'Subtotal', 'wepos' ) }} - {{ __( 'Includes Tax', 'wepos' ) }} {{ formatPrice( $store.getters['Cart/getTotalLineTax'] ) }} + {{ __( 'Including Tax', 'wepos' ) }} {{ formatPrice( $store.getters['Cart/getSubtotal'] ) }} + + +