diff --git a/README.md b/README.md index 6ea0b95b..d3c1b9ac 100644 --- a/README.md +++ b/README.md @@ -5,9 +5,9 @@ **Requires at least:** 4.4 **Tested up to:** 6.0 **WC requires at least:** 3.0 -**WC tested up to:** 6.5.1 +**WC tested up to:** 6.6.1 **Requires PHP:** 5.6 -**Stable tag:** 1.2.3 +**Stable tag:** 1.2.4 **License:** GPLv2 or later **License URI:** http://www.gnu.org/licenses/gpl-2.0.html @@ -60,6 +60,9 @@ No FAQ ## Changelog ## +### v1.2.4 -> 28 June, 2022 ### +- **Fix:** Localization issue on changing site language + ### v1.2.3 -> 03 June, 2022 ### - **Compatibility:** Compatibility for WordPress 6.0 diff --git a/assets/js/admin.js b/assets/js/admin.js index a86f20ed..bca6516f 100644 --- a/assets/js/admin.js +++ b/assets/js/admin.js @@ -38,6 +38,10 @@ new Vue({ }, created: function created() { this.setLocaleData(wepos.i18n['wepos']); + + if (wepos.i18n['wepos-pro']) { + this.setLocaleData(wepos.i18n['wepos-pro']); + } } }); diff --git a/assets/js/admin.min.js b/assets/js/admin.min.js index 74c1868e..9c185505 100644 --- a/assets/js/admin.min.js +++ b/assets/js/admin.min.js @@ -1 +1 @@ -pluginWebpack([1],{177:function(e,t,a){"use strict";var i=o(a(178)),s=o(a(181)),n=o(a(28)),l=o(a(212));function o(e){return e&&e.__esModule?e:{default:e}}var r=wepos_get_lib("Vue");r.config.productionTip=!1,new r({el:"#wepos-admin-app",router:s.default,store:n.default,render:function(e){return e(i.default)},created:function(){this.setLocaleData(wepos.i18n.wepos)}}),(0,l.default)("wepos")},178:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=a(77),s=a(180),n=!1;var l=function(e){n||a(179)},o=a(0)(i.a,s.a,!1,l,null,null);o.options.__file="assets/src/admin/App.vue",t.default=o.exports},179:function(e,t){},180:function(e,t,a){"use strict";var i=function(){var e=this.$createElement,t=this._self._c||e;return t("div",{attrs:{id:"wepos-admin-app"}},[t("router-view")],1)};i._withStripped=!0;var s={render:i,staticRenderFns:[]};t.a=s},181:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(e){return e&&e.__esModule?e:{default:e}}(a(182));var s=wepos_get_lib("Vue"),n=wepos_get_lib("Router");s.use(n),t.default=new n({routes:wepos.hooks.applyFilters("wepos_admin_routes",[{path:"/settings",name:"Settings",component:i.default}])})},182:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=a(78),s=a(211),n=!1;var l=function(e){n||a(183)},o=a(0)(i.a,s.a,!1,l,null,null);o.options.__file="assets/src/admin/components/Settings.vue",t.default=o.exports},183:function(e,t){},184:function(e,t,a){"use strict";var i=a(79),s=a(210),n=!1;var l=function(e){n||a(185)},o=a(0)(i.a,s.a,!1,l,null,null);o.options.__file="assets/src/admin/components/Fields.vue",t.a=o.exports},185:function(e,t){},186:function(e,t,a){"use strict";var i=a(80),s=a(209),n=!1;var l=function(e){n||a(187)},o=a(0)(i.a,s.a,!1,l,"data-v-267901b1",null);o.options.__file="assets/src/admin/components/ColorPicker.vue",t.a=o.exports},187:function(e,t){},209:function(e,t,a){"use strict";var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"color-picker-container"},[a("button",{staticClass:"button color-picker-button",style:{backgroundColor:e.value},attrs:{type:"button"},on:{click:e.toggleColorPicker}},[a("span",[e._v(e._s(e.__("Select Color","wepos")))])]),e._v(" "),e.showColorPicker&&"hex"===e.format?a("input",{staticClass:"hex-input",attrs:{type:"text"},domProps:{value:e.value},on:{input:function(t){e.setHexColor(t.target.value)}}}):e._e(),e._v(" "),e.showColorPicker?a("div",{staticClass:"button-group"},[a("button",{staticClass:"button button-small",attrs:{type:"button"},on:{click:function(t){e.updateColor({})}}},[e._v(e._s(e.__("Clear","wepos")))]),e._v(" "),a("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?a("sketch",{attrs:{value:e.value,"preset-colors":e.presetColors,"disable-alpha":e.disableAlpha,"disable-fields":e.disableFields},on:{input:e.updateColor}}):e._e()],1)};i._withStripped=!0;var s={render:i,staticRenderFns:[]};t.a=s},210:function(e,t,a){"use strict";var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[e.containCommonFields(e.fieldData.type)?a("tr",{class:e.id},[a("th",{attrs:{scope:"row"}},[a("label",{attrs:{for:e.sectionId+"["+e.fieldData.name+"]"}},[e._v(e._s(e.fieldData.label))])]),e._v(" "),a("td",[a("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(" "),a("p",{staticClass:"description",domProps:{innerHTML:e._s(e.fieldData.desc)}})])]):e._e(),e._v(" "),"number"==e.fieldData.type?a("tr",{class:e.id},[a("th",{attrs:{scope:"row"}},[a("label",{attrs:{for:e.sectionId+"["+e.fieldData.name+"]"}},[e._v(e._s(e.fieldData.label))])]),e._v(" "),a("td",[a("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(" "),a("p",{staticClass:"description",domProps:{innerHTML:e._s(e.fieldData.desc)}})])]):e._e(),e._v(" "),"textarea"==e.fieldData.type?a("tr",{class:e.id},[a("th",{attrs:{scope:"row"}},[a("label",{attrs:{for:e.sectionId+"["+e.fieldData.name+"]"}},[e._v(e._s(e.fieldData.label))])]),e._v(" "),a("td",[a("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(" "),a("p",{staticClass:"description",domProps:{innerHTML:e._s(e.fieldData.desc)}})])]):e._e(),e._v(" "),"checkbox"==e.fieldData.type?a("tr",{class:e.id},[a("th",{attrs:{scope:"row"}},[a("label",{attrs:{for:e.sectionId+"["+e.fieldData.name+"]"}},[e._v(e._s(e.fieldData.label))])]),e._v(" "),a("td",[a("fieldset",[a("label",{attrs:{for:e.sectionId+"["+e.fieldData.name+"]"}},[a("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.fieldValue[e.fieldData.name]=a.concat([null])):n>-1&&(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?a("tr",{class:e.id},[a("th",{attrs:{scope:"row"}},[a("label",{attrs:{for:e.sectionId+"["+e.fieldData.name+"]"}},[e._v(e._s(e.fieldData.label))])]),e._v(" "),a("td",[a("fieldset",[e._l(e.fieldData.options,function(t,i){return[a("label",{attrs:{for:e.sectionId+"["+e.fieldData.name+"]["+i+"]"}},[a("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 l=e._i(a,null);s.checked?l<0&&(e.fieldValue[e.fieldData.name][i]=a.concat([null])):l>-1&&(e.fieldValue[e.fieldData.name][i]=a.slice(0,l).concat(a.slice(l+1)))}else e.$set(e.fieldValue[e.fieldData.name],i,n)}}}),e._v("\n "+e._s(t)+"\n ")]),e._v(" "),a("br")]})],2)])]):e._e(),e._v(" "),"select"==e.fieldData.type?a("tr",{class:e.id},[a("th",{attrs:{scope:"row"}},[a("label",{attrs:{for:e.sectionId+"["+e.fieldData.name+"]"}},[e._v(e._s(e.fieldData.label))])]),e._v(" "),a("td",[e.fieldData.grouped?a("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?a("option",{attrs:{value:""},domProps:{innerHTML:e._s(e.fieldData.placeholder)}}):e._e(),e._v(" "),e._l(e.fieldData.options,function(t){return a("optgroup",{attrs:{label:t.group_label}},e._l(t.group_values,function(t){return a("option",{domProps:{value:t.value,innerHTML:e._s(t.label)}})}))})],2):a("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?a("option",{attrs:{value:""},domProps:{innerHTML:e._s(e.fieldData.placeholder)}}):e._e(),e._v(" "),e._l(e.fieldData.options,function(t,i){return a("option",{domProps:{value:i,innerHTML:e._s(t)}})})],2),e._v(" "),a("p",{staticClass:"description",domProps:{innerHTML:e._s(e.fieldData.desc)}})])]):e._e(),e._v(" "),"file"==e.fieldData.type?a("tr",{class:e.id},[a("th",{attrs:{scope:"row"}},[a("label",{attrs:{for:e.sectionId+"["+e.fieldData.name+"]"}},[e._v(e._s(e.fieldData.label))])]),e._v(" "),a("td",[a("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(" "),a("input",{staticClass:"button wpsa-browse",attrs:{type:"button",value:"Choose File"},on:{click:function(t){t.preventDefault(),e.$emit("openMedia",{sectionId:e.sectionId,name:e.fieldData.name},t)}}}),e._v(" "),a("p",{staticClass:"description",domProps:{innerHTML:e._s(e.fieldData.desc)}})])]):e._e(),e._v(" "),"color"==e.fieldData.type?a("tr",{class:e.id},[a("th",{attrs:{scope:"row"}},[a("label",{attrs:{for:e.sectionId+"["+e.fieldData.name+"]"}},[e._v(e._s(e.fieldData.label))])]),e._v(" "),a("td",[a("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(" "),a("p",{staticClass:"description",domProps:{innerHTML:e._s(e.fieldData.desc)}})],1)]):e._e(),e._v(" "),"html"==e.fieldData.type?a("tr",{class:e.id},[a("th",{attrs:{scope:"row"}},[a("label",{attrs:{for:e.sectionId+"["+e.fieldData.name+"]"}},[e._v(e._s(e.fieldData.label))])]),e._v(" "),a("td",[a("p",{staticClass:"description",domProps:{innerHTML:e._s(e.fieldData.desc)}})])]):e._e(),e._v(" "),"radio"==e.fieldData.type?a("tr",{class:e.id},[a("th",{attrs:{scope:"row"}},[a("label",{attrs:{for:e.sectionId+"["+e.fieldData.name+"]"}},[e._v(e._s(e.fieldData.label))])]),e._v(" "),a("td",[a("fieldset",[e._l(e.fieldData.options,function(t,i){return[a("label",{attrs:{for:e.sectionId+"["+e.fieldData.name+"]["+i+"]"}},[a("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){e.$set(e.fieldValue,e.fieldData.name,i)}}}),e._v(" "+e._s(t)+"\n ")])]})],2),e._v(" "),a("p",{staticClass:"description",domProps:{innerHTML:e._s(e.fieldData.desc)}})])]):e._e(),e._v(" "),"wpeditor"==e.fieldData.type?a("tr",{class:e.id},[a("th",{attrs:{scope:"row"}},[a("label",{attrs:{for:e.sectionId+"["+e.fieldData.name+"]"}},[e._v(e._s(e.fieldData.label))])]),e._v(" "),a("td",{attrs:{width:"72%"}},[a("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(" "),a("p",{staticClass:"description",domProps:{innerHTML:e._s(e.fieldData.desc)}})],1)]):e._e(),e._v(" "),"repeatable"==e.fieldData.type?a("tr",{class:e.id},[a("th",{attrs:{scope:"row"}},[a("label",{attrs:{for:e.sectionId+"["+e.fieldData.name+"]"}},[e._v(e._s(e.fieldData.label))])]),e._v(" "),a("td",{attrs:{width:"72%"}},[a("ul",{staticClass:"dokan-settings-repeatable-list"},e._l(e.fieldValue[e.fieldData.name],function(t,i){return e.fieldValue[e.fieldData.name]?a("li",[e._v("\n "+e._s(t.value)+" "),a("span",{staticClass:"dashicons dashicons-no-alt remove-item",on:{click:function(t){t.preventDefault(),e.removeItem(i,e.fieldData.name)}}})]):e._e()})),e._v(" "),a("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(" "),a("a",{staticClass:"button wepos-repetable-add-item-btn",attrs:{href:"#"},on:{click:function(t){t.preventDefault(),e.addItem(e.fieldData.type,e.fieldData.name)}}},[e._v("+")]),e._v(" "),a("p",{staticClass:"description",domProps:{innerHTML:e._s(e.fieldData.desc)}})])]):e._e(),e._v(" "),"radio_image"==e.fieldData.type?a("tr",{class:e.id},[a("th",{attrs:{scope:"row"}},[a("label",{attrs:{for:e.sectionId+"["+e.fieldData.name+"]"}},[e._v(e._s(e.fieldData.label))])]),e._v(" "),a("td",[a("div",{staticClass:"radio-image-container"},[e._l(e.fieldData.options,function(t,i){return[a("label",{staticClass:"radio-image",class:{active:e.fieldValue[e.fieldData.name]===i,"not-active":e.fieldValue[e.fieldData.name]!==i}},[a("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){e.$set(e.fieldValue,e.fieldData.name,i)}}}),e._v(" "),a("span",{staticClass:"current-option-indicator"},[a("span",{staticClass:"dashicons dashicons-yes"}),e._v(" "+e._s(e.__("Active","wepos")))]),e._v(" "),a("img",{attrs:{src:t}}),e._v(" "),a("span",{staticClass:"active-option"},[a("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()])};i._withStripped=!0;var s={render:i,staticRenderFns:[]};t.a=s},211:function(e,t,a){"use strict";var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"wepos-settings"},[a("h2",{staticStyle:{"margin-bottom":"15px"}},[e._v(e._s(e.__("Settings","wepos")))]),e._v(" "),e.isSaved?a("div",{staticClass:"settings-error notice is-dismissible",class:{updated:e.isUpdated,error:!e.isUpdated},attrs:{id:"setting-message_updated"}},[a("p",[a("strong",{domProps:{innerHTML:e._s(e.message)}})]),e._v(" "),a("button",{staticClass:"notice-dismiss",attrs:{type:"button"},on:{click:function(t){t.preventDefault(),e.isSaved=!1}}},[a("span",{staticClass:"screen-reader-text"},[e._v(e._s(e.__("Dismiss this notice.","wepos")))])])]):e._e(),e._v(" "),a("div",{staticClass:"wepos-settings-wrap"},[a("h2",{staticClass:"nav-tab-wrapper"},[e._l(e.settingSections,function(t){return[a("a",{staticClass:"nav-tab",class:{"nav-tab-active":e.currentTab===t.id},attrs:{href:"#"},on:{click:function(a){a.preventDefault(),e.changeTab(t)}}},[a("span",{staticClass:"dashicons",class:t.icon}),e._v(" "+e._s(t.title))])]})],2),e._v(" "),a("div",{staticClass:"metabox-holder"},[e._l(e.settingFields,function(t,i){return e.isLoaded?[a("div",{directives:[{name:"show",rawName:"v-show",value:e.currentTab===i,expression:"currentTab===index"}],staticClass:"group",attrs:{id:i}},[a("form",{attrs:{method:"post",action:"options.php"}},[a("input",{attrs:{type:"hidden",name:"option_page"},domProps:{value:i}}),e._v(" "),a("input",{attrs:{type:"hidden",name:"action",value:"update"}}),e._v(" "),a("h2",[e._v(e._s(e.showSectionTitle(i)))]),e._v(" "),a("table",{staticClass:"form-table"},[a("tbody",e._l(t,function(t,s){return a("fields",{key:s,attrs:{"section-id":i,id:s,"field-data":t,"field-value":e.settingValues[i]},on:{openMedia:e.showMedia}})}))]),e._v(" "),a("p",{staticClass:"submit"},[a("input",{staticClass:"button button-primary",attrs:{type:"submit",name:"submit",id:"submit"},domProps:{value:e.__("Save Changes","wepos")},on:{click:function(t){t.preventDefault(),e.saveSettings(e.settingValues[i],i)}}})])])])]:e._e()})],2),e._v(" "),e.showLoading?a("div",{staticClass:"loading"}):e._e()])])};i._withStripped=!0;var s={render:i,staticRenderFns:[]};t.a=s},212:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=jQuery,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")})}},28:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(a(29)),s=n(a(31));function n(e){return e&&e.__esModule?e:{default:e}}var l=wepos_get_lib("Vue"),o=wepos_get_lib("Vuex");l.use(o),t.default=new o.Store({modules:{Cart:i.default,Order:s.default}})},29:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(e){return e&&e.__esModule?e:{default:e}}(a(30));t.default={namespaced:!0,state:{settings:{},availableTax:{},cartdata:{line_items:[],fee_lines:[]}},getters:{getSubtotal:function(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:function(e){var t=0;return weLo_.forEach(e.cartdata.fee_lines,function(e,a){"fee"==e.type&&(t+=Math.abs(e.total))}),t},getTotalDiscount:function(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:function(e){var t=0;return weLo_.forEach(e.cartdata.line_items,function(e,a){t+=Math.abs(e.tax_amount*e.quantity)}),t},getTotalTax:function(e){var t=0,a=0;return weLo_.forEach(e.cartdata.line_items,function(e,a){t+=Math.abs(e.tax_amount*e.quantity)}),void 0!=e.settings.woo_tax&&"incl"==e.settings.woo_tax.wc_tax_display_cart&&(t=0),weLo_.forEach(e.cartdata.fee_lines,function(t,i){if("fee"==t.type&&"taxable"==t.tax_status){var s=""===t.tax_class?"standard":t.tax_class,n=weLo_.find(e.availableTax,{class:s.toString()});void 0!==n&&(a+=Math.abs(t.total)*Math.abs(n.rate)/100)}}),t+a},getOrderTotal:function(e,t){return t.getSubtotal+t.getTotalFee+t.getTotalTax},getTotal:function(e,t){return t.getOrderTotal-t.getTotalDiscount},getSettings:function(e,t){return e.settings}},mutations:{setSettings:function(e,t){e.settings=t},setAvailableTax:function(e,t){e.availableTax=t},setCartData:function(e,t){weLo_.isEmpty(t)?e.cartdata={line_items:[],fee_lines:[]}:e.cartdata=Object.assign({},t)},addToCartItem:function(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 s=weLo_.findIndex(e.cartdata.line_items,{product_id:a.product_id,variation_id:a.variation_id});s<0?i.default.hasStock(t)&&e.cartdata.line_items.push(a):i.default.hasStock(t,e.cartdata.line_items[s].quantity)&&(e.cartdata.line_items[s].quantity+=1)},removeCartItem:function(e,t){e.cartdata.line_items.splice(t,1)},addCartItemQuantity:function(e,t){var a=e.cartdata.line_items[t];i.default.hasStock(a,a.quantity)&&e.cartdata.line_items[t].quantity++},removeCartItemQuantity:function(e,t){e.cartdata.line_items[t].quantity<=1?e.cartdata.line_items[t].quantity=1:e.cartdata.line_items[t].quantity--},toggleEditQuantity:function(e,t){e.cartdata.line_items[t].editQuantity=!e.cartdata.line_items[t].editQuantity},addDiscount:function(e,t){e.cartdata.fee_lines.push({name:t.title,type:"discount",value:t.value.toString(),isEdit:!1,discount_type:t.type,tax_status:"none",tax_class:"",total:0})},addFee:function(e,t){e.cartdata.fee_lines.push({name:t.title,type:"fee",value:t.value.toString(),isEdit:!1,fee_type:t.type,tax_status:"none",tax_class:"",total:0})},saveFeeValue:function(e,t){e.cartdata.fee_lines.splice(t.key,1,t.feeData),e.cartdata.fee_lines[t.key].isEdit=!1},editFeeValue:function(e,t){e.cartdata.fee_lines[t].isEdit=!0},cancelSaveFeeValue:function(e,t){e.cartdata.fee_lines[t].isEdit=!1},removeFeeLineItems:function(e,t){e.cartdata.fee_lines.splice(t,1)},emptyCart:function(e){e.cartdata={line_items:[],fee_lines:[]}},calculateDiscount:function(e,t){e.cartdata.fee_lines.length>0&&weLo_.forEach(e.cartdata.fee_lines,function(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:function(e,t){e.cartdata.fee_lines.length>0&&weLo_.forEach(e.cartdata.fee_lines,function(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:function(e,t){e.commit("setSettings",t)},setAvailableTaxAction:function(e,t){e.commit("setAvailableTax",t)},setCartDataAction:function(e,t){e.commit("setCartData",t),e.commit("calculateDiscount",e.getters),e.commit("calculateFee",e.getters)},addToCartAction:function(e,t){e.commit("addToCartItem",t),e.commit("calculateDiscount",e.getters),e.commit("calculateFee",e.getters)},removeCartItemAction:function(e,t){e.commit("removeCartItem",t),e.commit("calculateDiscount",e.getters),e.commit("calculateFee",e.getters)},addItemQuantityAction:function(e,t){e.commit("addCartItemQuantity",t),e.commit("calculateDiscount",e.getters),e.commit("calculateFee",e.getters)},removeItemQuantityAction:function(e,t){e.commit("removeCartItemQuantity",t),e.commit("calculateDiscount",e.getters),e.commit("calculateFee",e.getters)},toggleEditQuantityAction:function(e,t){e.commit("toggleEditQuantity",t)},addDiscountAction:function(e,t){e.commit("addDiscount",t),e.commit("calculateDiscount",e.getters),e.commit("calculateFee",e.getters)},addFeeAction:function(e,t){e.commit("addFee",t),e.commit("calculateDiscount",e.getters),e.commit("calculateFee",e.getters)},removeFeeLineItemsAction:function(e,t){e.commit("removeFeeLineItems",t),e.commit("calculateDiscount",e.getters),e.commit("calculateFee",e.getters)},saveFeeValueAction:function(e,t){e.commit("saveFeeValue",t),e.commit("calculateDiscount",e.getters),e.commit("calculateFee",e.getters)},editFeeValueAction:function(e,t){e.commit("editFeeValue",t)},cancelSaveFeeValueAction:function(e,t){e.commit("cancelSaveFeeValue",t)},emptyCartAction:function(e){e.commit("emptyCart")},calculateDiscount:function(e){e.commit("calculateDiscount",e.getters)},calculateFee:function(e){e.commit("calculateFee",e.getters)}}}},30:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={hasStock:function(e){var 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}}},31:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={namespaced:!0,state:{orderdata:{billing:{},shipping:{},customer_id:0,customer_note:"",payment_method:"",payment_method_title:""},canProcessPayment:!1},getters:{getCanProcessPayment:function(e){return e.canProcessPayment}},mutations:{setOrderData:function(e,t){weLo_.isEmpty(t)?e.orderdata={billing:{},shipping:{},customer_id:0,customer_note:"",payment_method:"",payment_method_title:""}:e.orderdata=t},setCustomer:function(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:function(e){e.orderdata={billing:{},shipping:{},customer_id:0,customer_note:"",payment_method:"",payment_method_title:""}},setCustomerNote:function(e,t){e.orderdata.customer_note=t.trim()},removeCustomerNote:function(e){e.orderdata.customer_note=""},setGateway:function(e,t){e.orderdata.payment_method=t.id,e.orderdata.payment_method_title=t.title},setCanProcessPayment:function(e,t){e.canProcessPayment=t}},actions:{setOrderDataAction:function(e,t){e.commit("setOrderData",t)},setCustomerAction:function(e,t){e.commit("setCustomer",t)},emptyOrderdataAction:function(e){e.commit("emptyOrderdata")},setCustomerNoteAction:function(e,t){e.commit("setCustomerNote",t)},removeCustomerNoteAction:function(e){e.commit("removeCustomerNote")},setGatewayAction:function(e,t){e.commit("setGateway",t)},setCanProcessPaymentAction:function(e,t){e.commit("setCanProcessPayment",t)}}}},77:function(e,t,a){"use strict";t.a={name:"App"}},78:function(e,t,a){"use strict";var i=a(184);t.a={name:"Settings",components:{Fields:i.a},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}}},79:function(e,t,a){"use strict";var i=a(186);let s=wepos_get_lib("TextEditor");t.a={name:"Fields",components:{colorPicker:i.a,TextEditor:s},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)}}}},80:function(e,t,a){"use strict";var i=a(188);t.a={components:{Sketch:i.a},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})}}}}},[177]); \ No newline at end of file +pluginWebpack([1],{177:function(e,t,a){"use strict";var i=o(a(178)),s=o(a(181)),n=o(a(28)),l=o(a(212));function o(e){return e&&e.__esModule?e:{default:e}}var r=wepos_get_lib("Vue");r.config.productionTip=!1,new r({el:"#wepos-admin-app",router:s.default,store:n.default,render:function(e){return e(i.default)},created:function(){this.setLocaleData(wepos.i18n.wepos),wepos.i18n["wepos-pro"]&&this.setLocaleData(wepos.i18n["wepos-pro"])}}),(0,l.default)("wepos")},178:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=a(77),s=a(180),n=!1;var l=function(e){n||a(179)},o=a(0)(i.a,s.a,!1,l,null,null);o.options.__file="assets/src/admin/App.vue",t.default=o.exports},179:function(e,t){},180:function(e,t,a){"use strict";var i=function(){var e=this.$createElement,t=this._self._c||e;return t("div",{attrs:{id:"wepos-admin-app"}},[t("router-view")],1)};i._withStripped=!0;var s={render:i,staticRenderFns:[]};t.a=s},181:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(e){return e&&e.__esModule?e:{default:e}}(a(182));var s=wepos_get_lib("Vue"),n=wepos_get_lib("Router");s.use(n),t.default=new n({routes:wepos.hooks.applyFilters("wepos_admin_routes",[{path:"/settings",name:"Settings",component:i.default}])})},182:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=a(78),s=a(211),n=!1;var l=function(e){n||a(183)},o=a(0)(i.a,s.a,!1,l,null,null);o.options.__file="assets/src/admin/components/Settings.vue",t.default=o.exports},183:function(e,t){},184:function(e,t,a){"use strict";var i=a(79),s=a(210),n=!1;var l=function(e){n||a(185)},o=a(0)(i.a,s.a,!1,l,null,null);o.options.__file="assets/src/admin/components/Fields.vue",t.a=o.exports},185:function(e,t){},186:function(e,t,a){"use strict";var i=a(80),s=a(209),n=!1;var l=function(e){n||a(187)},o=a(0)(i.a,s.a,!1,l,"data-v-267901b1",null);o.options.__file="assets/src/admin/components/ColorPicker.vue",t.a=o.exports},187:function(e,t){},209:function(e,t,a){"use strict";var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"color-picker-container"},[a("button",{staticClass:"button color-picker-button",style:{backgroundColor:e.value},attrs:{type:"button"},on:{click:e.toggleColorPicker}},[a("span",[e._v(e._s(e.__("Select Color","wepos")))])]),e._v(" "),e.showColorPicker&&"hex"===e.format?a("input",{staticClass:"hex-input",attrs:{type:"text"},domProps:{value:e.value},on:{input:function(t){e.setHexColor(t.target.value)}}}):e._e(),e._v(" "),e.showColorPicker?a("div",{staticClass:"button-group"},[a("button",{staticClass:"button button-small",attrs:{type:"button"},on:{click:function(t){e.updateColor({})}}},[e._v(e._s(e.__("Clear","wepos")))]),e._v(" "),a("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?a("sketch",{attrs:{value:e.value,"preset-colors":e.presetColors,"disable-alpha":e.disableAlpha,"disable-fields":e.disableFields},on:{input:e.updateColor}}):e._e()],1)};i._withStripped=!0;var s={render:i,staticRenderFns:[]};t.a=s},210:function(e,t,a){"use strict";var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[e.containCommonFields(e.fieldData.type)?a("tr",{class:e.id},[a("th",{attrs:{scope:"row"}},[a("label",{attrs:{for:e.sectionId+"["+e.fieldData.name+"]"}},[e._v(e._s(e.fieldData.label))])]),e._v(" "),a("td",[a("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(" "),a("p",{staticClass:"description",domProps:{innerHTML:e._s(e.fieldData.desc)}})])]):e._e(),e._v(" "),"number"==e.fieldData.type?a("tr",{class:e.id},[a("th",{attrs:{scope:"row"}},[a("label",{attrs:{for:e.sectionId+"["+e.fieldData.name+"]"}},[e._v(e._s(e.fieldData.label))])]),e._v(" "),a("td",[a("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(" "),a("p",{staticClass:"description",domProps:{innerHTML:e._s(e.fieldData.desc)}})])]):e._e(),e._v(" "),"textarea"==e.fieldData.type?a("tr",{class:e.id},[a("th",{attrs:{scope:"row"}},[a("label",{attrs:{for:e.sectionId+"["+e.fieldData.name+"]"}},[e._v(e._s(e.fieldData.label))])]),e._v(" "),a("td",[a("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(" "),a("p",{staticClass:"description",domProps:{innerHTML:e._s(e.fieldData.desc)}})])]):e._e(),e._v(" "),"checkbox"==e.fieldData.type?a("tr",{class:e.id},[a("th",{attrs:{scope:"row"}},[a("label",{attrs:{for:e.sectionId+"["+e.fieldData.name+"]"}},[e._v(e._s(e.fieldData.label))])]),e._v(" "),a("td",[a("fieldset",[a("label",{attrs:{for:e.sectionId+"["+e.fieldData.name+"]"}},[a("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.fieldValue[e.fieldData.name]=a.concat([null])):n>-1&&(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?a("tr",{class:e.id},[a("th",{attrs:{scope:"row"}},[a("label",{attrs:{for:e.sectionId+"["+e.fieldData.name+"]"}},[e._v(e._s(e.fieldData.label))])]),e._v(" "),a("td",[a("fieldset",[e._l(e.fieldData.options,function(t,i){return[a("label",{attrs:{for:e.sectionId+"["+e.fieldData.name+"]["+i+"]"}},[a("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 l=e._i(a,null);s.checked?l<0&&(e.fieldValue[e.fieldData.name][i]=a.concat([null])):l>-1&&(e.fieldValue[e.fieldData.name][i]=a.slice(0,l).concat(a.slice(l+1)))}else e.$set(e.fieldValue[e.fieldData.name],i,n)}}}),e._v("\n "+e._s(t)+"\n ")]),e._v(" "),a("br")]})],2)])]):e._e(),e._v(" "),"select"==e.fieldData.type?a("tr",{class:e.id},[a("th",{attrs:{scope:"row"}},[a("label",{attrs:{for:e.sectionId+"["+e.fieldData.name+"]"}},[e._v(e._s(e.fieldData.label))])]),e._v(" "),a("td",[e.fieldData.grouped?a("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?a("option",{attrs:{value:""},domProps:{innerHTML:e._s(e.fieldData.placeholder)}}):e._e(),e._v(" "),e._l(e.fieldData.options,function(t){return a("optgroup",{attrs:{label:t.group_label}},e._l(t.group_values,function(t){return a("option",{domProps:{value:t.value,innerHTML:e._s(t.label)}})}))})],2):a("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?a("option",{attrs:{value:""},domProps:{innerHTML:e._s(e.fieldData.placeholder)}}):e._e(),e._v(" "),e._l(e.fieldData.options,function(t,i){return a("option",{domProps:{value:i,innerHTML:e._s(t)}})})],2),e._v(" "),a("p",{staticClass:"description",domProps:{innerHTML:e._s(e.fieldData.desc)}})])]):e._e(),e._v(" "),"file"==e.fieldData.type?a("tr",{class:e.id},[a("th",{attrs:{scope:"row"}},[a("label",{attrs:{for:e.sectionId+"["+e.fieldData.name+"]"}},[e._v(e._s(e.fieldData.label))])]),e._v(" "),a("td",[a("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(" "),a("input",{staticClass:"button wpsa-browse",attrs:{type:"button",value:"Choose File"},on:{click:function(t){t.preventDefault(),e.$emit("openMedia",{sectionId:e.sectionId,name:e.fieldData.name},t)}}}),e._v(" "),a("p",{staticClass:"description",domProps:{innerHTML:e._s(e.fieldData.desc)}})])]):e._e(),e._v(" "),"color"==e.fieldData.type?a("tr",{class:e.id},[a("th",{attrs:{scope:"row"}},[a("label",{attrs:{for:e.sectionId+"["+e.fieldData.name+"]"}},[e._v(e._s(e.fieldData.label))])]),e._v(" "),a("td",[a("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(" "),a("p",{staticClass:"description",domProps:{innerHTML:e._s(e.fieldData.desc)}})],1)]):e._e(),e._v(" "),"html"==e.fieldData.type?a("tr",{class:e.id},[a("th",{attrs:{scope:"row"}},[a("label",{attrs:{for:e.sectionId+"["+e.fieldData.name+"]"}},[e._v(e._s(e.fieldData.label))])]),e._v(" "),a("td",[a("p",{staticClass:"description",domProps:{innerHTML:e._s(e.fieldData.desc)}})])]):e._e(),e._v(" "),"radio"==e.fieldData.type?a("tr",{class:e.id},[a("th",{attrs:{scope:"row"}},[a("label",{attrs:{for:e.sectionId+"["+e.fieldData.name+"]"}},[e._v(e._s(e.fieldData.label))])]),e._v(" "),a("td",[a("fieldset",[e._l(e.fieldData.options,function(t,i){return[a("label",{attrs:{for:e.sectionId+"["+e.fieldData.name+"]["+i+"]"}},[a("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){e.$set(e.fieldValue,e.fieldData.name,i)}}}),e._v(" "+e._s(t)+"\n ")])]})],2),e._v(" "),a("p",{staticClass:"description",domProps:{innerHTML:e._s(e.fieldData.desc)}})])]):e._e(),e._v(" "),"wpeditor"==e.fieldData.type?a("tr",{class:e.id},[a("th",{attrs:{scope:"row"}},[a("label",{attrs:{for:e.sectionId+"["+e.fieldData.name+"]"}},[e._v(e._s(e.fieldData.label))])]),e._v(" "),a("td",{attrs:{width:"72%"}},[a("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(" "),a("p",{staticClass:"description",domProps:{innerHTML:e._s(e.fieldData.desc)}})],1)]):e._e(),e._v(" "),"repeatable"==e.fieldData.type?a("tr",{class:e.id},[a("th",{attrs:{scope:"row"}},[a("label",{attrs:{for:e.sectionId+"["+e.fieldData.name+"]"}},[e._v(e._s(e.fieldData.label))])]),e._v(" "),a("td",{attrs:{width:"72%"}},[a("ul",{staticClass:"dokan-settings-repeatable-list"},e._l(e.fieldValue[e.fieldData.name],function(t,i){return e.fieldValue[e.fieldData.name]?a("li",[e._v("\n "+e._s(t.value)+" "),a("span",{staticClass:"dashicons dashicons-no-alt remove-item",on:{click:function(t){t.preventDefault(),e.removeItem(i,e.fieldData.name)}}})]):e._e()})),e._v(" "),a("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(" "),a("a",{staticClass:"button wepos-repetable-add-item-btn",attrs:{href:"#"},on:{click:function(t){t.preventDefault(),e.addItem(e.fieldData.type,e.fieldData.name)}}},[e._v("+")]),e._v(" "),a("p",{staticClass:"description",domProps:{innerHTML:e._s(e.fieldData.desc)}})])]):e._e(),e._v(" "),"radio_image"==e.fieldData.type?a("tr",{class:e.id},[a("th",{attrs:{scope:"row"}},[a("label",{attrs:{for:e.sectionId+"["+e.fieldData.name+"]"}},[e._v(e._s(e.fieldData.label))])]),e._v(" "),a("td",[a("div",{staticClass:"radio-image-container"},[e._l(e.fieldData.options,function(t,i){return[a("label",{staticClass:"radio-image",class:{active:e.fieldValue[e.fieldData.name]===i,"not-active":e.fieldValue[e.fieldData.name]!==i}},[a("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){e.$set(e.fieldValue,e.fieldData.name,i)}}}),e._v(" "),a("span",{staticClass:"current-option-indicator"},[a("span",{staticClass:"dashicons dashicons-yes"}),e._v(" "+e._s(e.__("Active","wepos")))]),e._v(" "),a("img",{attrs:{src:t}}),e._v(" "),a("span",{staticClass:"active-option"},[a("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()])};i._withStripped=!0;var s={render:i,staticRenderFns:[]};t.a=s},211:function(e,t,a){"use strict";var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"wepos-settings"},[a("h2",{staticStyle:{"margin-bottom":"15px"}},[e._v(e._s(e.__("Settings","wepos")))]),e._v(" "),e.isSaved?a("div",{staticClass:"settings-error notice is-dismissible",class:{updated:e.isUpdated,error:!e.isUpdated},attrs:{id:"setting-message_updated"}},[a("p",[a("strong",{domProps:{innerHTML:e._s(e.message)}})]),e._v(" "),a("button",{staticClass:"notice-dismiss",attrs:{type:"button"},on:{click:function(t){t.preventDefault(),e.isSaved=!1}}},[a("span",{staticClass:"screen-reader-text"},[e._v(e._s(e.__("Dismiss this notice.","wepos")))])])]):e._e(),e._v(" "),a("div",{staticClass:"wepos-settings-wrap"},[a("h2",{staticClass:"nav-tab-wrapper"},[e._l(e.settingSections,function(t){return[a("a",{staticClass:"nav-tab",class:{"nav-tab-active":e.currentTab===t.id},attrs:{href:"#"},on:{click:function(a){a.preventDefault(),e.changeTab(t)}}},[a("span",{staticClass:"dashicons",class:t.icon}),e._v(" "+e._s(t.title))])]})],2),e._v(" "),a("div",{staticClass:"metabox-holder"},[e._l(e.settingFields,function(t,i){return e.isLoaded?[a("div",{directives:[{name:"show",rawName:"v-show",value:e.currentTab===i,expression:"currentTab===index"}],staticClass:"group",attrs:{id:i}},[a("form",{attrs:{method:"post",action:"options.php"}},[a("input",{attrs:{type:"hidden",name:"option_page"},domProps:{value:i}}),e._v(" "),a("input",{attrs:{type:"hidden",name:"action",value:"update"}}),e._v(" "),a("h2",[e._v(e._s(e.showSectionTitle(i)))]),e._v(" "),a("table",{staticClass:"form-table"},[a("tbody",e._l(t,function(t,s){return a("fields",{key:s,attrs:{"section-id":i,id:s,"field-data":t,"field-value":e.settingValues[i]},on:{openMedia:e.showMedia}})}))]),e._v(" "),a("p",{staticClass:"submit"},[a("input",{staticClass:"button button-primary",attrs:{type:"submit",name:"submit",id:"submit"},domProps:{value:e.__("Save Changes","wepos")},on:{click:function(t){t.preventDefault(),e.saveSettings(e.settingValues[i],i)}}})])])])]:e._e()})],2),e._v(" "),e.showLoading?a("div",{staticClass:"loading"}):e._e()])])};i._withStripped=!0;var s={render:i,staticRenderFns:[]};t.a=s},212:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=jQuery,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")})}},28:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(a(29)),s=n(a(31));function n(e){return e&&e.__esModule?e:{default:e}}var l=wepos_get_lib("Vue"),o=wepos_get_lib("Vuex");l.use(o),t.default=new o.Store({modules:{Cart:i.default,Order:s.default}})},29:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(e){return e&&e.__esModule?e:{default:e}}(a(30));t.default={namespaced:!0,state:{settings:{},availableTax:{},cartdata:{line_items:[],fee_lines:[]}},getters:{getSubtotal:function(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:function(e){var t=0;return weLo_.forEach(e.cartdata.fee_lines,function(e,a){"fee"==e.type&&(t+=Math.abs(e.total))}),t},getTotalDiscount:function(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:function(e){var t=0;return weLo_.forEach(e.cartdata.line_items,function(e,a){t+=Math.abs(e.tax_amount*e.quantity)}),t},getTotalTax:function(e){var t=0,a=0;return weLo_.forEach(e.cartdata.line_items,function(e,a){t+=Math.abs(e.tax_amount*e.quantity)}),void 0!=e.settings.woo_tax&&"incl"==e.settings.woo_tax.wc_tax_display_cart&&(t=0),weLo_.forEach(e.cartdata.fee_lines,function(t,i){if("fee"==t.type&&"taxable"==t.tax_status){var s=""===t.tax_class?"standard":t.tax_class,n=weLo_.find(e.availableTax,{class:s.toString()});void 0!==n&&(a+=Math.abs(t.total)*Math.abs(n.rate)/100)}}),t+a},getOrderTotal:function(e,t){return t.getSubtotal+t.getTotalFee+t.getTotalTax},getTotal:function(e,t){return t.getOrderTotal-t.getTotalDiscount},getSettings:function(e,t){return e.settings}},mutations:{setSettings:function(e,t){e.settings=t},setAvailableTax:function(e,t){e.availableTax=t},setCartData:function(e,t){weLo_.isEmpty(t)?e.cartdata={line_items:[],fee_lines:[]}:e.cartdata=Object.assign({},t)},addToCartItem:function(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 s=weLo_.findIndex(e.cartdata.line_items,{product_id:a.product_id,variation_id:a.variation_id});s<0?i.default.hasStock(t)&&e.cartdata.line_items.push(a):i.default.hasStock(t,e.cartdata.line_items[s].quantity)&&(e.cartdata.line_items[s].quantity+=1)},removeCartItem:function(e,t){e.cartdata.line_items.splice(t,1)},addCartItemQuantity:function(e,t){var a=e.cartdata.line_items[t];i.default.hasStock(a,a.quantity)&&e.cartdata.line_items[t].quantity++},removeCartItemQuantity:function(e,t){e.cartdata.line_items[t].quantity<=1?e.cartdata.line_items[t].quantity=1:e.cartdata.line_items[t].quantity--},toggleEditQuantity:function(e,t){e.cartdata.line_items[t].editQuantity=!e.cartdata.line_items[t].editQuantity},addDiscount:function(e,t){e.cartdata.fee_lines.push({name:t.title,type:"discount",value:t.value.toString(),isEdit:!1,discount_type:t.type,tax_status:"none",tax_class:"",total:0})},addFee:function(e,t){e.cartdata.fee_lines.push({name:t.title,type:"fee",value:t.value.toString(),isEdit:!1,fee_type:t.type,tax_status:"none",tax_class:"",total:0})},saveFeeValue:function(e,t){e.cartdata.fee_lines.splice(t.key,1,t.feeData),e.cartdata.fee_lines[t.key].isEdit=!1},editFeeValue:function(e,t){e.cartdata.fee_lines[t].isEdit=!0},cancelSaveFeeValue:function(e,t){e.cartdata.fee_lines[t].isEdit=!1},removeFeeLineItems:function(e,t){e.cartdata.fee_lines.splice(t,1)},emptyCart:function(e){e.cartdata={line_items:[],fee_lines:[]}},calculateDiscount:function(e,t){e.cartdata.fee_lines.length>0&&weLo_.forEach(e.cartdata.fee_lines,function(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:function(e,t){e.cartdata.fee_lines.length>0&&weLo_.forEach(e.cartdata.fee_lines,function(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:function(e,t){e.commit("setSettings",t)},setAvailableTaxAction:function(e,t){e.commit("setAvailableTax",t)},setCartDataAction:function(e,t){e.commit("setCartData",t),e.commit("calculateDiscount",e.getters),e.commit("calculateFee",e.getters)},addToCartAction:function(e,t){e.commit("addToCartItem",t),e.commit("calculateDiscount",e.getters),e.commit("calculateFee",e.getters)},removeCartItemAction:function(e,t){e.commit("removeCartItem",t),e.commit("calculateDiscount",e.getters),e.commit("calculateFee",e.getters)},addItemQuantityAction:function(e,t){e.commit("addCartItemQuantity",t),e.commit("calculateDiscount",e.getters),e.commit("calculateFee",e.getters)},removeItemQuantityAction:function(e,t){e.commit("removeCartItemQuantity",t),e.commit("calculateDiscount",e.getters),e.commit("calculateFee",e.getters)},toggleEditQuantityAction:function(e,t){e.commit("toggleEditQuantity",t)},addDiscountAction:function(e,t){e.commit("addDiscount",t),e.commit("calculateDiscount",e.getters),e.commit("calculateFee",e.getters)},addFeeAction:function(e,t){e.commit("addFee",t),e.commit("calculateDiscount",e.getters),e.commit("calculateFee",e.getters)},removeFeeLineItemsAction:function(e,t){e.commit("removeFeeLineItems",t),e.commit("calculateDiscount",e.getters),e.commit("calculateFee",e.getters)},saveFeeValueAction:function(e,t){e.commit("saveFeeValue",t),e.commit("calculateDiscount",e.getters),e.commit("calculateFee",e.getters)},editFeeValueAction:function(e,t){e.commit("editFeeValue",t)},cancelSaveFeeValueAction:function(e,t){e.commit("cancelSaveFeeValue",t)},emptyCartAction:function(e){e.commit("emptyCart")},calculateDiscount:function(e){e.commit("calculateDiscount",e.getters)},calculateFee:function(e){e.commit("calculateFee",e.getters)}}}},30:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={hasStock:function(e){var 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}}},31:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={namespaced:!0,state:{orderdata:{billing:{},shipping:{},customer_id:0,customer_note:"",payment_method:"",payment_method_title:""},canProcessPayment:!1},getters:{getCanProcessPayment:function(e){return e.canProcessPayment}},mutations:{setOrderData:function(e,t){weLo_.isEmpty(t)?e.orderdata={billing:{},shipping:{},customer_id:0,customer_note:"",payment_method:"",payment_method_title:""}:e.orderdata=t},setCustomer:function(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:function(e){e.orderdata={billing:{},shipping:{},customer_id:0,customer_note:"",payment_method:"",payment_method_title:""}},setCustomerNote:function(e,t){e.orderdata.customer_note=t.trim()},removeCustomerNote:function(e){e.orderdata.customer_note=""},setGateway:function(e,t){e.orderdata.payment_method=t.id,e.orderdata.payment_method_title=t.title},setCanProcessPayment:function(e,t){e.canProcessPayment=t}},actions:{setOrderDataAction:function(e,t){e.commit("setOrderData",t)},setCustomerAction:function(e,t){e.commit("setCustomer",t)},emptyOrderdataAction:function(e){e.commit("emptyOrderdata")},setCustomerNoteAction:function(e,t){e.commit("setCustomerNote",t)},removeCustomerNoteAction:function(e){e.commit("removeCustomerNote")},setGatewayAction:function(e,t){e.commit("setGateway",t)},setCanProcessPaymentAction:function(e,t){e.commit("setCanProcessPayment",t)}}}},77:function(e,t,a){"use strict";t.a={name:"App"}},78:function(e,t,a){"use strict";var i=a(184);t.a={name:"Settings",components:{Fields:i.a},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}}},79:function(e,t,a){"use strict";var i=a(186);let s=wepos_get_lib("TextEditor");t.a={name:"Fields",components:{colorPicker:i.a,TextEditor:s},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)}}}},80:function(e,t,a){"use strict";var i=a(188);t.a={components:{Sketch:i.a},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})}}}}},[177]); \ No newline at end of file diff --git a/assets/js/frontend.js b/assets/js/frontend.js index 036b5f15..2cc6b9d0 100644 --- a/assets/js/frontend.js +++ b/assets/js/frontend.js @@ -3127,6 +3127,10 @@ new Vue({ }, created: function created() { this.setLocaleData(wepos.i18n['wepos']); + + if (wepos.i18n['wepos-pro']) { + this.setLocaleData(wepos.i18n['wepos-pro']); + } } }); diff --git a/assets/js/frontend.min.js b/assets/js/frontend.min.js index 6cc5dd0c..ed5f654b 100644 --- a/assets/js/frontend.min.js +++ b/assets/js/frontend.min.js @@ -1 +1 @@ -pluginWebpack([0],Array(28).concat([function(t,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var a=o(s(29)),i=o(s(31));function o(t){return t&&t.__esModule?t:{default:t}}var r=wepos_get_lib("Vue"),n=wepos_get_lib("Vuex");r.use(n),e.default=new n.Store({modules:{Cart:a.default,Order:i.default}})},function(t,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var a=function(t){return t&&t.__esModule?t:{default:t}}(s(30));e.default={namespaced:!0,state:{settings:{},availableTax:{},cartdata:{line_items:[],fee_lines:[]}},getters:{getSubtotal:function(t){var e=0;return weLo_.forEach(t.cartdata.line_items,function(t,s){t.on_sale?e+=t.quantity*t.sale_price:e+=t.quantity*t.regular_price}),e},getTotalFee:function(t){var e=0;return weLo_.forEach(t.cartdata.fee_lines,function(t,s){"fee"==t.type&&(e+=Math.abs(t.total))}),e},getTotalDiscount:function(t){var e=0;return weLo_.forEach(t.cartdata.fee_lines,function(t,s){"discount"==t.type&&(e+=Number(Math.abs(t.total)))}),e},getTotalLineTax:function(t){var e=0;return weLo_.forEach(t.cartdata.line_items,function(t,s){e+=Math.abs(t.tax_amount*t.quantity)}),e},getTotalTax:function(t){var e=0,s=0;return weLo_.forEach(t.cartdata.line_items,function(t,s){e+=Math.abs(t.tax_amount*t.quantity)}),void 0!=t.settings.woo_tax&&"incl"==t.settings.woo_tax.wc_tax_display_cart&&(e=0),weLo_.forEach(t.cartdata.fee_lines,function(e,a){if("fee"==e.type&&"taxable"==e.tax_status){var i=""===e.tax_class?"standard":e.tax_class,o=weLo_.find(t.availableTax,{class:i.toString()});void 0!==o&&(s+=Math.abs(e.total)*Math.abs(o.rate)/100)}}),e+s},getOrderTotal:function(t,e){return e.getSubtotal+e.getTotalFee+e.getTotalTax},getTotal:function(t,e){return e.getOrderTotal-e.getTotalDiscount},getSettings:function(t,e){return t.settings}},mutations:{setSettings:function(t,e){t.settings=e},setAvailableTax:function(t,e){t.availableTax=e},setCartData:function(t,e){weLo_.isEmpty(e)?t.cartdata={line_items:[],fee_lines:[]}:t.cartdata=Object.assign({},e)},addToCartItem:function(t,e){var s={};s.product_id=0===e.parent_id?e.id:e.parent_id,s.name=e.name,s.quantity=1,s.regular_price=e.regular_display_price,s.sale_price=e.sales_display_price,s.on_sale=e.on_sale,s.attribute=e.attributes,s.variation_id=0!==e.parent_id?e.id:0,s.editQuantity=!1,s.type=e.type,s.tax_amount=e.tax_amount,s.manage_stock=e.manage_stock,s.stock_status=e.stock_status,s.backorders_allowed=e.backorders_allowed,s.stock_quantity=e.stock_quantity;var i=weLo_.findIndex(t.cartdata.line_items,{product_id:s.product_id,variation_id:s.variation_id});i<0?a.default.hasStock(e)&&t.cartdata.line_items.push(s):a.default.hasStock(e,t.cartdata.line_items[i].quantity)&&(t.cartdata.line_items[i].quantity+=1)},removeCartItem:function(t,e){t.cartdata.line_items.splice(e,1)},addCartItemQuantity:function(t,e){var s=t.cartdata.line_items[e];a.default.hasStock(s,s.quantity)&&t.cartdata.line_items[e].quantity++},removeCartItemQuantity:function(t,e){t.cartdata.line_items[e].quantity<=1?t.cartdata.line_items[e].quantity=1:t.cartdata.line_items[e].quantity--},toggleEditQuantity:function(t,e){t.cartdata.line_items[e].editQuantity=!t.cartdata.line_items[e].editQuantity},addDiscount:function(t,e){t.cartdata.fee_lines.push({name:e.title,type:"discount",value:e.value.toString(),isEdit:!1,discount_type:e.type,tax_status:"none",tax_class:"",total:0})},addFee:function(t,e){t.cartdata.fee_lines.push({name:e.title,type:"fee",value:e.value.toString(),isEdit:!1,fee_type:e.type,tax_status:"none",tax_class:"",total:0})},saveFeeValue:function(t,e){t.cartdata.fee_lines.splice(e.key,1,e.feeData),t.cartdata.fee_lines[e.key].isEdit=!1},editFeeValue:function(t,e){t.cartdata.fee_lines[e].isEdit=!0},cancelSaveFeeValue:function(t,e){t.cartdata.fee_lines[e].isEdit=!1},removeFeeLineItems:function(t,e){t.cartdata.fee_lines.splice(e,1)},emptyCart:function(t){t.cartdata={line_items:[],fee_lines:[]}},calculateDiscount:function(t,e){t.cartdata.fee_lines.length>0&&weLo_.forEach(t.cartdata.fee_lines,function(s,a){"discount"==s.type&&("percent"==s.discount_type?t.cartdata.fee_lines[a].total="-"+e.getSubtotal*Math.abs(s.value)/100:t.cartdata.fee_lines[a].total="-"+Math.abs(s.value))})},calculateFee:function(t,e){t.cartdata.fee_lines.length>0&&weLo_.forEach(t.cartdata.fee_lines,function(s,a){"fee"==s.type&&("percent"==s.fee_type?t.cartdata.fee_lines[a].total=(e.getSubtotal*Math.abs(s.value)/100).toString():t.cartdata.fee_lines[a].total=Math.abs(s.value).toString())})}},actions:{setSettingsAction:function(t,e){t.commit("setSettings",e)},setAvailableTaxAction:function(t,e){t.commit("setAvailableTax",e)},setCartDataAction:function(t,e){t.commit("setCartData",e),t.commit("calculateDiscount",t.getters),t.commit("calculateFee",t.getters)},addToCartAction:function(t,e){t.commit("addToCartItem",e),t.commit("calculateDiscount",t.getters),t.commit("calculateFee",t.getters)},removeCartItemAction:function(t,e){t.commit("removeCartItem",e),t.commit("calculateDiscount",t.getters),t.commit("calculateFee",t.getters)},addItemQuantityAction:function(t,e){t.commit("addCartItemQuantity",e),t.commit("calculateDiscount",t.getters),t.commit("calculateFee",t.getters)},removeItemQuantityAction:function(t,e){t.commit("removeCartItemQuantity",e),t.commit("calculateDiscount",t.getters),t.commit("calculateFee",t.getters)},toggleEditQuantityAction:function(t,e){t.commit("toggleEditQuantity",e)},addDiscountAction:function(t,e){t.commit("addDiscount",e),t.commit("calculateDiscount",t.getters),t.commit("calculateFee",t.getters)},addFeeAction:function(t,e){t.commit("addFee",e),t.commit("calculateDiscount",t.getters),t.commit("calculateFee",t.getters)},removeFeeLineItemsAction:function(t,e){t.commit("removeFeeLineItems",e),t.commit("calculateDiscount",t.getters),t.commit("calculateFee",t.getters)},saveFeeValueAction:function(t,e){t.commit("saveFeeValue",e),t.commit("calculateDiscount",t.getters),t.commit("calculateFee",t.getters)},editFeeValueAction:function(t,e){t.commit("editFeeValue",e)},cancelSaveFeeValueAction:function(t,e){t.commit("cancelSaveFeeValue",e)},emptyCartAction:function(t){t.commit("emptyCart")},calculateDiscount:function(t){t.commit("calculateDiscount",t.getters)},calculateFee:function(t){t.commit("calculateFee",t.getters)}}}},function(t,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={hasStock:function(t){var 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}}},function(t,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={namespaced:!0,state:{orderdata:{billing:{},shipping:{},customer_id:0,customer_note:"",payment_method:"",payment_method_title:""},canProcessPayment:!1},getters:{getCanProcessPayment:function(t){return t.canProcessPayment}},mutations:{setOrderData:function(t,e){weLo_.isEmpty(e)?t.orderdata={billing:{},shipping:{},customer_id:0,customer_note:"",payment_method:"",payment_method_title:""}:t.orderdata=e},setCustomer:function(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:function(t){t.orderdata={billing:{},shipping:{},customer_id:0,customer_note:"",payment_method:"",payment_method_title:""}},setCustomerNote:function(t,e){t.orderdata.customer_note=e.trim()},removeCustomerNote:function(t){t.orderdata.customer_note=""},setGateway:function(t,e){t.orderdata.payment_method=e.id,t.orderdata.payment_method_title=e.title},setCanProcessPayment:function(t,e){t.canProcessPayment=e}},actions:{setOrderDataAction:function(t,e){t.commit("setOrderData",e)},setCustomerAction:function(t,e){t.commit("setCustomer",e)},emptyOrderdataAction:function(t){t.commit("emptyOrderdata")},setCustomerNoteAction:function(t,e){t.commit("setCustomerNote",e)},removeCustomerNoteAction:function(t){t.commit("removeCustomerNote")},setGatewayAction:function(t,e){t.commit("setGateway",e)},setCanProcessPaymentAction:function(t,e){t.commit("setCanProcessPayment",e)}}}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(t,e,s){"use strict";e.a={name:"App"}},function(t,e,s){"use strict";var a=s(151),i=s(154),o=s(157),r=s(160),n=s(73),c=s.n(n),l=s(167),u=s(170),d=s(173);let p=wepos_get_lib("Modal");e.a={name:"Home",components:{ProductSearch:i.a,CustomerSearch:o.a,Overlay:a.a,Modal:p,MugenScroll:c.a,FeeKeypad:r.a,PrintReceipt:l.a,PrintReceiptHtml:u.a,CustomerNote:d.a},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 void 0!=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)}),s=weLo_.findIndex(this.categories,e),a=t.splice(0,s+1),i=[];if(a.length>0){for(var o=a.length-1;o>=0;o--)if(i.length>0){var r=weLo_.find(a,{id:a[o+1].parent_id});if(void 0!=r&&(i.push(r),null==r.parent_id))break}else i.push(a[o]);return i.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 s=weLo_.find(this.availableGateways,{id:t});this.$store.dispatch("Order/setGatewayAction",s)},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),s=jQuery(".wepos-checkout-wrapper");s.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(a=>{"success"==a.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),s.unblock()):s.unblock()}).fail(t=>{s.unblock(),alert(t.responseJSON.message)})}).fail(t=>{s.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!(void 0==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)},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,s)=>{this.products=this.products.concat(t),this.page+=1,this.totalPages=parseInt(s.getResponseHeader("X-WP-TotalPages")),this.productLoading=!1}).then((t,e,s)=>{this.fetchProducts()}):this.productLoading=!1},maybeRemoveDeletedProduct:t=>new Promise((e,s)=>{if(!t)return e(t);if(!t.line_items||t.line_items.length<1)return e(t);let a=t.line_items.map(t=>t.product_id);wepos.api.get(wepos.rest.root+wepos.rest.posversion+"/products?include="+a.toString()).then(s=>{let a=s.map(t=>t.id);return t.line_items.forEach((e,s)=>{a.includes(e.product_id)||(t.line_items.splice(s,1),localStorage.setItem("cartdata",JSON.stringify(t)))}),e(t)}).fail(()=>s(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 s=[],a={};return t.forEach(function(t){a[t.id]={response:t,children:a[t.id]&&a[t.id].children},null===t.parent_id?s.push(a[t.id]):(a[t.parent_id]=a[t.parent_id]||{},a[t.parent_id].children=a[t.parent_id].children||[],a[t.parent_id].children.push(a[t.id]))}),s}(t),s={id:-1,level:0,name:this.__("All categories","wepos"),parent_id:null},a=e.reduce(function t(e){return function(s,a){return a.response.level=e,s.concat(a.response,(a.children||[]).reduce(t(e+1),[]))}}(0),[]);this.categories=a,this.categories.unshift(s),this.selectedCategory=s,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)}}},function(t,e,s){"use strict";e.a={name:"Overlay",props:{show:{type:Boolean}}}},function(t,e,s){"use strict";var a=s(68),i=s(27);s.n(i);let o=wepos_get_lib("Modal");e.a={name:"ProductInlineSearch",props:{products:{type:Array,default:()=>[]},settings:{type:Object,default:()=>({})}},components:{Modal:o,KeyboardControl:a.a},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,s={},a=this.products.filter(t=>{if("simple"==t.type&&t[e].toString()==this.serachInput)return!0;if("variable"==t.type){var s=!1;if(t.variations.length>0&&weLo_.forEach(t.variations,(t,a)=>{t[e].toString()==this.serachInput&&(s=!0)}),s)return!0}return!1});if(a.length>0)if("variable"==(a=a[0]).type)(s=a.variations.filter(t=>t[e].toString()==this.serachInput)[0]).parent_id=a.id,s.type=a.type,s.name=a.name,this.$emit("onProductAdded",s);else this.$emit("onProductAdded",a);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()}}},function(t,e,s){"use strict";var a=s(69),i=s(0)(a.a,null,!1,null,null,null);i.options.__file="assets/src/frontend/components/KeyboardControl.vue",e.a=i.exports},function(t,e,s){"use strict";e.a={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({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 s=void 0!==wepos.states[t.code]?wepos.states[t.code]:[],a=Object.keys(s);a.length>0?this.stateList=a.map(t=>({code:t,name:s[t]})):(this.stateList=s,this.selectedState=null)},generatePassword(t){for(var e="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789",s="",a=0,i=e.length;a{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)}}},function(t,e,s){"use strict";var a=s(162);e.a={name:"FeeKeypad",components:{keyboard:a.a},computed:{hotkeys(){return{discount:{f4:this.showFeeKeypad,esc:this.hideFeeKepad},fee:{f5:this.showFeeKeypad,esc:this.hideFeeKepad}}[this.shortKey]}},props:{name:{type:String,default:"Fee"},className:{type:String,default:""},shortKey:{type:String,default:""}},data:()=>({input:"",displayValue:"",viewFeeKeypad:!1}),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(t){this.$emit("inputfee",t.value.toString(),"percent"),this.viewFeeKeypad=!1,this.input="",this.displayValue=""},flatFee(t){this.$emit("inputfee",t.value.toString(),"flat"),this.viewFeeKeypad=!1,this.input="",this.displayValue=""},change(t){isNaN(t)?(this.input=this.displayValue,""==this.displayValue&&(this.input="")):(this.displayValue=t,this.input=this.displayValue),jQuery(this.$refs.feeinput).focus(),""==this.input&&jQuery(this.$refs.feeinput).focus()},inputChange(){isNaN(this.displayValue)?this.displayValue=this.input:this.input=this.displayValue,""==this.input&&jQuery(this.$refs.feeinput).focus()},showFeeKeypad(t){t.preventDefault(),this.viewFeeKeypad=!0,setTimeout(()=>{jQuery(this.$refs.feeinput).focus()},500)}}}},function(t,e,s){"use strict";const a="7440011c983cf39ae730b1f831e2922ac5a76910",i="f630c4abcae620278f82e142a526ef325c2a773a",o="ad982c66898e02a5dab419ea7568421b03f68ee2";e.a={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("||",a).replace("{{",i).replace("}}",o).split("|")},buttons(){return this.lines.map(t=>{let e=[],s=null;return t.match(new RegExp(`(${i}|${o}|${a}|.)`,"g")).forEach(t=>{if("{"===t)s="";else if("}"===t){let t=s.split(":"),a=t.length>1?t[0]:"",i=t.length>1?t[1]:t[0],o=t.length>2?t[2]:null,r=null;r=["append","backspace","space","clear","goto"].indexOf(i)>=0?this[i].bind(this,o):this.$emit.bind(this,i,this),e.push({type:"action",action:{name:i.replace(/\s+/g,"-").toLowerCase(),callable:r},value:a,args:o}),s=null}else null!==s?s+=t:(t===a&&(t="|"),t===i&&(t="{"),t===o&&(t="}"),e.push({type:"char",action:{name:null,callable:this.append.bind(this,t)},value:t,args:null}))}),e})},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{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)}}},function(t,e,s){"use strict";e.a={name:"ReceiptPrintHtml",props:{printdata:{type:Object,default:()=>({})},settings:{type:Object,default:()=>({})}},methods:{formatDate:t=>(t=new Date(t)).toLocaleString()}}},function(t,e,s){"use strict";e.a={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=""}}}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(t,e,s){"use strict";var a=r(s(145)),i=r(s(148)),o=r(s(28));function r(t){return t&&t.__esModule?t:{default:t}}var n=wepos_get_lib("Vue");n.config.productionTip=!1,new n({el:"#vue-frontend-app",router:i.default,store:o.default,render:function(t){return t(a.default)},created:function(){this.setLocaleData(wepos.i18n.wepos)}})},function(t,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var a=s(64),i=s(147),o=!1;var r=function(t){o||s(146)},n=s(0)(a.a,i.a,!1,r,null,null);n.options.__file="assets/src/frontend/App.vue",e.default=n.exports},function(t,e){},function(t,e,s){"use strict";var a=function(){var t=this.$createElement,e=this._self._c||t;return e("div",{attrs:{id:"vue-frontend-app"}},[e("router-view")],1)};a._withStripped=!0;var i={render:a,staticRenderFns:[]};e.a=i},function(t,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var a=function(t){return t&&t.__esModule?t:{default:t}}(s(149));var i=wepos_get_lib("Vue"),o=wepos_get_lib("Router");i.use(o),e.default=new o({routes:wepos.hooks.applyFilters("wepos_frontend_routes",[{path:"/",name:"Home",component:a.default}])})},function(t,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var a=s(65),i=s(176),o=!1;var r=function(t){o||s(150)},n=s(0)(a.a,i.a,!1,r,null,null);n.options.__file="assets/src/frontend/components/Home.vue",e.default=n.exports},function(t,e){},function(t,e,s){"use strict";var a=s(66),i=s(153),o=!1;var r=function(t){o||s(152)},n=s(0)(a.a,i.a,!1,r,null,null);n.options.__file="assets/src/frontend/components/Overlay.vue",e.a=n.exports},function(t,e){},function(t,e,s){"use strict";var a=function(){var t=this.$createElement,e=this._self._c||t;return this.show?e("div",{staticClass:"overlay"}):this._e()};a._withStripped=!0;var i={render:a,staticRenderFns:[]};e.a=i},function(t,e,s){"use strict";var a=s(67),i=s(156),o=!1;var r=function(t){o||s(155)},n=s(0)(a.a,i.a,!1,r,null,null);n.options.__file="assets/src/frontend/components/ProductSearch.vue",e.a=n.exports},function(t,e){},function(t,e,s){"use strict";var a=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{directives:[{name:"click-outside",rawName:"v-click-outside",value:t.outside,expression:"outside"}],staticClass:"search-box"},[s("form",{attrs:{action:"",autocomplete:"off"},on:{submit:function(e){e.preventDefault(),t.handleProductScan(e)}}},[s("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){e.preventDefault(),t.triggerFocus(e)},keyup:function(e){e.preventDefault(),t.searchProduct(e)},input:function(e){e.target.composing||(t.serachInput=e.target.value)}}}),t._v(" "),"product"==t.mode?s("span",{staticClass:"search-icon flaticon-musica-searcher"}):t._e(),t._v(" "),"scan"==t.mode?s("span",{staticClass:"search-icon flaticon-supermarket-scanner"}):t._e(),t._v(" "),s("div",{directives:[{name:"hotkey",rawName:"v-hotkey",value:t.hotkeys,expression:"hotkeys"}],staticClass:"search-type"},[s("a",{class:{active:"product"==t.mode},attrs:{href:"#"},on:{click:function(e){e.preventDefault(),t.changeMode("product")}}},[t._v(t._s(t.__("Product","wepos")))]),t._v(" "),s("a",{class:{active:"scan"==t.mode},attrs:{href:"#"},on:{click:function(e){e.preventDefault(),t.changeMode("scan")}}},[t._v(t._s(t.__("Scan","wepos")))])]),t._v(" "),s("div",{directives:[{name:"show",rawName:"v-show",value:t.showResults&&"product"==t.mode,expression:"showResults && mode=='product'"}],staticClass:"search-result"},[t.searchableProduct.length?s("div",[s("keyboard-control",{attrs:{listLength:t.searchableProduct.length},on:{"key-down":t.onKeyDown,"key-up":t.onKeyUp},scopedSlots:t._u([{key:"default",fn:function(e){var a=e.selectedIndex;return t._l(t.searchableProduct,function(e,i){return s("li",{key:i,staticClass:"product-search-item",class:{selected:i===a}},["simple"==e.type?[s("a",{staticClass:"wepos-clearfix",attrs:{href:"#"},on:{click:function(s){t.addToCartAction(e)}}},[t._v(t._s(e.name)+"\n "),s("span",{staticClass:"price"},[t._v(t._s(t.formatPrice(e.price)))]),t._v(" "),e.sku?s("span",{staticClass:"sku"},[t._v(t._s(e.sku))]):t._e(),t._v(" "),s("span",{staticClass:"action flaticon-enter-arrow wepos-right"})])]:t._e(),t._v(" "),"variable"==e.type?[s("a",{attrs:{href:"#"},on:{click:function(s){s.preventDefault(),t.selectVariation(e)}}},[t._v(t._s(e.name)+"\n "),s("span",{staticClass:"price"},[t._v(t._s(t.formatPrice(e.price)))]),t._v(" "),e.sku?s("span",{staticClass:"sku"},[t._v(t._s(e.sku))]):t._e(),t._v(" "),s("span",{staticClass:"action flaticon-enter-arrow wepos-right"})])]:t._e()],2)})}}])})],1):s("div",{staticClass:"no-data-found"},[t._v("\n "+t._s(t.__("No product found","wepos"))+"\n ")]),t._v(" "),s("div",{staticClass:"suggession"},[s("span",{staticClass:"term"},[s("span",{staticClass:"flaticon-swap"}),t._v(" "+t._s(t.__("to navigate","wepos"))+"\n ")]),t._v(" "),s("span",{staticClass:"term"},[s("span",{staticClass:"flaticon-enter-arrow"}),t._v(" "+t._s(t.__("to select","wepos"))+"\n ")]),t._v(" "),s("span",{staticClass:"term"},[s("strong",[t._v("esc")]),t._v(" "+t._s(t.__("to dismiss","wepos"))+"\n ")])])])]),t._v(" "),t.showVariationModal?s("modal",{attrs:{title:t.__("Select Variations","wepos"),width:"500px",height:"auto",footer:!0,header:!0},on:{close:function(e){t.showVariationModal=!1}}},[s("template",{slot:"body"},t._l(t.selectedVariationProduct.attributes,function(e){return s("div",{staticClass:"variation-attribute-wrapper"},[s("div",{staticClass:"attribute"},[s("p",[t._v(t._s(e.name))]),t._v(" "),s("div",{staticClass:"options"},[t._l(e.options,function(a){return[s("label",[s("input",{directives:[{name:"model",rawName:"v-model",value:t.chosenAttribute[e.name],expression:"chosenAttribute[attribute.name]"}],attrs:{type:"radio"},domProps:{value:a,checked:t._q(t.chosenAttribute[e.name],a)},on:{change:function(s){t.$set(t.chosenAttribute,e.name,a)}}}),t._v(" "),s("div",{staticClass:"box"},[t._v("\n "+t._s(a)+"\n ")])])]})],2)])])})),t._v(" "),s("template",{slot:"footer"},[s("button",{staticClass:"add-variation-btn",attrs:{disabled:t.attributeDisabled},on:{click:function(e){t.addVariationProduct()}}},[t._v(t._s(t.__("Add Product","wepos")))])])],2):t._e()],1)};a._withStripped=!0;var i={render:a,staticRenderFns:[]};e.a=i},function(t,e,s){"use strict";var a=s(70),i=s(159),o=!1;var r=function(t){o||s(158)},n=s(0)(a.a,i.a,!1,r,null,null);n.options.__file="assets/src/frontend/components/CustomerSearch.vue",e.a=n.exports},function(t,e){},function(t,e,s){"use strict";var a=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("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"},[s("form",{attrs:{action:"",autocomplete:"off"}},[s("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"}},[s("defs",[s("linearGradient",{attrs:{x1:"14.5524094%",y1:"14.6909544%",x2:"82.7722259%",y2:"85.2519444%",id:"linearGradient-1"}},[s("stop",{attrs:{"stop-color":"#C444FB",offset:"0%"}}),t._v(" "),s("stop",{attrs:{"stop-color":"#5B56D7",offset:"100%"}})],1)],1),t._v(" "),s("g",{attrs:{id:"Page-1",stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"}},[s("g",{attrs:{id:"POS-Design---Dokan-P2",transform:"translate(-759.000000, -27.000000)"}},[s("g",{attrs:{id:"Group",transform:"translate(759.000000, 27.000000)"}},[s("circle",{attrs:{id:"Oval",fill:"url(#linearGradient-1)","fill-rule":"nonzero",cx:"9.5",cy:"9.5",r:"9.5"}}),t._v(" "),s("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)"}},[s("g",{attrs:{id:"flaticon1543304699-svg"}},[s("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(" "),s("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(" "),s("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(" "),s("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(" "),s("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){e.preventDefault(),t.triggerFocus(e)},keyup:t.searchCustomer,input:function(e){e.target.composing||(t.serachInput=e.target.value)}}}),t._v(" "),s("span",{staticClass:"add-new-customer flaticon-add",on:{click:function(e){e.preventDefault(),t.addNewCustomer()}}}),t._v(" "),s("div",{directives:[{name:"show",rawName:"v-show",value:t.showCustomerResults,expression:"showCustomerResults"}],staticClass:"search-result"},[t.customers.length?s("div",[s("keyboard-control",{attrs:{listLength:t.customers.length},on:{"key-down":t.onKeyDown,"key-up":t.onKeyUp},scopedSlots:t._u([{key:"default",fn:function(e){var a=e.selectedIndex;return t._l(t.customers,function(e,i){return s("li",{key:i,staticClass:"customer-search-item",class:{selected:i===a}},[s("a",{staticClass:"wepos-clearfix",attrs:{href:"#"},on:{click:function(s){t.selectCustomer(e)}}},[s("span",{staticClass:"avatar wepos-left"},[s("img",{attrs:{src:e.avatar_url,alt:e.first_name+" "+e.last_name}})]),t._v(" "),s("span",{staticClass:"name wepos-left"},[t._v(t._s(e.first_name+" "+e.last_name)),s("span",{staticClass:"metadata"},[t._v(t._s(e.email))])]),t._v(" "),s("span",{staticClass:"action flaticon-enter-arrow wepos-right"})])])})}}])})],1):s("div",{staticClass:"no-data-found"},[t._v("\n "+t._s(t.__("No customer found","wepos"))+"\n ")]),t._v(" "),s("div",{staticClass:"suggession"},[s("span",{staticClass:"term"},[s("span",{staticClass:"flaticon-swap"}),t._v(" "+t._s(t.__("to navigate","wepos"))+"\n ")]),t._v(" "),s("span",{staticClass:"term"},[s("span",{staticClass:"flaticon-enter-arrow"}),t._v(" "+t._s(t.__("to select","wepos"))+"\n ")]),t._v(" "),s("span",{staticClass:"term"},[s("strong",[t._v("esc")]),t._v(" "+t._s(t.__("to dismiss","wepos"))+"\n ")])])])]),t._v(" "),t.showNewCustomerModal?s("modal",{attrs:{title:t.__("Add New Customer","wepos"),width:"700px",footer:!0,header:!0},on:{close:t.closeNewCustomerModal}},[s("template",{slot:"body"},[s("div",{staticClass:"wepos-new-customer-form"},[s("form",{staticClass:"wepos-form",attrs:{action:"",autocomplete:"off"}},[s("div",{staticClass:"form-row col-2"},[s("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(" "),s("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(" "),s("div",{staticClass:"form-row"},[s("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(" "),s("div",{staticClass:"form-row col-2"},[s("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(" "),s("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(" "),s("div",{staticClass:"form-row col-2"},[s("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(e){return[s("span",{domProps:{innerHTML:t._s(e.option.name)}})]}},{key:"option",fn:function(e){return[s("span",{domProps:{innerHTML:t._s(e.option.name)}})]}}]),model:{value:t.selectedCountry,callback:function(e){t.selectedCountry=e},expression:"selectedCountry"}},[s("template",{slot:"noResult"},[s("div",{staticClass:"no-data-found"},[t._v(t._s(t.__("No country found","wepos")))])])],2),t._v(" "),t.stateList.length>0?[s("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(e){return[s("span",{domProps:{innerHTML:t._s(e.option.name)}})]}},{key:"option",fn:function(e){return[s("span",{domProps:{innerHTML:t._s(e.option.name)}})]}}]),model:{value:t.selectedState,callback:function(e){t.selectedState=e},expression:"selectedState"}},[s("template",{slot:"noResult"},[s("div",{staticClass:"no-data-found"},[t._v(t._s(t.__("No country found","wepos")))])])],2)]:[s("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(" "),s("div",{staticClass:"form-row col-2"},[s("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(" "),s("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(" "),s("div",{staticClass:"form-row"},[s("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(" "),s("template",{slot:"footer"},[s("button",{staticClass:"add-new-customer-btn add-variation-btn",attrs:{disabled:t.isDisabled},on:{click:function(e){t.createCustomer()}}},[t._v(t._s(t.__("Add Customer","wepos")))])])],2):t._e()],1)};a._withStripped=!0;var i={render:a,staticRenderFns:[]};e.a=i},function(t,e,s){"use strict";var a=s(71),i=s(165),o=!1;var r=function(t){o||s(161)},n=s(0)(a.a,i.a,!1,r,null,null);n.options.__file="assets/src/frontend/components/FeeKeypad.vue",e.a=n.exports},function(t,e){},function(t,e,s){"use strict";var a=s(72),i=s(164),o=!1;var r=function(t){o||s(163)},n=s(0)(a.a,i.a,!1,r,null,null);n.options.__file="assets/src/frontend/components/Keyboard.vue",e.a=n.exports},function(t,e){},function(t,e,s){"use strict";var a=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("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(e){return s("div",{staticClass:"vue-keyboard-row",attrs:{role:"row","data-keys":e.length}},t._l(e,function(e){return s("button",{staticClass:"vue-keyboard-key",class:e.type,attrs:{role:"button","data-args":e.args,"data-text":e.value,"data-action":e.action.name},domProps:{innerHTML:t._s(e.value)},on:{click:function(t){t.preventDefault(),e.action.callable(t)}}})}))}))};a._withStripped=!0;var i={render:a,staticRenderFns:[]};e.a=i},function(t,e,s){"use strict";var a=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{directives:[{name:"hotkey",rawName:"v-hotkey",value:t.hotkeys,expression:"hotkeys"}],staticClass:"wepos-fee-keypad-wrap",class:t.className},[s("v-popover",{attrs:{offset:"5","popover-base-class":"fee-keypad tooltip popover",placement:"top",open:t.viewFeeKeypad}},[s("a",{attrs:{href:"#"},on:{click:t.showFeeKeypad}},[t._v(t._s(t.__("Add","wepos"))+" "+t._s(t.name))]),t._v(" "),s("template",{slot:"popover"},[s("form",[s("input",{directives:[{name:"model",rawName:"v-model",value:t.displayValue,expression:"displayValue"}],ref:"feeinput",attrs:{type:"text"},domProps:{value:t.displayValue},on:{keyup:t.inputChange,input:function(e){e.target.composing||(t.displayValue=e.target.value)}}})]),t._v(" "),s("keyboard",{attrs:{layouts:t.layout()},on:{percent:t.percentFee,flat:t.flatFee,input:t.change},model:{value:t.input,callback:function(e){t.input=e},expression:"input"}})],1)],2)],1)};a._withStripped=!0;var i={render:a,staticRenderFns:[]};e.a=i},,function(t,e,s){"use strict";var a=s(74),i=s(169),o=!1;var r=function(t){o||s(168)},n=s(0)(a.a,i.a,!1,r,null,null);n.options.__file="assets/src/frontend/components/PrintReceipt.vue",e.a=n.exports},function(t,e){},function(t,e,s){"use strict";var a=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{attrs:{id:"wepos-print-receipt"}},[s("button",{staticClass:"print-btn",on:{click:function(e){e.preventDefault(),t.printReceipt()}}},[s("span",{staticClass:"icon flaticon-printer"}),t._v(" "),s("span",{staticClass:"label"},[t._v(t._s(t.__("Print Receipt","wepos")))])])])};a._withStripped=!0;var i={render:a,staticRenderFns:[]};e.a=i},function(t,e,s){"use strict";var a=s(75),i=s(172),o=!1;var r=function(t){o||s(171)},n=s(0)(a.a,i.a,!1,r,null,null);n.options.__file="assets/src/frontend/components/PrintReceiptHtml.vue",e.a=n.exports},function(t,e){},function(t,e,s){"use strict";var a=function(){var t=this,e=t.$createElement,s=t._self._c||e;return t.settings.wepos_receipts?s("div",{staticClass:"wepos-checkout-print-wrapper"},[s("div",{staticClass:"header",domProps:{innerHTML:t._s(t.settings.wepos_receipts.receipt_header)}}),t._v(" "),s("div",{staticClass:"order-info"},[s("span",{staticClass:"wepos-left"},[s("strong",[t._v(t._s(t.__("Order ID","wepos"))+": #"+t._s(t.printdata.order_id))])]),t._v(" "),s("span",{staticClass:"wepos-right"},[s("strong",[t._v(t._s(t.__("Order Date","wepos"))+": "+t._s(t.formatDate(t.printdata.order_date)))])]),t._v(" "),s("div",{staticClass:"wepos-clearfix"})]),t._v(" "),s("div",{staticClass:"content"},[s("table",{staticClass:"sale-summary"},[s("tbody",[t._l(t.printdata.line_items,function(e){return s("tr",[s("td",{staticClass:"name"},[t._v("\n "+t._s(e.name)+"\n "),e.attribute.length>0?s("div",{staticClass:"attribute"},[s("ul",t._l(e.attribute,function(e){return s("li",[s("span",{staticClass:"attr_name"},[t._v(t._s(e.name))]),t._v(": "),s("span",{staticClass:"attr_value"},[t._v(t._s(e.option))])])}))]):t._e()]),t._v(" "),s("td",{staticClass:"quantity"},[t._v(t._s(e.quantity))]),t._v(" "),s("td",{staticClass:"price"},[e.on_sale?[s("span",{staticClass:"regular-price"},[t._v(t._s(t.formatPrice(e.quantity*e.regular_price)))]),t._v(" "),s("span",{staticClass:"sale-price"},[t._v(t._s(t.formatPrice(e.quantity*e.sale_price)))])]:[s("span",{staticClass:"sale-price"},[t._v(t._s(t.formatPrice(e.quantity*e.regular_price)))])]],2)])}),t._v(" "),s("tr",{staticClass:"cart-meta-data"},[s("td",{staticClass:"name",attrs:{colspan:"2"}},[t._v("\n "+t._s(t.__("Subtotal","wepos"))+"\n "),"incl"==t.settings.woo_tax.wc_tax_display_cart?s("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(" "),s("td",{staticClass:"price"},[t._v(t._s(t.formatPrice(t.printdata.subtotal)))])]),t._v(" "),t._l(t.printdata.fee_lines,function(e,a){return s("tr",{staticClass:"cart-meta-data"},["discount"==e.type?[s("td",{staticClass:"name",attrs:{colspan:"2"}},[t._v(t._s(t.__("Discount","wepos"))+" "),s("span",{staticClass:"metadata"},[t._v(t._s("percent"==e.discount_type?e.value+"%":t.formatPrice(e.value)))])]),t._v(" "),s("td",{staticClass:"price"},[t._v("-"+t._s(t.formatPrice(Math.abs(e.total))))])]:[s("td",{staticClass:"name",attrs:{colspan:"2"}},[t._v(t._s(t.__("Fee","wepos"))+" "),s("span",{staticClass:"metadata"},[t._v(t._s(e.name)+" "+t._s("percent"==e.fee_type?e.value+"%":t.formatPrice(e.value)))])]),t._v(" "),s("td",{staticClass:"price"},[t._v("-"+t._s(t.formatPrice(Math.abs(e.total))))])]],2)}),t._v(" "),t.printdata.taxtotal?s("tr",[s("td",{staticClass:"name",attrs:{colspan:"2"}},[t._v(t._s(t.__("Tax","wepos")))]),t._v(" "),s("td",{staticClass:"price"},[t._v(t._s(t.formatPrice(t.printdata.taxtotal)))])]):t._e(),t._v(" "),s("tr",[s("td",{staticClass:"name",attrs:{colspan:"2"}},[t._v(t._s(t.__("Order Total","wepos")))]),t._v(" "),s("td",{staticClass:"price"},[t._v(t._s(t.formatPrice(t.printdata.ordertotal)))])]),t._v(" "),t._m(0),t._v(" "),s("tr",[s("td",{attrs:{colspan:"2"}},[t._v(t._s(t.__("Payment method","wepos")))]),t._v(" "),s("td",{staticClass:"price"},[t._v(t._s(t.printdata.gateway.title||""))])]),t._v(" "),(t.printdata.gateway.id="wepos_cash")?[s("tr",[s("td",{attrs:{colspan:"2"}},[t._v(t._s(t.__("Cash Given","wepos")))]),t._v(" "),s("td",{staticClass:"price"},[t._v(t._s(t.formatPrice(t.printdata.cashamount)))])]),t._v(" "),s("tr",[s("td",{attrs:{colspan:"2"}},[t._v(t._s(t.__("Change Money","wepos")))]),t._v(" "),s("td",{staticClass:"price"},[t._v(t._s(t.formatPrice(t.printdata.changeamount)))])])]:t._e()],2)])]),t._v(" "),s("div",{staticClass:"footer",domProps:{innerHTML:t._s(t.settings.wepos_receipts.receipt_footer)}})]):t._e()};a._withStripped=!0;var i={render:a,staticRenderFns:[function(){var t=this.$createElement,e=this._self._c||t;return e("tr",{staticClass:"divider"},[e("td",{attrs:{colspan:"3"}})])}]};e.a=i},function(t,e,s){"use strict";var a=s(76),i=s(175),o=!1;var r=function(t){o||s(174)},n=s(0)(a.a,i.a,!1,r,null,null);n.options.__file="assets/src/frontend/components/CustomerNote.vue",e.a=n.exports},function(t,e){},function(t,e,s){"use strict";var a=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{directives:[{name:"hotkey",rawName:"v-hotkey",value:t.hotkeys,expression:"hotkeys"}],staticClass:"wepos-custom-note-wrap"},[s("v-popover",{attrs:{offset:"5","popover-base-class":"customer-note tooltip popover",placement:"top",open:t.viewNotePopover}},[s("a",{attrs:{href:"#"},on:{click:function(e){e.preventDefault(),t.openNote(e)}}},[t._v(t._s(t.__("Add Note","wepos")))]),t._v(" "),s("template",{slot:"popover"},[s("form",{on:{submit:function(e){e.preventDefault(),t.addCustomerNote(e)}}},[s("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(" "),s("button",{staticClass:"add-note-btn",attrs:{type:"submit",disabled:""==t.customerNote}},[t._v(t._s(t.__("Add Note","wepos")))])])])],2)],1)};a._withStripped=!0;var i={render:a,staticRenderFns:[]};e.a=i},function(t,e,s){"use strict";var a=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{directives:[{name:"hotkey",rawName:"v-hotkey",value:t.hotkeys,expression:"hotkeys"}],attrs:{id:"wepos-main"}},[s("div",{staticClass:"content-product"},[s("div",{staticClass:"top-panel wepos-clearfix"},[s("div",{staticClass:"search-bar"},[s("product-search",{attrs:{products:t.products,settings:t.settings},on:{onProductAdded:t.addToCart}})],1),t._v(" "),s("div",{staticClass:"category"},[s("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(e){return[s("span",[t._l(e.option.level,function(e){return[t._v("\n  \n ")]}),t._v("\n "+t._s(e.option.name)+"\n ")],2)]}}]),model:{value:t.selectedCategory,callback:function(e){t.selectedCategory=e},expression:"selectedCategory"}},[s("template",{slot:"noResult"},[s("div",{staticClass:"no-data-found"},[t._v(t._s(t.__("Not found","wepos")))])])],2)],1),t._v(" "),s("div",{staticClass:"toggle-view"},[s("div",{staticClass:"product-toggle"},[s("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(" "),s("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?s("div",{staticClass:"breadcrumb"},[s("ul",[t._l(t.getBreadCrums,function(e){return[s("router-link",{attrs:{tag:"li",to:{name:"Home",query:{category:e.id}}}},[s("a",[t._v(t._s(e.name))])])]})],2),t._v(" "),s("span",{staticClass:"close-breadcrumb flaticon-cancel-music",on:{click:function(e){e.preventDefault(),t.removeBreadcrums(e)}}})]):t._e(),t._v(" "),s("div",{ref:"items-wrapper",staticClass:"items-wrapper",class:t.productView},[t.productLoading?t._e():[t._l(t.getFilteredProduct,function(e){return t.getFilteredProduct.length>0?s("div",{staticClass:"item"},["simple"===e.type?[s("div",{staticClass:"item-wrap",class:{disabled:!t.hasStock(e)},on:{click:function(s){s.preventDefault(),t.addToCart(e)}}},[s("div",{staticClass:"img"},[s("img",{attrs:{src:t.getProductImage(e),alt:t.getProductImageName(e)}})]),t._v(" "),"grid"===t.productView?s("div",{staticClass:"title"},[t._v("\n "+t._s(t.truncateTitle(e.name,20))+"\n ")]):s("div",{staticClass:"title"},[s("div",{staticClass:"product-name"},[t._v(t._s(e.name))]),t._v(" "),s("ul",{staticClass:"meta"},[e.sku?s("li",[s("span",{staticClass:"label"},[t._v(t._s(t.__("Sku :","wepos")))]),t._v(" "),s("span",{staticClass:"value"},[t._v(t._s(e.sku))])]):t._e(),t._v(" "),s("li",[s("span",{staticClass:"label"},[t._v(t._s(t.__("Price :","wepos")))]),t._v(" "),s("span",{staticClass:"value",domProps:{innerHTML:t._s(e.price_html)}})])])]),t._v(" "),s("span",{staticClass:"add-product-icon flaticon-add",class:t.productView})])]:t._e(),t._v(" "),"variable"===e.type?[s("v-popover",{attrs:{offset:"10","popover-base-class":"product-variation tooltip popover",placement:"left-end"}},[s("div",{staticClass:"item-wrap",on:{click:function(s){t.selectVariationProduct(e)}}},[s("div",{staticClass:"img"},[s("img",{attrs:{src:t.getProductImage(e),alt:t.getProductImageName(e)}})]),t._v(" "),"grid"===t.productView?s("div",{staticClass:"title"},[t._v("\n "+t._s(t.truncateTitle(e.name,20))+"\n ")]):s("div",{staticClass:"title"},[s("div",{staticClass:"product-name"},[t._v(t._s(e.name))]),t._v(" "),s("ul",{staticClass:"meta"},[s("li",[s("span",{staticClass:"label"},[t._v(t._s(t.__("Price :","wepos")))]),t._v(" "),s("span",{staticClass:"value",domProps:{innerHTML:t._s(e.price_html)}})])])]),t._v(" "),s("span",{staticClass:"add-product-icon flaticon-add",class:t.productView})]),t._v(" "),s("template",{slot:"popover"},[s("div",{staticClass:"variation-header"},[t._v("\n "+t._s(t.__("Select Variations","wepos"))+"\n ")]),t._v(" "),s("div",{staticClass:"variation-body"},[t._l(e.attributes,function(e){return[s("div",{staticClass:"attribute"},[s("p",[t._v(t._s(e.name))]),t._v(" "),s("div",{staticClass:"options"},[t._l(e.options,function(a){return[s("label",[s("input",{directives:[{name:"model",rawName:"v-model",value:t.selectedAttribute[e.name],expression:"selectedAttribute[attribute.name]"}],attrs:{type:"radio"},domProps:{value:a,checked:t._q(t.selectedAttribute[e.name],a)},on:{change:function(s){t.$set(t.selectedAttribute,e.name,a)}}}),t._v(" "),s("div",{staticClass:"box"},[t._v("\n "+t._s(a)+"\n ")])])]})],2)])]})],2),t._v(" "),s("div",{staticClass:"variation-footer"},[s("button",{attrs:{disabled:t.attributeDisabled},on:{click:function(e){e.preventDefault(),t.addVariationProduct(e)}}},[t._v(t._s(t.__("Add Product","wepos")))])])])],2)]:t._e()],2):t._e()}),t._v(" "),t.getFilteredProduct.length<=0?s("div",{staticClass:"no-product-found"},[s("img",{attrs:{src:t.wepos.assets_url+"/images/no-product.png",alt:"",width:"120px"}}),t._v(" "),s("p",[t._v(t._s(t.__("No Product Found","wepos")))])]):t._e()],t._v(" "),t.productLoading?s("div",{staticClass:"product-loading"},[s("div",{staticClass:"spinner spinner-loading"})]):t._e()],2)]),t._v(" "),s("div",{staticClass:"content-cart"},[s("div",{staticClass:"top-panel"},[s("customer-search",{on:{onCustomerSelected:t.selectCustomer}}),t._v(" "),s("div",{staticClass:"action"},[s("div",{staticClass:"more-options"},[s("v-popover",{attrs:{offset:"5","popover-base-class":"wepos-dropdown-menu tooltip popover",placement:"bottom-end",open:t.showQucikMenu}},[s("button",{staticClass:"wepos-button",on:{click:function(e){e.preventDefault(),t.openQucikMenu()}}},[s("span",{staticClass:"more-icon flaticon-more"})]),t._v(" "),s("template",{slot:"popover"},[s("ul",[t._l(t.quickLinkListStart,function(t,e){return s(t,{key:e-"1",tag:"component"})}),t._v(" "),s("li",[s("a",{attrs:{href:"#"},on:{click:function(e){e.preventDefault(),t.emptyCart(e)}}},[s("span",{staticClass:"flaticon-empty-cart quick-menu-icon"}),t._v(t._s(t.__("Empty Cart","wepos")))])]),t._v(" "),s("li",[s("a",{attrs:{href:"#"},on:{click:function(e){e.preventDefault(),t.openHelp(e)}}},[s("span",{staticClass:"flaticon-information quick-menu-icon"}),t._v(t._s(t.__("Help","wepos")))])]),t._v(" "),s("li",{staticClass:"divider"}),t._v(" "),t._l(t.quickLinkList,function(t,e){return s(t,{key:e,tag:"component"})}),t._v(" "),s("li",[s("a",{attrs:{href:"#"},on:{click:function(e){e.preventDefault(),t.logout(e)}}},[s("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,e){return s(t,{key:e,tag:"component"})}),t._v(" "),t.settings.wepos_general?s("div",{staticClass:"cart-panel"},[s("div",{staticClass:"cart-content"},[s("table",{staticClass:"cart-table"},[s("thead",[s("tr",[s("th",{attrs:{width:"65%"}},[t._v(t._s(t.__("Product","wepos")))]),t._v(" "),s("th",{attrs:{width:"15%"}},[t._v(t._s(t.__("Qty","wepos")))]),t._v(" "),s("th",{attrs:{width:"30%"}},[t._v(t._s(t.__("Price","wepos")))]),t._v(" "),s("th"),t._v(" "),s("th")])]),t._v(" "),s("tbody",[t.cartdata.line_items.length>0?[t._l(t.cartdata.line_items,function(e,a){return[s("tr",[s("td",{staticClass:"name",on:{click:function(s){t.toggleEditQuantity(e,a)}}},[t._v("\n "+t._s(e.name)+"\n "),e.attribute.length>0&&"variable"===e.type?s("div",{staticClass:"attribute"},[s("ul",t._l(e.attribute,function(e){return s("li",[s("span",{staticClass:"attr_name"},[t._v(t._s(e.name))]),t._v(": "),s("span",{staticClass:"attr_value"},[t._v(t._s(e.option))])])}))]):t._e()]),t._v(" "),s("td",{staticClass:"qty",on:{click:function(s){t.toggleEditQuantity(e,a)}}},[t._v(t._s(e.quantity))]),t._v(" "),s("td",{staticClass:"price",on:{click:function(s){t.toggleEditQuantity(e,a)}}},[e.on_sale?[s("span",{staticClass:"sale-price"},[t._v(t._s(t.formatPrice(e.quantity*e.sale_price)))]),t._v(" "),s("span",{staticClass:"regular-price"},[t._v(t._s(t.formatPrice(e.quantity*e.regular_price)))])]:[s("span",{staticClass:"sale-price"},[t._v(t._s(t.formatPrice(e.quantity*e.regular_price)))])]],2),t._v(" "),s("td",{staticClass:"action"},[s("span",{staticClass:"flaticon-right-arrow",class:{open:e.editQuantity},on:{click:function(s){s.preventDefault(),t.toggleEditQuantity(e,a)}}})]),t._v(" "),s("td",{staticClass:"remove"},[s("span",{staticClass:"flaticon-cancel-music",on:{click:function(e){e.preventDefault(),t.removeItem(a)}}})])]),t._v(" "),e.editQuantity?s("tr",{staticClass:"update-quantity-wrap"},[s("td",{attrs:{colspan:"5"}},[s("span",{staticClass:"qty"},[t._v(t._s(t.__("Quantity","wepos")))]),t._v(" "),s("span",{staticClass:"qty-number"},[s("input",{directives:[{name:"model",rawName:"v-model",value:e.quantity,expression:"item.quantity"}],attrs:{type:"number",min:"1",step:"1"},domProps:{value:e.quantity},on:{input:function(s){s.target.composing||t.$set(e,"quantity",s.target.value)}}})]),t._v(" "),s("span",{staticClass:"qty-action"},[s("a",{staticClass:"add",attrs:{href:"#"},on:{click:function(s){s.preventDefault(),t.addQuantity(e,a)}}},[t._v("+")]),t._v(" "),s("a",{staticClass:"minus",attrs:{href:"#"},on:{click:function(s){s.preventDefault(),t.removeQuantity(e,a)}}},[t._v("-")])])])]):t._e()]})]:[s("tr",{staticClass:"no-item"},[s("td",{attrs:{colspan:"5"}},[s("img",{attrs:{src:t.wepos.assets_url+"/images/empty-cart.png",alt:"",width:"120px"}}),t._v(" "),s("p",[t._v(t._s(t.__("Empty Cart","wepos")))])])])]],2)])]),t._v(" "),s("div",{staticClass:"cart-calculation"},[s("form",{attrs:{autocomplete:"off"}},[s("table",{staticClass:"cart-total-table"},[s("tbody",[s("tr",{staticClass:"cart-meta-data"},[s("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?s("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(" "),s("td",{staticClass:"price"},[t._v(t._s(t.formatPrice(t.$store.getters["Cart/getSubtotal"])))]),t._v(" "),s("td",{staticClass:"action"})]),t._v(" "),t.cartdata.fee_lines.length>0?t._l(t.cartdata.fee_lines,function(e,a){return s("tr",{staticClass:"cart-meta-data"},["discount"==e.type?[s("td",{staticClass:"label"},[t._v(t._s(t.__("Discount","wepos"))+" "),s("span",{staticClass:"name"},[t._v(t._s("percent"==e.discount_type?e.value+"%":t.formatPrice(e.value)))])]),t._v(" "),s("td",{staticClass:"price"},[t._v("−"+t._s(t.formatPrice(Math.abs(e.total))))]),t._v(" "),s("td",{staticClass:"action"},[s("span",{staticClass:"flaticon-cancel-music",on:{click:function(e){t.removeFeeLine(a)}}})])]:[t.cartdata.fee_lines[a].isEdit?[s("td",{staticClass:"label",attrs:{colspan:"2"}},[s("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(" "),s("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?[s("label",{attrs:{for:"fee-tax-status"}},[s("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 s=t.feeData.tax_status,a=e.target,i=a.checked?"taxable":"none";if(Array.isArray(s)){var o=t._i(s,null);a.checked?o<0&&(t.feeData.tax_status=s.concat([null])):o>-1&&(t.feeData.tax_status=s.slice(0,o).concat(s.slice(o+1)))}else t.$set(t.feeData,"tax_status",i)}}}),t._v(" "+t._s(t.__("Taxable","wepos")))]),t._v(" "),"taxable"==t.feeData.tax_status?s("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 s=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?s:s[0])}}},t._l(t.availableTax,function(e){return s("option",{domProps:{value:"standard"==e.class?"":e.class}},[t._v(t._s(t.unSanitizeString(e.class))+" - "+t._s(e.percentage_rate))])})):t._e()]:t._e(),t._v(" "),s("button",{attrs:{disabled:""==t.feeData.name},on:{click:function(e){e.preventDefault(),t.saveFee(a)}}},[t._v(t._s(t.__("Apply","wepos")))]),t._v(" "),s("button",{staticClass:"cancel",on:{click:function(e){e.preventDefault(),t.cancelEditFee(a)}}},[t._v(t._s(t.__("Cancel","wepos")))])],2),t._v(" "),s("td",{staticClass:"action"},[s("span",{staticClass:"flaticon-cancel-music",on:{click:function(e){t.removeFeeLine(a)}}})])]:[s("td",{staticClass:"label",on:{dblclick:function(e){e.preventDefault(),t.editFeeData(a)}}},[t._v(t._s(t.__("Fee","wepos"))+" "),s("span",{staticClass:"name"},[t._v(t._s(e.name)+" "+t._s("percent"==e.fee_type?e.value+"%":t.formatPrice(e.value)))])]),t._v(" "),s("td",{staticClass:"price"},[t._v(t._s(t.formatPrice(Math.abs(e.total))))]),t._v(" "),s("td",{staticClass:"action"},[s("span",{staticClass:"flaticon-cancel-music",on:{click:function(e){t.removeFeeLine(a)}}})])]]],2)}):t._e(),t._v(" "),t.$store.getters["Cart/getTotalTax"]?s("tr",{staticClass:"tax"},[s("td",{staticClass:"label"},[t._v(t._s(t.__("Tax","wepos")))]),t._v(" "),s("td",{staticClass:"price"},[t._v(t._s(t.formatPrice(t.$store.getters["Cart/getTotalTax"])))]),t._v(" "),s("td",{staticClass:"action"})]):t._e(),t._v(" "),s("tr",{staticClass:"cart-action"},[s("td",{attrs:{colspan:"3"}},[s("fee-keypad",{attrs:{name:t.__("Discount","wepos"),"short-key":"discount"},on:{inputfee:t.setDiscount}}),t._v(" "),s("fee-keypad",{attrs:{name:t.__("Fee","wepos"),"short-key":"fee"},on:{inputfee:t.setFee}}),t._v(" "),""==t.orderdata.customer_note?s("customer-note",{on:{addnote:t.addCustomerNote}}):t._e()],1)]),t._v(" "),t.orderdata.customer_note?s("tr",{staticClass:"note"},[s("td",{staticClass:"note-text",attrs:{colspan:"2"}},[t._v("\n "+t._s(t.orderdata.customer_note)+"\n ")]),t._v(" "),s("td",{staticClass:"action"},[s("span",{staticClass:"flaticon-cancel-music",on:{click:function(e){e.preventDefault(),t.removeCustomerNote(e)}}})])]):t._e(),t._v(" "),s("tr",{staticClass:"pay-now",on:{click:function(e){t.initPayment()}}},[s("td",[t._v(t._s(t.__("Pay Now","wepos")))]),t._v(" "),s("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?s("modal",{attrs:{width:"600px",height:"400px"},on:{close:function(e){t.createNewSale()}}},[s("template",{slot:"body"},[s("div",{staticClass:"wepos-payment-receipt"},[s("div",{staticClass:"sale-completed"},[s("img",{attrs:{src:t.wepos.assets_url+"/images/sale-completed.png",alt:"",width:"120px"}}),t._v(" "),s("h2",[t._v(t._s(t.__("Sale Completed","wepos")))])]),t._v(" "),s("div",{staticClass:"print-section"},[s("print-receipt"),t._v(" "),s("button",{staticClass:"new-sale-btn",on:{click:function(e){e.preventDefault(),t.createNewSale()}}},[s("span",{staticClass:"icon flaticon-add"}),t._v(" "),s("span",{staticClass:"label"},[t._v(t._s(t.__("New Sale","wepos")))])])],1)])])],2):t._e(),t._v(" "),t.showHelp?s("modal",{attrs:{width:"700px",height:"500px"},on:{close:function(e){t.closeHelp()}}},[s("template",{slot:"body"},[s("div",{staticClass:"wepos-help-wrapper"},[s("h2",[t._v(t._s(t.__("Shortcut Keys","wepos")))]),t._v(" "),s("ul",[s("li",[s("span",{staticClass:"code"},[s("code",[t._v("f1")])]),t._v(" "),s("span",{staticClass:"title"},[t._v(t._s(t.__("Search Product","wepos")))])]),t._v(" "),s("li",[s("span",{staticClass:"code"},[s("code",[t._v("f2")])]),t._v(" "),s("span",{staticClass:"title"},[t._v(t._s(t.__("Scan Product","wepos")))])]),t._v(" "),s("li",[s("span",{staticClass:"code"},[s("code",[t._v("f3")])]),t._v(" "),s("span",{staticClass:"title"},[t._v(t._s(t.__("Toggle Product View","wepos")))])]),t._v(" "),s("li",[s("span",{staticClass:"code"},[s("code",[t._v("f4")])]),t._v(" "),s("span",{staticClass:"title"},[t._v(t._s(t.__("Add Fee in cart","wepos")))])]),t._v(" "),s("li",[s("span",{staticClass:"code"},[s("code",[t._v("f5")])]),t._v(" "),s("span",{staticClass:"title"},[t._v(t._s(t.__("Add Discount in cart","wepos")))])]),t._v(" "),s("li",[s("span",{staticClass:"code"},[s("code",[t._v("f6")])]),t._v(" "),s("span",{staticClass:"title"},[t._v(t._s(t.__("Add Customer note","wepos")))])]),t._v(" "),s("li",[s("span",{staticClass:"code"},[s("code",[t._v("f7")])]),t._v(" "),s("span",{staticClass:"title"},[t._v(t._s(t.__("Customer Search","wepos")))])]),t._v(" "),s("li",[s("span",{staticClass:"code"},[s("code",[t._v("shift+f7")])]),t._v(" "),s("span",{staticClass:"title"},[t._v(t._s(t.__("Add new Customer","wepos")))])]),t._v(" "),s("li",[s("span",{staticClass:"code"},[s("code",[t._v("f8")])]),t._v(" "),s("span",{staticClass:"title"},[t._v(t._s(t.__("Create New Sale","wepos")))])]),t._v(" "),s("li",[s("span",{staticClass:"code"},[s("code",[t._v("shift+f8")])]),t._v(" "),s("span",{staticClass:"title"},[t._v(t._s(t.__("Empty your cart","wepos")))])]),t._v(" "),s("li",[s("span",{staticClass:"code"},[s("code",[t._v("f9")])]),t._v(" "),s("span",{staticClass:"title"},[t._v(t._s(t.__("Go to payment receipt","wepos")))])]),t._v(" "),s("li",[s("span",{staticClass:"code"},[s("code",[t._v("f10")])]),t._v(" "),s("span",{staticClass:"title"},[t._v(t._s(t.__("Process Payment","wepos")))])]),t._v(" "),s("li",[s("span",{staticClass:"code"},[s("code",[t._v("ctrl/cmd+p")])]),t._v(" "),s("span",{staticClass:"title"},[t._v(t._s(t.__("Print Receipt","wepos")))])]),t._v(" "),s("li",[s("span",{staticClass:"code"},[s("code",[t._v("ctrl/cmd+?")])]),t._v(" "),s("span",{staticClass:"title"},[t._v(t._s(t.__("Show/Close(Toggle) Help","wepos")))])]),t._v(" "),s("li",[s("span",{staticClass:"code"},[s("code",[t._v("esc")])]),t._v(" "),s("span",{staticClass:"title"},[t._v(t._s(t.__("Close anything","wepos")))])])])])])],2):t._e(),t._v(" "),t.showModal?s("modal",{attrs:{width:"98%",height:"95vh"},on:{open:function(e){t.focusCashInput()},close:function(e){t.backToSale()},enterpressed:function(e){t.processPayment()}}},[s("template",{slot:"body"},[s("div",{staticClass:"wepos-checkout-wrapper"},[s("div",{staticClass:"left-content"},[s("div",{staticClass:"header"},[t._v("\n "+t._s(t.__("Sale Summary","wepos"))+"\n ")]),t._v(" "),s("div",{staticClass:"content"},[s("table",{staticClass:"sale-summary-cart"},[s("tbody",t._l(t.cartdata.line_items,function(e){return s("tr",[s("td",{staticClass:"name"},[t._v("\n "+t._s(e.name)+"\n "),e.attribute.length>0&&"variable"===e.type?s("div",{staticClass:"attribute"},[s("ul",t._l(e.attribute,function(e){return s("li",[s("span",{staticClass:"attr_name"},[t._v(t._s(e.name))]),t._v(": "),s("span",{staticClass:"attr_value"},[t._v(t._s(e.option))])])}))]):t._e()]),t._v(" "),s("td",{staticClass:"quantity"},[t._v(t._s(e.quantity))]),t._v(" "),s("td",{staticClass:"price"},[e.on_sale?[s("span",{staticClass:"sale-price"},[t._v(t._s(t.formatPrice(e.quantity*e.sale_price)))]),t._v(" "),s("span",{staticClass:"regular-price"},[t._v(t._s(t.formatPrice(e.quantity*e.regular_price)))])]:[s("span",{staticClass:"sale-price"},[t._v(t._s(t.formatPrice(e.quantity*e.regular_price)))])]],2)])}))])]),t._v(" "),s("div",{staticClass:"footer"},[s("ul",[s("li",{staticClass:"wepos-clearfix"},[s("span",{staticClass:"wepos-left"},[t._v("\n "+t._s(t.__("Subtotal","wepos"))+"\n "),"incl"==t.settings.woo_tax.wc_tax_display_cart?s("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(" "),s("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(e,a){return s("li",{staticClass:"wepos-clearfix"},["discount"==e.type?[s("span",{staticClass:"wepos-left"},[t._v(t._s(t.__("Discount","wepos"))+" "),s("span",{staticClass:"metadata"},[t._v(t._s(e.name)+" "+t._s("percent"==e.discount_type?e.value+"%":t.formatPrice(e.value)))])]),t._v(" "),s("span",{staticClass:"wepos-right"},[t._v("-"+t._s(t.formatPrice(Math.abs(e.total))))])]:[s("span",{staticClass:"wepos-left"},[t._v(t._s(t.__("Fee","wepos"))+" "),s("span",{staticClass:"metadata"},[t._v(t._s(e.name)+" "+t._s("percent"==e.fee_type?e.value+"%":t.formatPrice(e.value)))])]),t._v(" "),s("span",{staticClass:"wepos-right"},[t._v(t._s(t.formatPrice(e.total)))])]],2)}):t._e(),t._v(" "),t.$store.getters["Cart/getTotalTax"]?s("li",{staticClass:"wepos-clearfix"},[s("span",{staticClass:"wepos-left"},[t._v(t._s(t.__("Tax","wepos")))]),t._v(" "),s("span",{staticClass:"wepos-right"},[t._v(t._s(t.formatPrice(t.$store.getters["Cart/getTotalTax"])))])]):t._e(),t._v(" "),s("li",{staticClass:"wepos-clearfix"},[s("span",{staticClass:"wepos-left"},[t._v(t._s(t.__("Order Total","wepos")))]),t._v(" "),s("span",{staticClass:"wepos-right"},[t._v(t._s(t.formatPrice(t.$store.getters["Cart/getTotal"])))])]),t._v(" "),s("li",{staticClass:"wepos-clearfix"},[s("span",{staticClass:"wepos-left"},[t._v(t._s(t.__("Pay","wepos")))]),t._v(" "),s("span",{staticClass:"wepos-right"},[t._v(t._s(t.formatPrice(t.$store.getters["Cart/getTotal"])))])])],2)])]),t._v(" "),s("div",{staticClass:"right-content"},[s("div",{staticClass:"header wepos-clearfix"},[s("h2",{staticClass:"wepos-left"},[t._v(t._s(t.__("Pay","wepos")))]),t._v(" "),s("span",{staticClass:"pay-amount wepos-right"},[t._v(t._s(t.formatPrice(t.$store.getters["Cart/getTotal"])))])]),t._v(" "),s("div",{staticClass:"content"},[s("div",{staticClass:"payment-gateway"},[t.availableGateways.length>0?[t._l(t.availableGateways,function(e){return s("label",[s("input",{directives:[{name:"model",rawName:"v-model",value:t.selectedGateway,expression:"selectedGateway"}],attrs:{type:"radio",name:"gateway",checked:""},domProps:{value:e.id,checked:t._q(t.selectedGateway,e.id)},on:{change:function(s){t.selectedGateway=e.id}}}),t._v(" "),s("span",{staticClass:"gateway",class:"gateway-"+e.id},[t._v("\n "+t._s(e.title)+"\n ")])])}),t._v(" "),t.emptyGatewayDiv>0?t._l(t.emptyGatewayDiv,function(t){return s("label",{key:t},[s("span",{staticClass:"grid-placeholder"})])}):t._e()]:[s("p",[t._v(t._s(t.__("No gateway found","wepos")))])]],2),t._v(" "),"wepos_cash"==t.orderdata.payment_method?[s("div",{staticClass:"payment-option"},[s("div",{staticClass:"payment-amount"},[s("div",{staticClass:"input-part"},[s("div",{staticClass:"input-wrap"},[s("p",[t._v(t._s(t.__("Cash","wepos")))]),t._v(" "),s("div",{staticClass:"input-addon"},[s("span",{staticClass:"currency"},[t._v(t._s(t.wepos.currency_format_symbol))]),t._v(" "),s("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(" "),s("div",{staticClass:"change-money"},[s("p",[t._v(t._s(t.__("Change money","wepos"))+": "+t._s(t.formatPrice(t.changeAmount)))])])])])]:t._e(),t._v(" "),t._l(t.availableGatewayContent,function(e,a){return s(e,{key:a,tag:"component",attrs:{availablegateways:t.availableGateways}})})],2),t._v(" "),s("div",{staticClass:"footer wepos-clearfix"},[s("a",{staticClass:"back-btn wepos-left",attrs:{href:"#"},on:{click:function(e){e.preventDefault(),t.backToSale()}}},[t._v(t._s(t.__("Back to Sale","wepos")))]),t._v(" "),s("button",{staticClass:"process-checkout-btn wepos-right",attrs:{disabled:!t.$store.getters["Order/getCanProcessPayment"]},on:{click:function(e){e.preventDefault(),t.processPayment(e)}}},[t._v(t._s(t.__("Process Payment","wepos")))])])])])])],2):t._e(),t._v(" "),s("overlay",{attrs:{show:t.showOverlay}}),t._v(" "),t.showReceiptHtml?s("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(e,a){return s(e,{key:a,tag:"component",attrs:{orderdata:t.orderdata,printdata:t.printdata}})})],2)};a._withStripped=!0;var i={render:a,staticRenderFns:[function(){var t=this.$createElement,e=this._self._c||t;return e("td",{staticClass:"icon"},[e("span",{staticClass:"flaticon-right-arrow"})])}]};e.a=i}]),[144]); \ No newline at end of file +pluginWebpack([0],Array(28).concat([function(t,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var a=o(s(29)),i=o(s(31));function o(t){return t&&t.__esModule?t:{default:t}}var r=wepos_get_lib("Vue"),n=wepos_get_lib("Vuex");r.use(n),e.default=new n.Store({modules:{Cart:a.default,Order:i.default}})},function(t,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var a=function(t){return t&&t.__esModule?t:{default:t}}(s(30));e.default={namespaced:!0,state:{settings:{},availableTax:{},cartdata:{line_items:[],fee_lines:[]}},getters:{getSubtotal:function(t){var e=0;return weLo_.forEach(t.cartdata.line_items,function(t,s){t.on_sale?e+=t.quantity*t.sale_price:e+=t.quantity*t.regular_price}),e},getTotalFee:function(t){var e=0;return weLo_.forEach(t.cartdata.fee_lines,function(t,s){"fee"==t.type&&(e+=Math.abs(t.total))}),e},getTotalDiscount:function(t){var e=0;return weLo_.forEach(t.cartdata.fee_lines,function(t,s){"discount"==t.type&&(e+=Number(Math.abs(t.total)))}),e},getTotalLineTax:function(t){var e=0;return weLo_.forEach(t.cartdata.line_items,function(t,s){e+=Math.abs(t.tax_amount*t.quantity)}),e},getTotalTax:function(t){var e=0,s=0;return weLo_.forEach(t.cartdata.line_items,function(t,s){e+=Math.abs(t.tax_amount*t.quantity)}),void 0!=t.settings.woo_tax&&"incl"==t.settings.woo_tax.wc_tax_display_cart&&(e=0),weLo_.forEach(t.cartdata.fee_lines,function(e,a){if("fee"==e.type&&"taxable"==e.tax_status){var i=""===e.tax_class?"standard":e.tax_class,o=weLo_.find(t.availableTax,{class:i.toString()});void 0!==o&&(s+=Math.abs(e.total)*Math.abs(o.rate)/100)}}),e+s},getOrderTotal:function(t,e){return e.getSubtotal+e.getTotalFee+e.getTotalTax},getTotal:function(t,e){return e.getOrderTotal-e.getTotalDiscount},getSettings:function(t,e){return t.settings}},mutations:{setSettings:function(t,e){t.settings=e},setAvailableTax:function(t,e){t.availableTax=e},setCartData:function(t,e){weLo_.isEmpty(e)?t.cartdata={line_items:[],fee_lines:[]}:t.cartdata=Object.assign({},e)},addToCartItem:function(t,e){var s={};s.product_id=0===e.parent_id?e.id:e.parent_id,s.name=e.name,s.quantity=1,s.regular_price=e.regular_display_price,s.sale_price=e.sales_display_price,s.on_sale=e.on_sale,s.attribute=e.attributes,s.variation_id=0!==e.parent_id?e.id:0,s.editQuantity=!1,s.type=e.type,s.tax_amount=e.tax_amount,s.manage_stock=e.manage_stock,s.stock_status=e.stock_status,s.backorders_allowed=e.backorders_allowed,s.stock_quantity=e.stock_quantity;var i=weLo_.findIndex(t.cartdata.line_items,{product_id:s.product_id,variation_id:s.variation_id});i<0?a.default.hasStock(e)&&t.cartdata.line_items.push(s):a.default.hasStock(e,t.cartdata.line_items[i].quantity)&&(t.cartdata.line_items[i].quantity+=1)},removeCartItem:function(t,e){t.cartdata.line_items.splice(e,1)},addCartItemQuantity:function(t,e){var s=t.cartdata.line_items[e];a.default.hasStock(s,s.quantity)&&t.cartdata.line_items[e].quantity++},removeCartItemQuantity:function(t,e){t.cartdata.line_items[e].quantity<=1?t.cartdata.line_items[e].quantity=1:t.cartdata.line_items[e].quantity--},toggleEditQuantity:function(t,e){t.cartdata.line_items[e].editQuantity=!t.cartdata.line_items[e].editQuantity},addDiscount:function(t,e){t.cartdata.fee_lines.push({name:e.title,type:"discount",value:e.value.toString(),isEdit:!1,discount_type:e.type,tax_status:"none",tax_class:"",total:0})},addFee:function(t,e){t.cartdata.fee_lines.push({name:e.title,type:"fee",value:e.value.toString(),isEdit:!1,fee_type:e.type,tax_status:"none",tax_class:"",total:0})},saveFeeValue:function(t,e){t.cartdata.fee_lines.splice(e.key,1,e.feeData),t.cartdata.fee_lines[e.key].isEdit=!1},editFeeValue:function(t,e){t.cartdata.fee_lines[e].isEdit=!0},cancelSaveFeeValue:function(t,e){t.cartdata.fee_lines[e].isEdit=!1},removeFeeLineItems:function(t,e){t.cartdata.fee_lines.splice(e,1)},emptyCart:function(t){t.cartdata={line_items:[],fee_lines:[]}},calculateDiscount:function(t,e){t.cartdata.fee_lines.length>0&&weLo_.forEach(t.cartdata.fee_lines,function(s,a){"discount"==s.type&&("percent"==s.discount_type?t.cartdata.fee_lines[a].total="-"+e.getSubtotal*Math.abs(s.value)/100:t.cartdata.fee_lines[a].total="-"+Math.abs(s.value))})},calculateFee:function(t,e){t.cartdata.fee_lines.length>0&&weLo_.forEach(t.cartdata.fee_lines,function(s,a){"fee"==s.type&&("percent"==s.fee_type?t.cartdata.fee_lines[a].total=(e.getSubtotal*Math.abs(s.value)/100).toString():t.cartdata.fee_lines[a].total=Math.abs(s.value).toString())})}},actions:{setSettingsAction:function(t,e){t.commit("setSettings",e)},setAvailableTaxAction:function(t,e){t.commit("setAvailableTax",e)},setCartDataAction:function(t,e){t.commit("setCartData",e),t.commit("calculateDiscount",t.getters),t.commit("calculateFee",t.getters)},addToCartAction:function(t,e){t.commit("addToCartItem",e),t.commit("calculateDiscount",t.getters),t.commit("calculateFee",t.getters)},removeCartItemAction:function(t,e){t.commit("removeCartItem",e),t.commit("calculateDiscount",t.getters),t.commit("calculateFee",t.getters)},addItemQuantityAction:function(t,e){t.commit("addCartItemQuantity",e),t.commit("calculateDiscount",t.getters),t.commit("calculateFee",t.getters)},removeItemQuantityAction:function(t,e){t.commit("removeCartItemQuantity",e),t.commit("calculateDiscount",t.getters),t.commit("calculateFee",t.getters)},toggleEditQuantityAction:function(t,e){t.commit("toggleEditQuantity",e)},addDiscountAction:function(t,e){t.commit("addDiscount",e),t.commit("calculateDiscount",t.getters),t.commit("calculateFee",t.getters)},addFeeAction:function(t,e){t.commit("addFee",e),t.commit("calculateDiscount",t.getters),t.commit("calculateFee",t.getters)},removeFeeLineItemsAction:function(t,e){t.commit("removeFeeLineItems",e),t.commit("calculateDiscount",t.getters),t.commit("calculateFee",t.getters)},saveFeeValueAction:function(t,e){t.commit("saveFeeValue",e),t.commit("calculateDiscount",t.getters),t.commit("calculateFee",t.getters)},editFeeValueAction:function(t,e){t.commit("editFeeValue",e)},cancelSaveFeeValueAction:function(t,e){t.commit("cancelSaveFeeValue",e)},emptyCartAction:function(t){t.commit("emptyCart")},calculateDiscount:function(t){t.commit("calculateDiscount",t.getters)},calculateFee:function(t){t.commit("calculateFee",t.getters)}}}},function(t,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={hasStock:function(t){var 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}}},function(t,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={namespaced:!0,state:{orderdata:{billing:{},shipping:{},customer_id:0,customer_note:"",payment_method:"",payment_method_title:""},canProcessPayment:!1},getters:{getCanProcessPayment:function(t){return t.canProcessPayment}},mutations:{setOrderData:function(t,e){weLo_.isEmpty(e)?t.orderdata={billing:{},shipping:{},customer_id:0,customer_note:"",payment_method:"",payment_method_title:""}:t.orderdata=e},setCustomer:function(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:function(t){t.orderdata={billing:{},shipping:{},customer_id:0,customer_note:"",payment_method:"",payment_method_title:""}},setCustomerNote:function(t,e){t.orderdata.customer_note=e.trim()},removeCustomerNote:function(t){t.orderdata.customer_note=""},setGateway:function(t,e){t.orderdata.payment_method=e.id,t.orderdata.payment_method_title=e.title},setCanProcessPayment:function(t,e){t.canProcessPayment=e}},actions:{setOrderDataAction:function(t,e){t.commit("setOrderData",e)},setCustomerAction:function(t,e){t.commit("setCustomer",e)},emptyOrderdataAction:function(t){t.commit("emptyOrderdata")},setCustomerNoteAction:function(t,e){t.commit("setCustomerNote",e)},removeCustomerNoteAction:function(t){t.commit("removeCustomerNote")},setGatewayAction:function(t,e){t.commit("setGateway",e)},setCanProcessPaymentAction:function(t,e){t.commit("setCanProcessPayment",e)}}}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(t,e,s){"use strict";e.a={name:"App"}},function(t,e,s){"use strict";var a=s(151),i=s(154),o=s(157),r=s(160),n=s(73),c=s.n(n),l=s(167),u=s(170),d=s(173);let p=wepos_get_lib("Modal");e.a={name:"Home",components:{ProductSearch:i.a,CustomerSearch:o.a,Overlay:a.a,Modal:p,MugenScroll:c.a,FeeKeypad:r.a,PrintReceipt:l.a,PrintReceiptHtml:u.a,CustomerNote:d.a},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 void 0!=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)}),s=weLo_.findIndex(this.categories,e),a=t.splice(0,s+1),i=[];if(a.length>0){for(var o=a.length-1;o>=0;o--)if(i.length>0){var r=weLo_.find(a,{id:a[o+1].parent_id});if(void 0!=r&&(i.push(r),null==r.parent_id))break}else i.push(a[o]);return i.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 s=weLo_.find(this.availableGateways,{id:t});this.$store.dispatch("Order/setGatewayAction",s)},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),s=jQuery(".wepos-checkout-wrapper");s.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(a=>{"success"==a.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),s.unblock()):s.unblock()}).fail(t=>{s.unblock(),alert(t.responseJSON.message)})}).fail(t=>{s.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!(void 0==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)},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,s)=>{this.products=this.products.concat(t),this.page+=1,this.totalPages=parseInt(s.getResponseHeader("X-WP-TotalPages")),this.productLoading=!1}).then((t,e,s)=>{this.fetchProducts()}):this.productLoading=!1},maybeRemoveDeletedProduct:t=>new Promise((e,s)=>{if(!t)return e(t);if(!t.line_items||t.line_items.length<1)return e(t);let a=t.line_items.map(t=>t.product_id);wepos.api.get(wepos.rest.root+wepos.rest.posversion+"/products?include="+a.toString()).then(s=>{let a=s.map(t=>t.id);return t.line_items.forEach((e,s)=>{a.includes(e.product_id)||(t.line_items.splice(s,1),localStorage.setItem("cartdata",JSON.stringify(t)))}),e(t)}).fail(()=>s(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 s=[],a={};return t.forEach(function(t){a[t.id]={response:t,children:a[t.id]&&a[t.id].children},null===t.parent_id?s.push(a[t.id]):(a[t.parent_id]=a[t.parent_id]||{},a[t.parent_id].children=a[t.parent_id].children||[],a[t.parent_id].children.push(a[t.id]))}),s}(t),s={id:-1,level:0,name:this.__("All categories","wepos"),parent_id:null},a=e.reduce(function t(e){return function(s,a){return a.response.level=e,s.concat(a.response,(a.children||[]).reduce(t(e+1),[]))}}(0),[]);this.categories=a,this.categories.unshift(s),this.selectedCategory=s,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)}}},function(t,e,s){"use strict";e.a={name:"Overlay",props:{show:{type:Boolean}}}},function(t,e,s){"use strict";var a=s(68),i=s(27);s.n(i);let o=wepos_get_lib("Modal");e.a={name:"ProductInlineSearch",props:{products:{type:Array,default:()=>[]},settings:{type:Object,default:()=>({})}},components:{Modal:o,KeyboardControl:a.a},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,s={},a=this.products.filter(t=>{if("simple"==t.type&&t[e].toString()==this.serachInput)return!0;if("variable"==t.type){var s=!1;if(t.variations.length>0&&weLo_.forEach(t.variations,(t,a)=>{t[e].toString()==this.serachInput&&(s=!0)}),s)return!0}return!1});if(a.length>0)if("variable"==(a=a[0]).type)(s=a.variations.filter(t=>t[e].toString()==this.serachInput)[0]).parent_id=a.id,s.type=a.type,s.name=a.name,this.$emit("onProductAdded",s);else this.$emit("onProductAdded",a);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()}}},function(t,e,s){"use strict";var a=s(69),i=s(0)(a.a,null,!1,null,null,null);i.options.__file="assets/src/frontend/components/KeyboardControl.vue",e.a=i.exports},function(t,e,s){"use strict";e.a={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({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 s=void 0!==wepos.states[t.code]?wepos.states[t.code]:[],a=Object.keys(s);a.length>0?this.stateList=a.map(t=>({code:t,name:s[t]})):(this.stateList=s,this.selectedState=null)},generatePassword(t){for(var e="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789",s="",a=0,i=e.length;a{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)}}},function(t,e,s){"use strict";var a=s(162);e.a={name:"FeeKeypad",components:{keyboard:a.a},computed:{hotkeys(){return{discount:{f4:this.showFeeKeypad,esc:this.hideFeeKepad},fee:{f5:this.showFeeKeypad,esc:this.hideFeeKepad}}[this.shortKey]}},props:{name:{type:String,default:"Fee"},className:{type:String,default:""},shortKey:{type:String,default:""}},data:()=>({input:"",displayValue:"",viewFeeKeypad:!1}),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(t){this.$emit("inputfee",t.value.toString(),"percent"),this.viewFeeKeypad=!1,this.input="",this.displayValue=""},flatFee(t){this.$emit("inputfee",t.value.toString(),"flat"),this.viewFeeKeypad=!1,this.input="",this.displayValue=""},change(t){isNaN(t)?(this.input=this.displayValue,""==this.displayValue&&(this.input="")):(this.displayValue=t,this.input=this.displayValue),jQuery(this.$refs.feeinput).focus(),""==this.input&&jQuery(this.$refs.feeinput).focus()},inputChange(){isNaN(this.displayValue)?this.displayValue=this.input:this.input=this.displayValue,""==this.input&&jQuery(this.$refs.feeinput).focus()},showFeeKeypad(t){t.preventDefault(),this.viewFeeKeypad=!0,setTimeout(()=>{jQuery(this.$refs.feeinput).focus()},500)}}}},function(t,e,s){"use strict";const a="7440011c983cf39ae730b1f831e2922ac5a76910",i="f630c4abcae620278f82e142a526ef325c2a773a",o="ad982c66898e02a5dab419ea7568421b03f68ee2";e.a={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("||",a).replace("{{",i).replace("}}",o).split("|")},buttons(){return this.lines.map(t=>{let e=[],s=null;return t.match(new RegExp(`(${i}|${o}|${a}|.)`,"g")).forEach(t=>{if("{"===t)s="";else if("}"===t){let t=s.split(":"),a=t.length>1?t[0]:"",i=t.length>1?t[1]:t[0],o=t.length>2?t[2]:null,r=null;r=["append","backspace","space","clear","goto"].indexOf(i)>=0?this[i].bind(this,o):this.$emit.bind(this,i,this),e.push({type:"action",action:{name:i.replace(/\s+/g,"-").toLowerCase(),callable:r},value:a,args:o}),s=null}else null!==s?s+=t:(t===a&&(t="|"),t===i&&(t="{"),t===o&&(t="}"),e.push({type:"char",action:{name:null,callable:this.append.bind(this,t)},value:t,args:null}))}),e})},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{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)}}},function(t,e,s){"use strict";e.a={name:"ReceiptPrintHtml",props:{printdata:{type:Object,default:()=>({})},settings:{type:Object,default:()=>({})}},methods:{formatDate:t=>(t=new Date(t)).toLocaleString()}}},function(t,e,s){"use strict";e.a={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=""}}}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(t,e,s){"use strict";var a=r(s(145)),i=r(s(148)),o=r(s(28));function r(t){return t&&t.__esModule?t:{default:t}}var n=wepos_get_lib("Vue");n.config.productionTip=!1,new n({el:"#vue-frontend-app",router:i.default,store:o.default,render:function(t){return t(a.default)},created:function(){this.setLocaleData(wepos.i18n.wepos),wepos.i18n["wepos-pro"]&&this.setLocaleData(wepos.i18n["wepos-pro"])}})},function(t,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var a=s(64),i=s(147),o=!1;var r=function(t){o||s(146)},n=s(0)(a.a,i.a,!1,r,null,null);n.options.__file="assets/src/frontend/App.vue",e.default=n.exports},function(t,e){},function(t,e,s){"use strict";var a=function(){var t=this.$createElement,e=this._self._c||t;return e("div",{attrs:{id:"vue-frontend-app"}},[e("router-view")],1)};a._withStripped=!0;var i={render:a,staticRenderFns:[]};e.a=i},function(t,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var a=function(t){return t&&t.__esModule?t:{default:t}}(s(149));var i=wepos_get_lib("Vue"),o=wepos_get_lib("Router");i.use(o),e.default=new o({routes:wepos.hooks.applyFilters("wepos_frontend_routes",[{path:"/",name:"Home",component:a.default}])})},function(t,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var a=s(65),i=s(176),o=!1;var r=function(t){o||s(150)},n=s(0)(a.a,i.a,!1,r,null,null);n.options.__file="assets/src/frontend/components/Home.vue",e.default=n.exports},function(t,e){},function(t,e,s){"use strict";var a=s(66),i=s(153),o=!1;var r=function(t){o||s(152)},n=s(0)(a.a,i.a,!1,r,null,null);n.options.__file="assets/src/frontend/components/Overlay.vue",e.a=n.exports},function(t,e){},function(t,e,s){"use strict";var a=function(){var t=this.$createElement,e=this._self._c||t;return this.show?e("div",{staticClass:"overlay"}):this._e()};a._withStripped=!0;var i={render:a,staticRenderFns:[]};e.a=i},function(t,e,s){"use strict";var a=s(67),i=s(156),o=!1;var r=function(t){o||s(155)},n=s(0)(a.a,i.a,!1,r,null,null);n.options.__file="assets/src/frontend/components/ProductSearch.vue",e.a=n.exports},function(t,e){},function(t,e,s){"use strict";var a=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{directives:[{name:"click-outside",rawName:"v-click-outside",value:t.outside,expression:"outside"}],staticClass:"search-box"},[s("form",{attrs:{action:"",autocomplete:"off"},on:{submit:function(e){e.preventDefault(),t.handleProductScan(e)}}},[s("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){e.preventDefault(),t.triggerFocus(e)},keyup:function(e){e.preventDefault(),t.searchProduct(e)},input:function(e){e.target.composing||(t.serachInput=e.target.value)}}}),t._v(" "),"product"==t.mode?s("span",{staticClass:"search-icon flaticon-musica-searcher"}):t._e(),t._v(" "),"scan"==t.mode?s("span",{staticClass:"search-icon flaticon-supermarket-scanner"}):t._e(),t._v(" "),s("div",{directives:[{name:"hotkey",rawName:"v-hotkey",value:t.hotkeys,expression:"hotkeys"}],staticClass:"search-type"},[s("a",{class:{active:"product"==t.mode},attrs:{href:"#"},on:{click:function(e){e.preventDefault(),t.changeMode("product")}}},[t._v(t._s(t.__("Product","wepos")))]),t._v(" "),s("a",{class:{active:"scan"==t.mode},attrs:{href:"#"},on:{click:function(e){e.preventDefault(),t.changeMode("scan")}}},[t._v(t._s(t.__("Scan","wepos")))])]),t._v(" "),s("div",{directives:[{name:"show",rawName:"v-show",value:t.showResults&&"product"==t.mode,expression:"showResults && mode=='product'"}],staticClass:"search-result"},[t.searchableProduct.length?s("div",[s("keyboard-control",{attrs:{listLength:t.searchableProduct.length},on:{"key-down":t.onKeyDown,"key-up":t.onKeyUp},scopedSlots:t._u([{key:"default",fn:function(e){var a=e.selectedIndex;return t._l(t.searchableProduct,function(e,i){return s("li",{key:i,staticClass:"product-search-item",class:{selected:i===a}},["simple"==e.type?[s("a",{staticClass:"wepos-clearfix",attrs:{href:"#"},on:{click:function(s){t.addToCartAction(e)}}},[t._v(t._s(e.name)+"\n "),s("span",{staticClass:"price"},[t._v(t._s(t.formatPrice(e.price)))]),t._v(" "),e.sku?s("span",{staticClass:"sku"},[t._v(t._s(e.sku))]):t._e(),t._v(" "),s("span",{staticClass:"action flaticon-enter-arrow wepos-right"})])]:t._e(),t._v(" "),"variable"==e.type?[s("a",{attrs:{href:"#"},on:{click:function(s){s.preventDefault(),t.selectVariation(e)}}},[t._v(t._s(e.name)+"\n "),s("span",{staticClass:"price"},[t._v(t._s(t.formatPrice(e.price)))]),t._v(" "),e.sku?s("span",{staticClass:"sku"},[t._v(t._s(e.sku))]):t._e(),t._v(" "),s("span",{staticClass:"action flaticon-enter-arrow wepos-right"})])]:t._e()],2)})}}])})],1):s("div",{staticClass:"no-data-found"},[t._v("\n "+t._s(t.__("No product found","wepos"))+"\n ")]),t._v(" "),s("div",{staticClass:"suggession"},[s("span",{staticClass:"term"},[s("span",{staticClass:"flaticon-swap"}),t._v(" "+t._s(t.__("to navigate","wepos"))+"\n ")]),t._v(" "),s("span",{staticClass:"term"},[s("span",{staticClass:"flaticon-enter-arrow"}),t._v(" "+t._s(t.__("to select","wepos"))+"\n ")]),t._v(" "),s("span",{staticClass:"term"},[s("strong",[t._v("esc")]),t._v(" "+t._s(t.__("to dismiss","wepos"))+"\n ")])])])]),t._v(" "),t.showVariationModal?s("modal",{attrs:{title:t.__("Select Variations","wepos"),width:"500px",height:"auto",footer:!0,header:!0},on:{close:function(e){t.showVariationModal=!1}}},[s("template",{slot:"body"},t._l(t.selectedVariationProduct.attributes,function(e){return s("div",{staticClass:"variation-attribute-wrapper"},[s("div",{staticClass:"attribute"},[s("p",[t._v(t._s(e.name))]),t._v(" "),s("div",{staticClass:"options"},[t._l(e.options,function(a){return[s("label",[s("input",{directives:[{name:"model",rawName:"v-model",value:t.chosenAttribute[e.name],expression:"chosenAttribute[attribute.name]"}],attrs:{type:"radio"},domProps:{value:a,checked:t._q(t.chosenAttribute[e.name],a)},on:{change:function(s){t.$set(t.chosenAttribute,e.name,a)}}}),t._v(" "),s("div",{staticClass:"box"},[t._v("\n "+t._s(a)+"\n ")])])]})],2)])])})),t._v(" "),s("template",{slot:"footer"},[s("button",{staticClass:"add-variation-btn",attrs:{disabled:t.attributeDisabled},on:{click:function(e){t.addVariationProduct()}}},[t._v(t._s(t.__("Add Product","wepos")))])])],2):t._e()],1)};a._withStripped=!0;var i={render:a,staticRenderFns:[]};e.a=i},function(t,e,s){"use strict";var a=s(70),i=s(159),o=!1;var r=function(t){o||s(158)},n=s(0)(a.a,i.a,!1,r,null,null);n.options.__file="assets/src/frontend/components/CustomerSearch.vue",e.a=n.exports},function(t,e){},function(t,e,s){"use strict";var a=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("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"},[s("form",{attrs:{action:"",autocomplete:"off"}},[s("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"}},[s("defs",[s("linearGradient",{attrs:{x1:"14.5524094%",y1:"14.6909544%",x2:"82.7722259%",y2:"85.2519444%",id:"linearGradient-1"}},[s("stop",{attrs:{"stop-color":"#C444FB",offset:"0%"}}),t._v(" "),s("stop",{attrs:{"stop-color":"#5B56D7",offset:"100%"}})],1)],1),t._v(" "),s("g",{attrs:{id:"Page-1",stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"}},[s("g",{attrs:{id:"POS-Design---Dokan-P2",transform:"translate(-759.000000, -27.000000)"}},[s("g",{attrs:{id:"Group",transform:"translate(759.000000, 27.000000)"}},[s("circle",{attrs:{id:"Oval",fill:"url(#linearGradient-1)","fill-rule":"nonzero",cx:"9.5",cy:"9.5",r:"9.5"}}),t._v(" "),s("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)"}},[s("g",{attrs:{id:"flaticon1543304699-svg"}},[s("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(" "),s("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(" "),s("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(" "),s("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(" "),s("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){e.preventDefault(),t.triggerFocus(e)},keyup:t.searchCustomer,input:function(e){e.target.composing||(t.serachInput=e.target.value)}}}),t._v(" "),s("span",{staticClass:"add-new-customer flaticon-add",on:{click:function(e){e.preventDefault(),t.addNewCustomer()}}}),t._v(" "),s("div",{directives:[{name:"show",rawName:"v-show",value:t.showCustomerResults,expression:"showCustomerResults"}],staticClass:"search-result"},[t.customers.length?s("div",[s("keyboard-control",{attrs:{listLength:t.customers.length},on:{"key-down":t.onKeyDown,"key-up":t.onKeyUp},scopedSlots:t._u([{key:"default",fn:function(e){var a=e.selectedIndex;return t._l(t.customers,function(e,i){return s("li",{key:i,staticClass:"customer-search-item",class:{selected:i===a}},[s("a",{staticClass:"wepos-clearfix",attrs:{href:"#"},on:{click:function(s){t.selectCustomer(e)}}},[s("span",{staticClass:"avatar wepos-left"},[s("img",{attrs:{src:e.avatar_url,alt:e.first_name+" "+e.last_name}})]),t._v(" "),s("span",{staticClass:"name wepos-left"},[t._v(t._s(e.first_name+" "+e.last_name)),s("span",{staticClass:"metadata"},[t._v(t._s(e.email))])]),t._v(" "),s("span",{staticClass:"action flaticon-enter-arrow wepos-right"})])])})}}])})],1):s("div",{staticClass:"no-data-found"},[t._v("\n "+t._s(t.__("No customer found","wepos"))+"\n ")]),t._v(" "),s("div",{staticClass:"suggession"},[s("span",{staticClass:"term"},[s("span",{staticClass:"flaticon-swap"}),t._v(" "+t._s(t.__("to navigate","wepos"))+"\n ")]),t._v(" "),s("span",{staticClass:"term"},[s("span",{staticClass:"flaticon-enter-arrow"}),t._v(" "+t._s(t.__("to select","wepos"))+"\n ")]),t._v(" "),s("span",{staticClass:"term"},[s("strong",[t._v("esc")]),t._v(" "+t._s(t.__("to dismiss","wepos"))+"\n ")])])])]),t._v(" "),t.showNewCustomerModal?s("modal",{attrs:{title:t.__("Add New Customer","wepos"),width:"700px",footer:!0,header:!0},on:{close:t.closeNewCustomerModal}},[s("template",{slot:"body"},[s("div",{staticClass:"wepos-new-customer-form"},[s("form",{staticClass:"wepos-form",attrs:{action:"",autocomplete:"off"}},[s("div",{staticClass:"form-row col-2"},[s("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(" "),s("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(" "),s("div",{staticClass:"form-row"},[s("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(" "),s("div",{staticClass:"form-row col-2"},[s("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(" "),s("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(" "),s("div",{staticClass:"form-row col-2"},[s("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(e){return[s("span",{domProps:{innerHTML:t._s(e.option.name)}})]}},{key:"option",fn:function(e){return[s("span",{domProps:{innerHTML:t._s(e.option.name)}})]}}]),model:{value:t.selectedCountry,callback:function(e){t.selectedCountry=e},expression:"selectedCountry"}},[s("template",{slot:"noResult"},[s("div",{staticClass:"no-data-found"},[t._v(t._s(t.__("No country found","wepos")))])])],2),t._v(" "),t.stateList.length>0?[s("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(e){return[s("span",{domProps:{innerHTML:t._s(e.option.name)}})]}},{key:"option",fn:function(e){return[s("span",{domProps:{innerHTML:t._s(e.option.name)}})]}}]),model:{value:t.selectedState,callback:function(e){t.selectedState=e},expression:"selectedState"}},[s("template",{slot:"noResult"},[s("div",{staticClass:"no-data-found"},[t._v(t._s(t.__("No country found","wepos")))])])],2)]:[s("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(" "),s("div",{staticClass:"form-row col-2"},[s("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(" "),s("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(" "),s("div",{staticClass:"form-row"},[s("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(" "),s("template",{slot:"footer"},[s("button",{staticClass:"add-new-customer-btn add-variation-btn",attrs:{disabled:t.isDisabled},on:{click:function(e){t.createCustomer()}}},[t._v(t._s(t.__("Add Customer","wepos")))])])],2):t._e()],1)};a._withStripped=!0;var i={render:a,staticRenderFns:[]};e.a=i},function(t,e,s){"use strict";var a=s(71),i=s(165),o=!1;var r=function(t){o||s(161)},n=s(0)(a.a,i.a,!1,r,null,null);n.options.__file="assets/src/frontend/components/FeeKeypad.vue",e.a=n.exports},function(t,e){},function(t,e,s){"use strict";var a=s(72),i=s(164),o=!1;var r=function(t){o||s(163)},n=s(0)(a.a,i.a,!1,r,null,null);n.options.__file="assets/src/frontend/components/Keyboard.vue",e.a=n.exports},function(t,e){},function(t,e,s){"use strict";var a=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("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(e){return s("div",{staticClass:"vue-keyboard-row",attrs:{role:"row","data-keys":e.length}},t._l(e,function(e){return s("button",{staticClass:"vue-keyboard-key",class:e.type,attrs:{role:"button","data-args":e.args,"data-text":e.value,"data-action":e.action.name},domProps:{innerHTML:t._s(e.value)},on:{click:function(t){t.preventDefault(),e.action.callable(t)}}})}))}))};a._withStripped=!0;var i={render:a,staticRenderFns:[]};e.a=i},function(t,e,s){"use strict";var a=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{directives:[{name:"hotkey",rawName:"v-hotkey",value:t.hotkeys,expression:"hotkeys"}],staticClass:"wepos-fee-keypad-wrap",class:t.className},[s("v-popover",{attrs:{offset:"5","popover-base-class":"fee-keypad tooltip popover",placement:"top",open:t.viewFeeKeypad}},[s("a",{attrs:{href:"#"},on:{click:t.showFeeKeypad}},[t._v(t._s(t.__("Add","wepos"))+" "+t._s(t.name))]),t._v(" "),s("template",{slot:"popover"},[s("form",[s("input",{directives:[{name:"model",rawName:"v-model",value:t.displayValue,expression:"displayValue"}],ref:"feeinput",attrs:{type:"text"},domProps:{value:t.displayValue},on:{keyup:t.inputChange,input:function(e){e.target.composing||(t.displayValue=e.target.value)}}})]),t._v(" "),s("keyboard",{attrs:{layouts:t.layout()},on:{percent:t.percentFee,flat:t.flatFee,input:t.change},model:{value:t.input,callback:function(e){t.input=e},expression:"input"}})],1)],2)],1)};a._withStripped=!0;var i={render:a,staticRenderFns:[]};e.a=i},,function(t,e,s){"use strict";var a=s(74),i=s(169),o=!1;var r=function(t){o||s(168)},n=s(0)(a.a,i.a,!1,r,null,null);n.options.__file="assets/src/frontend/components/PrintReceipt.vue",e.a=n.exports},function(t,e){},function(t,e,s){"use strict";var a=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{attrs:{id:"wepos-print-receipt"}},[s("button",{staticClass:"print-btn",on:{click:function(e){e.preventDefault(),t.printReceipt()}}},[s("span",{staticClass:"icon flaticon-printer"}),t._v(" "),s("span",{staticClass:"label"},[t._v(t._s(t.__("Print Receipt","wepos")))])])])};a._withStripped=!0;var i={render:a,staticRenderFns:[]};e.a=i},function(t,e,s){"use strict";var a=s(75),i=s(172),o=!1;var r=function(t){o||s(171)},n=s(0)(a.a,i.a,!1,r,null,null);n.options.__file="assets/src/frontend/components/PrintReceiptHtml.vue",e.a=n.exports},function(t,e){},function(t,e,s){"use strict";var a=function(){var t=this,e=t.$createElement,s=t._self._c||e;return t.settings.wepos_receipts?s("div",{staticClass:"wepos-checkout-print-wrapper"},[s("div",{staticClass:"header",domProps:{innerHTML:t._s(t.settings.wepos_receipts.receipt_header)}}),t._v(" "),s("div",{staticClass:"order-info"},[s("span",{staticClass:"wepos-left"},[s("strong",[t._v(t._s(t.__("Order ID","wepos"))+": #"+t._s(t.printdata.order_id))])]),t._v(" "),s("span",{staticClass:"wepos-right"},[s("strong",[t._v(t._s(t.__("Order Date","wepos"))+": "+t._s(t.formatDate(t.printdata.order_date)))])]),t._v(" "),s("div",{staticClass:"wepos-clearfix"})]),t._v(" "),s("div",{staticClass:"content"},[s("table",{staticClass:"sale-summary"},[s("tbody",[t._l(t.printdata.line_items,function(e){return s("tr",[s("td",{staticClass:"name"},[t._v("\n "+t._s(e.name)+"\n "),e.attribute.length>0?s("div",{staticClass:"attribute"},[s("ul",t._l(e.attribute,function(e){return s("li",[s("span",{staticClass:"attr_name"},[t._v(t._s(e.name))]),t._v(": "),s("span",{staticClass:"attr_value"},[t._v(t._s(e.option))])])}))]):t._e()]),t._v(" "),s("td",{staticClass:"quantity"},[t._v(t._s(e.quantity))]),t._v(" "),s("td",{staticClass:"price"},[e.on_sale?[s("span",{staticClass:"regular-price"},[t._v(t._s(t.formatPrice(e.quantity*e.regular_price)))]),t._v(" "),s("span",{staticClass:"sale-price"},[t._v(t._s(t.formatPrice(e.quantity*e.sale_price)))])]:[s("span",{staticClass:"sale-price"},[t._v(t._s(t.formatPrice(e.quantity*e.regular_price)))])]],2)])}),t._v(" "),s("tr",{staticClass:"cart-meta-data"},[s("td",{staticClass:"name",attrs:{colspan:"2"}},[t._v("\n "+t._s(t.__("Subtotal","wepos"))+"\n "),"incl"==t.settings.woo_tax.wc_tax_display_cart?s("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(" "),s("td",{staticClass:"price"},[t._v(t._s(t.formatPrice(t.printdata.subtotal)))])]),t._v(" "),t._l(t.printdata.fee_lines,function(e,a){return s("tr",{staticClass:"cart-meta-data"},["discount"==e.type?[s("td",{staticClass:"name",attrs:{colspan:"2"}},[t._v(t._s(t.__("Discount","wepos"))+" "),s("span",{staticClass:"metadata"},[t._v(t._s("percent"==e.discount_type?e.value+"%":t.formatPrice(e.value)))])]),t._v(" "),s("td",{staticClass:"price"},[t._v("-"+t._s(t.formatPrice(Math.abs(e.total))))])]:[s("td",{staticClass:"name",attrs:{colspan:"2"}},[t._v(t._s(t.__("Fee","wepos"))+" "),s("span",{staticClass:"metadata"},[t._v(t._s(e.name)+" "+t._s("percent"==e.fee_type?e.value+"%":t.formatPrice(e.value)))])]),t._v(" "),s("td",{staticClass:"price"},[t._v("-"+t._s(t.formatPrice(Math.abs(e.total))))])]],2)}),t._v(" "),t.printdata.taxtotal?s("tr",[s("td",{staticClass:"name",attrs:{colspan:"2"}},[t._v(t._s(t.__("Tax","wepos")))]),t._v(" "),s("td",{staticClass:"price"},[t._v(t._s(t.formatPrice(t.printdata.taxtotal)))])]):t._e(),t._v(" "),s("tr",[s("td",{staticClass:"name",attrs:{colspan:"2"}},[t._v(t._s(t.__("Order Total","wepos")))]),t._v(" "),s("td",{staticClass:"price"},[t._v(t._s(t.formatPrice(t.printdata.ordertotal)))])]),t._v(" "),t._m(0),t._v(" "),s("tr",[s("td",{attrs:{colspan:"2"}},[t._v(t._s(t.__("Payment method","wepos")))]),t._v(" "),s("td",{staticClass:"price"},[t._v(t._s(t.printdata.gateway.title||""))])]),t._v(" "),(t.printdata.gateway.id="wepos_cash")?[s("tr",[s("td",{attrs:{colspan:"2"}},[t._v(t._s(t.__("Cash Given","wepos")))]),t._v(" "),s("td",{staticClass:"price"},[t._v(t._s(t.formatPrice(t.printdata.cashamount)))])]),t._v(" "),s("tr",[s("td",{attrs:{colspan:"2"}},[t._v(t._s(t.__("Change Money","wepos")))]),t._v(" "),s("td",{staticClass:"price"},[t._v(t._s(t.formatPrice(t.printdata.changeamount)))])])]:t._e()],2)])]),t._v(" "),s("div",{staticClass:"footer",domProps:{innerHTML:t._s(t.settings.wepos_receipts.receipt_footer)}})]):t._e()};a._withStripped=!0;var i={render:a,staticRenderFns:[function(){var t=this.$createElement,e=this._self._c||t;return e("tr",{staticClass:"divider"},[e("td",{attrs:{colspan:"3"}})])}]};e.a=i},function(t,e,s){"use strict";var a=s(76),i=s(175),o=!1;var r=function(t){o||s(174)},n=s(0)(a.a,i.a,!1,r,null,null);n.options.__file="assets/src/frontend/components/CustomerNote.vue",e.a=n.exports},function(t,e){},function(t,e,s){"use strict";var a=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{directives:[{name:"hotkey",rawName:"v-hotkey",value:t.hotkeys,expression:"hotkeys"}],staticClass:"wepos-custom-note-wrap"},[s("v-popover",{attrs:{offset:"5","popover-base-class":"customer-note tooltip popover",placement:"top",open:t.viewNotePopover}},[s("a",{attrs:{href:"#"},on:{click:function(e){e.preventDefault(),t.openNote(e)}}},[t._v(t._s(t.__("Add Note","wepos")))]),t._v(" "),s("template",{slot:"popover"},[s("form",{on:{submit:function(e){e.preventDefault(),t.addCustomerNote(e)}}},[s("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(" "),s("button",{staticClass:"add-note-btn",attrs:{type:"submit",disabled:""==t.customerNote}},[t._v(t._s(t.__("Add Note","wepos")))])])])],2)],1)};a._withStripped=!0;var i={render:a,staticRenderFns:[]};e.a=i},function(t,e,s){"use strict";var a=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{directives:[{name:"hotkey",rawName:"v-hotkey",value:t.hotkeys,expression:"hotkeys"}],attrs:{id:"wepos-main"}},[s("div",{staticClass:"content-product"},[s("div",{staticClass:"top-panel wepos-clearfix"},[s("div",{staticClass:"search-bar"},[s("product-search",{attrs:{products:t.products,settings:t.settings},on:{onProductAdded:t.addToCart}})],1),t._v(" "),s("div",{staticClass:"category"},[s("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(e){return[s("span",[t._l(e.option.level,function(e){return[t._v("\n  \n ")]}),t._v("\n "+t._s(e.option.name)+"\n ")],2)]}}]),model:{value:t.selectedCategory,callback:function(e){t.selectedCategory=e},expression:"selectedCategory"}},[s("template",{slot:"noResult"},[s("div",{staticClass:"no-data-found"},[t._v(t._s(t.__("Not found","wepos")))])])],2)],1),t._v(" "),s("div",{staticClass:"toggle-view"},[s("div",{staticClass:"product-toggle"},[s("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(" "),s("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?s("div",{staticClass:"breadcrumb"},[s("ul",[t._l(t.getBreadCrums,function(e){return[s("router-link",{attrs:{tag:"li",to:{name:"Home",query:{category:e.id}}}},[s("a",[t._v(t._s(e.name))])])]})],2),t._v(" "),s("span",{staticClass:"close-breadcrumb flaticon-cancel-music",on:{click:function(e){e.preventDefault(),t.removeBreadcrums(e)}}})]):t._e(),t._v(" "),s("div",{ref:"items-wrapper",staticClass:"items-wrapper",class:t.productView},[t.productLoading?t._e():[t._l(t.getFilteredProduct,function(e){return t.getFilteredProduct.length>0?s("div",{staticClass:"item"},["simple"===e.type?[s("div",{staticClass:"item-wrap",class:{disabled:!t.hasStock(e)},on:{click:function(s){s.preventDefault(),t.addToCart(e)}}},[s("div",{staticClass:"img"},[s("img",{attrs:{src:t.getProductImage(e),alt:t.getProductImageName(e)}})]),t._v(" "),"grid"===t.productView?s("div",{staticClass:"title"},[t._v("\n "+t._s(t.truncateTitle(e.name,20))+"\n ")]):s("div",{staticClass:"title"},[s("div",{staticClass:"product-name"},[t._v(t._s(e.name))]),t._v(" "),s("ul",{staticClass:"meta"},[e.sku?s("li",[s("span",{staticClass:"label"},[t._v(t._s(t.__("Sku :","wepos")))]),t._v(" "),s("span",{staticClass:"value"},[t._v(t._s(e.sku))])]):t._e(),t._v(" "),s("li",[s("span",{staticClass:"label"},[t._v(t._s(t.__("Price :","wepos")))]),t._v(" "),s("span",{staticClass:"value",domProps:{innerHTML:t._s(e.price_html)}})])])]),t._v(" "),s("span",{staticClass:"add-product-icon flaticon-add",class:t.productView})])]:t._e(),t._v(" "),"variable"===e.type?[s("v-popover",{attrs:{offset:"10","popover-base-class":"product-variation tooltip popover",placement:"left-end"}},[s("div",{staticClass:"item-wrap",on:{click:function(s){t.selectVariationProduct(e)}}},[s("div",{staticClass:"img"},[s("img",{attrs:{src:t.getProductImage(e),alt:t.getProductImageName(e)}})]),t._v(" "),"grid"===t.productView?s("div",{staticClass:"title"},[t._v("\n "+t._s(t.truncateTitle(e.name,20))+"\n ")]):s("div",{staticClass:"title"},[s("div",{staticClass:"product-name"},[t._v(t._s(e.name))]),t._v(" "),s("ul",{staticClass:"meta"},[s("li",[s("span",{staticClass:"label"},[t._v(t._s(t.__("Price :","wepos")))]),t._v(" "),s("span",{staticClass:"value",domProps:{innerHTML:t._s(e.price_html)}})])])]),t._v(" "),s("span",{staticClass:"add-product-icon flaticon-add",class:t.productView})]),t._v(" "),s("template",{slot:"popover"},[s("div",{staticClass:"variation-header"},[t._v("\n "+t._s(t.__("Select Variations","wepos"))+"\n ")]),t._v(" "),s("div",{staticClass:"variation-body"},[t._l(e.attributes,function(e){return[s("div",{staticClass:"attribute"},[s("p",[t._v(t._s(e.name))]),t._v(" "),s("div",{staticClass:"options"},[t._l(e.options,function(a){return[s("label",[s("input",{directives:[{name:"model",rawName:"v-model",value:t.selectedAttribute[e.name],expression:"selectedAttribute[attribute.name]"}],attrs:{type:"radio"},domProps:{value:a,checked:t._q(t.selectedAttribute[e.name],a)},on:{change:function(s){t.$set(t.selectedAttribute,e.name,a)}}}),t._v(" "),s("div",{staticClass:"box"},[t._v("\n "+t._s(a)+"\n ")])])]})],2)])]})],2),t._v(" "),s("div",{staticClass:"variation-footer"},[s("button",{attrs:{disabled:t.attributeDisabled},on:{click:function(e){e.preventDefault(),t.addVariationProduct(e)}}},[t._v(t._s(t.__("Add Product","wepos")))])])])],2)]:t._e()],2):t._e()}),t._v(" "),t.getFilteredProduct.length<=0?s("div",{staticClass:"no-product-found"},[s("img",{attrs:{src:t.wepos.assets_url+"/images/no-product.png",alt:"",width:"120px"}}),t._v(" "),s("p",[t._v(t._s(t.__("No Product Found","wepos")))])]):t._e()],t._v(" "),t.productLoading?s("div",{staticClass:"product-loading"},[s("div",{staticClass:"spinner spinner-loading"})]):t._e()],2)]),t._v(" "),s("div",{staticClass:"content-cart"},[s("div",{staticClass:"top-panel"},[s("customer-search",{on:{onCustomerSelected:t.selectCustomer}}),t._v(" "),s("div",{staticClass:"action"},[s("div",{staticClass:"more-options"},[s("v-popover",{attrs:{offset:"5","popover-base-class":"wepos-dropdown-menu tooltip popover",placement:"bottom-end",open:t.showQucikMenu}},[s("button",{staticClass:"wepos-button",on:{click:function(e){e.preventDefault(),t.openQucikMenu()}}},[s("span",{staticClass:"more-icon flaticon-more"})]),t._v(" "),s("template",{slot:"popover"},[s("ul",[t._l(t.quickLinkListStart,function(t,e){return s(t,{key:e-"1",tag:"component"})}),t._v(" "),s("li",[s("a",{attrs:{href:"#"},on:{click:function(e){e.preventDefault(),t.emptyCart(e)}}},[s("span",{staticClass:"flaticon-empty-cart quick-menu-icon"}),t._v(t._s(t.__("Empty Cart","wepos")))])]),t._v(" "),s("li",[s("a",{attrs:{href:"#"},on:{click:function(e){e.preventDefault(),t.openHelp(e)}}},[s("span",{staticClass:"flaticon-information quick-menu-icon"}),t._v(t._s(t.__("Help","wepos")))])]),t._v(" "),s("li",{staticClass:"divider"}),t._v(" "),t._l(t.quickLinkList,function(t,e){return s(t,{key:e,tag:"component"})}),t._v(" "),s("li",[s("a",{attrs:{href:"#"},on:{click:function(e){e.preventDefault(),t.logout(e)}}},[s("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,e){return s(t,{key:e,tag:"component"})}),t._v(" "),t.settings.wepos_general?s("div",{staticClass:"cart-panel"},[s("div",{staticClass:"cart-content"},[s("table",{staticClass:"cart-table"},[s("thead",[s("tr",[s("th",{attrs:{width:"65%"}},[t._v(t._s(t.__("Product","wepos")))]),t._v(" "),s("th",{attrs:{width:"15%"}},[t._v(t._s(t.__("Qty","wepos")))]),t._v(" "),s("th",{attrs:{width:"30%"}},[t._v(t._s(t.__("Price","wepos")))]),t._v(" "),s("th"),t._v(" "),s("th")])]),t._v(" "),s("tbody",[t.cartdata.line_items.length>0?[t._l(t.cartdata.line_items,function(e,a){return[s("tr",[s("td",{staticClass:"name",on:{click:function(s){t.toggleEditQuantity(e,a)}}},[t._v("\n "+t._s(e.name)+"\n "),e.attribute.length>0&&"variable"===e.type?s("div",{staticClass:"attribute"},[s("ul",t._l(e.attribute,function(e){return s("li",[s("span",{staticClass:"attr_name"},[t._v(t._s(e.name))]),t._v(": "),s("span",{staticClass:"attr_value"},[t._v(t._s(e.option))])])}))]):t._e()]),t._v(" "),s("td",{staticClass:"qty",on:{click:function(s){t.toggleEditQuantity(e,a)}}},[t._v(t._s(e.quantity))]),t._v(" "),s("td",{staticClass:"price",on:{click:function(s){t.toggleEditQuantity(e,a)}}},[e.on_sale?[s("span",{staticClass:"sale-price"},[t._v(t._s(t.formatPrice(e.quantity*e.sale_price)))]),t._v(" "),s("span",{staticClass:"regular-price"},[t._v(t._s(t.formatPrice(e.quantity*e.regular_price)))])]:[s("span",{staticClass:"sale-price"},[t._v(t._s(t.formatPrice(e.quantity*e.regular_price)))])]],2),t._v(" "),s("td",{staticClass:"action"},[s("span",{staticClass:"flaticon-right-arrow",class:{open:e.editQuantity},on:{click:function(s){s.preventDefault(),t.toggleEditQuantity(e,a)}}})]),t._v(" "),s("td",{staticClass:"remove"},[s("span",{staticClass:"flaticon-cancel-music",on:{click:function(e){e.preventDefault(),t.removeItem(a)}}})])]),t._v(" "),e.editQuantity?s("tr",{staticClass:"update-quantity-wrap"},[s("td",{attrs:{colspan:"5"}},[s("span",{staticClass:"qty"},[t._v(t._s(t.__("Quantity","wepos")))]),t._v(" "),s("span",{staticClass:"qty-number"},[s("input",{directives:[{name:"model",rawName:"v-model",value:e.quantity,expression:"item.quantity"}],attrs:{type:"number",min:"1",step:"1"},domProps:{value:e.quantity},on:{input:function(s){s.target.composing||t.$set(e,"quantity",s.target.value)}}})]),t._v(" "),s("span",{staticClass:"qty-action"},[s("a",{staticClass:"add",attrs:{href:"#"},on:{click:function(s){s.preventDefault(),t.addQuantity(e,a)}}},[t._v("+")]),t._v(" "),s("a",{staticClass:"minus",attrs:{href:"#"},on:{click:function(s){s.preventDefault(),t.removeQuantity(e,a)}}},[t._v("-")])])])]):t._e()]})]:[s("tr",{staticClass:"no-item"},[s("td",{attrs:{colspan:"5"}},[s("img",{attrs:{src:t.wepos.assets_url+"/images/empty-cart.png",alt:"",width:"120px"}}),t._v(" "),s("p",[t._v(t._s(t.__("Empty Cart","wepos")))])])])]],2)])]),t._v(" "),s("div",{staticClass:"cart-calculation"},[s("form",{attrs:{autocomplete:"off"}},[s("table",{staticClass:"cart-total-table"},[s("tbody",[s("tr",{staticClass:"cart-meta-data"},[s("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?s("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(" "),s("td",{staticClass:"price"},[t._v(t._s(t.formatPrice(t.$store.getters["Cart/getSubtotal"])))]),t._v(" "),s("td",{staticClass:"action"})]),t._v(" "),t.cartdata.fee_lines.length>0?t._l(t.cartdata.fee_lines,function(e,a){return s("tr",{staticClass:"cart-meta-data"},["discount"==e.type?[s("td",{staticClass:"label"},[t._v(t._s(t.__("Discount","wepos"))+" "),s("span",{staticClass:"name"},[t._v(t._s("percent"==e.discount_type?e.value+"%":t.formatPrice(e.value)))])]),t._v(" "),s("td",{staticClass:"price"},[t._v("−"+t._s(t.formatPrice(Math.abs(e.total))))]),t._v(" "),s("td",{staticClass:"action"},[s("span",{staticClass:"flaticon-cancel-music",on:{click:function(e){t.removeFeeLine(a)}}})])]:[t.cartdata.fee_lines[a].isEdit?[s("td",{staticClass:"label",attrs:{colspan:"2"}},[s("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(" "),s("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?[s("label",{attrs:{for:"fee-tax-status"}},[s("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 s=t.feeData.tax_status,a=e.target,i=a.checked?"taxable":"none";if(Array.isArray(s)){var o=t._i(s,null);a.checked?o<0&&(t.feeData.tax_status=s.concat([null])):o>-1&&(t.feeData.tax_status=s.slice(0,o).concat(s.slice(o+1)))}else t.$set(t.feeData,"tax_status",i)}}}),t._v(" "+t._s(t.__("Taxable","wepos")))]),t._v(" "),"taxable"==t.feeData.tax_status?s("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 s=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?s:s[0])}}},t._l(t.availableTax,function(e){return s("option",{domProps:{value:"standard"==e.class?"":e.class}},[t._v(t._s(t.unSanitizeString(e.class))+" - "+t._s(e.percentage_rate))])})):t._e()]:t._e(),t._v(" "),s("button",{attrs:{disabled:""==t.feeData.name},on:{click:function(e){e.preventDefault(),t.saveFee(a)}}},[t._v(t._s(t.__("Apply","wepos")))]),t._v(" "),s("button",{staticClass:"cancel",on:{click:function(e){e.preventDefault(),t.cancelEditFee(a)}}},[t._v(t._s(t.__("Cancel","wepos")))])],2),t._v(" "),s("td",{staticClass:"action"},[s("span",{staticClass:"flaticon-cancel-music",on:{click:function(e){t.removeFeeLine(a)}}})])]:[s("td",{staticClass:"label",on:{dblclick:function(e){e.preventDefault(),t.editFeeData(a)}}},[t._v(t._s(t.__("Fee","wepos"))+" "),s("span",{staticClass:"name"},[t._v(t._s(e.name)+" "+t._s("percent"==e.fee_type?e.value+"%":t.formatPrice(e.value)))])]),t._v(" "),s("td",{staticClass:"price"},[t._v(t._s(t.formatPrice(Math.abs(e.total))))]),t._v(" "),s("td",{staticClass:"action"},[s("span",{staticClass:"flaticon-cancel-music",on:{click:function(e){t.removeFeeLine(a)}}})])]]],2)}):t._e(),t._v(" "),t.$store.getters["Cart/getTotalTax"]?s("tr",{staticClass:"tax"},[s("td",{staticClass:"label"},[t._v(t._s(t.__("Tax","wepos")))]),t._v(" "),s("td",{staticClass:"price"},[t._v(t._s(t.formatPrice(t.$store.getters["Cart/getTotalTax"])))]),t._v(" "),s("td",{staticClass:"action"})]):t._e(),t._v(" "),s("tr",{staticClass:"cart-action"},[s("td",{attrs:{colspan:"3"}},[s("fee-keypad",{attrs:{name:t.__("Discount","wepos"),"short-key":"discount"},on:{inputfee:t.setDiscount}}),t._v(" "),s("fee-keypad",{attrs:{name:t.__("Fee","wepos"),"short-key":"fee"},on:{inputfee:t.setFee}}),t._v(" "),""==t.orderdata.customer_note?s("customer-note",{on:{addnote:t.addCustomerNote}}):t._e()],1)]),t._v(" "),t.orderdata.customer_note?s("tr",{staticClass:"note"},[s("td",{staticClass:"note-text",attrs:{colspan:"2"}},[t._v("\n "+t._s(t.orderdata.customer_note)+"\n ")]),t._v(" "),s("td",{staticClass:"action"},[s("span",{staticClass:"flaticon-cancel-music",on:{click:function(e){e.preventDefault(),t.removeCustomerNote(e)}}})])]):t._e(),t._v(" "),s("tr",{staticClass:"pay-now",on:{click:function(e){t.initPayment()}}},[s("td",[t._v(t._s(t.__("Pay Now","wepos")))]),t._v(" "),s("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?s("modal",{attrs:{width:"600px",height:"400px"},on:{close:function(e){t.createNewSale()}}},[s("template",{slot:"body"},[s("div",{staticClass:"wepos-payment-receipt"},[s("div",{staticClass:"sale-completed"},[s("img",{attrs:{src:t.wepos.assets_url+"/images/sale-completed.png",alt:"",width:"120px"}}),t._v(" "),s("h2",[t._v(t._s(t.__("Sale Completed","wepos")))])]),t._v(" "),s("div",{staticClass:"print-section"},[s("print-receipt"),t._v(" "),s("button",{staticClass:"new-sale-btn",on:{click:function(e){e.preventDefault(),t.createNewSale()}}},[s("span",{staticClass:"icon flaticon-add"}),t._v(" "),s("span",{staticClass:"label"},[t._v(t._s(t.__("New Sale","wepos")))])])],1)])])],2):t._e(),t._v(" "),t.showHelp?s("modal",{attrs:{width:"700px",height:"500px"},on:{close:function(e){t.closeHelp()}}},[s("template",{slot:"body"},[s("div",{staticClass:"wepos-help-wrapper"},[s("h2",[t._v(t._s(t.__("Shortcut Keys","wepos")))]),t._v(" "),s("ul",[s("li",[s("span",{staticClass:"code"},[s("code",[t._v("f1")])]),t._v(" "),s("span",{staticClass:"title"},[t._v(t._s(t.__("Search Product","wepos")))])]),t._v(" "),s("li",[s("span",{staticClass:"code"},[s("code",[t._v("f2")])]),t._v(" "),s("span",{staticClass:"title"},[t._v(t._s(t.__("Scan Product","wepos")))])]),t._v(" "),s("li",[s("span",{staticClass:"code"},[s("code",[t._v("f3")])]),t._v(" "),s("span",{staticClass:"title"},[t._v(t._s(t.__("Toggle Product View","wepos")))])]),t._v(" "),s("li",[s("span",{staticClass:"code"},[s("code",[t._v("f4")])]),t._v(" "),s("span",{staticClass:"title"},[t._v(t._s(t.__("Add Fee in cart","wepos")))])]),t._v(" "),s("li",[s("span",{staticClass:"code"},[s("code",[t._v("f5")])]),t._v(" "),s("span",{staticClass:"title"},[t._v(t._s(t.__("Add Discount in cart","wepos")))])]),t._v(" "),s("li",[s("span",{staticClass:"code"},[s("code",[t._v("f6")])]),t._v(" "),s("span",{staticClass:"title"},[t._v(t._s(t.__("Add Customer note","wepos")))])]),t._v(" "),s("li",[s("span",{staticClass:"code"},[s("code",[t._v("f7")])]),t._v(" "),s("span",{staticClass:"title"},[t._v(t._s(t.__("Customer Search","wepos")))])]),t._v(" "),s("li",[s("span",{staticClass:"code"},[s("code",[t._v("shift+f7")])]),t._v(" "),s("span",{staticClass:"title"},[t._v(t._s(t.__("Add new Customer","wepos")))])]),t._v(" "),s("li",[s("span",{staticClass:"code"},[s("code",[t._v("f8")])]),t._v(" "),s("span",{staticClass:"title"},[t._v(t._s(t.__("Create New Sale","wepos")))])]),t._v(" "),s("li",[s("span",{staticClass:"code"},[s("code",[t._v("shift+f8")])]),t._v(" "),s("span",{staticClass:"title"},[t._v(t._s(t.__("Empty your cart","wepos")))])]),t._v(" "),s("li",[s("span",{staticClass:"code"},[s("code",[t._v("f9")])]),t._v(" "),s("span",{staticClass:"title"},[t._v(t._s(t.__("Go to payment receipt","wepos")))])]),t._v(" "),s("li",[s("span",{staticClass:"code"},[s("code",[t._v("f10")])]),t._v(" "),s("span",{staticClass:"title"},[t._v(t._s(t.__("Process Payment","wepos")))])]),t._v(" "),s("li",[s("span",{staticClass:"code"},[s("code",[t._v("ctrl/cmd+p")])]),t._v(" "),s("span",{staticClass:"title"},[t._v(t._s(t.__("Print Receipt","wepos")))])]),t._v(" "),s("li",[s("span",{staticClass:"code"},[s("code",[t._v("ctrl/cmd+?")])]),t._v(" "),s("span",{staticClass:"title"},[t._v(t._s(t.__("Show/Close(Toggle) Help","wepos")))])]),t._v(" "),s("li",[s("span",{staticClass:"code"},[s("code",[t._v("esc")])]),t._v(" "),s("span",{staticClass:"title"},[t._v(t._s(t.__("Close anything","wepos")))])])])])])],2):t._e(),t._v(" "),t.showModal?s("modal",{attrs:{width:"98%",height:"95vh"},on:{open:function(e){t.focusCashInput()},close:function(e){t.backToSale()},enterpressed:function(e){t.processPayment()}}},[s("template",{slot:"body"},[s("div",{staticClass:"wepos-checkout-wrapper"},[s("div",{staticClass:"left-content"},[s("div",{staticClass:"header"},[t._v("\n "+t._s(t.__("Sale Summary","wepos"))+"\n ")]),t._v(" "),s("div",{staticClass:"content"},[s("table",{staticClass:"sale-summary-cart"},[s("tbody",t._l(t.cartdata.line_items,function(e){return s("tr",[s("td",{staticClass:"name"},[t._v("\n "+t._s(e.name)+"\n "),e.attribute.length>0&&"variable"===e.type?s("div",{staticClass:"attribute"},[s("ul",t._l(e.attribute,function(e){return s("li",[s("span",{staticClass:"attr_name"},[t._v(t._s(e.name))]),t._v(": "),s("span",{staticClass:"attr_value"},[t._v(t._s(e.option))])])}))]):t._e()]),t._v(" "),s("td",{staticClass:"quantity"},[t._v(t._s(e.quantity))]),t._v(" "),s("td",{staticClass:"price"},[e.on_sale?[s("span",{staticClass:"sale-price"},[t._v(t._s(t.formatPrice(e.quantity*e.sale_price)))]),t._v(" "),s("span",{staticClass:"regular-price"},[t._v(t._s(t.formatPrice(e.quantity*e.regular_price)))])]:[s("span",{staticClass:"sale-price"},[t._v(t._s(t.formatPrice(e.quantity*e.regular_price)))])]],2)])}))])]),t._v(" "),s("div",{staticClass:"footer"},[s("ul",[s("li",{staticClass:"wepos-clearfix"},[s("span",{staticClass:"wepos-left"},[t._v("\n "+t._s(t.__("Subtotal","wepos"))+"\n "),"incl"==t.settings.woo_tax.wc_tax_display_cart?s("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(" "),s("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(e,a){return s("li",{staticClass:"wepos-clearfix"},["discount"==e.type?[s("span",{staticClass:"wepos-left"},[t._v(t._s(t.__("Discount","wepos"))+" "),s("span",{staticClass:"metadata"},[t._v(t._s(e.name)+" "+t._s("percent"==e.discount_type?e.value+"%":t.formatPrice(e.value)))])]),t._v(" "),s("span",{staticClass:"wepos-right"},[t._v("-"+t._s(t.formatPrice(Math.abs(e.total))))])]:[s("span",{staticClass:"wepos-left"},[t._v(t._s(t.__("Fee","wepos"))+" "),s("span",{staticClass:"metadata"},[t._v(t._s(e.name)+" "+t._s("percent"==e.fee_type?e.value+"%":t.formatPrice(e.value)))])]),t._v(" "),s("span",{staticClass:"wepos-right"},[t._v(t._s(t.formatPrice(e.total)))])]],2)}):t._e(),t._v(" "),t.$store.getters["Cart/getTotalTax"]?s("li",{staticClass:"wepos-clearfix"},[s("span",{staticClass:"wepos-left"},[t._v(t._s(t.__("Tax","wepos")))]),t._v(" "),s("span",{staticClass:"wepos-right"},[t._v(t._s(t.formatPrice(t.$store.getters["Cart/getTotalTax"])))])]):t._e(),t._v(" "),s("li",{staticClass:"wepos-clearfix"},[s("span",{staticClass:"wepos-left"},[t._v(t._s(t.__("Order Total","wepos")))]),t._v(" "),s("span",{staticClass:"wepos-right"},[t._v(t._s(t.formatPrice(t.$store.getters["Cart/getTotal"])))])]),t._v(" "),s("li",{staticClass:"wepos-clearfix"},[s("span",{staticClass:"wepos-left"},[t._v(t._s(t.__("Pay","wepos")))]),t._v(" "),s("span",{staticClass:"wepos-right"},[t._v(t._s(t.formatPrice(t.$store.getters["Cart/getTotal"])))])])],2)])]),t._v(" "),s("div",{staticClass:"right-content"},[s("div",{staticClass:"header wepos-clearfix"},[s("h2",{staticClass:"wepos-left"},[t._v(t._s(t.__("Pay","wepos")))]),t._v(" "),s("span",{staticClass:"pay-amount wepos-right"},[t._v(t._s(t.formatPrice(t.$store.getters["Cart/getTotal"])))])]),t._v(" "),s("div",{staticClass:"content"},[s("div",{staticClass:"payment-gateway"},[t.availableGateways.length>0?[t._l(t.availableGateways,function(e){return s("label",[s("input",{directives:[{name:"model",rawName:"v-model",value:t.selectedGateway,expression:"selectedGateway"}],attrs:{type:"radio",name:"gateway",checked:""},domProps:{value:e.id,checked:t._q(t.selectedGateway,e.id)},on:{change:function(s){t.selectedGateway=e.id}}}),t._v(" "),s("span",{staticClass:"gateway",class:"gateway-"+e.id},[t._v("\n "+t._s(e.title)+"\n ")])])}),t._v(" "),t.emptyGatewayDiv>0?t._l(t.emptyGatewayDiv,function(t){return s("label",{key:t},[s("span",{staticClass:"grid-placeholder"})])}):t._e()]:[s("p",[t._v(t._s(t.__("No gateway found","wepos")))])]],2),t._v(" "),"wepos_cash"==t.orderdata.payment_method?[s("div",{staticClass:"payment-option"},[s("div",{staticClass:"payment-amount"},[s("div",{staticClass:"input-part"},[s("div",{staticClass:"input-wrap"},[s("p",[t._v(t._s(t.__("Cash","wepos")))]),t._v(" "),s("div",{staticClass:"input-addon"},[s("span",{staticClass:"currency"},[t._v(t._s(t.wepos.currency_format_symbol))]),t._v(" "),s("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(" "),s("div",{staticClass:"change-money"},[s("p",[t._v(t._s(t.__("Change money","wepos"))+": "+t._s(t.formatPrice(t.changeAmount)))])])])])]:t._e(),t._v(" "),t._l(t.availableGatewayContent,function(e,a){return s(e,{key:a,tag:"component",attrs:{availablegateways:t.availableGateways}})})],2),t._v(" "),s("div",{staticClass:"footer wepos-clearfix"},[s("a",{staticClass:"back-btn wepos-left",attrs:{href:"#"},on:{click:function(e){e.preventDefault(),t.backToSale()}}},[t._v(t._s(t.__("Back to Sale","wepos")))]),t._v(" "),s("button",{staticClass:"process-checkout-btn wepos-right",attrs:{disabled:!t.$store.getters["Order/getCanProcessPayment"]},on:{click:function(e){e.preventDefault(),t.processPayment(e)}}},[t._v(t._s(t.__("Process Payment","wepos")))])])])])])],2):t._e(),t._v(" "),s("overlay",{attrs:{show:t.showOverlay}}),t._v(" "),t.showReceiptHtml?s("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(e,a){return s(e,{key:a,tag:"component",attrs:{orderdata:t.orderdata,printdata:t.printdata}})})],2)};a._withStripped=!0;var i={render:a,staticRenderFns:[function(){var t=this.$createElement,e=this._self._c||t;return e("td",{staticClass:"icon"},[e("span",{staticClass:"flaticon-right-arrow"})])}]};e.a=i}]),[144]); \ No newline at end of file diff --git a/assets/src/admin/main.js b/assets/src/admin/main.js index 5e8f5366..c6cad1fd 100644 --- a/assets/src/admin/main.js +++ b/assets/src/admin/main.js @@ -14,7 +14,11 @@ new Vue({ store, render: h => h(App), created() { - this.setLocaleData( wepos.i18n['wepos'] ) + this.setLocaleData( wepos.i18n['wepos'] ); + + if ( wepos.i18n['wepos-pro'] ) { + this.setLocaleData( wepos.i18n['wepos-pro'] ); + } } }); diff --git a/assets/src/frontend/main.js b/assets/src/frontend/main.js index 621ed630..80a90adf 100644 --- a/assets/src/frontend/main.js +++ b/assets/src/frontend/main.js @@ -14,6 +14,10 @@ new Vue({ store, render: h => h(App), created() { - this.setLocaleData( wepos.i18n['wepos'] ) + this.setLocaleData( wepos.i18n['wepos'] ); + + if ( wepos.i18n['wepos-pro'] ) { + this.setLocaleData( wepos.i18n['wepos-pro'] ); + } } }) diff --git a/languages/wepos.pot b/languages/wepos.pot index c1d2453d..fe94b200 100644 --- a/languages/wepos.pot +++ b/languages/wepos.pot @@ -2,9 +2,9 @@ # This file is distributed under the GPL2. msgid "" msgstr "" -"Project-Id-Version: wePOS - Point Of Sale (POS) for WooCommerce 1.2.3\n" +"Project-Id-Version: wePOS - Point Of Sale (POS) for WooCommerce 1.2.4\n" "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/wepos\n" -"POT-Creation-Date: 2022-06-03 09:58:21+00:00\n" +"POT-Creation-Date: 2022-06-28 05:27:26+00:00\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -13,13 +13,13 @@ msgstr "" "Language-Team: LANGUAGE \n" "X-Generator: wp-vue-i18n 1.1.3\n" -#: assets/js/admin.js:122 assets/js/admin.js:369 assets/js/admin.js:461 -#: assets/js/admin.js:1429 assets/js/bootstrap.js:1086 -#: assets/js/frontend.js:3205 assets/js/frontend.js:3387 -#: assets/js/frontend.js:3471 assets/js/frontend.js:3980 -#: assets/js/frontend.js:5016 assets/js/frontend.js:5183 -#: assets/js/frontend.js:5288 assets/js/frontend.js:5663 -#: assets/js/frontend.js:5774 assets/js/vendor.js:18166 +#: assets/js/admin.js:126 assets/js/admin.js:373 assets/js/admin.js:465 +#: assets/js/admin.js:1433 assets/js/bootstrap.js:1086 +#: assets/js/frontend.js:3209 assets/js/frontend.js:3391 +#: assets/js/frontend.js:3475 assets/js/frontend.js:3984 +#: assets/js/frontend.js:5020 assets/js/frontend.js:5187 +#: assets/js/frontend.js:5292 assets/js/frontend.js:5667 +#: assets/js/frontend.js:5778 assets/js/vendor.js:18166 #: assets/js/vendor.js:18266 assets/js/vendor.js:27716 #: assets/js/vendor.js:28292 assets/js/vendor.js:28402 #: assets/js/vendor.js:28522 assets/js/vendor.js:28544 @@ -27,12 +27,12 @@ msgstr "" msgid "div" msgstr "" -#: assets/js/admin.js:2293 assets/js/admin.min.js:1 +#: assets/js/admin.js:2297 assets/js/admin.min.js:1 #: assets/src/admin/components/Settings.vue:134 msgid "Choose your file" msgstr "" -#: assets/js/admin.js:2295 assets/js/admin.min.js:1 +#: assets/js/admin.js:2299 assets/js/admin.min.js:1 #: assets/src/admin/components/Fields.vue:171 #: assets/src/admin/components/Settings.vue:136 msgid "Select" @@ -142,15 +142,15 @@ msgstr "" msgid "Please enter an email address for customer" msgstr "" -#: assets/js/frontend.js:4950 +#: assets/js/frontend.js:4954 msgid "aside" msgstr "" -#: assets/js/frontend.js:5577 +#: assets/js/frontend.js:5581 msgid "tr" msgstr "" -#: assets/js/frontend.js:8455 +#: assets/js/frontend.js:8459 msgid "td" msgstr "" diff --git a/package-lock.json b/package-lock.json index 88ba4185..44f07b1b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "wepos", - "version": "1.2.3", + "version": "1.2.4", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 742cf66a..5482eae5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "wepos", - "version": "1.2.3", + "version": "1.2.4", "description": "Point of Sale plugin for WooCommerce", "author": "weDevs ", "license": "GPLv2", diff --git a/readme.txt b/readme.txt index a8a5a65d..fddfbe96 100644 --- a/readme.txt +++ b/readme.txt @@ -5,9 +5,9 @@ Tags: WooCommerce POS, point of sale, free pos, pos plugin, woocommerce point of Requires at least: 4.4 Tested up to: 6.0 WC requires at least: 3.0 -WC tested up to: 6.5.1 +WC tested up to: 6.6.1 Requires PHP: 5.6 -Stable tag: 1.2.3 +Stable tag: 1.2.4 License: GPLv2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html @@ -60,6 +60,9 @@ No FAQ == Changelog == += v1.2.4 -> 28th June, 2022 = +- **Fix:** Localization issue on changing site language + = v1.2.3 -> 3rd June, 2022 = - **Compatibility:** Compatibility for WordPress 6.0 diff --git a/wepos.php b/wepos.php index d5128a2e..0867e0fb 100644 --- a/wepos.php +++ b/wepos.php @@ -3,13 +3,13 @@ Plugin Name: wePOS - Point Of Sale (POS) for WooCommerce Plugin URI: https://wedevs.com/wepos Description: A beautiful and fast Point of Sale (POS) system for WooCommerce -Version: 1.2.3 +Version: 1.2.4 Author: weDevs Author URI: https://wedevs.com/ Text Domain: wepos Domain Path: /languages WC requires at least: 3.0 -WC tested up to: 6.5.1 +WC tested up to: 6.6.1 License: GPL2 License URI: https://www.gnu.org/licenses/gpl-2.0.html */ @@ -57,7 +57,7 @@ final class WePOS { * * @var string */ - public $version = '1.2.3'; + public $version = '1.2.4'; /** * Holds various class instances