@perevorot/shop 1.1.1 → 1.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (125) hide show
  1. package/dist/api.js +1 -1
  2. package/dist/api.js.map +1 -1
  3. package/dist/app.js +1 -1
  4. package/dist/app.js.map +1 -1
  5. package/dist/global.js +1 -1
  6. package/dist/global.js.map +1 -1
  7. package/dist/helpers.js +1 -1
  8. package/dist/helpers.js.map +1 -1
  9. package/dist/js/components/account/Account.js +1 -1
  10. package/dist/js/components/account/Account.js.map +1 -1
  11. package/dist/js/components/account/OrderItem.js +1 -1
  12. package/dist/js/components/account/OrderItem.js.map +1 -1
  13. package/dist/js/components/account/Orders.js +1 -1
  14. package/dist/js/components/account/Orders.js.map +1 -1
  15. package/dist/js/components/account/User.js +1 -1
  16. package/dist/js/components/account/User.js.map +1 -1
  17. package/dist/js/components/account/Wish.js +1 -1
  18. package/dist/js/components/account/Wish.js.map +1 -1
  19. package/dist/js/components/auth/Forget.js +1 -1
  20. package/dist/js/components/auth/Forget.js.map +1 -1
  21. package/dist/js/components/auth/Login.js +1 -1
  22. package/dist/js/components/auth/Login.js.map +1 -1
  23. package/dist/js/components/auth/Registration.js +1 -1
  24. package/dist/js/components/auth/Registration.js.map +1 -1
  25. package/dist/js/components/auth/Reset.js +1 -1
  26. package/dist/js/components/auth/Reset.js.map +1 -1
  27. package/dist/js/components/auth/User.js +1 -1
  28. package/dist/js/components/auth/User.js.map +1 -1
  29. package/dist/js/components/shop/Catalog.js +1 -1
  30. package/dist/js/components/shop/Catalog.js.map +1 -1
  31. package/dist/js/components/shop/CodeCopy.js +1 -1
  32. package/dist/js/components/shop/CodeCopy.js.map +1 -1
  33. package/dist/js/components/shop/Cross.js +1 -1
  34. package/dist/js/components/shop/Cross.js.map +1 -1
  35. package/dist/js/components/shop/FilterToggle.js +1 -1
  36. package/dist/js/components/shop/FilterToggle.js.map +1 -1
  37. package/dist/js/components/shop/Gallery.js +1 -1
  38. package/dist/js/components/shop/Gallery.js.map +1 -1
  39. package/dist/js/components/shop/Pagination.js +1 -1
  40. package/dist/js/components/shop/Pagination.js.map +1 -1
  41. package/dist/js/components/shop/PromoProducts.js +1 -1
  42. package/dist/js/components/shop/PromoProducts.js.map +1 -1
  43. package/dist/js/components/shop/Search.js +1 -1
  44. package/dist/js/components/shop/Search.js.map +1 -1
  45. package/dist/js/components/shop/bundle/Bundle.js +1 -1
  46. package/dist/js/components/shop/bundle/Bundle.js.map +1 -1
  47. package/dist/js/components/shop/bundle/BundleAdd.js +1 -1
  48. package/dist/js/components/shop/bundle/BundleAdd.js.map +1 -1
  49. package/dist/js/components/shop/cart/Cart.js +1 -1
  50. package/dist/js/components/shop/cart/Cart.js.map +1 -1
  51. package/dist/js/components/shop/cart/CartAdd.js +1 -1
  52. package/dist/js/components/shop/cart/CartAdd.js.map +1 -1
  53. package/dist/js/components/shop/cart/CartItem.js +1 -1
  54. package/dist/js/components/shop/cart/CartItem.js.map +1 -1
  55. package/dist/js/components/shop/cart/CartTrigger.js +1 -1
  56. package/dist/js/components/shop/cart/CartTrigger.js.map +1 -1
  57. package/dist/js/components/shop/cart/SuccessMessage.js +1 -1
  58. package/dist/js/components/shop/cart/SuccessMessage.js.map +1 -1
  59. package/dist/js/components/shop/compare/Compare.js +1 -1
  60. package/dist/js/components/shop/compare/Compare.js.map +1 -1
  61. package/dist/js/components/shop/compare/CompareAdd.js +1 -1
  62. package/dist/js/components/shop/compare/CompareAdd.js.map +1 -1
  63. package/dist/js/components/shop/compare/CompareDelete.js +1 -1
  64. package/dist/js/components/shop/compare/CompareDelete.js.map +1 -1
  65. package/dist/js/components/shop/compare/Comparsion.js +1 -1
  66. package/dist/js/components/shop/compare/Comparsion.js.map +1 -1
  67. package/dist/js/components/shop/compare/SuccessMessage.js +1 -1
  68. package/dist/js/components/shop/compare/SuccessMessage.js.map +1 -1
  69. package/dist/js/components/shop/filters/FilterSearch.js +1 -1
  70. package/dist/js/components/shop/filters/FilterSearch.js.map +1 -1
  71. package/dist/js/components/shop/filters/Price.js +1 -1
  72. package/dist/js/components/shop/filters/Price.js.map +1 -1
  73. package/dist/js/components/shop/order/Checkout.js +1 -1
  74. package/dist/js/components/shop/order/Checkout.js.map +1 -1
  75. package/dist/js/components/shop/order/CheckoutItem.js +1 -1
  76. package/dist/js/components/shop/order/CheckoutItem.js.map +1 -1
  77. package/dist/js/components/shop/order/OneClick.js +1 -1
  78. package/dist/js/components/shop/order/OneClick.js.map +1 -1
  79. package/dist/js/components/shop/order/shipping/CheckoutShippingCourier.js +1 -1
  80. package/dist/js/components/shop/order/shipping/CheckoutShippingCourier.js.map +1 -1
  81. package/dist/js/components/shop/order/shipping/CheckoutShippingNovaposhtaAddress.js +1 -1
  82. package/dist/js/components/shop/order/shipping/CheckoutShippingNovaposhtaAddress.js.map +1 -1
  83. package/dist/js/components/shop/order/shipping/CheckoutShippingNovaposhtaWarehouse.js +1 -1
  84. package/dist/js/components/shop/order/shipping/CheckoutShippingNovaposhtaWarehouse.js.map +1 -1
  85. package/dist/js/components/shop/order/shipping/CheckoutShippingPickup.js +1 -1
  86. package/dist/js/components/shop/order/shipping/CheckoutShippingPickup.js.map +1 -1
  87. package/dist/js/components/shop/reviews/Review.js +1 -1
  88. package/dist/js/components/shop/reviews/Review.js.map +1 -1
  89. package/dist/js/components/shop/viewed/Viewed.js +1 -1
  90. package/dist/js/components/shop/viewed/Viewed.js.map +1 -1
  91. package/dist/js/components/shop/viewed/ViewedDelete.js +1 -1
  92. package/dist/js/components/shop/viewed/ViewedDelete.js.map +1 -1
  93. package/dist/js/components/shop/viewed/Viewer.js +1 -1
  94. package/dist/js/components/shop/viewed/Viewer.js.map +1 -1
  95. package/dist/js/components/shop/wishlist/SuccessMessage.js +1 -1
  96. package/dist/js/components/shop/wishlist/SuccessMessage.js.map +1 -1
  97. package/dist/js/components/shop/wishlist/Wishlist.js +1 -1
  98. package/dist/js/components/shop/wishlist/Wishlist.js.map +1 -1
  99. package/dist/js/components/shop/wishlist/WishlistAdd.js +1 -1
  100. package/dist/js/components/shop/wishlist/WishlistAdd.js.map +1 -1
  101. package/dist/js/components/shop/wishlist/WishlistDelete.js +1 -1
  102. package/dist/js/components/shop/wishlist/WishlistDelete.js.map +1 -1
  103. package/dist/js/forms/FormCheckbox.js +1 -1
  104. package/dist/js/forms/FormCheckbox.js.map +1 -1
  105. package/dist/js/forms/FormCheckboxes.js +1 -1
  106. package/dist/js/forms/FormCheckboxes.js.map +1 -1
  107. package/dist/js/forms/FormPassword.js +1 -1
  108. package/dist/js/forms/FormPassword.js.map +1 -1
  109. package/dist/js/forms/FormRadio.js +1 -1
  110. package/dist/js/forms/FormRadio.js.map +1 -1
  111. package/dist/js/forms/FormRating.js +1 -1
  112. package/dist/js/forms/FormRating.js.map +1 -1
  113. package/dist/js/forms/FormSelect.js +1 -1
  114. package/dist/js/forms/FormSelect.js.map +1 -1
  115. package/dist/js/forms/FormSwitch.js +1 -1
  116. package/dist/js/forms/FormSwitch.js.map +1 -1
  117. package/dist/js/forms/FormText.js +1 -1
  118. package/dist/js/forms/FormText.js.map +1 -1
  119. package/dist/js/forms/FormTextarea.js +1 -1
  120. package/dist/js/forms/FormTextarea.js.map +1 -1
  121. package/dist/store.js +1 -1
  122. package/dist/store.js.map +1 -1
  123. package/dist/vuex.js +1 -1
  124. package/dist/vuex.js.map +1 -1
  125. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"Registration.js","sources":["../../../../src/js/components/auth/Registration.vue","../../../../src/js/components/auth/Registration.vue?vue&type=template&id=47b68e84&lang.js"],"sourcesContent":["<template>\n <div class=\"auth-registration\" v-if=\"!loadingForm\">\n <div class=\"title\">{{ __('auth.registration.title') }}</div>\n <div v-show=\"!thanks\">\n <SchemaForm schemaRowClasses=\"field\" :schema=\"schema\" :validation-schema=\"validation\" :initial-errors=\"errors\" :key=\"key\" @submit=\"onSubmit\">\n <template #afterForm>\n <div class=\"field\">\n <button class=\"button is-link\" type=\"submit\" v-bind:class=\"{ 'is-loading': loading }\">\n {{ __('auth.registration.form.submit' + (type == 'short' ? '_short' : '')) }}\n </button>\n </div>\n <div class=\"socials\">\n <div class=\"description has-text-centered\">\n {{ __('auth.login.socials') }}\n </div>\n <div class=\"buttons\">\n <a class=\"button\" @click=\"facebook\">\n <svg class=\"icon fb-btn\">\n <use xlink:href=\"#logo-facebook-icon\" />\n </svg>\n <span>Facebook</span>\n </a>\n <a class=\"button\" @click=\"google\"><svg class=\"icon google-btn\">\n <use xlink:href=\"#logo-google-icon\" />\n </svg>\n <span>Google</span>\n </a>\n </div>\n </div>\n <div class=\"href-already-register\">\n <a @click=\"login\">{{ __('auth.registration.already') }}</a>\n </div>\n </template>\n </SchemaForm>\n </div>\n <div v-show=\"thanks\">\n <div>\n {{\n __('auth.registration.thanks' + (type == 'short' ? '_short' : ''), {\n email: model.email\n })\n }}\n </div>\n <div class=\"mt-3\">\n <button class=\"button\" @click=\"close\">\n {{ __('auth.registration.continue') }}\n </button>\n </div>\n </div>\n </div>\n</template>\n<script>\nimport { ref } from 'vue';\nimport { useStore } from 'vuex';\nimport { SchemaFormFactory, useSchemaForm } from 'formvuelate';\nimport VeeValidatePlugin from '@formvuelate/plugin-vee-validate';\nimport { auth as api } from '@perevorot/shop/dist/api';\nimport { formParse } from '@perevorot/shop/dist/helpers';\nimport SecureLS from 'secure-ls';\n\nconst SchemaForm = SchemaFormFactory([VeeValidatePlugin({})]);\n\nexport default {\n name: 'registration',\n components: {\n SchemaForm\n },\n setup() {\n const store = useStore();\n const loading = ref(false);\n const loadingForm = ref(true);\n const key = ref(0);\n const errors = ref({});\n const thanks = ref(false);\n const type = ref('');\n const schema = ref({});\n const validation = ref({});\n const model = ref({});\n\n let emptyModel;\n\n useSchemaForm(model);\n\n const onSubmit = () => {\n loading.value = true;\n\n store.dispatch('auth/register', {\n type: type.value.charAt(0).toUpperCase() + type.value.slice(1),\n credentials: model.value,\n finally: () => {\n loading.value = false;\n },\n callback: () => {\n thanks.value = true;\n\n model.value = emptyModel;\n\n key.value++;\n\n let ls = new SecureLS({\n isCompression: false\n });\n\n let forms = ls.get('forms');\n\n if (forms.registration) {\n forms.registration = {};\n }\n\n ls.set('forms', forms);\n },\n catch: (error) => {\n if (error.response.data && error.response.data.errors) {\n for (const [field, messages] of Object.entries(error.response.data.errors)) {\n if (messages[0]) {\n errors.value[field] = messages[0];\n }\n }\n\n key.value++;\n }\n }\n });\n };\n\n const close = () => {\n store.commit('auth/modal', null);\n store.dispatch('auth/me');\n };\n\n const facebook = () => {\n window.location.href = $ziggy('auth.login.social', {\n provider: 'facebook'\n });\n };\n\n const google = () => {\n window.location.href = $ziggy('auth.login.social', {\n provider: 'google'\n });\n };\n\n const login = () => {\n store.commit('auth/modal', 'login');\n };\n\n api.registerForm()\n .then((response) => {\n const form = formParse(response.data);\n\n emptyModel = form.model;\n\n schema.value = form.schema;\n model.value = form.model;\n validation.value = form.validation;\n\n type.value = response.data.type;\n })\n .finally(() => {\n loadingForm.value = false;\n });\n\n return {\n loading,\n loadingForm,\n key,\n errors,\n schema,\n validation,\n onSubmit,\n facebook,\n google,\n thanks,\n model,\n close,\n type,\n login\n };\n }\n};\n</script>","<template>\n <div class=\"auth-registration\" v-if=\"!loadingForm\">\n <div class=\"title\">{{ __('auth.registration.title') }}</div>\n <div v-show=\"!thanks\">\n <SchemaForm schemaRowClasses=\"field\" :schema=\"schema\" :validation-schema=\"validation\" :initial-errors=\"errors\" :key=\"key\" @submit=\"onSubmit\">\n <template #afterForm>\n <div class=\"field\">\n <button class=\"button is-link\" type=\"submit\" v-bind:class=\"{ 'is-loading': loading }\">\n {{ __('auth.registration.form.submit' + (type == 'short' ? '_short' : '')) }}\n </button>\n </div>\n <div class=\"socials\">\n <div class=\"description has-text-centered\">\n {{ __('auth.login.socials') }}\n </div>\n <div class=\"buttons\">\n <a class=\"button\" @click=\"facebook\">\n <svg class=\"icon fb-btn\">\n <use xlink:href=\"#logo-facebook-icon\" />\n </svg>\n <span>Facebook</span>\n </a>\n <a class=\"button\" @click=\"google\"><svg class=\"icon google-btn\">\n <use xlink:href=\"#logo-google-icon\" />\n </svg>\n <span>Google</span>\n </a>\n </div>\n </div>\n <div class=\"href-already-register\">\n <a @click=\"login\">{{ __('auth.registration.already') }}</a>\n </div>\n </template>\n </SchemaForm>\n </div>\n <div v-show=\"thanks\">\n <div>\n {{\n __('auth.registration.thanks' + (type == 'short' ? '_short' : ''), {\n email: model.email\n })\n }}\n </div>\n <div class=\"mt-3\">\n <button class=\"button\" @click=\"close\">\n {{ __('auth.registration.continue') }}\n </button>\n </div>\n </div>\n </div>\n</template>\n<script>\nimport { ref } from 'vue';\nimport { useStore } from 'vuex';\nimport { SchemaFormFactory, useSchemaForm } from 'formvuelate';\nimport VeeValidatePlugin from '@formvuelate/plugin-vee-validate';\nimport { auth as api } from '@perevorot/shop/dist/api';\nimport { formParse } from '@perevorot/shop/dist/helpers';\nimport SecureLS from 'secure-ls';\n\nconst SchemaForm = SchemaFormFactory([VeeValidatePlugin({})]);\n\nexport default {\n name: 'registration',\n components: {\n SchemaForm\n },\n setup() {\n const store = useStore();\n const loading = ref(false);\n const loadingForm = ref(true);\n const key = ref(0);\n const errors = ref({});\n const thanks = ref(false);\n const type = ref('');\n const schema = ref({});\n const validation = ref({});\n const model = ref({});\n\n let emptyModel;\n\n useSchemaForm(model);\n\n const onSubmit = () => {\n loading.value = true;\n\n store.dispatch('auth/register', {\n type: type.value.charAt(0).toUpperCase() + type.value.slice(1),\n credentials: model.value,\n finally: () => {\n loading.value = false;\n },\n callback: () => {\n thanks.value = true;\n\n model.value = emptyModel;\n\n key.value++;\n\n let ls = new SecureLS({\n isCompression: false\n });\n\n let forms = ls.get('forms');\n\n if (forms.registration) {\n forms.registration = {};\n }\n\n ls.set('forms', forms);\n },\n catch: (error) => {\n if (error.response.data && error.response.data.errors) {\n for (const [field, messages] of Object.entries(error.response.data.errors)) {\n if (messages[0]) {\n errors.value[field] = messages[0];\n }\n }\n\n key.value++;\n }\n }\n });\n };\n\n const close = () => {\n store.commit('auth/modal', null);\n store.dispatch('auth/me');\n };\n\n const facebook = () => {\n window.location.href = $ziggy('auth.login.social', {\n provider: 'facebook'\n });\n };\n\n const google = () => {\n window.location.href = $ziggy('auth.login.social', {\n provider: 'google'\n });\n };\n\n const login = () => {\n store.commit('auth/modal', 'login');\n };\n\n api.registerForm()\n .then((response) => {\n const form = formParse(response.data);\n\n emptyModel = form.model;\n\n schema.value = form.schema;\n model.value = form.model;\n validation.value = form.validation;\n\n type.value = response.data.type;\n })\n .finally(() => {\n loadingForm.value = false;\n });\n\n return {\n loading,\n loadingForm,\n key,\n errors,\n schema,\n validation,\n onSubmit,\n facebook,\n google,\n thanks,\n model,\n close,\n type,\n login\n };\n }\n};\n</script>"],"names":["name","components","SchemaForm","SchemaFormFactory","VeeValidatePlugin","setup","emptyModel","store","useStore","loading","ref","loadingForm","key","errors","thanks","type","schema","validation","model","useSchemaForm","api","registerForm","then","response","form","formParse","data","value","finally","onSubmit","dispatch","charAt","toUpperCase","slice","credentials","callback","ls","SecureLS","isCompression","forms","get","registration","set","catch","error","field","messages","Object","entries","facebook","window","location","href","$ziggy","provider","google","close","commit","login","class","_createElementVNode","$setup","_createElementBlock","_hoisted_1","_hoisted_2","_ctx","_createVNode","schemaRowClasses","afterForm","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","onClick","_hoisted_13","_hoisted_14"],"mappings":"8TA8De,CACXA,KAAM,eACNC,WAAY,CACRC,WALWC,oBAAkB,CAACC,UAAkB,OAOpDC,YAYQC,EAXEC,EAAQC,aACRC,EAAUC,OAAI,GACdC,EAAcD,OAAI,GAClBE,EAAMF,MAAI,GACVG,EAASH,MAAI,IACbI,EAASJ,OAAI,GACbK,EAAOL,MAAI,IACXM,EAASN,MAAI,IACbO,EAAaP,MAAI,IACjBQ,EAAQR,MAAI,IAIlBS,gBAAcD,UAiEdE,OAAIC,eACCC,KAAMC,QACGC,EAAOC,YAAUF,EAASG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,MAAM,cACFA,MAAM,oCAGNA,MAAM,cAEHC,4BAAKD,MAAM,gBACPC,yCAAgB,6BAEpBA,iCAAM,mBAEwBA,4BAAKD,MAAM,oBACrCC,yCAAgB,2BAEpBA,iCAAM,iBAIbD,MAAM,4BAcdA,MAAM,qFA1CmBE,6DAAtCC,2BAAAC,GACIH,2BAAAI,oBAAsBC,qDACtBL,iCACIM,iBAAYC,iBAAiB,QAASnD,OAAQ6C,6BAA4BA,8BAA6BA,SAASjD,IAAKiD,MAAMhC,SAAQgC,aACpHO,oBACP,KAAAR,2BAAAS,GACIT,+BAAQD,wBAAM,+BAA6DE,aAA5C9C,KAAK,4BAC7BkD,+CAAsCJ,2BAGjDD,2BAAAU,GACIV,2BAAAW,oBACON,+BAEPL,2BAAAY,GACIZ,0BAAGD,MAAM,SAAUc,sCAAOZ,2CAM1BD,0BAAGD,MAAM,SAAUc,sCAAOZ,2CAOlCD,2BAAAc,GACId,0BAAIa,sCAAOZ,oDAAUI,8HA3BvBJ,6BAgCdD,iCACIA,kDAEQK,0CAAiCJ,+CAKzCD,2BAAAe,GACIf,+BAAQD,MAAM,SAAUc,sCAAOZ,oDACxBI,yDAVFJ"}
1
+ {"version":3,"file":"Registration.js","sources":["../../../../src/js/components/auth/Registration.vue","../../../../src/js/components/auth/Registration.vue?vue&type=template&id=47b68e84&lang.js"],"sourcesContent":["<template>\n <div class=\"auth-registration\" v-if=\"!loadingForm\">\n <div class=\"title\">{{ __('auth.registration.title') }}</div>\n <div v-show=\"!thanks\">\n <SchemaForm schemaRowClasses=\"field\" :schema=\"schema\" :validation-schema=\"validation\" :initial-errors=\"errors\" :key=\"key\" @submit=\"onSubmit\">\n <template #afterForm>\n <div class=\"field\">\n <button class=\"button is-link\" type=\"submit\" v-bind:class=\"{ 'is-loading': loading }\">\n {{ __('auth.registration.form.submit' + (type == 'short' ? '_short' : '')) }}\n </button>\n </div>\n <div class=\"socials\">\n <div class=\"description has-text-centered\">\n {{ __('auth.login.socials') }}\n </div>\n <div class=\"buttons\">\n <a class=\"button\" @click=\"facebook\">\n <svg class=\"icon fb-btn\">\n <use xlink:href=\"#logo-facebook-icon\" />\n </svg>\n <span>Facebook</span>\n </a>\n <a class=\"button\" @click=\"google\"><svg class=\"icon google-btn\">\n <use xlink:href=\"#logo-google-icon\" />\n </svg>\n <span>Google</span>\n </a>\n </div>\n </div>\n <div class=\"href-already-register\">\n <a @click=\"login\">{{ __('auth.registration.already') }}</a>\n </div>\n </template>\n </SchemaForm>\n </div>\n <div v-show=\"thanks\">\n <div>\n {{\n __('auth.registration.thanks' + (type == 'short' ? '_short' : ''), {\n email: model.email\n })\n }}\n </div>\n <div class=\"mt-3\">\n <button class=\"button\" @click=\"close\">\n {{ __('auth.registration.continue') }}\n </button>\n </div>\n </div>\n </div>\n</template>\n<script>\nimport { ref } from 'vue';\nimport { useStore } from 'vuex';\nimport { SchemaFormFactory, useSchemaForm } from 'formvuelate';\nimport VeeValidatePlugin from '@formvuelate/plugin-vee-validate';\nimport { auth as api } from '@perevorot/shop/dist/api';\nimport { formParse } from '@perevorot/shop/dist/helpers';\nimport SecureLS from 'secure-ls';\n\nconst SchemaForm = SchemaFormFactory([VeeValidatePlugin({})]);\n\nexport default {\n name: 'registration',\n components: {\n SchemaForm\n },\n setup() {\n const store = useStore();\n const loading = ref(false);\n const loadingForm = ref(true);\n const key = ref(0);\n const errors = ref({});\n const thanks = ref(false);\n const type = ref('');\n const schema = ref({});\n const validation = ref({});\n const model = ref({});\n\n let emptyModel;\n\n useSchemaForm(model);\n\n const onSubmit = () => {\n loading.value = true;\n\n store.dispatch('auth/register', {\n type: type.value.charAt(0).toUpperCase() + type.value.slice(1),\n credentials: model.value,\n finally: () => {\n loading.value = false;\n },\n callback: () => {\n thanks.value = true;\n\n model.value = emptyModel;\n\n key.value++;\n\n let ls = new SecureLS({\n isCompression: false\n });\n\n let forms = ls.get('forms');\n\n if (forms.registration) {\n forms.registration = {};\n }\n\n ls.set('forms', forms);\n },\n catch: (error) => {\n if (error.response.data && error.response.data.errors) {\n for (const [field, messages] of Object.entries(error.response.data.errors)) {\n if (messages[0]) {\n errors.value[field] = messages[0];\n }\n }\n\n key.value++;\n }\n }\n });\n };\n\n const close = () => {\n store.commit('auth/modal', null);\n store.dispatch('auth/me');\n };\n\n const facebook = () => {\n window.location.href = $ziggy('auth.login.social', {\n provider: 'facebook'\n });\n };\n\n const google = () => {\n window.location.href = $ziggy('auth.login.social', {\n provider: 'google'\n });\n };\n\n const login = () => {\n store.commit('auth/modal', 'login');\n };\n\n api.registerForm()\n .then((response) => {\n const form = formParse(response.data);\n\n emptyModel = form.model;\n\n schema.value = form.schema;\n model.value = form.model;\n validation.value = form.validation;\n\n type.value = response.data.type;\n })\n .finally(() => {\n loadingForm.value = false;\n });\n\n return {\n loading,\n loadingForm,\n key,\n errors,\n schema,\n validation,\n onSubmit,\n facebook,\n google,\n thanks,\n model,\n close,\n type,\n login\n };\n }\n};\n</script>","<template>\n <div class=\"auth-registration\" v-if=\"!loadingForm\">\n <div class=\"title\">{{ __('auth.registration.title') }}</div>\n <div v-show=\"!thanks\">\n <SchemaForm schemaRowClasses=\"field\" :schema=\"schema\" :validation-schema=\"validation\" :initial-errors=\"errors\" :key=\"key\" @submit=\"onSubmit\">\n <template #afterForm>\n <div class=\"field\">\n <button class=\"button is-link\" type=\"submit\" v-bind:class=\"{ 'is-loading': loading }\">\n {{ __('auth.registration.form.submit' + (type == 'short' ? '_short' : '')) }}\n </button>\n </div>\n <div class=\"socials\">\n <div class=\"description has-text-centered\">\n {{ __('auth.login.socials') }}\n </div>\n <div class=\"buttons\">\n <a class=\"button\" @click=\"facebook\">\n <svg class=\"icon fb-btn\">\n <use xlink:href=\"#logo-facebook-icon\" />\n </svg>\n <span>Facebook</span>\n </a>\n <a class=\"button\" @click=\"google\"><svg class=\"icon google-btn\">\n <use xlink:href=\"#logo-google-icon\" />\n </svg>\n <span>Google</span>\n </a>\n </div>\n </div>\n <div class=\"href-already-register\">\n <a @click=\"login\">{{ __('auth.registration.already') }}</a>\n </div>\n </template>\n </SchemaForm>\n </div>\n <div v-show=\"thanks\">\n <div>\n {{\n __('auth.registration.thanks' + (type == 'short' ? '_short' : ''), {\n email: model.email\n })\n }}\n </div>\n <div class=\"mt-3\">\n <button class=\"button\" @click=\"close\">\n {{ __('auth.registration.continue') }}\n </button>\n </div>\n </div>\n </div>\n</template>\n<script>\nimport { ref } from 'vue';\nimport { useStore } from 'vuex';\nimport { SchemaFormFactory, useSchemaForm } from 'formvuelate';\nimport VeeValidatePlugin from '@formvuelate/plugin-vee-validate';\nimport { auth as api } from '@perevorot/shop/dist/api';\nimport { formParse } from '@perevorot/shop/dist/helpers';\nimport SecureLS from 'secure-ls';\n\nconst SchemaForm = SchemaFormFactory([VeeValidatePlugin({})]);\n\nexport default {\n name: 'registration',\n components: {\n SchemaForm\n },\n setup() {\n const store = useStore();\n const loading = ref(false);\n const loadingForm = ref(true);\n const key = ref(0);\n const errors = ref({});\n const thanks = ref(false);\n const type = ref('');\n const schema = ref({});\n const validation = ref({});\n const model = ref({});\n\n let emptyModel;\n\n useSchemaForm(model);\n\n const onSubmit = () => {\n loading.value = true;\n\n store.dispatch('auth/register', {\n type: type.value.charAt(0).toUpperCase() + type.value.slice(1),\n credentials: model.value,\n finally: () => {\n loading.value = false;\n },\n callback: () => {\n thanks.value = true;\n\n model.value = emptyModel;\n\n key.value++;\n\n let ls = new SecureLS({\n isCompression: false\n });\n\n let forms = ls.get('forms');\n\n if (forms.registration) {\n forms.registration = {};\n }\n\n ls.set('forms', forms);\n },\n catch: (error) => {\n if (error.response.data && error.response.data.errors) {\n for (const [field, messages] of Object.entries(error.response.data.errors)) {\n if (messages[0]) {\n errors.value[field] = messages[0];\n }\n }\n\n key.value++;\n }\n }\n });\n };\n\n const close = () => {\n store.commit('auth/modal', null);\n store.dispatch('auth/me');\n };\n\n const facebook = () => {\n window.location.href = $ziggy('auth.login.social', {\n provider: 'facebook'\n });\n };\n\n const google = () => {\n window.location.href = $ziggy('auth.login.social', {\n provider: 'google'\n });\n };\n\n const login = () => {\n store.commit('auth/modal', 'login');\n };\n\n api.registerForm()\n .then((response) => {\n const form = formParse(response.data);\n\n emptyModel = form.model;\n\n schema.value = form.schema;\n model.value = form.model;\n validation.value = form.validation;\n\n type.value = response.data.type;\n })\n .finally(() => {\n loadingForm.value = false;\n });\n\n return {\n loading,\n loadingForm,\n key,\n errors,\n schema,\n validation,\n onSubmit,\n facebook,\n google,\n thanks,\n model,\n close,\n type,\n login\n };\n }\n};\n</script>"],"names":["name","components","SchemaForm","SchemaFormFactory","VeeValidatePlugin","setup","emptyModel","store","useStore","loading","ref","loadingForm","key","errors","thanks","type","schema","validation","model","useSchemaForm","api","registerForm","then","response","form","formParse","data","value","finally","onSubmit","dispatch","charAt","toUpperCase","slice","credentials","callback","ls","SecureLS","isCompression","forms","get","registration","set","catch","error","Object","entries","field","messages","facebook","window","location","href","$ziggy","provider","google","close","commit","login","class","_createElementVNode","$setup","_createElementBlock","_hoisted_1","_hoisted_2","_ctx","_createVNode","schemaRowClasses","afterForm","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","onClick","_hoisted_13","_hoisted_14"],"mappings":"4wCA4DA,MAEe,CACXA,KAAM,eACNC,WAAY,CACRC,WALWC,oBAAkB,CAACC,UAAkB,OAOpDC,qBAYQC,EAXEC,EAAQC,aACRC,EAAUC,OAAI,GACdC,EAAcD,OAAI,GAClBE,EAAMF,MAAI,GACVG,EAASH,MAAI,IACbI,EAASJ,OAAI,GACbK,EAAOL,MAAI,IACXM,EAASN,MAAI,IACbO,EAAaP,MAAI,IACjBQ,EAAQR,MAAI,IAIlBS,gBAAcD,UAiEdE,OAAIC,eACCC,MAAK,SAACC,OACGC,EAAOC,YAAUF,EAASG,MAEhCpB,EAAakB,EAAKN,MAElBF,EAAOW,MAAQH,EAAKR,OACpBE,EAAMS,MAAQH,EAAKN,MACnBD,EAAWU,MAAQH,EAAKP,WAExBF,EAAKY,MAAQJ,EAASG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BA,iCAAM,iBAIbD,MAAM,4BAcdA,MAAM,qFA1CmBE,6DAAtCC,2BAAAC,GACIH,2BAAAI,oBAAsBC,qDACtBL,iCACIM,iBAAYC,iBAAiB,QAASnD,OAAQ6C,6BAA4BA,8BAA6BA,SAASjD,IAAKiD,MAAMhC,SAAQgC,aACpHO,qBACP,kBAAAR,2BAAAS,GACIT,+BAAQD,wBAAM,+BAA6DE,aAA5C9C,KAAK,4BAC7BkD,+CAAsCJ,2BAGjDD,2BAAAU,GACIV,2BAAAW,oBACON,+BAEPL,2BAAAY,GACIZ,0BAAGD,MAAM,SAAUc,sCAAOZ,gDAM1BD,0BAAGD,MAAM,SAAUc,sCAAOZ,gDAOlCD,2BAAAc,GACId,0BAAIa,sCAAOZ,yDAAUI,gIA3BvBJ,6BAgCdD,iCACIA,kDAEQK,0CAAiCJ,+CAKzCD,2BAAAe,GACIf,+BAAQD,MAAM,SAAUc,sCAAOZ,yDACxBI,yDAVFJ"}
@@ -1,2 +1,2 @@
1
- "use strict";var e=require("vue"),t=require("vuex"),a=require("formvuelate"),r=require("@formvuelate/plugin-vee-validate"),o=require("@perevorot/shop/dist/js/forms/FormText"),n=require("@perevorot/shop/dist/js/forms/FormPassword"),l=require("yup");function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function s(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(a){if("default"!==a){var r=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(t,a,r.get?r:{enumerable:!0,get:function(){return e[a]}})}})),t.default=e,Object.freeze(t)}var c=i(r),u=i(o),m=i(n),d=s(l);e.markRaw(m.default),e.markRaw(u.default);var p={name:"reset",components:{SchemaForm:a.SchemaFormFactory([c.default({})])},setup(){var r=e.ref(!1),o=t.useStore(),n=e.ref(0),l=e.ref(""),i=e.ref(!1),s=e.getCurrentInstance(),c=e.ref({password:{component:m.default,label:__("auth.login.form.password"),type:"password"},password_confirmation:{component:u.default,label:__("auth.login.form.password_confirmation"),type:"password"}}),p=d.object().shape({password:d.string().min(6,__("auth.validation.min")).required(__("auth.validation.required")),password_confirmation:d.string().oneOf([d.ref("password"),null],__("auth.validation.password_confirmation"))}),f=e.ref({password:"",password_confirmation:"",token:s.parent.props.resetToken,email:s.parent.props.resetEmail});a.useSchemaForm(f);return{loading:r,key:n,schema:c,validation:p,onSubmit:()=>{r.value=!0,o.dispatch("auth/passwordUpdate",{credentials:f.value,callback:(e,t)=>{l.value=e},finally:()=>{f.value={},r.value=!1,i.value=!0,n.value++}})},reseted:i,message:l,cancel:()=>{o.commit("auth/modal","login")},again:()=>{o.commit("auth/modal","forget")},close:()=>{o.commit("auth/modal",null),o.dispatch("auth/me")}}}},f={class:"form auth-reset"},v={class:"title"},h={key:0},_={class:"mb-3"},g={class:"field"},b={class:"columns is-vcentered"},k={class:"column"},w={class:"mt-3"},y={key:1},E={class:"mt-3"},S={class:"mt-3"};p.render=function(t,a,r,o,n,l){var i=e.resolveComponent("SchemaForm");return e.openBlock(),e.createElementBlock("div",f,[e.createElementVNode("div",v,e.toDisplayString(t.__("auth.reset.title")),1),e.withDirectives(e.createElementVNode("div",null,[t.$parent.tokenValid?(e.openBlock(),e.createElementBlock("div",h,[e.createElementVNode("div",_,e.toDisplayString(t.__("auth.reset.info",{email:t.$parent.resetEmail})),1),e.createVNode(i,{schemaRowClasses:"field",schema:o.schema,"validation-schema":o.validation,key:o.key,onSubmit:o.onSubmit},{afterForm:e.withCtx(()=>[e.createElementVNode("div",g,[e.createElementVNode("div",b,[e.createElementVNode("div",k,[e.createElementVNode("button",{class:e.normalizeClass(["button is-link",{"is-loading":o.loading}]),type:"submit"},e.toDisplayString(t.__("auth.reset.form.submit")),3)])])])]),_:1},8,["schema","validation-schema","onSubmit"]),e.createElementVNode("div",w,[e.createElementVNode("button",{class:"button",onClick:a[0]||(a[0]=function(){return o.cancel&&o.cancel(...arguments)})},e.toDisplayString(t.__("auth.reset.cancel")),1)])])):(e.openBlock(),e.createElementBlock("div",y,[e.createElementVNode("p",null,e.toDisplayString(t.__("auth.reset.token-not-valid")),1),e.createElementVNode("div",E,[e.createElementVNode("button",{class:"button",onClick:a[1]||(a[1]=function(){return o.again&&o.again(...arguments)})},e.toDisplayString(t.__("auth.reset.again")),1)])]))],512),[[e.vShow,!o.reseted]]),e.withDirectives(e.createElementVNode("div",null,[e.createElementVNode("div",null,e.toDisplayString(o.message),1),e.createElementVNode("div",S,[e.createElementVNode("button",{class:"button",onClick:a[2]||(a[2]=function(){return o.close&&o.close(...arguments)})},e.toDisplayString(t.__("auth.reset.close")),1)])],512),[[e.vShow,o.reseted]])])},module.exports=p;
1
+ "use strict";var e=require("vue"),t=require("vuex"),a=require("formvuelate"),o=require("@formvuelate/plugin-vee-validate"),r=require("@perevorot/shop/dist/js/forms/FormText"),n=require("@perevorot/shop/dist/js/forms/FormPassword"),i=require("yup");function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function s(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(a){if("default"!==a){var o=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(t,a,o.get?o:{enumerable:!0,get:function(){return e[a]}})}})),t.default=e,Object.freeze(t)}var c=l(o),u=l(r),m=l(n),d=s(i);e.markRaw(m.default),e.markRaw(u.default);var p={name:"reset",components:{SchemaForm:a.SchemaFormFactory([c.default({})])},setup:function(){var o=e.ref(!1),r=t.useStore(),n=e.ref(0),i=e.ref(""),l=e.ref(!1),s=e.getCurrentInstance(),c=e.ref({password:{component:m.default,label:__("auth.login.form.password"),type:"password"},password_confirmation:{component:u.default,label:__("auth.login.form.password_confirmation"),type:"password"}}),p=d.object().shape({password:d.string().min(6,__("auth.validation.min")).required(__("auth.validation.required")),password_confirmation:d.string().oneOf([d.ref("password"),null],__("auth.validation.password_confirmation"))}),f=e.ref({password:"",password_confirmation:"",token:s.parent.props.resetToken,email:s.parent.props.resetEmail});a.useSchemaForm(f);return{loading:o,key:n,schema:c,validation:p,onSubmit:function(){o.value=!0,r.dispatch("auth/passwordUpdate",{credentials:f.value,callback:function(e,t){i.value=e},finally:function(){f.value={},o.value=!1,l.value=!0,n.value++}})},reseted:l,message:i,cancel:function(){r.commit("auth/modal","login")},again:function(){r.commit("auth/modal","forget")},close:function(){r.commit("auth/modal",null),r.dispatch("auth/me")}}}},f={class:"form auth-reset"},v={class:"title"},h={key:0},_={class:"mb-3"},g={class:"field"},b={class:"columns is-vcentered"},y={class:"column"},k={class:"mt-3"},w={key:1},E={class:"mt-3"},S={class:"mt-3"};p.render=function(t,a,o,r,n,i){var l=e.resolveComponent("SchemaForm");return e.openBlock(),e.createElementBlock("div",f,[e.createElementVNode("div",v,e.toDisplayString(t.__("auth.reset.title")),1),e.withDirectives(e.createElementVNode("div",null,[t.$parent.tokenValid?(e.openBlock(),e.createElementBlock("div",h,[e.createElementVNode("div",_,e.toDisplayString(t.__("auth.reset.info",{email:t.$parent.resetEmail})),1),e.createVNode(l,{schemaRowClasses:"field",schema:r.schema,"validation-schema":r.validation,key:r.key,onSubmit:r.onSubmit},{afterForm:e.withCtx((function(){return[e.createElementVNode("div",g,[e.createElementVNode("div",b,[e.createElementVNode("div",y,[e.createElementVNode("button",{class:e.normalizeClass(["button is-link",{"is-loading":r.loading}]),type:"submit"},e.toDisplayString(t.__("auth.reset.form.submit")),3)])])])]})),_:1},8,["schema","validation-schema","onSubmit"]),e.createElementVNode("div",k,[e.createElementVNode("button",{class:"button",onClick:a[0]||(a[0]=function(){return r.cancel&&r.cancel.apply(r,arguments)})},e.toDisplayString(t.__("auth.reset.cancel")),1)])])):(e.openBlock(),e.createElementBlock("div",w,[e.createElementVNode("p",null,e.toDisplayString(t.__("auth.reset.token-not-valid")),1),e.createElementVNode("div",E,[e.createElementVNode("button",{class:"button",onClick:a[1]||(a[1]=function(){return r.again&&r.again.apply(r,arguments)})},e.toDisplayString(t.__("auth.reset.again")),1)])]))],512),[[e.vShow,!r.reseted]]),e.withDirectives(e.createElementVNode("div",null,[e.createElementVNode("div",null,e.toDisplayString(r.message),1),e.createElementVNode("div",S,[e.createElementVNode("button",{class:"button",onClick:a[2]||(a[2]=function(){return r.close&&r.close.apply(r,arguments)})},e.toDisplayString(t.__("auth.reset.close")),1)])],512),[[e.vShow,r.reseted]])])},module.exports=p;
2
2
  //# sourceMappingURL=Reset.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Reset.js","sources":["../../../../src/js/components/auth/Reset.vue","../../../../src/js/components/auth/Reset.vue?vue&type=template&id=293c875c&lang.js"],"sourcesContent":["<template>\n <div class=\"form auth-reset\">\n <div class=\"title\">{{ __('auth.reset.title') }}</div>\n <div v-show=\"!reseted\">\n <div v-if=\"$parent.tokenValid\">\n <div class=\"mb-3\">\n {{\n __('auth.reset.info', {\n email: $parent.resetEmail\n })\n }}\n </div>\n <SchemaForm schemaRowClasses=\"field\" :schema=\"schema\" :validation-schema=\"validation\" :key=\"key\" @submit=\"onSubmit\">\n <template #afterForm>\n <div class=\"field\">\n <div class=\"columns is-vcentered\">\n <div class=\"column\">\n <button class=\"button is-link\" type=\"submit\" v-bind:class=\"{ 'is-loading': loading }\">\n {{ __('auth.reset.form.submit') }}\n </button>\n </div>\n </div>\n </div>\n </template>\n </SchemaForm>\n <div class=\"mt-3\">\n <button class=\"button\" @click=\"cancel\">\n {{ __('auth.reset.cancel') }}\n </button>\n </div>\n </div>\n <div v-else>\n <p>{{ __('auth.reset.token-not-valid') }}</p>\n <div class=\"mt-3\">\n <button class=\"button\" @click=\"again\">\n {{ __('auth.reset.again') }}\n </button>\n </div>\n </div>\n </div>\n <div v-show=\"reseted\">\n <div>{{ message }}</div>\n <div class=\"mt-3\">\n <button class=\"button\" @click=\"close\">\n {{ __('auth.reset.close') }}\n </button>\n </div>\n </div>\n </div>\n</template>\n<script>\nimport { ref, markRaw, getCurrentInstance } from 'vue';\nimport { useStore } from 'vuex';\nimport { SchemaFormFactory, useSchemaForm } from 'formvuelate';\nimport VeeValidatePlugin from '@formvuelate/plugin-vee-validate';\nimport FormText from '@perevorot/shop/dist/js/forms/FormText';\nimport FormPassword from '@perevorot/shop/dist/js/forms/FormPassword';\nimport * as yup from 'yup';\n\nmarkRaw(FormPassword);\nmarkRaw(FormText);\n\nconst SchemaForm = SchemaFormFactory([VeeValidatePlugin({})]);\n\nexport default {\n name: 'reset',\n components: {\n SchemaForm\n },\n setup() {\n const loading = ref(false);\n const store = useStore();\n const key = ref(0);\n const message = ref('');\n const reseted = ref(false);\n const instance = getCurrentInstance();\n\n const schema = ref({\n password: {\n component: FormPassword,\n label: __('auth.login.form.password'),\n type: 'password'\n },\n password_confirmation: {\n component: FormText,\n label: __('auth.login.form.password_confirmation'),\n type: 'password'\n }\n });\n\n const validation = yup.object().shape({\n password: yup.string().min(6, __('auth.validation.min')).required(__('auth.validation.required')),\n password_confirmation: yup.string().oneOf([yup.ref('password'), null], __('auth.validation.password_confirmation'))\n });\n\n const model = ref({\n password: '',\n password_confirmation: '',\n token: instance.parent.props.resetToken,\n email: instance.parent.props.resetEmail\n });\n\n useSchemaForm(model);\n\n const cancel = () => {\n store.commit('auth/modal', 'login');\n };\n\n const again = () => {\n store.commit('auth/modal', 'forget');\n };\n\n const onSubmit = () => {\n loading.value = true;\n\n store.dispatch('auth/passwordUpdate', {\n credentials: model.value,\n callback: (m, isError) => {\n message.value = m;\n },\n finally: () => {\n model.value = {};\n loading.value = false;\n reseted.value = true;\n key.value++;\n }\n });\n };\n\n const close = () => {\n store.commit('auth/modal', null);\n store.dispatch('auth/me');\n };\n\n return {\n loading,\n key,\n schema,\n validation,\n onSubmit,\n reseted,\n message,\n cancel,\n again,\n close\n };\n }\n};\n</script>","<template>\n <div class=\"form auth-reset\">\n <div class=\"title\">{{ __('auth.reset.title') }}</div>\n <div v-show=\"!reseted\">\n <div v-if=\"$parent.tokenValid\">\n <div class=\"mb-3\">\n {{\n __('auth.reset.info', {\n email: $parent.resetEmail\n })\n }}\n </div>\n <SchemaForm schemaRowClasses=\"field\" :schema=\"schema\" :validation-schema=\"validation\" :key=\"key\" @submit=\"onSubmit\">\n <template #afterForm>\n <div class=\"field\">\n <div class=\"columns is-vcentered\">\n <div class=\"column\">\n <button class=\"button is-link\" type=\"submit\" v-bind:class=\"{ 'is-loading': loading }\">\n {{ __('auth.reset.form.submit') }}\n </button>\n </div>\n </div>\n </div>\n </template>\n </SchemaForm>\n <div class=\"mt-3\">\n <button class=\"button\" @click=\"cancel\">\n {{ __('auth.reset.cancel') }}\n </button>\n </div>\n </div>\n <div v-else>\n <p>{{ __('auth.reset.token-not-valid') }}</p>\n <div class=\"mt-3\">\n <button class=\"button\" @click=\"again\">\n {{ __('auth.reset.again') }}\n </button>\n </div>\n </div>\n </div>\n <div v-show=\"reseted\">\n <div>{{ message }}</div>\n <div class=\"mt-3\">\n <button class=\"button\" @click=\"close\">\n {{ __('auth.reset.close') }}\n </button>\n </div>\n </div>\n </div>\n</template>\n<script>\nimport { ref, markRaw, getCurrentInstance } from 'vue';\nimport { useStore } from 'vuex';\nimport { SchemaFormFactory, useSchemaForm } from 'formvuelate';\nimport VeeValidatePlugin from '@formvuelate/plugin-vee-validate';\nimport FormText from '@perevorot/shop/dist/js/forms/FormText';\nimport FormPassword from '@perevorot/shop/dist/js/forms/FormPassword';\nimport * as yup from 'yup';\n\nmarkRaw(FormPassword);\nmarkRaw(FormText);\n\nconst SchemaForm = SchemaFormFactory([VeeValidatePlugin({})]);\n\nexport default {\n name: 'reset',\n components: {\n SchemaForm\n },\n setup() {\n const loading = ref(false);\n const store = useStore();\n const key = ref(0);\n const message = ref('');\n const reseted = ref(false);\n const instance = getCurrentInstance();\n\n const schema = ref({\n password: {\n component: FormPassword,\n label: __('auth.login.form.password'),\n type: 'password'\n },\n password_confirmation: {\n component: FormText,\n label: __('auth.login.form.password_confirmation'),\n type: 'password'\n }\n });\n\n const validation = yup.object().shape({\n password: yup.string().min(6, __('auth.validation.min')).required(__('auth.validation.required')),\n password_confirmation: yup.string().oneOf([yup.ref('password'), null], __('auth.validation.password_confirmation'))\n });\n\n const model = ref({\n password: '',\n password_confirmation: '',\n token: instance.parent.props.resetToken,\n email: instance.parent.props.resetEmail\n });\n\n useSchemaForm(model);\n\n const cancel = () => {\n store.commit('auth/modal', 'login');\n };\n\n const again = () => {\n store.commit('auth/modal', 'forget');\n };\n\n const onSubmit = () => {\n loading.value = true;\n\n store.dispatch('auth/passwordUpdate', {\n credentials: model.value,\n callback: (m, isError) => {\n message.value = m;\n },\n finally: () => {\n model.value = {};\n loading.value = false;\n reseted.value = true;\n key.value++;\n }\n });\n };\n\n const close = () => {\n store.commit('auth/modal', null);\n store.dispatch('auth/me');\n };\n\n return {\n loading,\n key,\n schema,\n validation,\n onSubmit,\n reseted,\n message,\n cancel,\n again,\n close\n };\n }\n};\n</script>"],"names":["markRaw","FormPassword","FormText","name","components","SchemaForm","SchemaFormFactory","VeeValidatePlugin","setup","loading","ref","store","useStore","key","message","reseted","instance","getCurrentInstance","schema","password","component","label","__","type","password_confirmation","validation","yup","object","shape","string","min","required","oneOf","model","token","parent","props","resetToken","email","resetEmail","useSchemaForm","onSubmit","value","dispatch","credentials","callback","m","isError","finally","cancel","commit","again","close","class","_createElementBlock","_hoisted_1","_createElementVNode","_hoisted_2","_ctx","tokenValid","_hoisted_4","_createVNode","schemaRowClasses","$setup","afterForm","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","onClick","_hoisted_10","_hoisted_11"],"mappings":"+nBA2DAA,UAAQC,WACRD,UAAQE,WAER,MAEe,CACXC,KAAM,QACNC,WAAY,CACRC,WALWC,oBAAkB,CAACC,UAAkB,OAOpDC,YACUC,EAAUC,OAAI,GACdC,EAAQC,aACRC,EAAMH,MAAI,GACVI,EAAUJ,MAAI,IACdK,EAAUL,OAAI,GACdM,EAAWC,uBAEXC,EAASR,MAAI,CACfS,SAAU,CACNC,UAAWnB,UACXoB,MAAOC,GAAG,4BACVC,KAAM,YAEVC,sBAAuB,CACnBJ,UAAWlB,UACXmB,MAAOC,GAAG,yCACVC,KAA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BmC,6FAO3BF,2BAAAY,GACIZ,+BAAQH,MAAM,SAAUgB,sCAAON,sDACxBL,kDAIfJ,8BACIE,gDAAME,uCACNF,2BAAAc,GACId,+BAAQH,MAAM,SAAUgB,sCAAON,oDACxBL,mDAhCLK,8BAqCdP,iCACIA,kDAAQO,cACRP,2BAAAe,GACIf,+BAAQH,MAAM,SAAUgB,sCAAON,oDACxBL,+CAJFK"}
1
+ {"version":3,"file":"Reset.js","sources":["../../../../src/js/components/auth/Reset.vue","../../../../src/js/components/auth/Reset.vue?vue&type=template&id=293c875c&lang.js"],"sourcesContent":["<template>\n <div class=\"form auth-reset\">\n <div class=\"title\">{{ __('auth.reset.title') }}</div>\n <div v-show=\"!reseted\">\n <div v-if=\"$parent.tokenValid\">\n <div class=\"mb-3\">\n {{\n __('auth.reset.info', {\n email: $parent.resetEmail\n })\n }}\n </div>\n <SchemaForm schemaRowClasses=\"field\" :schema=\"schema\" :validation-schema=\"validation\" :key=\"key\" @submit=\"onSubmit\">\n <template #afterForm>\n <div class=\"field\">\n <div class=\"columns is-vcentered\">\n <div class=\"column\">\n <button class=\"button is-link\" type=\"submit\" v-bind:class=\"{ 'is-loading': loading }\">\n {{ __('auth.reset.form.submit') }}\n </button>\n </div>\n </div>\n </div>\n </template>\n </SchemaForm>\n <div class=\"mt-3\">\n <button class=\"button\" @click=\"cancel\">\n {{ __('auth.reset.cancel') }}\n </button>\n </div>\n </div>\n <div v-else>\n <p>{{ __('auth.reset.token-not-valid') }}</p>\n <div class=\"mt-3\">\n <button class=\"button\" @click=\"again\">\n {{ __('auth.reset.again') }}\n </button>\n </div>\n </div>\n </div>\n <div v-show=\"reseted\">\n <div>{{ message }}</div>\n <div class=\"mt-3\">\n <button class=\"button\" @click=\"close\">\n {{ __('auth.reset.close') }}\n </button>\n </div>\n </div>\n </div>\n</template>\n<script>\nimport { ref, markRaw, getCurrentInstance } from 'vue';\nimport { useStore } from 'vuex';\nimport { SchemaFormFactory, useSchemaForm } from 'formvuelate';\nimport VeeValidatePlugin from '@formvuelate/plugin-vee-validate';\nimport FormText from '@perevorot/shop/dist/js/forms/FormText';\nimport FormPassword from '@perevorot/shop/dist/js/forms/FormPassword';\nimport * as yup from 'yup';\n\nmarkRaw(FormPassword);\nmarkRaw(FormText);\n\nconst SchemaForm = SchemaFormFactory([VeeValidatePlugin({})]);\n\nexport default {\n name: 'reset',\n components: {\n SchemaForm\n },\n setup() {\n const loading = ref(false);\n const store = useStore();\n const key = ref(0);\n const message = ref('');\n const reseted = ref(false);\n const instance = getCurrentInstance();\n\n const schema = ref({\n password: {\n component: FormPassword,\n label: __('auth.login.form.password'),\n type: 'password'\n },\n password_confirmation: {\n component: FormText,\n label: __('auth.login.form.password_confirmation'),\n type: 'password'\n }\n });\n\n const validation = yup.object().shape({\n password: yup.string().min(6, __('auth.validation.min')).required(__('auth.validation.required')),\n password_confirmation: yup.string().oneOf([yup.ref('password'), null], __('auth.validation.password_confirmation'))\n });\n\n const model = ref({\n password: '',\n password_confirmation: '',\n token: instance.parent.props.resetToken,\n email: instance.parent.props.resetEmail\n });\n\n useSchemaForm(model);\n\n const cancel = () => {\n store.commit('auth/modal', 'login');\n };\n\n const again = () => {\n store.commit('auth/modal', 'forget');\n };\n\n const onSubmit = () => {\n loading.value = true;\n\n store.dispatch('auth/passwordUpdate', {\n credentials: model.value,\n callback: (m, isError) => {\n message.value = m;\n },\n finally: () => {\n model.value = {};\n loading.value = false;\n reseted.value = true;\n key.value++;\n }\n });\n };\n\n const close = () => {\n store.commit('auth/modal', null);\n store.dispatch('auth/me');\n };\n\n return {\n loading,\n key,\n schema,\n validation,\n onSubmit,\n reseted,\n message,\n cancel,\n again,\n close\n };\n }\n};\n</script>","<template>\n <div class=\"form auth-reset\">\n <div class=\"title\">{{ __('auth.reset.title') }}</div>\n <div v-show=\"!reseted\">\n <div v-if=\"$parent.tokenValid\">\n <div class=\"mb-3\">\n {{\n __('auth.reset.info', {\n email: $parent.resetEmail\n })\n }}\n </div>\n <SchemaForm schemaRowClasses=\"field\" :schema=\"schema\" :validation-schema=\"validation\" :key=\"key\" @submit=\"onSubmit\">\n <template #afterForm>\n <div class=\"field\">\n <div class=\"columns is-vcentered\">\n <div class=\"column\">\n <button class=\"button is-link\" type=\"submit\" v-bind:class=\"{ 'is-loading': loading }\">\n {{ __('auth.reset.form.submit') }}\n </button>\n </div>\n </div>\n </div>\n </template>\n </SchemaForm>\n <div class=\"mt-3\">\n <button class=\"button\" @click=\"cancel\">\n {{ __('auth.reset.cancel') }}\n </button>\n </div>\n </div>\n <div v-else>\n <p>{{ __('auth.reset.token-not-valid') }}</p>\n <div class=\"mt-3\">\n <button class=\"button\" @click=\"again\">\n {{ __('auth.reset.again') }}\n </button>\n </div>\n </div>\n </div>\n <div v-show=\"reseted\">\n <div>{{ message }}</div>\n <div class=\"mt-3\">\n <button class=\"button\" @click=\"close\">\n {{ __('auth.reset.close') }}\n </button>\n </div>\n </div>\n </div>\n</template>\n<script>\nimport { ref, markRaw, getCurrentInstance } from 'vue';\nimport { useStore } from 'vuex';\nimport { SchemaFormFactory, useSchemaForm } from 'formvuelate';\nimport VeeValidatePlugin from '@formvuelate/plugin-vee-validate';\nimport FormText from '@perevorot/shop/dist/js/forms/FormText';\nimport FormPassword from '@perevorot/shop/dist/js/forms/FormPassword';\nimport * as yup from 'yup';\n\nmarkRaw(FormPassword);\nmarkRaw(FormText);\n\nconst SchemaForm = SchemaFormFactory([VeeValidatePlugin({})]);\n\nexport default {\n name: 'reset',\n components: {\n SchemaForm\n },\n setup() {\n const loading = ref(false);\n const store = useStore();\n const key = ref(0);\n const message = ref('');\n const reseted = ref(false);\n const instance = getCurrentInstance();\n\n const schema = ref({\n password: {\n component: FormPassword,\n label: __('auth.login.form.password'),\n type: 'password'\n },\n password_confirmation: {\n component: FormText,\n label: __('auth.login.form.password_confirmation'),\n type: 'password'\n }\n });\n\n const validation = yup.object().shape({\n password: yup.string().min(6, __('auth.validation.min')).required(__('auth.validation.required')),\n password_confirmation: yup.string().oneOf([yup.ref('password'), null], __('auth.validation.password_confirmation'))\n });\n\n const model = ref({\n password: '',\n password_confirmation: '',\n token: instance.parent.props.resetToken,\n email: instance.parent.props.resetEmail\n });\n\n useSchemaForm(model);\n\n const cancel = () => {\n store.commit('auth/modal', 'login');\n };\n\n const again = () => {\n store.commit('auth/modal', 'forget');\n };\n\n const onSubmit = () => {\n loading.value = true;\n\n store.dispatch('auth/passwordUpdate', {\n credentials: model.value,\n callback: (m, isError) => {\n message.value = m;\n },\n finally: () => {\n model.value = {};\n loading.value = false;\n reseted.value = true;\n key.value++;\n }\n });\n };\n\n const close = () => {\n store.commit('auth/modal', null);\n store.dispatch('auth/me');\n };\n\n return {\n loading,\n key,\n schema,\n validation,\n onSubmit,\n reseted,\n message,\n cancel,\n again,\n close\n };\n }\n};\n</script>"],"names":["markRaw","FormPassword","FormText","name","components","SchemaForm","SchemaFormFactory","VeeValidatePlugin","setup","loading","ref","store","useStore","key","message","reseted","instance","getCurrentInstance","schema","password","component","label","__","type","password_confirmation","validation","yup","object","shape","string","min","required","oneOf","model","token","parent","props","resetToken","email","resetEmail","useSchemaForm","onSubmit","value","dispatch","credentials","callback","m","isError","finally","cancel","commit","again","close","class","_createElementBlock","_hoisted_1","_createElementVNode","_hoisted_2","_ctx","tokenValid","_hoisted_4","_createVNode","schemaRowClasses","$setup","afterForm","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","onClick","_hoisted_10","_hoisted_11"],"mappings":"+nBA2DAA,UAAQC,WACRD,UAAQE,WAER,MAEe,CACXC,KAAM,QACNC,WAAY,CACRC,WALWC,oBAAkB,CAACC,UAAkB,OAOpDC,qBACUC,EAAUC,OAAI,GACdC,EAAQC,aACRC,EAAMH,MAAI,GACVI,EAAUJ,MAAI,IACdK,EAAUL,OAAI,GACdM,EAAWC,uBAEXC,EAASR,MAAI,CACfS,SAAU,CACNC,UAAWnB,UACXoB,MAAOC,GAAG,4BACVC,KAAM,YAEVC,sBAAuB,CACnBJ,UAA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BAAM,+BAA6DU,aAA5CxC,KAAK,4BAC7BmC,+FAO3BF,2BAAAY,GACIZ,+BAAQH,MAAM,SAAUgB,sCAAON,2DACxBL,kDAIfJ,8BACIE,gDAAME,uCACNF,2BAAAc,GACId,+BAAQH,MAAM,SAAUgB,sCAAON,yDACxBL,mDAhCLK,8BAqCdP,iCACIA,kDAAQO,cACRP,2BAAAe,GACIf,+BAAQH,MAAM,SAAUgB,sCAAON,yDACxBL,+CAJFK"}
@@ -1,2 +1,2 @@
1
- "use strict";var e=require("vue"),t=require("vuex");function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var l={name:"user",components:{Reset:o(require("@perevorot/shop/dist/js/components/auth/Reset")).default},props:{resetToken:{type:String,default:""},resetEmail:{type:String,default:""},tokenValid:{type:Boolean,default:!1}},setup(o){var l=t.useStore(),n=e.computed(()=>l.getters["auth/me"]),a=e.computed(()=>l.getters["auth/modal"]),r=e.computed(()=>Object.keys(n.value).length>0),s=e.ref(!1),c=e.computed(()=>l.getters["auth/account"]),i=()=>{l.commit("auth/modal",null),l.dispatch("auth/me")};return l.dispatch("auth/me",{finally:()=>{s.value=!0}}),window.addEventListener("keyup",e=>{a.value&&"Escape"===e.key&&i()}),o.resetToken&&l.commit("auth/modal","reset"),{mounted:s,user:n,logged:r,modal:a,open:()=>{l.commit("auth/modal","login")},close:i,register:()=>{l.commit("auth/modal","registration")},logout:()=>{l.dispatch("auth/logout")},routes:c}}},n={key:0,class:"auth-user"},a={class:"modal-content"},r=[e.createElementVNode("svg",{class:"icon close"},[e.createElementVNode("use",{"xlink:href":"#close"})],-1)],s={class:"box"},c={class:"tabs"},i={key:1,class:"auth-user"},d={class:"dropdown is-right is-hoverable"},u={class:"dropdown-trigger"},m=["href"],p=e.createElementVNode("i",{class:"fas fa-user"},null,-1),g=e.createElementVNode("span",{class:"icon is-small"},[e.createElementVNode("i",{class:"fas fa-angle-down","aria-hidden":"true"})],-1),k={class:"dropdown-menu",role:"menu"},v={class:"dropdown-content"},E=["href"],h={key:0,class:"icon"},V=["xlink:href"],N={key:1,class:"badge"},f={key:1,class:"dropdown-divider"},B=e.createElementVNode("hr",{class:"dropdown-divider"},null,-1),y=e.createElementVNode("svg",{class:"icon"},[e.createElementVNode("use",{"xlink:href":"#icon-logout"})],-1);l.render=function(t,o,l,C,b,w){var S=e.resolveComponent("login"),x=e.resolveComponent("registration"),_=e.resolveComponent("reset");return C.mounted&&!C.logged?(e.openBlock(),e.createElementBlock("div",n,[e.renderSlot(t.$slots,"login",{open:C.open,label:t.__("auth.login.login")},()=>[e.createElementVNode("a",{class:"button",onClick:o[0]||(o[0]=function(){return C.open&&C.open(...arguments)})},e.toDisplayString(t.__("auth.login.login")),1)]),e.createElementVNode("div",{class:e.normalizeClass(["modal",{"is-active":C.modal}])},[e.createElementVNode("div",{class:"modal-background",onClick:o[1]||(o[1]=function(){return C.close&&C.close(...arguments)})}),e.createElementVNode("div",a,[e.createElementVNode("button",{class:"modal-close is-large",onClick:o[2]||(o[2]=function(){return C.close&&C.close(...arguments)})},r),e.createElementVNode("div",s,[e.createElementVNode("div",c,[e.createElementVNode("ul",null,[e.createElementVNode("li",{class:e.normalizeClass({"is-active":"login"==C.modal||"forget"==C.modal})},[e.createElementVNode("a",{onClick:o[3]||(o[3]=function(){return C.open&&C.open(...arguments)})},e.toDisplayString(t.__("auth.login.login")),1)],2),e.createElementVNode("li",{class:e.normalizeClass({"is-active":"registration"==C.modal}),onClick:o[4]||(o[4]=function(){return C.register&&C.register(...arguments)})},[e.createElementVNode("a",null,e.toDisplayString(t.__("auth.login.signup")),1)],2)])]),(e.openBlock(),e.createBlock(e.KeepAlive,null,["login"==C.modal||"forget"==C.modal?(e.openBlock(),e.createBlock(S,{key:0})):e.createCommentVNode("v-if",!0)],1024)),(e.openBlock(),e.createBlock(e.KeepAlive,null,["registration"==C.modal?(e.openBlock(),e.createBlock(x,{key:0})):e.createCommentVNode("v-if",!0)],1024)),e.withDirectives(e.createVNode(_,null,null,512),[[e.vShow,"reset"==C.modal]])])])],2)])):C.mounted?(e.openBlock(),e.createElementBlock("div",i,[e.createElementVNode("div",d,[e.createElementVNode("div",u,[e.createElementVNode("a",{class:"button",href:C.routes[0].path},[e.renderSlot(t.$slots,"user",{user:C.user.name?C.user.name:C.user.email},()=>[e.createElementVNode("span",null,[p,e.createTextVNode(" "+e.toDisplayString(C.user.name?C.user.name:C.user.email),1)]),g])],8,m)]),e.createElementVNode("div",k,[e.createElementVNode("div",v,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C.routes,(t,o)=>(e.openBlock(),e.createElementBlock("div",{key:o},[t.text?(e.openBlock(),e.createElementBlock("a",{key:0,href:t.path,class:"dropdown-item"},[t.icon?(e.openBlock(),e.createElementBlock("svg",h,[e.createElementVNode("use",{"xlink:href":"#"+t.icon},null,8,V)])):e.createCommentVNode("v-if",!0),e.createElementVNode("span",null,e.toDisplayString(t.text),1),t.badge?(e.openBlock(),e.createElementBlock("span",N,e.toDisplayString(t.badge),1)):e.createCommentVNode("v-if",!0)],8,E)):(e.openBlock(),e.createElementBlock("hr",f))]))),128)),B,e.createElementVNode("a",{class:"dropdown-item",onClick:o[5]||(o[5]=function(){return C.logout&&C.logout(...arguments)})},[y,e.createElementVNode("span",null,e.toDisplayString(t.__("auth.user.menu.logout")),1)])])])])])):e.createCommentVNode("v-if",!0)},module.exports=l;
1
+ "use strict";var e=require("vue"),t=require("vuex");function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n={name:"user",components:{Reset:o(require("@perevorot/shop/dist/js/components/auth/Reset")).default},props:{resetToken:{type:String,default:""},resetEmail:{type:String,default:""},tokenValid:{type:Boolean,default:!1}},setup:function(o){var n=t.useStore(),l=e.computed((function(){return n.getters["auth/me"]})),a=e.computed((function(){return n.getters["auth/modal"]})),r=e.computed((function(){return Object.keys(l.value).length>0})),c=e.ref(!1),s=e.computed((function(){return n.getters["auth/account"]})),i=function(){n.commit("auth/modal",null),n.dispatch("auth/me")};return n.dispatch("auth/me",{finally:function(){c.value=!0}}),window.addEventListener("keyup",(function(e){a.value&&"Escape"===e.key&&i()})),o.resetToken&&n.commit("auth/modal","reset"),{mounted:c,user:l,logged:r,modal:a,open:function(){n.commit("auth/modal","login")},close:i,register:function(){n.commit("auth/modal","registration")},logout:function(){n.dispatch("auth/logout")},routes:s}}},l={key:0,class:"auth-user"},a={class:"modal-content"},r=[e.createElementVNode("svg",{class:"icon close"},[e.createElementVNode("use",{"xlink:href":"#close"})],-1)],c={class:"box"},s={class:"tabs"},i={key:1,class:"auth-user"},u={class:"dropdown is-right is-hoverable"},d={class:"dropdown-trigger"},m=["href"],p=e.createElementVNode("i",{class:"fas fa-user"},null,-1),g=e.createElementVNode("span",{class:"icon is-small"},[e.createElementVNode("i",{class:"fas fa-angle-down","aria-hidden":"true"})],-1),f={class:"dropdown-menu",role:"menu"},k={class:"dropdown-content"},v=["href"],E={key:0,class:"icon"},h=["xlink:href"],V={key:1,class:"badge"},N={key:1,class:"dropdown-divider"},y=e.createElementVNode("hr",{class:"dropdown-divider"},null,-1),B=e.createElementVNode("svg",{class:"icon"},[e.createElementVNode("use",{"xlink:href":"#icon-logout"})],-1);n.render=function(t,o,n,C,b,w){var S=e.resolveComponent("login"),x=e.resolveComponent("registration"),_=e.resolveComponent("reset");return C.mounted&&!C.logged?(e.openBlock(),e.createElementBlock("div",l,[e.renderSlot(t.$slots,"login",{open:C.open,label:t.__("auth.login.login")},(function(){return[e.createElementVNode("a",{class:"button",onClick:o[0]||(o[0]=function(){return C.open&&C.open.apply(C,arguments)})},e.toDisplayString(t.__("auth.login.login")),1)]})),e.createElementVNode("div",{class:e.normalizeClass(["modal",{"is-active":C.modal}])},[e.createElementVNode("div",{class:"modal-background",onClick:o[1]||(o[1]=function(){return C.close&&C.close.apply(C,arguments)})}),e.createElementVNode("div",a,[e.createElementVNode("button",{class:"modal-close is-large",onClick:o[2]||(o[2]=function(){return C.close&&C.close.apply(C,arguments)})},r),e.createElementVNode("div",c,[e.createElementVNode("div",s,[e.createElementVNode("ul",null,[e.createElementVNode("li",{class:e.normalizeClass({"is-active":"login"==C.modal||"forget"==C.modal})},[e.createElementVNode("a",{onClick:o[3]||(o[3]=function(){return C.open&&C.open.apply(C,arguments)})},e.toDisplayString(t.__("auth.login.login")),1)],2),e.createElementVNode("li",{class:e.normalizeClass({"is-active":"registration"==C.modal}),onClick:o[4]||(o[4]=function(){return C.register&&C.register.apply(C,arguments)})},[e.createElementVNode("a",null,e.toDisplayString(t.__("auth.login.signup")),1)],2)])]),(e.openBlock(),e.createBlock(e.KeepAlive,null,["login"==C.modal||"forget"==C.modal?(e.openBlock(),e.createBlock(S,{key:0})):e.createCommentVNode("v-if",!0)],1024)),(e.openBlock(),e.createBlock(e.KeepAlive,null,["registration"==C.modal?(e.openBlock(),e.createBlock(x,{key:0})):e.createCommentVNode("v-if",!0)],1024)),e.withDirectives(e.createVNode(_,null,null,512),[[e.vShow,"reset"==C.modal]])])])],2)])):C.mounted?(e.openBlock(),e.createElementBlock("div",i,[e.createElementVNode("div",u,[e.createElementVNode("div",d,[e.createElementVNode("a",{class:"button",href:C.routes[0].path},[e.renderSlot(t.$slots,"user",{user:C.user.name?C.user.name:C.user.email},(function(){return[e.createElementVNode("span",null,[p,e.createTextVNode(" "+e.toDisplayString(C.user.name?C.user.name:C.user.email),1)]),g]}))],8,m)]),e.createElementVNode("div",f,[e.createElementVNode("div",k,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C.routes,(function(t,o){return e.openBlock(),e.createElementBlock("div",{key:o},[t.text?(e.openBlock(),e.createElementBlock("a",{key:0,href:t.path,class:"dropdown-item"},[t.icon?(e.openBlock(),e.createElementBlock("svg",E,[e.createElementVNode("use",{"xlink:href":"#"+t.icon},null,8,h)])):e.createCommentVNode("v-if",!0),e.createElementVNode("span",null,e.toDisplayString(t.text),1),t.badge?(e.openBlock(),e.createElementBlock("span",V,e.toDisplayString(t.badge),1)):e.createCommentVNode("v-if",!0)],8,v)):(e.openBlock(),e.createElementBlock("hr",N))])})),128)),y,e.createElementVNode("a",{class:"dropdown-item",onClick:o[5]||(o[5]=function(){return C.logout&&C.logout.apply(C,arguments)})},[B,e.createElementVNode("span",null,e.toDisplayString(t.__("auth.user.menu.logout")),1)])])])])])):e.createCommentVNode("v-if",!0)},module.exports=n;
2
2
  //# sourceMappingURL=User.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"User.js","sources":["../../../../src/js/components/auth/User.vue","../../../../src/js/components/auth/User.vue?vue&type=template&id=fc39b0b6&lang.js"],"sourcesContent":["<template>\n <div class=\"auth-user\" v-if=\"mounted && !logged\">\n <slot name=\"login\" :open=\"open\" :label=\"__('auth.login.login')\">\n <a class=\"button\" @click=\"open\">{{ __('auth.login.login') }}</a>\n </slot>\n <div class=\"modal\" v-bind:class=\"{ 'is-active': modal }\">\n <div class=\"modal-background\" @click=\"close\"></div>\n <div class=\"modal-content\">\n <button class=\"modal-close is-large\" @click=\"close\">\n <svg class=\"icon close\">\n <use xlink:href=\"#close\" />\n </svg>\n </button>\n <div class=\"box\">\n <div class=\"tabs\">\n <ul>\n <li v-bind:class=\"{\n 'is-active': modal == 'login' || modal == 'forget'\n }\">\n <a @click=\"open\">{{ __('auth.login.login') }}</a>\n </li>\n <li v-bind:class=\"{\n 'is-active': modal == 'registration'\n }\" @click=\"register\">\n <a>{{ __('auth.login.signup') }}</a>\n </li>\n </ul>\n </div>\n <keep-alive>\n <login v-if=\"modal == 'login' || modal == 'forget'\"></login>\n </keep-alive>\n <keep-alive>\n <registration v-if=\"modal == 'registration'\"></registration>\n </keep-alive>\n <reset v-show=\"modal == 'reset'\"></reset>\n </div>\n </div>\n </div>\n </div>\n <div class=\"auth-user\" v-else-if=\"mounted\">\n <div class=\"dropdown is-right is-hoverable\">\n <div class=\"dropdown-trigger\">\n <a class=\"button\" :href=\"routes[0].path\">\n <slot name=\"user\" :user=\"user.name ? user.name : user.email\">\n <span>\n <i class=\"fas fa-user\"></i>\n {{ user.name ? user.name : user.email }}\n </span>\n <span class=\"icon is-small\">\n <i class=\"fas fa-angle-down\" aria-hidden=\"true\"></i>\n </span>\n </slot>\n </a>\n </div>\n <div class=\"dropdown-menu\" role=\"menu\">\n <div class=\"dropdown-content\">\n <div v-for=\"(item, key) in routes\" v-bind:key=\"key\">\n <a :href=\"item.path\" v-if=\"item.text\" class=\"dropdown-item\">\n <svg class=\"icon\" v-if=\"item.icon\">\n <use :xlink:href=\"'#' + item.icon\" />\n </svg>\n <span>{{ item.text }}</span>\n <span class=\"badge\" v-if=\"item.badge\">{{ item.badge }}</span>\n </a>\n <hr class=\"dropdown-divider\" v-else />\n </div>\n <hr class=\"dropdown-divider\" />\n <a class=\"dropdown-item\" @click=\"logout\">\n <svg class=\"icon\">\n <use xlink:href=\"#icon-logout\" />\n </svg>\n <span>{{ __('auth.user.menu.logout') }}</span>\n </a>\n </div>\n </div>\n </div>\n </div>\n</template>\n\n<script>\nimport { ref, computed } from 'vue';\nimport { useStore } from 'vuex';\nimport Reset from '@perevorot/shop/dist/js/components/auth/Reset';\n\nexport default {\n name: 'user',\n components: {\n Reset\n },\n props: {\n resetToken: {\n type: String,\n default: ''\n },\n resetEmail: {\n type: String,\n default: ''\n },\n tokenValid: {\n type: Boolean,\n default: false\n }\n },\n setup(props) {\n const store = useStore();\n const user = computed(() => store.getters['auth/me']);\n const modal = computed(() => store.getters['auth/modal']);\n const logged = computed(() => Object.keys(user.value).length > 0);\n const mounted = ref(false);\n const routes = computed(() => store.getters['auth/account']);\n\n const open = () => {\n store.commit('auth/modal', 'login');\n };\n\n const close = () => {\n store.commit('auth/modal', null);\n store.dispatch('auth/me');\n };\n\n const logout = () => {\n store.dispatch('auth/logout');\n };\n\n const register = () => {\n store.commit('auth/modal', 'registration');\n };\n\n store.dispatch('auth/me', {\n finally: () => {\n mounted.value = true;\n }\n });\n\n window.addEventListener('keyup', (e) => {\n if (modal.value && e.key === 'Escape') {\n close();\n }\n });\n\n if (props.resetToken) {\n store.commit('auth/modal', 'reset');\n }\n\n return {\n mounted,\n user,\n logged,\n modal,\n open,\n close,\n register,\n logout,\n routes\n };\n }\n};\n</script>","<template>\n <div class=\"auth-user\" v-if=\"mounted && !logged\">\n <slot name=\"login\" :open=\"open\" :label=\"__('auth.login.login')\">\n <a class=\"button\" @click=\"open\">{{ __('auth.login.login') }}</a>\n </slot>\n <div class=\"modal\" v-bind:class=\"{ 'is-active': modal }\">\n <div class=\"modal-background\" @click=\"close\"></div>\n <div class=\"modal-content\">\n <button class=\"modal-close is-large\" @click=\"close\">\n <svg class=\"icon close\">\n <use xlink:href=\"#close\" />\n </svg>\n </button>\n <div class=\"box\">\n <div class=\"tabs\">\n <ul>\n <li v-bind:class=\"{\n 'is-active': modal == 'login' || modal == 'forget'\n }\">\n <a @click=\"open\">{{ __('auth.login.login') }}</a>\n </li>\n <li v-bind:class=\"{\n 'is-active': modal == 'registration'\n }\" @click=\"register\">\n <a>{{ __('auth.login.signup') }}</a>\n </li>\n </ul>\n </div>\n <keep-alive>\n <login v-if=\"modal == 'login' || modal == 'forget'\"></login>\n </keep-alive>\n <keep-alive>\n <registration v-if=\"modal == 'registration'\"></registration>\n </keep-alive>\n <reset v-show=\"modal == 'reset'\"></reset>\n </div>\n </div>\n </div>\n </div>\n <div class=\"auth-user\" v-else-if=\"mounted\">\n <div class=\"dropdown is-right is-hoverable\">\n <div class=\"dropdown-trigger\">\n <a class=\"button\" :href=\"routes[0].path\">\n <slot name=\"user\" :user=\"user.name ? user.name : user.email\">\n <span>\n <i class=\"fas fa-user\"></i>\n {{ user.name ? user.name : user.email }}\n </span>\n <span class=\"icon is-small\">\n <i class=\"fas fa-angle-down\" aria-hidden=\"true\"></i>\n </span>\n </slot>\n </a>\n </div>\n <div class=\"dropdown-menu\" role=\"menu\">\n <div class=\"dropdown-content\">\n <div v-for=\"(item, key) in routes\" v-bind:key=\"key\">\n <a :href=\"item.path\" v-if=\"item.text\" class=\"dropdown-item\">\n <svg class=\"icon\" v-if=\"item.icon\">\n <use :xlink:href=\"'#' + item.icon\" />\n </svg>\n <span>{{ item.text }}</span>\n <span class=\"badge\" v-if=\"item.badge\">{{ item.badge }}</span>\n </a>\n <hr class=\"dropdown-divider\" v-else />\n </div>\n <hr class=\"dropdown-divider\" />\n <a class=\"dropdown-item\" @click=\"logout\">\n <svg class=\"icon\">\n <use xlink:href=\"#icon-logout\" />\n </svg>\n <span>{{ __('auth.user.menu.logout') }}</span>\n </a>\n </div>\n </div>\n </div>\n </div>\n</template>\n\n<script>\nimport { ref, computed } from 'vue';\nimport { useStore } from 'vuex';\nimport Reset from '@perevorot/shop/dist/js/components/auth/Reset';\n\nexport default {\n name: 'user',\n components: {\n Reset\n },\n props: {\n resetToken: {\n type: String,\n default: ''\n },\n resetEmail: {\n type: String,\n default: ''\n },\n tokenValid: {\n type: Boolean,\n default: false\n }\n },\n setup(props) {\n const store = useStore();\n const user = computed(() => store.getters['auth/me']);\n const modal = computed(() => store.getters['auth/modal']);\n const logged = computed(() => Object.keys(user.value).length > 0);\n const mounted = ref(false);\n const routes = computed(() => store.getters['auth/account']);\n\n const open = () => {\n store.commit('auth/modal', 'login');\n };\n\n const close = () => {\n store.commit('auth/modal', null);\n store.dispatch('auth/me');\n };\n\n const logout = () => {\n store.dispatch('auth/logout');\n };\n\n const register = () => {\n store.commit('auth/modal', 'registration');\n };\n\n store.dispatch('auth/me', {\n finally: () => {\n mounted.value = true;\n }\n });\n\n window.addEventListener('keyup', (e) => {\n if (modal.value && e.key === 'Escape') {\n close();\n }\n });\n\n if (props.resetToken) {\n store.commit('auth/modal', 'reset');\n }\n\n return {\n mounted,\n user,\n logged,\n modal,\n open,\n close,\n register,\n logout,\n routes\n };\n }\n};\n</script>"],"names":["name","components","props","resetToken","type","String","default","resetEmail","tokenValid","Boolean","setup","store","useStore","user","computed","getters","modal","logged","Object","keys","value","length","mounted","ref","routes","close","commit","dispatch","finally","window","addEventListener","e","key","open","register","logout","class","_createElementVNode","role","$setup","_createElementBlock","_hoisted_1","_renderSlot","label","_ctx","onClick","_hoisted_2","_hoisted_5","_hoisted_6","_createBlock","_createVNode","_hoisted_7","_hoisted_8","_hoisted_9","href","path","email","_hoisted_11","_hoisted_12","_hoisted_13","_hoisted_14","item","text","icon","_hoisted_16","badge","_hoisted_18","_hoisted_19","_hoisted_20","_hoisted_21"],"mappings":"kIAoFe,CACXA,KAAM,OACNC,WAAY,4EAGZC,MAAO,CACHC,WAAY,CACRC,KAAMC,OACNC,QAAS,IAEbC,WAAY,CACRH,KAAMC,OACNC,QAAS,IAEbE,WAAY,CACRJ,KAAMK,QACNH,SAAS,IAGjBI,MAAMR,OACIS,EAAQC,aACRC,EAAOC,WAAS,IAAMH,EAAMI,QAAQ,YACpCC,EAAQF,WAAS,IAAMH,EAAMI,QAAQ,eACrCE,EAASH,WAAS,IAAMI,OAAOC,KAAKN,EAAKO,OAAOC,OAAS,GACzDC,EAAUC,OAAI,GACdC,EAASV,WAAS,IAAMH,EAAMI,QAAQ,iBAMtCU,EAAQ,KACVd,EAAMe,OAAO,aAAc,MAC3Bf,EAAMgB,SAAS,mBAWnBhB,EAAMgB,SAAS,UAAW,CACtBC,QAAS,KACLN,EAAQF,OAAQ,KAIxBS,OAAOC,iBAAiB,QAAUC,IAC1Bf,EAAMI,OAAmB,WAAVW,EAAEC,KACjBP,MAIJvB,EAAMC,YACNQ,EAAMe,OAAO,aAAc,SAGxB,CACHJ,QAAAA,EACAT,KAAAA,EACAI,OAAAA,EACAD,MAAAA,EACAiB,KAtCS,KACTtB,EAAMe,OAAO,aAAc,UAsC3BD,MAAAA,EACAS,SA3Ba,KACbvB,EAAMe,OAAO,aAAc,iBA2B3BS,OAhCW,KACXxB,EAAMgB,SAAS,gBAgCfH,OAAAA,cCxJHY,MAAM,gBAMEA,MAAM,oBAEHC,4BAAKD,MAAM,eACPC,yCAAgB,oBAGnBD,MAAM,UACFA,MAAM,iBAyBtBA,MAAM,gBACFA,MAAM,qCACFA,MAAM,iCAIKC,0BAAGD,M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AA2B,cAEJC,EACA/B,0BAAGD,MAAM,gBAAiBS,sCAAON,qCAC7B8B,EAGAhC,mDAASO"}
1
+ {"version":3,"file":"User.js","sources":["../../../../src/js/components/auth/User.vue","../../../../src/js/components/auth/User.vue?vue&type=template&id=fc39b0b6&lang.js"],"sourcesContent":["<template>\n <div class=\"auth-user\" v-if=\"mounted && !logged\">\n <slot name=\"login\" :open=\"open\" :label=\"__('auth.login.login')\">\n <a class=\"button\" @click=\"open\">{{ __('auth.login.login') }}</a>\n </slot>\n <div class=\"modal\" v-bind:class=\"{ 'is-active': modal }\">\n <div class=\"modal-background\" @click=\"close\"></div>\n <div class=\"modal-content\">\n <button class=\"modal-close is-large\" @click=\"close\">\n <svg class=\"icon close\">\n <use xlink:href=\"#close\" />\n </svg>\n </button>\n <div class=\"box\">\n <div class=\"tabs\">\n <ul>\n <li v-bind:class=\"{\n 'is-active': modal == 'login' || modal == 'forget'\n }\">\n <a @click=\"open\">{{ __('auth.login.login') }}</a>\n </li>\n <li v-bind:class=\"{\n 'is-active': modal == 'registration'\n }\" @click=\"register\">\n <a>{{ __('auth.login.signup') }}</a>\n </li>\n </ul>\n </div>\n <keep-alive>\n <login v-if=\"modal == 'login' || modal == 'forget'\"></login>\n </keep-alive>\n <keep-alive>\n <registration v-if=\"modal == 'registration'\"></registration>\n </keep-alive>\n <reset v-show=\"modal == 'reset'\"></reset>\n </div>\n </div>\n </div>\n </div>\n <div class=\"auth-user\" v-else-if=\"mounted\">\n <div class=\"dropdown is-right is-hoverable\">\n <div class=\"dropdown-trigger\">\n <a class=\"button\" :href=\"routes[0].path\">\n <slot name=\"user\" :user=\"user.name ? user.name : user.email\">\n <span>\n <i class=\"fas fa-user\"></i>\n {{ user.name ? user.name : user.email }}\n </span>\n <span class=\"icon is-small\">\n <i class=\"fas fa-angle-down\" aria-hidden=\"true\"></i>\n </span>\n </slot>\n </a>\n </div>\n <div class=\"dropdown-menu\" role=\"menu\">\n <div class=\"dropdown-content\">\n <div v-for=\"(item, key) in routes\" v-bind:key=\"key\">\n <a :href=\"item.path\" v-if=\"item.text\" class=\"dropdown-item\">\n <svg class=\"icon\" v-if=\"item.icon\">\n <use :xlink:href=\"'#' + item.icon\" />\n </svg>\n <span>{{ item.text }}</span>\n <span class=\"badge\" v-if=\"item.badge\">{{ item.badge }}</span>\n </a>\n <hr class=\"dropdown-divider\" v-else />\n </div>\n <hr class=\"dropdown-divider\" />\n <a class=\"dropdown-item\" @click=\"logout\">\n <svg class=\"icon\">\n <use xlink:href=\"#icon-logout\" />\n </svg>\n <span>{{ __('auth.user.menu.logout') }}</span>\n </a>\n </div>\n </div>\n </div>\n </div>\n</template>\n\n<script>\nimport { ref, computed } from 'vue';\nimport { useStore } from 'vuex';\nimport Reset from '@perevorot/shop/dist/js/components/auth/Reset';\n\nexport default {\n name: 'user',\n components: {\n Reset\n },\n props: {\n resetToken: {\n type: String,\n default: ''\n },\n resetEmail: {\n type: String,\n default: ''\n },\n tokenValid: {\n type: Boolean,\n default: false\n }\n },\n setup(props) {\n const store = useStore();\n const user = computed(() => store.getters['auth/me']);\n const modal = computed(() => store.getters['auth/modal']);\n const logged = computed(() => Object.keys(user.value).length > 0);\n const mounted = ref(false);\n const routes = computed(() => store.getters['auth/account']);\n\n const open = () => {\n store.commit('auth/modal', 'login');\n };\n\n const close = () => {\n store.commit('auth/modal', null);\n store.dispatch('auth/me');\n };\n\n const logout = () => {\n store.dispatch('auth/logout');\n };\n\n const register = () => {\n store.commit('auth/modal', 'registration');\n };\n\n store.dispatch('auth/me', {\n finally: () => {\n mounted.value = true;\n }\n });\n\n window.addEventListener('keyup', (e) => {\n if (modal.value && e.key === 'Escape') {\n close();\n }\n });\n\n if (props.resetToken) {\n store.commit('auth/modal', 'reset');\n }\n\n return {\n mounted,\n user,\n logged,\n modal,\n open,\n close,\n register,\n logout,\n routes\n };\n }\n};\n</script>","<template>\n <div class=\"auth-user\" v-if=\"mounted && !logged\">\n <slot name=\"login\" :open=\"open\" :label=\"__('auth.login.login')\">\n <a class=\"button\" @click=\"open\">{{ __('auth.login.login') }}</a>\n </slot>\n <div class=\"modal\" v-bind:class=\"{ 'is-active': modal }\">\n <div class=\"modal-background\" @click=\"close\"></div>\n <div class=\"modal-content\">\n <button class=\"modal-close is-large\" @click=\"close\">\n <svg class=\"icon close\">\n <use xlink:href=\"#close\" />\n </svg>\n </button>\n <div class=\"box\">\n <div class=\"tabs\">\n <ul>\n <li v-bind:class=\"{\n 'is-active': modal == 'login' || modal == 'forget'\n }\">\n <a @click=\"open\">{{ __('auth.login.login') }}</a>\n </li>\n <li v-bind:class=\"{\n 'is-active': modal == 'registration'\n }\" @click=\"register\">\n <a>{{ __('auth.login.signup') }}</a>\n </li>\n </ul>\n </div>\n <keep-alive>\n <login v-if=\"modal == 'login' || modal == 'forget'\"></login>\n </keep-alive>\n <keep-alive>\n <registration v-if=\"modal == 'registration'\"></registration>\n </keep-alive>\n <reset v-show=\"modal == 'reset'\"></reset>\n </div>\n </div>\n </div>\n </div>\n <div class=\"auth-user\" v-else-if=\"mounted\">\n <div class=\"dropdown is-right is-hoverable\">\n <div class=\"dropdown-trigger\">\n <a class=\"button\" :href=\"routes[0].path\">\n <slot name=\"user\" :user=\"user.name ? user.name : user.email\">\n <span>\n <i class=\"fas fa-user\"></i>\n {{ user.name ? user.name : user.email }}\n </span>\n <span class=\"icon is-small\">\n <i class=\"fas fa-angle-down\" aria-hidden=\"true\"></i>\n </span>\n </slot>\n </a>\n </div>\n <div class=\"dropdown-menu\" role=\"menu\">\n <div class=\"dropdown-content\">\n <div v-for=\"(item, key) in routes\" v-bind:key=\"key\">\n <a :href=\"item.path\" v-if=\"item.text\" class=\"dropdown-item\">\n <svg class=\"icon\" v-if=\"item.icon\">\n <use :xlink:href=\"'#' + item.icon\" />\n </svg>\n <span>{{ item.text }}</span>\n <span class=\"badge\" v-if=\"item.badge\">{{ item.badge }}</span>\n </a>\n <hr class=\"dropdown-divider\" v-else />\n </div>\n <hr class=\"dropdown-divider\" />\n <a class=\"dropdown-item\" @click=\"logout\">\n <svg class=\"icon\">\n <use xlink:href=\"#icon-logout\" />\n </svg>\n <span>{{ __('auth.user.menu.logout') }}</span>\n </a>\n </div>\n </div>\n </div>\n </div>\n</template>\n\n<script>\nimport { ref, computed } from 'vue';\nimport { useStore } from 'vuex';\nimport Reset from '@perevorot/shop/dist/js/components/auth/Reset';\n\nexport default {\n name: 'user',\n components: {\n Reset\n },\n props: {\n resetToken: {\n type: String,\n default: ''\n },\n resetEmail: {\n type: String,\n default: ''\n },\n tokenValid: {\n type: Boolean,\n default: false\n }\n },\n setup(props) {\n const store = useStore();\n const user = computed(() => store.getters['auth/me']);\n const modal = computed(() => store.getters['auth/modal']);\n const logged = computed(() => Object.keys(user.value).length > 0);\n const mounted = ref(false);\n const routes = computed(() => store.getters['auth/account']);\n\n const open = () => {\n store.commit('auth/modal', 'login');\n };\n\n const close = () => {\n store.commit('auth/modal', null);\n store.dispatch('auth/me');\n };\n\n const logout = () => {\n store.dispatch('auth/logout');\n };\n\n const register = () => {\n store.commit('auth/modal', 'registration');\n };\n\n store.dispatch('auth/me', {\n finally: () => {\n mounted.value = true;\n }\n });\n\n window.addEventListener('keyup', (e) => {\n if (modal.value && e.key === 'Escape') {\n close();\n }\n });\n\n if (props.resetToken) {\n store.commit('auth/modal', 'reset');\n }\n\n return {\n mounted,\n user,\n logged,\n modal,\n open,\n close,\n register,\n logout,\n routes\n };\n }\n};\n</script>"],"names":["name","components","Reset","props","resetToken","type","String","default","resetEmail","tokenValid","Boolean","setup","store","useStore","user","computed","getters","modal","logged","Object","keys","value","length","mounted","ref","routes","close","commit","dispatch","finally","window","addEventListener","e","key","open","register","logout","class","_createElementVNode","role","$setup","_createElementBlock","_hoisted_1","_renderSlot","label","_ctx","onClick","_hoisted_2","_hoisted_5","_hoisted_6","_createBlock","_createVNode","_hoisted_7","_hoisted_8","_hoisted_9","href","path","email","_hoisted_11","_hoisted_12","_hoisted_13","_hoisted_14","item","text","icon","_hoisted_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setup(){var t=e.ref(null),a=[],n=()=>{document.querySelectorAll("#subcategory > div").forEach(e=>{e.remove()})},o=()=>{window.scrollTo({top:0,left:0,behavior:"smooth"}),window.lazyImages&&window.lazyImages.update(),document.documentElement.classList.remove("is-catalog-loading"),l()},r=(r,l)=>{var c=(e=>{var t=e.hash?e.hash.substring(1):"",a=t?-1!==e.pathname.indexOf(":")?e.pathname+";"+t:e.pathname+"/"+t:e.pathname;return e.origin+a+(e.search?e.search+"&filter":"?filter")})(r),i=(e=>e.replace(/[^a-z0-9]/g,""))(c);-1===a.indexOf(i)?(document.documentElement.classList.add("is-catalog-loading"),$http.get(c).then(c=>{var d=document.createElement("html");d.innerHTML=c.data.page,window.app.component(i,{template:d.querySelector("#subcategory").innerHTML}),n(),a.push(i),t.value=i,l||history.pushState({urlPath:r.href},document.title,r.href),e.nextTick(o)}).catch(e=>{console.error(e)}).finally(()=>{document.documentElement.classList.remove("is-catalog-loading")})):(n(),t.value=i,l||history.pushState({urlPath:r.href},document.title,r.href),e.nextTick(o))},l=()=>{document.querySelectorAll("[shop-filter] a").forEach(e=>{e.addEventListener("click",t=>{t.preventDefault(),r(e)})})},c=()=>{var e=document.createElement("a");e.href=window.location.href,r(e,!0)};return window.addEventListener("DOMContentLoaded",()=>{l(),window.addEventListener("popstate",()=>{c()}),window.location.hash&&c()}),{page:t}}});t.render=function(t,a,n,o,r,l){return e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.page))},module.exports=t;
1
+ "use strict";var e=require("vue"),t=e.defineComponent({name:"catalog",setup:function(){var t=e.ref(null),n=[],o=function(){document.querySelectorAll("#subcategory > div").forEach((function(e){e.remove()}))},a=function(){window.scrollTo({top:0,left:0,behavior:"smooth"}),window.lazyImages&&window.lazyImages.update(),document.documentElement.classList.remove("is-catalog-loading"),c()},r=function(r,c){var i=function(e){var t=e.hash?e.hash.substring(1):"",n=t?-1!==e.pathname.indexOf(":")?e.pathname+";"+t:e.pathname+"/"+t:e.pathname;return e.origin+n+(e.search?e.search+"&filter":"?filter")}(r),u=function(e){return e.replace(/[^a-z0-9]/g,"")}(i);-1===n.indexOf(u)?(document.documentElement.classList.add("is-catalog-loading"),$http.get(i).then((function(i){var l=document.createElement("html");l.innerHTML=i.data.page,window.app.component(u,{template:l.querySelector("#subcategory").innerHTML}),o(),n.push(u),t.value=u,c||history.pushState({urlPath:r.href},document.title,r.href),e.nextTick(a)})).catch((function(e){console.error(e)})).finally((function(){document.documentElement.classList.remove("is-catalog-loading")}))):(o(),t.value=u,c||history.pushState({urlPath:r.href},document.title,r.href),e.nextTick(a))},c=function(){document.querySelectorAll("[shop-filter] a").forEach((function(e){e.addEventListener("click",(function(t){t.preventDefault(),r(e)}))}))},i=function(){var e=document.createElement("a");e.href=window.location.href,r(e,!0)};return window.addEventListener("DOMContentLoaded",(function(){c(),window.addEventListener("popstate",(function(){i()})),window.location.hash&&i()})),{page:t}}});t.render=function(t,n,o,a,r,c){return e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.page))},module.exports=t;
2
2
  //# sourceMappingURL=Catalog.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Catalog.js","sources":["../../../../src/js/components/shop/Catalog.vue","../../../../src/js/components/shop/Catalog.vue?vue&type=template&id=063df22e&lang.js"],"sourcesContent":["<template>\n <component :is=\"page\"></component>\n</template>\n<script>\nimport { ref, defineComponent, nextTick } from 'vue';\n\nexport default defineComponent({\n name: 'catalog',\n setup() {\n const page = ref(null);\n const pages = [];\n\n const getPageName = (href) => {\n return href.replace(/[^a-z0-9]/g, '');\n };\n\n const clearContainer = () => {\n document.querySelectorAll('#subcategory > div').forEach((element) => {\n element.remove();\n });\n };\n\n const after = () => {\n window.scrollTo({\n top: 0,\n left: 0,\n behavior: 'smooth'\n });\n\n if (window.lazyImages) {\n window.lazyImages.update();\n }\n\n document.documentElement.classList.remove('is-catalog-loading');\n\n init();\n };\n\n const parseFilterHref = (a) => {\n const hash = a.hash ? a.hash.substring(1) : '';\n const pathname = hash ? (a.pathname.indexOf(':') !== -1 ? a.pathname + ';' + hash : a.pathname + '/' + hash) : a.pathname;\n\n return a.origin + pathname + (a.search ? a.search + '&filter' : '?filter');\n };\n\n const get = (a, ignoreHistory) => {\n const href = parseFilterHref(a);\n\n const componentName = getPageName(href);\n\n if (pages.indexOf(componentName) === -1) {\n document.documentElement.classList.add('is-catalog-loading');\n\n $http\n .get(href)\n .then((response) => {\n let html = document.createElement('html');\n\n html.innerHTML = response.data.page;\n\n window.app.component(componentName, {\n template: html.querySelector('#subcategory').innerHTML\n });\n\n clearContainer();\n\n pages.push(componentName);\n\n page.value = componentName;\n\n if (!ignoreHistory) {\n history.pushState({ urlPath: a.href }, document.title, a.href);\n }\n\n nextTick(after);\n })\n .catch((error) => {\n console.error(error);\n })\n .finally(() => {\n document.documentElement.classList.remove('is-catalog-loading');\n });\n } else {\n clearContainer();\n\n page.value = componentName;\n\n if (!ignoreHistory) {\n history.pushState({ urlPath: a.href }, document.title, a.href);\n }\n\n nextTick(after);\n }\n };\n\n const init = () => {\n document.querySelectorAll('[shop-filter] a').forEach((a) => {\n a.addEventListener('click', (e) => {\n e.preventDefault();\n\n get(a);\n });\n });\n };\n\n const refresh = () => {\n const a = document.createElement('a');\n a.href = window.location.href;\n\n get(a, true);\n };\n\n window.addEventListener('DOMContentLoaded', () => {\n init();\n\n window.addEventListener('popstate', () => {\n refresh();\n });\n\n if (window.location.hash) {\n refresh();\n }\n });\n\n return {\n page\n };\n }\n});\n</script>","<template>\n <component :is=\"page\"></component>\n</template>\n<script>\nimport { ref, defineComponent, nextTick } from 'vue';\n\nexport default defineComponent({\n name: 'catalog',\n setup() {\n const page = ref(null);\n const pages = [];\n\n const getPageName = (href) => {\n return href.replace(/[^a-z0-9]/g, '');\n };\n\n const clearContainer = () => {\n document.querySelectorAll('#subcategory > div').forEach((element) => {\n element.remove();\n });\n };\n\n const after = () => {\n window.scrollTo({\n top: 0,\n left: 0,\n behavior: 'smooth'\n });\n\n if (window.lazyImages) {\n window.lazyImages.update();\n }\n\n document.documentElement.classList.remove('is-catalog-loading');\n\n init();\n };\n\n const parseFilterHref = (a) => {\n const hash = a.hash ? a.hash.substring(1) : '';\n const pathname = hash ? (a.pathname.indexOf(':') !== -1 ? a.pathname + ';' + hash : a.pathname + '/' + hash) : a.pathname;\n\n return a.origin + pathname + (a.search ? a.search + '&filter' : '?filter');\n };\n\n const get = (a, ignoreHistory) => {\n const href = parseFilterHref(a);\n\n const componentName = getPageName(href);\n\n if (pages.indexOf(componentName) === -1) {\n document.documentElement.classList.add('is-catalog-loading');\n\n $http\n .get(href)\n .then((response) => {\n let html = document.createElement('html');\n\n html.innerHTML = response.data.page;\n\n window.app.component(componentName, {\n template: html.querySelector('#subcategory').innerHTML\n });\n\n clearContainer();\n\n pages.push(componentName);\n\n page.value = componentName;\n\n if (!ignoreHistory) {\n history.pushState({ urlPath: a.href }, document.title, a.href);\n }\n\n nextTick(after);\n })\n .catch((error) => {\n console.error(error);\n })\n .finally(() => {\n document.documentElement.classList.remove('is-catalog-loading');\n });\n } else {\n clearContainer();\n\n page.value = componentName;\n\n if (!ignoreHistory) {\n history.pushState({ urlPath: a.href }, document.title, a.href);\n }\n\n nextTick(after);\n }\n };\n\n const init = () => {\n document.querySelectorAll('[shop-filter] a').forEach((a) => {\n a.addEventListener('click', (e) => {\n e.preventDefault();\n\n get(a);\n });\n });\n };\n\n const refresh = () => {\n const a = document.createElement('a');\n a.href = window.location.href;\n\n get(a, true);\n };\n\n window.addEventListener('DOMContentLoaded', () => {\n init();\n\n window.addEventListener('popstate', () => {\n refresh();\n });\n\n if (window.location.hash) {\n refresh();\n }\n });\n\n return {\n page\n };\n }\n});\n</script>"],"names":["defineComponent","name","setup","page","ref","pages","clearContainer","document","querySelectorAll","forEach","element","remove","after","window","scrollTo","top","left","behavior","lazyImages","update","documentElement","classList","init","get","a","ignoreHistory","href","hash","substring","pathname","indexOf","origin","search","parseFilterHref","componentName","replace","getPageName","add","$http","then","response","html","createElement","innerHTML","data","app","component","template","querySelector","push","value","history","pushState","urlPath","title","nextTick","catch","error","console","finally","addEventListener","e","preventDefault","refresh","location","_createBlock","_ctx"],"mappings":"oCAMeA,kBAAgB,CAC3BC,KAAM,UACNC,YACUC,EAAOC,MAAI,MACXC,EAAQ,GAMRC,EAAiB,KACnBC,SAASC,iBAAiB,sBAAsBC,QAASC,IACrDA,EAAQC,YAIVC,EAAQ,KACVC,OAAOC,SAAS,CACZC,IAAK,EACLC,KAAM,EACNC,SAAU,WAGVJ,OAAOK,YACPL,OAAOK,WAAWC,SAGtBZ,SAASa,gBAAgBC,UAAUV,OAAO,sBAE1CW,KAUEC,EAAM,CAACC,EAAGC,SACNC,EAReF,CAAAA,QACfG,EAAOH,EAAEG,KAAOH,EAAEG,KAAKC,UAAU,GAAK,GACtCC,EAAWF,GAAqC,IAA7BH,EAAEK,SAASC,QAAQ,KAAcN,EAAEK,SAAW,IAAMF,EAAOH,EAAEK,SAAW,IAAMF,EAAQH,EAAEK,gBAE1GL,EAAEO,OAASF,GAAYL,EAAEQ,OAASR,EAAEQ,OAAS,UAAY,YAInDC,CAAgBT,GAEvBU,EApCWR,CAAAA,GACVA,EAAKS,QAAQ,aAAc,IAmCZC,CAAYV,IAEI,IAAlCrB,EAAMyB,QAAQI,IACd3B,SAASa,gBAAgBC,UAAUgB,IAAI,sBAEvCC,MACKf,IAAIG,GACJa,KAAMC,QACCC,EAAOlC,SAASmC,cAAc,QAElCD,EAAKE,UAAYH,EAASI,KAAKzC,KAE/BU,OAAOgC,IAAIC,UAAUZ,EAAe,CAChCa,SAAUN,EAAKO,cAAc,gBAAgBL,YAGjDrC,IAEAD,EAAM4C,KAAKf,GAEX/B,EAAK+C,MAAQhB,EAERT,GACD0B,QAAQC,UAAU,CAAEC,QAAS7B,EAAEE,MAAQnB,SAAS+C,MAAO9B,EAAEE,MAG7D6B,WAAS3C,KAEZ4C,MAAOC,IACJC,QAAQD,MAAMA,KAEjBE,QAAQ,KACLpD,SAASa,gBAAgBC,UAAUV,OAAO,0BAGlDL,IAEAH,EAAK+C,MAAQhB,EAERT,GACD0B,QAAQC,UAAU,CAAEC,QAAS7B,EAAEE,MAAQnB,SAAS+C,MAAO9B,EAAEE,MAG7D6B,WAAS3C,KAIXU,EAAO,KACTf,SAASC,iBAAiB,mBAAmBC,QAASe,IAClDA,EAAEoC,iBAAiB,QAAUC,IACzBA,EAAEC,iBAEFvC,EAAIC,QAKVuC,EAAU,SACNvC,EAAIjB,SAASmC,cAAc,KACjClB,EAAEE,KAAOb,OAAOmD,SAAStC,KAEzBH,EAAIC,GAAG,WAGXX,OAAO+C,iBAAiB,mBAAoB,KACxCtC,IAEAT,OAAO+C,iBAAiB,WAAY,KAChCG,MAGAlD,OAAOmD,SAASrC,MAChBoC,MAID,CACH5D,KAAAA,0DC5HR8D,wCAAgBC"}
1
+ {"version":3,"file":"Catalog.js","sources":["../../../../src/js/components/shop/Catalog.vue","../../../../src/js/components/shop/Catalog.vue?vue&type=template&id=063df22e&lang.js"],"sourcesContent":["<template>\n <component :is=\"page\"></component>\n</template>\n<script>\nimport { ref, defineComponent, nextTick } from 'vue';\n\nexport default defineComponent({\n name: 'catalog',\n setup() {\n const page = ref(null);\n const pages = [];\n\n const getPageName = (href) => {\n return href.replace(/[^a-z0-9]/g, '');\n };\n\n const clearContainer = () => {\n document.querySelectorAll('#subcategory > div').forEach((element) => {\n element.remove();\n });\n };\n\n const after = () => {\n window.scrollTo({\n top: 0,\n left: 0,\n behavior: 'smooth'\n });\n\n if (window.lazyImages) {\n window.lazyImages.update();\n }\n\n document.documentElement.classList.remove('is-catalog-loading');\n\n init();\n };\n\n const parseFilterHref = (a) => {\n const hash = a.hash ? a.hash.substring(1) : '';\n const pathname = hash ? (a.pathname.indexOf(':') !== -1 ? a.pathname + ';' + hash : a.pathname + '/' + hash) : a.pathname;\n\n return a.origin + pathname + (a.search ? a.search + '&filter' : '?filter');\n };\n\n const get = (a, ignoreHistory) => {\n const href = parseFilterHref(a);\n\n const componentName = getPageName(href);\n\n if (pages.indexOf(componentName) === -1) {\n document.documentElement.classList.add('is-catalog-loading');\n\n $http\n .get(href)\n .then((response) => {\n let html = document.createElement('html');\n\n html.innerHTML = response.data.page;\n\n window.app.component(componentName, {\n template: html.querySelector('#subcategory').innerHTML\n });\n\n clearContainer();\n\n pages.push(componentName);\n\n page.value = componentName;\n\n if (!ignoreHistory) {\n history.pushState({ urlPath: a.href }, document.title, a.href);\n }\n\n nextTick(after);\n })\n .catch((error) => {\n console.error(error);\n })\n .finally(() => {\n document.documentElement.classList.remove('is-catalog-loading');\n });\n } else {\n clearContainer();\n\n page.value = componentName;\n\n if (!ignoreHistory) {\n history.pushState({ urlPath: a.href }, document.title, a.href);\n }\n\n nextTick(after);\n }\n };\n\n const init = () => {\n document.querySelectorAll('[shop-filter] a').forEach((a) => {\n a.addEventListener('click', (e) => {\n e.preventDefault();\n\n get(a);\n });\n });\n };\n\n const refresh = () => {\n const a = document.createElement('a');\n a.href = window.location.href;\n\n get(a, true);\n };\n\n window.addEventListener('DOMContentLoaded', () => {\n init();\n\n window.addEventListener('popstate', () => {\n refresh();\n });\n\n if (window.location.hash) {\n refresh();\n }\n });\n\n return {\n page\n };\n }\n});\n</script>","<template>\n <component :is=\"page\"></component>\n</template>\n<script>\nimport { ref, defineComponent, nextTick } from 'vue';\n\nexport default defineComponent({\n name: 'catalog',\n setup() {\n const page = ref(null);\n const pages = [];\n\n const getPageName = (href) => {\n return href.replace(/[^a-z0-9]/g, '');\n };\n\n const clearContainer = () => {\n document.querySelectorAll('#subcategory > div').forEach((element) => {\n element.remove();\n });\n };\n\n const after = () => {\n window.scrollTo({\n top: 0,\n left: 0,\n behavior: 'smooth'\n });\n\n if (window.lazyImages) {\n window.lazyImages.update();\n }\n\n document.documentElement.classList.remove('is-catalog-loading');\n\n init();\n };\n\n const parseFilterHref = (a) => {\n const hash = a.hash ? a.hash.substring(1) : '';\n const pathname = hash ? (a.pathname.indexOf(':') !== -1 ? a.pathname + ';' + hash : a.pathname + '/' + hash) : a.pathname;\n\n return a.origin + pathname + (a.search ? a.search + '&filter' : '?filter');\n };\n\n const get = (a, ignoreHistory) => {\n const href = parseFilterHref(a);\n\n const componentName = getPageName(href);\n\n if (pages.indexOf(componentName) === -1) {\n document.documentElement.classList.add('is-catalog-loading');\n\n $http\n .get(href)\n .then((response) => {\n let html = document.createElement('html');\n\n html.innerHTML = response.data.page;\n\n window.app.component(componentName, {\n template: html.querySelector('#subcategory').innerHTML\n });\n\n clearContainer();\n\n pages.push(componentName);\n\n page.value = componentName;\n\n if (!ignoreHistory) {\n history.pushState({ urlPath: a.href }, document.title, a.href);\n }\n\n nextTick(after);\n })\n .catch((error) => {\n console.error(error);\n })\n .finally(() => {\n document.documentElement.classList.remove('is-catalog-loading');\n });\n } else {\n clearContainer();\n\n page.value = componentName;\n\n if (!ignoreHistory) {\n history.pushState({ urlPath: a.href }, document.title, a.href);\n }\n\n nextTick(after);\n }\n };\n\n const init = () => {\n document.querySelectorAll('[shop-filter] a').forEach((a) => {\n a.addEventListener('click', (e) => {\n e.preventDefault();\n\n get(a);\n });\n });\n };\n\n const refresh = () => {\n const a = document.createElement('a');\n a.href = window.location.href;\n\n get(a, true);\n };\n\n window.addEventListener('DOMContentLoaded', () => {\n init();\n\n window.addEventListener('popstate', () => {\n refresh();\n });\n\n if (window.location.hash) {\n refresh();\n }\n });\n\n return {\n page\n };\n }\n});\n</script>"],"names":["defineComponent","name","setup","page","ref","pages","clearContainer","document","querySelectorAll","forEach","element","remove","after","window","scrollTo","top","left","behavior","lazyImages","update","documentElement","classList","init","get","a","ignoreHistory","href","hash","substring","pathname","indexOf","origin","search","parseFilterHref","componentName","replace","getPageName","add","$http","then","response","html","createElement","innerHTML","data","app","component","template","querySelector","push","value","history","pushState","urlPath","title","nextTick","catch","error","console","finally","addEventListener","e","preventDefault","refresh","location","_createBlock","_ctx"],"mappings":"oCAMeA,kBAAgB,CAC3BC,KAAM,UACNC,qBACUC,EAAOC,MAAI,MACXC,EAAQ,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AO,WACTf,SAASC,iBAAiB,mBAAmBC,SAAQ,SAACe,GAClDA,EAAEoC,iBAAiB,SAAS,SAACC,GACzBA,EAAEC,iBAEFvC,EAAIC,UAKVuC,EAAU,eACNvC,EAAIjB,SAASmC,cAAc,KACjClB,EAAEE,KAAOb,OAAOmD,SAAStC,KAEzBH,EAAIC,GAAG,WAGXX,OAAO+C,iBAAiB,oBAAoB,WACxCtC,IAEAT,OAAO+C,iBAAiB,YAAY,WAChCG,OAGAlD,OAAOmD,SAASrC,MAChBoC,OAID,CACH5D,KAAAA,0DC5HR8D,wCAAgBC"}
@@ -1,2 +1,2 @@
1
- "use strict";var e=require("vue"),o=require("vue-toastification");function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r=t(require("copy-to-clipboard")),a=o.useToast(),l=e.defineComponent({name:"code-copy",props:{code:{type:String,default:""},className:{type:String,default:""}},setup(o){var t=o.code,l=o.className,n=e.ref(!1),c=__("shop.copy"),s=e.ref(!1),p=e.ref(null);return{code:t,copyLabel:c,isHovered:n,className:l,isHovered:n,style:s,enter:()=>{s.value={width:p.value.offsetWidth+"px"},n.value=!0},leave:()=>{n.value=!1},copyToClipboard:()=>{r.default(t),a(__("shop.copied",{code:t}),{type:"success"})},wrapper:p}}}),n={key:0};l.render=function(o,t,r,a,l,c){return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["shop-code",o.className]),onMouseenter:t[0]||(t[0]=function(){return o.enter&&o.enter(...arguments)}),onMouseleave:t[1]||(t[1]=function(){return o.leave&&o.leave(...arguments)}),onClick:t[2]||(t[2]=function(){return o.copyToClipboard&&o.copyToClipboard(...arguments)}),style:e.normalizeStyle(o.style),ref:"wrapper"},[o.isHovered?(e.openBlock(),e.createElementBlock("span",n,e.toDisplayString(o.copyLabel),1)):e.renderSlot(o.$slots,"default",{key:1,code:o.code},()=>[e.createTextVNode(e.toDisplayString(o.code),1)])],38)},module.exports=l;
1
+ "use strict";var e=require("vue"),o=require("vue-toastification");function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r=t(require("copy-to-clipboard"));function n(e,o,t){return o in e?Object.defineProperty(e,o,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[o]=t,e}var a=o.useToast(),l=e.defineComponent({name:"code-copy",props:{code:{type:String,default:""},className:{type:String,default:""}},setup:function(o){var t,l=o.code,c=o.className,u=e.ref(!1),i=__("shop.copy"),p=e.ref(!1),s=e.ref(null);return n(t={code:l,copyLabel:i,isHovered:u,className:c},"isHovered",u),n(t,"style",p),n(t,"enter",(function(){p.value={width:s.value.offsetWidth+"px"},u.value=!0})),n(t,"leave",(function(){u.value=!1})),n(t,"copyToClipboard",(function(){r.default(l),a(__("shop.copied",{code:l}),{type:"success"})})),n(t,"wrapper",s),t}}),c={key:0};l.render=function(o,t,r,n,a,l){return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["shop-code",o.className]),onMouseenter:t[0]||(t[0]=function(){return o.enter&&o.enter.apply(o,arguments)}),onMouseleave:t[1]||(t[1]=function(){return o.leave&&o.leave.apply(o,arguments)}),onClick:t[2]||(t[2]=function(){return o.copyToClipboard&&o.copyToClipboard.apply(o,arguments)}),style:e.normalizeStyle(o.style),ref:"wrapper"},[o.isHovered?(e.openBlock(),e.createElementBlock("span",c,e.toDisplayString(o.copyLabel),1)):e.renderSlot(o.$slots,"default",{key:1,code:o.code},(function(){return[e.createTextVNode(e.toDisplayString(o.code),1)]}))],38)},module.exports=l;
2
2
  //# sourceMappingURL=CodeCopy.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"CodeCopy.js","sources":["../../../../src/js/components/shop/CodeCopy.vue","../../../../src/js/components/shop/CodeCopy.vue?vue&type=template&id=25b9fe40&lang.js"],"sourcesContent":["<template>\n <div class=\"shop-code\" v-bind:class=\"className\" v-on:mouseenter=\"enter\" v-on:mouseleave=\"leave\" v-on:click=\"copyToClipboard\" v-bind:style=\"style\" ref=\"wrapper\">\n <span v-if=\"isHovered\">{{ copyLabel }}</span>\n <slot :code=\"code\" v-else>\n {{ code }}\n </slot>\n </div>\n</template>\n<script>\nimport { ref, defineComponent } from \"vue\";\nimport { useToast } from 'vue-toastification';\nimport copy from \"copy-to-clipboard\";\n\nconst toast = useToast();\n\nexport default /*#__PURE__*/ defineComponent({\n name: \"code-copy\",\n props: {\n code: {\n type: String,\n default: \"\",\n },\n className: {\n type: String,\n default: \"\",\n },\n },\n setup(props) {\n const code = props.code;\n const className = props.className;\n const isHovered = ref(false);\n const copyLabel = __(\"shop.copy\");\n const style = ref(false);\n const wrapper = ref(null);\n\n const copyToClipboard = () => {\n copy(code);\n\n toast(__(\"shop.copied\", { code: code }), {\n type: \"success\",\n });\n };\n\n const enter = () => {\n style.value = {\n width: wrapper.value.offsetWidth + \"px\",\n };\n\n isHovered.value = true;\n };\n\n const leave = () => {\n isHovered.value = false;\n };\n\n return {\n code,\n copyLabel,\n isHovered,\n className,\n isHovered,\n style,\n enter,\n leave,\n copyToClipboard,\n wrapper,\n };\n },\n});\n</script>","<template>\n <div class=\"shop-code\" v-bind:class=\"className\" v-on:mouseenter=\"enter\" v-on:mouseleave=\"leave\" v-on:click=\"copyToClipboard\" v-bind:style=\"style\" ref=\"wrapper\">\n <span v-if=\"isHovered\">{{ copyLabel }}</span>\n <slot :code=\"code\" v-else>\n {{ code }}\n </slot>\n </div>\n</template>\n<script>\nimport { ref, defineComponent } from \"vue\";\nimport { useToast } from 'vue-toastification';\nimport copy from \"copy-to-clipboard\";\n\nconst toast = useToast();\n\nexport default /*#__PURE__*/ defineComponent({\n name: \"code-copy\",\n props: {\n code: {\n type: String,\n default: \"\",\n },\n className: {\n type: String,\n default: \"\",\n },\n },\n setup(props) {\n const code = props.code;\n const className = props.className;\n const isHovered = ref(false);\n const copyLabel = __(\"shop.copy\");\n const style = ref(false);\n const wrapper = ref(null);\n\n const copyToClipboard = () => {\n copy(code);\n\n toast(__(\"shop.copied\", { code: code }), {\n type: \"success\",\n });\n };\n\n const enter = () => {\n style.value = {\n width: wrapper.value.offsetWidth + \"px\",\n };\n\n isHovered.value = true;\n };\n\n const leave = () => {\n isHovered.value = false;\n };\n\n return {\n code,\n copyLabel,\n isHovered,\n className,\n isHovered,\n style,\n enter,\n leave,\n copyToClipboard,\n wrapper,\n };\n },\n});\n</script>"],"names":["toast","useToast","defineComponent","name","props","code","type","String","default","className","setup","isHovered","ref","copyLabel","__","style","wrapper","enter","value","width","offsetWidth","leave","copyToClipboard","copy","_createElementBlock","class","_ctx","onMouseenter","onMouseleave","onClick","_renderSlot"],"mappings":"gLAaMA,EAAQC,eAEeC,kBAAgB,CACzCC,KAAM,YACNC,MAAO,CACHC,KAAM,CACFC,KAAMC,OACNC,QAAS,IAEbC,UAAW,CACPH,KAAMC,OACNC,QAAS,KAGjBE,MAAMN,OACIC,EAAOD,EAAMC,KACbI,EAAYL,EAAMK,UAClBE,EAAYC,OAAI,GAChBC,EAAYC,GAAG,aACfC,EAAQH,OAAI,GACZI,EAAUJ,MAAI,YAsBb,CACHP,KAAAA,EACAQ,UAAAA,EACAF,UAAAA,EACAF,UAAAA,EACAE,UAAAA,EACAI,MAAAA,EACAE,MAnBU,KACVF,EAAMG,MAAQ,CACVC,MAAOH,EAAQE,MAAME,YAAc,MAGvCT,EAAUO,OAAQ,GAelBG,MAZU,KACVV,EAAUO,OAAQ,GAYlBI,gBA7BoB,KACpBC,UAAKlB,GAELL,EAAMc,GAAG,cAAe,CAAET,KAAMA,IAAS,CACrCC,KAAM,aA0BVU,QAAAA,oEChERQ,4BAAKC,wBAAM,YAA0BC,cAAgBC,2CAAYD,iCAAYE,2CAAYF,iCAAYG,sCAAOH,qDAAwBX,uBAAOW,SAAOd,IAAI,YACtIc,2BAAZF,gDAA0BE,iBAC1BI,uCAAOzB,KAAMqB,QAAb,yCACOA"}
1
+ {"version":3,"file":"CodeCopy.js","sources":["../../../../src/js/components/shop/CodeCopy.vue","../../../../src/js/components/shop/CodeCopy.vue?vue&type=template&id=25b9fe40&lang.js"],"sourcesContent":["<template>\n <div class=\"shop-code\" v-bind:class=\"className\" v-on:mouseenter=\"enter\" v-on:mouseleave=\"leave\" v-on:click=\"copyToClipboard\" v-bind:style=\"style\" ref=\"wrapper\">\n <span v-if=\"isHovered\">{{ copyLabel }}</span>\n <slot :code=\"code\" v-else>\n {{ code }}\n </slot>\n </div>\n</template>\n<script>\nimport { ref, defineComponent } from \"vue\";\nimport { useToast } from 'vue-toastification';\nimport copy from \"copy-to-clipboard\";\n\nconst toast = useToast();\n\nexport default /*#__PURE__*/ defineComponent({\n name: \"code-copy\",\n props: {\n code: {\n type: String,\n default: \"\",\n },\n className: {\n type: String,\n default: \"\",\n },\n },\n setup(props) {\n const code = props.code;\n const className = props.className;\n const isHovered = ref(false);\n const copyLabel = __(\"shop.copy\");\n const style = ref(false);\n const wrapper = ref(null);\n\n const copyToClipboard = () => {\n copy(code);\n\n toast(__(\"shop.copied\", { code: code }), {\n type: \"success\",\n });\n };\n\n const enter = () => {\n style.value = {\n width: wrapper.value.offsetWidth + \"px\",\n };\n\n isHovered.value = true;\n };\n\n const leave = () => {\n isHovered.value = false;\n };\n\n return {\n code,\n copyLabel,\n isHovered,\n className,\n isHovered,\n style,\n enter,\n leave,\n copyToClipboard,\n wrapper,\n };\n },\n});\n</script>","<template>\n <div class=\"shop-code\" v-bind:class=\"className\" v-on:mouseenter=\"enter\" v-on:mouseleave=\"leave\" v-on:click=\"copyToClipboard\" v-bind:style=\"style\" ref=\"wrapper\">\n <span v-if=\"isHovered\">{{ copyLabel }}</span>\n <slot :code=\"code\" v-else>\n {{ code }}\n </slot>\n </div>\n</template>\n<script>\nimport { ref, defineComponent } from \"vue\";\nimport { useToast } from 'vue-toastification';\nimport copy from \"copy-to-clipboard\";\n\nconst toast = useToast();\n\nexport default /*#__PURE__*/ defineComponent({\n name: \"code-copy\",\n props: {\n code: {\n type: String,\n default: \"\",\n },\n className: {\n type: String,\n default: \"\",\n },\n },\n setup(props) {\n const code = props.code;\n const className = props.className;\n const isHovered = ref(false);\n const copyLabel = __(\"shop.copy\");\n const style = ref(false);\n const wrapper = ref(null);\n\n const copyToClipboard = () => {\n copy(code);\n\n toast(__(\"shop.copied\", { code: code }), {\n type: \"success\",\n });\n };\n\n const enter = () => {\n style.value = {\n width: wrapper.value.offsetWidth + \"px\",\n };\n\n isHovered.value = true;\n };\n\n const leave = () => {\n isHovered.value = false;\n };\n\n return {\n code,\n copyLabel,\n isHovered,\n className,\n isHovered,\n style,\n enter,\n leave,\n copyToClipboard,\n wrapper,\n };\n },\n});\n</script>"],"names":["toast","useToast","defineComponent","name","props","code","type","String","default","className","setup","isHovered","ref","copyLabel","__","style","wrapper","value","width","offsetWidth","copy","_createElementBlock","class","_ctx","onMouseenter","onMouseleave","onClick","_renderSlot"],"mappings":"wSAaA,IAAMA,EAAQC,eAEeC,kBAAgB,CACzCC,KAAM,YACNC,MAAO,CACHC,KAAM,CACFC,KAAMC,OACNC,QAAS,IAEbC,UAAW,CACPH,KAAMC,OACNC,QAAS,KAGjBE,eAAMN,SACIC,EAAOD,EAAMC,KACbI,EAAYL,EAAMK,UAClBE,EAAYC,OAAI,GAChBC,EAAYC,GAAG,aACfC,EAAQH,OAAI,GACZI,EAAUJ,MAAI,kBAuBhBP,KAAAA,EACAQ,UAAAA,EACAF,UAAAA,EACAF,UAAAA,eACAE,eACAI,gBAlBU,WACVA,EAAME,MAAQ,CACVC,MAAOF,EAAQC,MAAME,YAAc,MAGvCR,EAAUM,OAAQ,kBAGR,WACVN,EAAUM,OAAQ,4BAjBE,WACpBG,UAAKf,GAELL,EAAMc,GAAG,cAAe,CAAET,KAAMA,IAAS,CACrCC,KAAM,6BA0BVU,sEChERK,4BAAKC,wBAAM,YAA0BC,cAAgBC,2CAAYD,sCAAYE,2CAAYF,sCAAYG,sCAAOH,0DAAwBR,uBAAOQ,SAAOX,IAAI,YACtIW,2BAAZF,gDAA0BE,iBAC1BI,uCAAOtB,KAAMkB,SAAb,sDACOA"}
@@ -1,2 +1,2 @@
1
- "use strict";var e=require("vue"),i=require("swiper/core");function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var s=r(i);s.default.use([i.Navigation,i.Mousewheel]);var t=e.defineComponent({name:"cross",setup(){window.addEventListener("DOMContentLoaded",()=>{var e=document.getElementById("cross-sale"),i=e.querySelectorAll(".swiper-container"),r=e.querySelectorAll("li"),t=[];r.forEach((e,n)=>{e.addEventListener("click",()=>{if(r.forEach(e=>{e.classList.remove("is-active")}),i.forEach(e=>{e.classList.add("is-hidden")}),i[n].classList.remove("is-hidden"),e.classList.add("is-active"),!t[n]){var o=window.crossSaleSwiperOptions?window.crossSaleSwiperOptions:{slidesPerView:5,spaceBetween:24,freeMode:!0,mousewheel:{forceToAxis:!0},navigation:{nextEl:".swiper-button-next",prevEl:".swiper-button-prev"}};t[n]=new s.default(i[n],o)}t[n].slideTo(0)})}),r[0].click()})}});t.render=function(e,i,r,s,t,n){return null},module.exports=t;
1
+ "use strict";var e=require("vue"),i=require("swiper/core");function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var t=n(i);t.default.use([i.Navigation,i.Mousewheel]);var o=e.defineComponent({name:"cross",setup:function(){window.addEventListener("DOMContentLoaded",(function(){var e=document.getElementById("cross-sale"),i=e.querySelectorAll(".swiper-container"),n=e.querySelectorAll("li"),o=[];n.forEach((function(e,r){e.addEventListener("click",(function(){if(n.forEach((function(e){e.classList.remove("is-active")})),i.forEach((function(e){e.classList.add("is-hidden")})),i[r].classList.remove("is-hidden"),e.classList.add("is-active"),!o[r]){var s=window.crossSaleSwiperOptions?window.crossSaleSwiperOptions:{slidesPerView:5,spaceBetween:24,freeMode:!0,mousewheel:{forceToAxis:!0},navigation:{nextEl:".swiper-button-next",prevEl:".swiper-button-prev"}};o[r]=new t.default(i[r],s)}o[r].slideTo(0)}))})),n[0].click()}))}});o.render=function(e,i,n,t,o,r){return null},module.exports=o;
2
2
  //# sourceMappingURL=Cross.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Cross.js","sources":["../../../../src/js/components/shop/Cross.vue"],"sourcesContent":["<template></template>\n<script>\nimport { defineComponent } from \"vue\";\nimport SwiperCore, { Navigation, Mousewheel } from \"swiper/core\";\n\nSwiperCore.use([Navigation, Mousewheel]);\n\nexport default /*#__PURE__*/ defineComponent({\n name: \"cross\",\n setup() {\n window.addEventListener(\"DOMContentLoaded\", () => {\n const container = document.getElementById(\"cross-sale\");\n const sliders = container.querySelectorAll(\".swiper-container\");\n const tabs = container.querySelectorAll(\"li\");\n let inited = [];\n\n tabs.forEach((li, index) => {\n li.addEventListener(\"click\", () => {\n tabs.forEach((li) => {\n li.classList.remove(\"is-active\");\n });\n\n sliders.forEach((slider) => {\n slider.classList.add(\"is-hidden\");\n });\n\n sliders[index].classList.remove(\"is-hidden\");\n li.classList.add(\"is-active\");\n\n if (!inited[index]) {\n const options = window.crossSaleSwiperOptions\n ? window.crossSaleSwiperOptions\n : {\n slidesPerView: 5,\n spaceBetween: 24,\n freeMode: true,\n mousewheel: {\n forceToAxis: true,\n },\n navigation: {\n nextEl: \".swiper-button-next\",\n prevEl: \".swiper-button-prev\",\n },\n };\n\n inited[index] = new SwiperCore(sliders[index], options);\n }\n\n inited[index].slideTo(0);\n });\n });\n\n tabs[0].click();\n });\n },\n});\n</script>"],"names":["SwiperCore","use","Navigation","Mousewheel","defineComponent","name","setup","window","addEventListener","container","document","getElementById","sliders","querySelectorAll","tabs","inited","forEach","li","index","classList","remove","slider","add","options","crossSaleSwiperOptions","slidesPerView","spaceBetween","freeMode","mousewheel","forceToAxis","navigation","nextEl","prevEl","slideTo","click"],"mappings":"8IAKAA,UAAWC,IAAI,CAACC,aAAYC,eAE5B,MAA6BC,kBAAgB,CACzCC,KAAM,QACNC,QACIC,OAAOC,iBAAiB,mBAAoB,SAClCC,EAAYC,SAASC,eAAe,cACpCC,EAAUH,EAAUI,iBAAiB,qBACrCC,EAAOL,EAAUI,iBAAiB,MACpCE,EAAS,GAEbD,EAAKE,QAAQ,CAACC,EAAIC,KACdD,EAAGT,iBAAiB,QAAS,QACzBM,EAAKE,QAASC,IACVA,EAAGE,UAAUC,OAAO,eAGxBR,EAAQI,QAASK,IACbA,EAAOF,UAAUG,IAAI,eAGzBV,EAAQM,GAAOC,UAAUC,OAAO,aAChCH,EAAGE,UAAUG,IAAI,cAEZP,EAAOG,GAAQ,KACVK,EAAUhB,OAAOiB,uBACjBjB,OAAOiB,uBACP,CACIC,cAAe,EACfC,aAAc,GACdC,UAAU,EACVC,WAAY,CACRC,aAAa,GAEjBC,WAAY,CACRC,OAAQ,sBACRC,OAAQ,wBAItBjB,EAAOG,GAAS,IAAIlB,UAAWY,EAAQM,GAAQK,GAGnDR,EAAOG,GAAOe,QAAQ,OAI9BnB,EAAK,GAAGoB"}
1
+ {"version":3,"file":"Cross.js","sources":["../../../../src/js/components/shop/Cross.vue"],"sourcesContent":["<template></template>\n<script>\nimport { defineComponent } from \"vue\";\nimport SwiperCore, { Navigation, Mousewheel } from \"swiper/core\";\n\nSwiperCore.use([Navigation, Mousewheel]);\n\nexport default /*#__PURE__*/ defineComponent({\n name: \"cross\",\n setup() {\n window.addEventListener(\"DOMContentLoaded\", () => {\n const container = document.getElementById(\"cross-sale\");\n const sliders = container.querySelectorAll(\".swiper-container\");\n const tabs = container.querySelectorAll(\"li\");\n let inited = [];\n\n tabs.forEach((li, index) => {\n li.addEventListener(\"click\", () => {\n tabs.forEach((li) => {\n li.classList.remove(\"is-active\");\n });\n\n sliders.forEach((slider) => {\n slider.classList.add(\"is-hidden\");\n });\n\n sliders[index].classList.remove(\"is-hidden\");\n li.classList.add(\"is-active\");\n\n if (!inited[index]) {\n const options = window.crossSaleSwiperOptions\n ? window.crossSaleSwiperOptions\n : {\n slidesPerView: 5,\n spaceBetween: 24,\n freeMode: true,\n mousewheel: {\n forceToAxis: true,\n },\n navigation: {\n nextEl: \".swiper-button-next\",\n prevEl: \".swiper-button-prev\",\n },\n };\n\n inited[index] = new SwiperCore(sliders[index], options);\n }\n\n inited[index].slideTo(0);\n });\n });\n\n tabs[0].click();\n });\n },\n});\n</script>"],"names":["SwiperCore","use","Navigation","Mousewheel","defineComponent","name","setup","window","addEventListener","container","document","getElementById","sliders","querySelectorAll","tabs","inited","forEach","li","index","classList","remove","slider","add","options","crossSaleSwiperOptions","slidesPerView","spaceBetween","freeMode","mousewheel","forceToAxis","navigation","nextEl","prevEl","slideTo","click"],"mappings":"8IAKAA,UAAWC,IAAI,CAACC,aAAYC,eAE5B,MAA6BC,kBAAgB,CACzCC,KAAM,QACNC,iBACIC,OAAOC,iBAAiB,oBAAoB,eAClCC,EAAYC,SAASC,eAAe,cACpCC,EAAUH,EAAUI,iBAAiB,qBACrCC,EAAOL,EAAUI,iBAAiB,MACpCE,EAAS,GAEbD,EAAKE,SAAQ,SAACC,EAAIC,GACdD,EAAGT,iBAAiB,SAAS,cACzBM,EAAKE,SAAQ,SAACC,GACVA,EAAGE,UAAUC,OAAO,gBAGxBR,EAAQI,SAAQ,SAACK,GACbA,EAAOF,UAAUG,IAAI,gBAGzBV,EAAQM,GAAOC,UAAUC,OAAO,aAChCH,EAAGE,UAAUG,IAAI,cAEZP,EAAOG,GAAQ,KACVK,EAAUhB,OAAOiB,uBACjBjB,OAAOiB,uBACP,CACIC,cAAe,EACfC,aAAc,GACdC,UAAU,EACVC,WAAY,CACRC,aAAa,GAEjBC,WAAY,CACRC,OAAQ,sBACRC,OAAQ,wBAItBjB,EAAOG,GAAS,IAAIlB,UAAWY,EAAQM,GAAQK,GAGnDR,EAAOG,GAAOe,QAAQ,SAI9BnB,EAAK,GAAGoB"}
@@ -1,2 +1,2 @@
1
- "use strict";var e=require("secure-ls"),t=require("vue");function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=r(e),l={name:"filter-toggle",setup(){t.onMounted(()=>{var e=new o.default({isCompression:!1}),t=e.get("filter");for(var[r,l]of(t||(t={brand:!0,category:!0,price:!0},e.set("filter",t)),Object.entries(t))){var s=document.querySelector('[shop-filter][data-code="'+r+'"]');s&&s.classList.remove("is-toggled")}document.querySelectorAll("[shop-filter-title]").forEach(r=>{r.addEventListener("click",()=>{var o=r.closest("[shop-filter]").dataset.code;t[o]?delete t[o]:t[o]=!0,r.closest("[shop-filter]").classList.toggle("is-toggled"),e.set("filter",t)})})})}};l.render=function(e,t,r,o,l,s){return null},module.exports=l;
1
+ "use strict";var e=require("secure-ls"),t=require("vue");function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=r(e);function o(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==r)return;var n,o,l=[],i=!0,u=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(l.push(n.value),!t||l.length!==t);i=!0);}catch(e){u=!0,o=e}finally{try{i||null==r.return||r.return()}finally{if(u)throw o}}return l}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return l(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return l(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var i={name:"filter-toggle",setup:function(){t.onMounted((function(){var e=new n.default({isCompression:!1}),t=e.get("filter");t||(t={brand:!0,category:!0,price:!0},e.set("filter",t));for(var r=0,l=Object.entries(t);r<l.length;r++){var i=o(l[r],2),u=i[0];i[1];var a=document.querySelector('[shop-filter][data-code="'+u+'"]');a&&a.classList.remove("is-toggled")}document.querySelectorAll("[shop-filter-title]").forEach((function(r){r.addEventListener("click",(function(){var n=r.closest("[shop-filter]").dataset.code;t[n]?delete t[n]:t[n]=!0,r.closest("[shop-filter]").classList.toggle("is-toggled"),e.set("filter",t)}))}))}))}};i.render=function(e,t,r,n,o,l){return null},module.exports=i;
2
2
  //# sourceMappingURL=FilterToggle.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"FilterToggle.js","sources":["../../../../src/js/components/shop/FilterToggle.vue"],"sourcesContent":["<template></template>\n<script>\nimport SecureLS from 'secure-ls';\nimport { onMounted } from 'vue';\n\nexport default {\n name: 'filter-toggle',\n setup() {\n onMounted(() => {\n let ls = new SecureLS({\n isCompression: false\n });\n\n let filter = ls.get('filter');\n\n if (!filter) {\n filter = {\n brand: true,\n category: true,\n price: true\n };\n\n ls.set('filter', filter);\n }\n\n for (const [code, value] of Object.entries(filter)) {\n const group = document.querySelector('[shop-filter][data-code=\"' + code + '\"]');\n\n if (group) {\n group.classList.remove('is-toggled');\n }\n }\n\n document.querySelectorAll('[shop-filter-title]').forEach((head) => {\n head.addEventListener('click', () => {\n const code = head.closest('[shop-filter]').dataset.code;\n\n if (!filter[code]) {\n filter[code] = true;\n } else {\n delete filter[code];\n }\n\n head.closest('[shop-filter]').classList.toggle('is-toggled');\n ls.set('filter', filter);\n });\n });\n });\n }\n};\n</script>"],"names":["name","setup","onMounted","ls","SecureLS","isCompression","filter","get","code","value","brand","category","price","set","Object","entries","group","document","querySelector","classList","remove","querySelectorAll","forEach","head","addEventListener","closest","dataset","toggle"],"mappings":"8IAKe,CACXA,KAAM,gBACNC,QACIC,YAAU,SACFC,EAAK,IAAIC,UAAS,CAClBC,eAAe,IAGfC,EAASH,EAAGI,IAAI,cAYf,IAAOC,EAAMC,KAVbH,IACDA,EAAS,CACLI,OAAO,EACPC,UAAU,EACVC,OAAO,GAGXT,EAAGU,IAAI,SAAUP,IAGOQ,OAAOC,QAAQT,IAAS,KAC1CU,EAAQC,SAASC,cAAc,4BAA8BV,EAAO,MAEtEQ,GACAA,EAAMG,UAAUC,OAAO,cAI/BH,SAASI,iBAAiB,uBAAuBC,QAASC,IACtDA,EAAKC,iBAAiB,QAAS,SACrBhB,EAAOe,EAAKE,QAAQ,iBAAiBC,QAAQlB,KAE9CF,EAAOE,UAGDF,EAAOE,GAFdF,EAAOE,IAAQ,EAKnBe,EAAKE,QAAQ,iBAAiBN,UAAUQ,OAAO,cAC/CxB,EAAGU,IAAI,SAAUP"}
1
+ {"version":3,"file":"FilterToggle.js","sources":["../../../../src/js/components/shop/FilterToggle.vue"],"sourcesContent":["<template></template>\n<script>\nimport SecureLS from 'secure-ls';\nimport { onMounted } from 'vue';\n\nexport default {\n name: 'filter-toggle',\n setup() {\n onMounted(() => {\n let ls = new SecureLS({\n isCompression: false\n });\n\n let filter = ls.get('filter');\n\n if (!filter) {\n filter = {\n brand: true,\n category: true,\n price: true\n };\n\n ls.set('filter', filter);\n }\n\n for (const [code, value] of Object.entries(filter)) {\n const group = document.querySelector('[shop-filter][data-code=\"' + code + '\"]');\n\n if (group) {\n group.classList.remove('is-toggled');\n }\n }\n\n document.querySelectorAll('[shop-filter-title]').forEach((head) => {\n head.addEventListener('click', () => {\n const code = head.closest('[shop-filter]').dataset.code;\n\n if (!filter[code]) {\n filter[code] = true;\n } else {\n delete filter[code];\n }\n\n head.closest('[shop-filter]').classList.toggle('is-toggled');\n ls.set('filter', filter);\n });\n });\n });\n }\n};\n</script>"],"names":["name","setup","onMounted","ls","SecureLS","isCompression","filter","get","brand","category","price","set","Object","entries","code","group","document","querySelector","classList","remove","querySelectorAll","forEach","head","addEventListener","closest","dataset","toggle"],"mappings":"4lCAKA,MAAe,CACXA,KAAM,gBACNC,iBACIC,aAAU,eACFC,EAAK,IAAIC,UAAS,CAClBC,eAAe,IAGfC,EAASH,EAAGI,IAAI,UAEfD,IACDA,EAAS,CACLE,OAAO,EACPC,UAAU,EACVC,OAAO,GAGXP,EAAGQ,IAAI,SAAUL,kBAGOM,OAAOC,QAAQP,kBAAS,iBAAxCQ,gBACFC,EAAQC,SAASC,cAAc,4BAA8BH,EAAO,MAEtEC,GACAA,EAAMG,UAAUC,OAAO,cAI/BH,SAASI,iBAAiB,uBAAuBC,SAAQ,SAACC,GACtDA,EAAKC,iBAAiB,SAAS,eACrBT,EAAOQ,EAAKE,QAAQ,iBAAiBC,QAAQX,KAE9CR,EAAOQ,UAGDR,EAAOQ,GAFdR,EAAOQ,IAAQ,EAKnBQ,EAAKE,QAAQ,iBAAiBN,UAAUQ,OAAO,cAC/CvB,EAAGQ,IAAI,SAAUL"}
@@ -1,2 +1,2 @@
1
- "use strict";var e=require("vue"),t=require("swiper/core");function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r=n(t);r.default.use([t.Navigation,t.Mousewheel,t.Thumbs]);var i=e.defineComponent({name:"gallery",props:{thumbsDirection:{type:String,default:"horizontal"},fullscreenThumbsDirection:{type:String,default:"horizontal"},prev:{type:String,default:".swiper-button-prev"},next:{type:String,default:".swiper-button-next"},thumbPrev:{type:String,default:".swiper-button-prev"},thumbNext:{type:String,default:".swiper-button-next"},fullscreen:{type:Boolean,default:!1},isResizeThumbs:{type:Boolean,default:!1},thumbsSpaceBetween:{type:Number,default:10}},setup(t){var n,i,o,l,s,u=e.ref(!1),a=()=>{document.body.classList.remove("product-gallery-modal-open"),u.value=!1,c("close"),t.isResizeThumbs&&p()},d=()=>{document.body.classList.add("product-gallery-modal-open"),u.value=!0,c("open")},c=e=>{i&&(t.thumbsDirection!=t.fullscreenThumbsDirection?l.changeDirection("open"==e?t.fullscreenThumbsDirection:t.thumbsDirection):l.update()),s.update()};window.addEventListener("keyup",e=>{u.value&&"Escape"===e.key&&a()});var p=()=>{i.style.height=parseInt(o.offsetHeight)+"px",l.update()},m=()=>{clearTimeout(n),n=setTimeout(()=>{p()},500)};return document.addEventListener("DOMContentLoaded",()=>{if(i=document.getElementById("product-gallery-thumbs"),o=document.getElementById("product-gallery"),i&&(l=new r.default(i,{spaceBetween:t.thumbsSpaceBetween,slidesPerView:"auto",mousewheel:{forceToAxis:!0},freeMode:!0,watchSlidesVisibility:!0,watchSlidesProgress:!0,direction:t.thumbsDirection,navigation:{nextEl:t.thumbNext,prevEl:t.thumbPrev}}),t.isResizeThumbs&&(window.addEventListener("resize",m),p()),i.classList.remove("not-inited")),t.fullscreen&&o.addEventListener("click",d),o){var e={spaceBetween:10,mousewheel:{forceToAxis:!0},centeredSlides:!0,navigation:{nextEl:t.next,prevEl:t.prev}};l&&(e.thumbs={swiper:l}),s=new r.default(o,e)}c("close")},!1),{modal:u,close:a}}});i.render=function(t,n,r,i,o,l){return t.fullscreen?(e.openBlock(),e.createElementBlock("button",{key:0,class:e.normalizeClass(["delete is-large",{"is-hidden":!t.modal}]),onClick:n[0]||(n[0]=function(){return t.close&&t.close(...arguments)})},null,2)):e.createCommentVNode("v-if",!0)},module.exports=i;
1
+ "use strict";var e=require("vue"),t=require("swiper/core");function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var i=n(t);i.default.use([t.Navigation,t.Mousewheel,t.Thumbs]);var o=e.defineComponent({name:"gallery",props:{thumbsDirection:{type:String,default:"horizontal"},fullscreenThumbsDirection:{type:String,default:"horizontal"},prev:{type:String,default:".swiper-button-prev"},next:{type:String,default:".swiper-button-next"},thumbPrev:{type:String,default:".swiper-button-prev"},thumbNext:{type:String,default:".swiper-button-next"},fullscreen:{type:Boolean,default:!1},isResizeThumbs:{type:Boolean,default:!1},thumbsSpaceBetween:{type:Number,default:10}},setup:function(t){var n,o,r,u,l,s=e.ref(!1),a=function(){document.body.classList.remove("product-gallery-modal-open"),s.value=!1,d("close"),t.isResizeThumbs&&p()},c=function(){document.body.classList.add("product-gallery-modal-open"),s.value=!0,d("open")},d=function(e){o&&(t.thumbsDirection!=t.fullscreenThumbsDirection?u.changeDirection("open"==e?t.fullscreenThumbsDirection:t.thumbsDirection):u.update()),l.update()};window.addEventListener("keyup",(function(e){s.value&&"Escape"===e.key&&a()}));var p=function(){o.style.height=parseInt(r.offsetHeight)+"px",u.update()},m=function(){clearTimeout(n),n=setTimeout((function(){p()}),500)};return document.addEventListener("DOMContentLoaded",(function(){if(o=document.getElementById("product-gallery-thumbs"),r=document.getElementById("product-gallery"),o&&(u=new i.default(o,{spaceBetween:t.thumbsSpaceBetween,slidesPerView:"auto",mousewheel:{forceToAxis:!0},freeMode:!0,watchSlidesVisibility:!0,watchSlidesProgress:!0,direction:t.thumbsDirection,navigation:{nextEl:t.thumbNext,prevEl:t.thumbPrev}}),t.isResizeThumbs&&(window.addEventListener("resize",m),p()),o.classList.remove("not-inited")),t.fullscreen&&r.addEventListener("click",c),r){var e={spaceBetween:10,mousewheel:{forceToAxis:!0},centeredSlides:!0,navigation:{nextEl:t.next,prevEl:t.prev}};u&&(e.thumbs={swiper:u}),l=new i.default(r,e)}d("close")}),!1),{modal:s,close:a}}});o.render=function(t,n,i,o,r,u){return t.fullscreen?(e.openBlock(),e.createElementBlock("button",{key:0,class:e.normalizeClass(["delete is-large",{"is-hidden":!t.modal}]),onClick:n[0]||(n[0]=function(){return t.close&&t.close.apply(t,arguments)})},null,2)):e.createCommentVNode("v-if",!0)},module.exports=o;
2
2
  //# sourceMappingURL=Gallery.js.map