@dropins/storefront-auth 0.0.1-alpha1 → 0.0.1-alpha10

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 (213) hide show
  1. package/api/confirmEmail/confirmEmail.d.ts +4 -0
  2. package/api/confirmEmail/graphql/confirmEmail.graphql.d.ts +2 -0
  3. package/api/confirmEmail/index.d.ts +2 -0
  4. package/api/createCustomer/createCustomer.d.ts +4 -0
  5. package/api/createCustomer/graphql/createCustomer.graphql.d.ts +2 -0
  6. package/api/createCustomer/graphql/createCustomerV2.graphql.d.ts +2 -0
  7. package/api/createCustomer/index.d.ts +2 -0
  8. package/api/createCustomerAddress/createCustomerAddress.d.ts +4 -0
  9. package/api/createCustomerAddress/graphql/createCustomerAddress.graphql.d.ts +2 -0
  10. package/api/createCustomerAddress/index.d.ts +2 -0
  11. package/api/fetch-graphql/fetch-graphql.d.ts +8 -0
  12. package/api/fetch-graphql/index.d.ts +2 -0
  13. package/api/getAttributesForm/getAttributesForm.d.ts +4 -0
  14. package/api/getAttributesForm/graphql/getAttributesForm.graphql.d.ts +2 -0
  15. package/api/getAttributesForm/index.d.ts +2 -0
  16. package/api/getCustomerData/getCustomerData.d.ts +4 -0
  17. package/api/getCustomerData/graphql/getCustomerData.graphql.d.ts +2 -0
  18. package/api/getCustomerData/index.d.ts +2 -0
  19. package/api/getCustomerToken/getCustomerToken.d.ts +15 -0
  20. package/api/getCustomerToken/graphql/getCustomerToken.graphql.d.ts +2 -0
  21. package/api/getCustomerToken/index.d.ts +2 -0
  22. package/api/getStoreConfig/getStoreConfig.d.ts +4 -0
  23. package/api/getStoreConfig/graphql/getStoreConfig.graphql.d.ts +2 -0
  24. package/api/getStoreConfig/index.d.ts +2 -0
  25. package/api/index.d.ts +14 -0
  26. package/api/initialize/index.d.ts +2 -0
  27. package/api/initialize/initialize.d.ts +14 -0
  28. package/api/requestPasswordResetEmail/graphql/requestPasswordResetEmail.graphql.d.ts +2 -0
  29. package/api/requestPasswordResetEmail/index.d.ts +2 -0
  30. package/api/requestPasswordResetEmail/requestPasswordResetEmail.d.ts +4 -0
  31. package/api/resendConfirmationEmail/graphql/resendConfirmationEmail.graphql.d.ts +2 -0
  32. package/api/resendConfirmationEmail/index.d.ts +2 -0
  33. package/api/resendConfirmationEmail/resendConfirmationEmail.d.ts +4 -0
  34. package/api/resetPassword/graphql/resetPassword.graphql.d.ts +2 -0
  35. package/api/resetPassword/index.d.ts +2 -0
  36. package/api/resetPassword/resetPassword.d.ts +4 -0
  37. package/api/revokeCustomerToken/graphql/revokeCustomerToken.graphql.d.ts +2 -0
  38. package/api/revokeCustomerToken/index.d.ts +2 -0
  39. package/api/revokeCustomerToken/revokeCustomerToken.d.ts +4 -0
  40. package/api.d.ts +1 -0
  41. package/api.js +1 -2
  42. package/chunks/EmailConfirmationForm.js +1 -0
  43. package/chunks/ResetPasswordForm.js +1 -0
  44. package/chunks/SignInForm.js +1 -0
  45. package/chunks/SignUpForm.js +1 -0
  46. package/chunks/SkeletonLoader.js +1 -0
  47. package/chunks/confirmEmail.js +12 -0
  48. package/chunks/createCustomerAddress.js +53 -0
  49. package/chunks/getCustomerToken.js +15 -0
  50. package/chunks/getStoreConfig.js +15 -0
  51. package/chunks/index.js +1 -0
  52. package/chunks/index2.js +1 -0
  53. package/chunks/index3.js +1 -0
  54. package/chunks/initialize.js +1 -0
  55. package/chunks/network-error.js +1 -0
  56. package/chunks/requestPasswordResetEmail.js +5 -0
  57. package/chunks/resendConfirmationEmail.js +4 -0
  58. package/chunks/resetPassword.js +5 -0
  59. package/chunks/revokeCustomerToken.js +8 -0
  60. package/chunks/setReCaptchaToken.js +1 -0
  61. package/chunks/simplifyTransformAttributesForm.js +1 -0
  62. package/chunks/transform-attributes-form.js +1 -0
  63. package/chunks/useInLineAlert.js +1 -0
  64. package/chunks/usePasswordValidationMessage.js +1 -0
  65. package/components/EmailConfirmationForm/EmailConfirmationForm.d.ts +5 -0
  66. package/components/EmailConfirmationForm/index.d.ts +3 -0
  67. package/components/ResetPasswordForm/ResetPasswordForm.d.ts +6 -0
  68. package/components/ResetPasswordForm/index.d.ts +3 -0
  69. package/components/SignInForm/SignInForm.d.ts +5 -0
  70. package/components/SignInForm/index.d.ts +3 -0
  71. package/components/SignUpForm/SignUpForm.d.ts +5 -0
  72. package/components/SignUpForm/index.d.ts +3 -0
  73. package/components/SkeletonLoader/SkeletonLoader.d.ts +5 -0
  74. package/components/SkeletonLoader/Skeletons/ResetPasswordSkeleton.d.ts +2 -0
  75. package/components/SkeletonLoader/Skeletons/SignInSkeleton.d.ts +2 -0
  76. package/components/SkeletonLoader/Skeletons/SignUpSkeleton.d.ts +2 -0
  77. package/components/SkeletonLoader/Skeletons/index.d.ts +4 -0
  78. package/components/SkeletonLoader/index.d.ts +3 -0
  79. package/components/SuccessNotificationForm/SuccessNotificationForm.d.ts +6 -0
  80. package/components/SuccessNotificationForm/index.d.ts +3 -0
  81. package/components/UI/Button/Button.d.ts +16 -0
  82. package/components/UI/Button/index.d.ts +3 -0
  83. package/components/UI/Form/Form.d.ts +5 -0
  84. package/components/UI/Form/index.d.ts +3 -0
  85. package/components/UI/FormInputs/FormInputs.d.ts +13 -0
  86. package/components/UI/FormInputs/index.d.ts +3 -0
  87. package/components/UI/Title/Title.d.ts +11 -0
  88. package/components/UI/Title/index.d.ts +3 -0
  89. package/components/UI/index.d.ts +5 -0
  90. package/components/UpdatePasswordForm/UpdatePasswordForm.d.ts +5 -0
  91. package/components/UpdatePasswordForm/index.d.ts +3 -0
  92. package/components/index.d.ts +11 -0
  93. package/configs/cookieConfigs.d.ts +7 -0
  94. package/configs/defaultCreateUserConfigs.d.ts +16 -0
  95. package/configs/patternConfigs.d.ts +3 -0
  96. package/containers/AuthCombine/AuthCombine.d.ts +5 -0
  97. package/containers/AuthCombine/index.d.ts +3 -0
  98. package/containers/AuthCombine.d.ts +3 -0
  99. package/containers/AuthCombine.js +1 -1
  100. package/containers/ResetPassword/ResetPassword.d.ts +5 -0
  101. package/containers/ResetPassword/index.d.ts +3 -0
  102. package/containers/ResetPassword.d.ts +3 -0
  103. package/containers/ResetPassword.js +1 -1
  104. package/containers/SignIn/SignIn.d.ts +5 -0
  105. package/containers/SignIn/index.d.ts +3 -0
  106. package/containers/SignIn.d.ts +3 -0
  107. package/containers/SignIn.js +1 -1
  108. package/containers/SignUp/SignUp.d.ts +5 -0
  109. package/containers/SignUp/index.d.ts +3 -0
  110. package/containers/SignUp.d.ts +3 -0
  111. package/containers/SignUp.js +1 -1
  112. package/containers/SuccessNotification/SuccessNotification.d.ts +5 -0
  113. package/containers/SuccessNotification/index.d.ts +3 -0
  114. package/containers/SuccessNotification.d.ts +3 -0
  115. package/containers/SuccessNotification.js +1 -1
  116. package/containers/UpdatePassword/UpdatePassword.d.ts +5 -0
  117. package/containers/UpdatePassword/index.d.ts +3 -0
  118. package/containers/UpdatePassword.d.ts +3 -0
  119. package/containers/UpdatePassword.js +1 -2
  120. package/containers/index.d.ts +7 -0
  121. package/data/models/attributes-form.d.ts +25 -0
  122. package/data/models/customer-data.d.ts +6 -0
  123. package/data/models/index.d.ts +7 -0
  124. package/data/models/password-reset-email.d.ts +5 -0
  125. package/data/models/reset-password.d.ts +5 -0
  126. package/data/models/revoke-customer-token.d.ts +5 -0
  127. package/data/models/store-config.d.ts +8 -0
  128. package/data/transforms/index.d.ts +7 -0
  129. package/data/transforms/transform-attributes-form.d.ts +5 -0
  130. package/data/transforms/transform-auth.d.ts +37 -0
  131. package/data/transforms/transform-customer-data.d.ts +5 -0
  132. package/data/transforms/transform-password-reset-email.d.ts +5 -0
  133. package/data/transforms/transform-reset-password.d.ts +5 -0
  134. package/data/transforms/transform-revoke-customer-token.d.ts +5 -0
  135. package/data/transforms/transform-store-config.d.ts +5 -0
  136. package/hooks/api/useGetAttributesForm.d.ts +14 -0
  137. package/hooks/api/useGetStoreConfigs.d.ts +8 -0
  138. package/hooks/components/useEmailConfirmationForm.d.ts +7 -0
  139. package/hooks/components/usePasswordValidationMessage.d.ts +16 -0
  140. package/hooks/components/useResetPasswordForm.d.ts +8 -0
  141. package/hooks/components/useSignInForm.d.ts +21 -0
  142. package/hooks/components/useSignUpForm.d.ts +20 -0
  143. package/hooks/components/useUpdatePasswordForm.d.ts +14 -0
  144. package/hooks/ui/useForm.d.ts +11 -0
  145. package/hooks/useEmailConfirmation.d.ts +11 -0
  146. package/hooks/useInLineAlert.d.ts +7 -0
  147. package/i18n/en_US.json.d.ts +72 -0
  148. package/lib/acdl.d.ts +9 -0
  149. package/lib/checkIsFunction.d.ts +2 -0
  150. package/lib/clearUrlAndReplace.d.ts +2 -0
  151. package/lib/convertToInputDateFormat.d.ts +2 -0
  152. package/lib/cookieUtils.d.ts +3 -0
  153. package/lib/fetch-error.d.ts +5 -0
  154. package/lib/generateRandomDigits.d.ts +2 -0
  155. package/lib/getFormValues.d.ts +2 -0
  156. package/lib/getUrlParam.d.ts +2 -0
  157. package/lib/mergeFormObjects.d.ts +3 -0
  158. package/lib/network-error.d.ts +6 -0
  159. package/lib/setReCaptchaToken.d.ts +2 -0
  160. package/lib/simplifyTransformAttributesForm.d.ts +2 -0
  161. package/lib/validationUniqueSymbolsPassword.d.ts +2 -0
  162. package/package.json +1 -1
  163. package/render/Provider.d.ts +8 -0
  164. package/render/index.d.ts +2 -0
  165. package/render/render.d.ts +4 -0
  166. package/render.d.ts +1 -0
  167. package/render.js +8 -1
  168. package/types/api/confirmEmail.types.d.ts +17 -0
  169. package/types/api/createCustomer.types.d.ts +24 -0
  170. package/types/api/createCustomerAddress.types.d.ts +47 -0
  171. package/types/api/getAttributesForm.types.d.ts +29 -0
  172. package/types/api/getCustomerData.types.d.ts +13 -0
  173. package/types/api/getCustomerToken.types.d.ts +11 -0
  174. package/types/api/passwordResetEmail.types.d.ts +9 -0
  175. package/types/api/resendConfirmationEmail.types.d.ts +9 -0
  176. package/types/api/resetPassword.types.d.ts +9 -0
  177. package/types/api/revokeCustomerToken.types.d.ts +9 -0
  178. package/types/api/storeConfig.types.d.ts +16 -0
  179. package/types/authCombine.types.d.ts +12 -0
  180. package/types/emailConfirmationForm.types.d.ts +14 -0
  181. package/types/form.types.d.ts +11 -0
  182. package/types/index.d.ts +22 -0
  183. package/types/notification.types.d.ts +15 -0
  184. package/types/resetPassword.types.d.ts +15 -0
  185. package/types/signIn.types.d.ts +43 -0
  186. package/types/signUp.types.d.ts +51 -0
  187. package/types/skeletonLoader.types.d.ts +6 -0
  188. package/types/successNotification.types.d.ts +14 -0
  189. package/types/updatePassword.types.d.ts +33 -0
  190. package/103.js +0 -1
  191. package/180.js +0 -2
  192. package/180.js.LICENSE.txt +0 -1
  193. package/221.js +0 -1
  194. package/235.js +0 -2
  195. package/235.js.LICENSE.txt +0 -1
  196. package/246.js +0 -2
  197. package/246.js.LICENSE.txt +0 -1
  198. package/25.js +0 -2
  199. package/25.js.LICENSE.txt +0 -1
  200. package/406.js +0 -1
  201. package/42.js +0 -2
  202. package/42.js.LICENSE.txt +0 -1
  203. package/508.js +0 -1
  204. package/591.js +0 -1
  205. package/666.js +0 -2
  206. package/666.js.LICENSE.txt +0 -1
  207. package/728.js +0 -1
  208. package/739.js +0 -2
  209. package/739.js.LICENSE.txt +0 -1
  210. package/920.js +0 -1
  211. package/api.js.LICENSE.txt +0 -1
  212. package/containers/UpdatePassword.js.LICENSE.txt +0 -1
  213. package/runtime.js +0 -1
@@ -1,2 +1 @@
1
- /*! For license information please see UpdatePassword.js.LICENSE.txt */
2
- import*as t from"@dropins/tools/event-bus.js";import*as r from"@dropins/tools/fetch-graphql.js";import*as e from"@dropins/tools/preact-compat.js";import*as n from"@dropins/tools/preact-hooks.js";import*as o from"@dropins/tools/preact-jsx-runtime.js";import*as a from"@dropins/tools/preact.js";export const id=846;export const ids=[846];export const modules={7636:(t,r,e)=>{e.d(r,{A:()=>i});var n,o=e(9094);function a(){return a=Object.assign?Object.assign.bind():function(t){for(var r=1;r<arguments.length;r++){var e=arguments[r];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])}return t},a.apply(this,arguments)}const i=function(t){return o.createElement("svg",a({width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg"},t),n||(n=o.createElement("path",{vectorEffect:"non-scaling-stroke",d:"M18.36 5.64 5.63 18.37M18.36 18.37 5.63 5.64",stroke:"currentColor"})))}},1260:(t,r,e)=>{e.d(r,{A:()=>u});var n,o,a=e(9094);function i(){return i=Object.assign?Object.assign.bind():function(t){for(var r=1;r<arguments.length;r++){var e=arguments[r];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])}return t},i.apply(this,arguments)}const u=function(t){return a.createElement("svg",i({width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg"},t),n||(n=a.createElement("g",{clipPath:"url(#Locker_svg__a)",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"},a.createElement("path",{vectorEffect:"non-scaling-stroke",d:"M7.33 11h9.33c.74 0 1.33.81 1.33 1.82v6.36c0 1-.6 1.82-1.33 1.82H7.33C6.59 21 6 20.19 6 19.18v-6.36c0-1 .6-1.82 1.33-1.82ZM8.5 10.86V6.5C8.5 4.57 10.07 3 12 3s3.5 1.57 3.5 3.5v4.36"}))),o||(o=a.createElement("defs",null,a.createElement("clipPath",{id:"Locker_svg__a"},a.createElement("path",{fill:"#fff",transform:"translate(5.25 2.25)",d:"M0 0h13.5v19.5H0z"})))))}},9960:(t,r,e)=>{e.d(r,{A:()=>i});var n,o=e(9094);function a(){return a=Object.assign?Object.assign.bind():function(t){for(var r=1;r<arguments.length;r++){var e=arguments[r];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])}return t},a.apply(this,arguments)}const i=function(t){return o.createElement("svg",a({width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg"},t),n||(n=o.createElement("path",{d:"M17.333 11.75H6.667",strokeWidth:1.5,strokeLinecap:"square",strokeLinejoin:"round",vectorEffect:"non-scaling-stroke",stroke:"currentColor"})))}},6613:(t,r,e)=>{function n(t,r){return function(t){if(Array.isArray(t))return t}(t)||function(t,r){var e=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=e){var n,o,a,i,u=[],s=!0,c=!1;try{if(a=(e=e.call(t)).next,0===r){if(Object(e)!==e)return;s=!1}else for(;!(s=(n=a.call(e)).done)&&(u.push(n.value),u.length!==r);s=!0);}catch(t){c=!0,o=t}finally{try{if(!s&&null!=e.return&&(i=e.return(),Object(i)!==i))return}finally{if(c)throw o}}return u}}(t,r)||function(t,r){if(!t)return;if("string"==typeof t)return o(t,r);var e=Object.prototype.toString.call(t).slice(8,-1);"Object"===e&&t.constructor&&(e=t.constructor.name);if("Map"===e||"Set"===e)return Array.from(t);if("Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return o(t,r)}(t,r)||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 o(t,r){(null==r||r>t.length)&&(r=t.length);for(var e=0,n=new Array(r);e<r;e++)n[e]=t[e];return n}e.d(r,{L:()=>a});var a=function(t){return t.reduce((function(t,r){if(!r)return t;if("string"==typeof r&&(t+=" ".concat(r)),Array.isArray(r)){var e=n(r,2),o=e[0],a=e[1];o&&a&&(t+=" ".concat(o))}return t}),"").trim()}},1764:(t,r,e)=>{e.d(r,{G:()=>l});var n=e(294),o=e(5883),a=function(t){var r,e,n,o;return{autocompleteOnStorefront:(null==t||null===(r=t.data)||void 0===r||null===(r=r.storeConfig)||void 0===r?void 0:r.autocomplete_on_storefront)||!1,minLength:(null==t||null===(e=t.data)||void 0===e||null===(e=e.storeConfig)||void 0===e?void 0:e.minimum_password_length)||3,requiredCharacterClasses:+(null==t||null===(n=t.data)||void 0===n||null===(n=n.storeConfig)||void 0===n?void 0:n.required_character_classes_number)||0,createAccountConfirmation:(null==t||null===(o=t.data)||void 0===o||null===(o=o.storeConfig)||void 0===o?void 0:o.create_account_confirmation)||!1}},i=e(6129);function u(t){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},u(t)}function s(){s=function(){return r};var t,r={},e=Object.prototype,n=e.hasOwnProperty,o=Object.defineProperty||function(t,r,e){t[r]=e.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function f(t,r,e){return Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{f({},"")}catch(t){f=function(t,r,e){return t[r]=e}}function h(t,r,e,n){var a=r&&r.prototype instanceof w?r:w,i=Object.create(a.prototype),u=new F(n||[]);return o(i,"_invoke",{value:O(t,e,u)}),i}function p(t,r,e){try{return{type:"normal",arg:t.call(r,e)}}catch(t){return{type:"throw",arg:t}}}r.wrap=h;var d="suspendedStart",m="suspendedYield",v="executing",y="completed",g={};function w(){}function b(){}function x(){}var _={};f(_,i,(function(){return this}));var L=Object.getPrototypeOf,E=L&&L(L(A([])));E&&E!==e&&n.call(E,i)&&(_=E);var S=x.prototype=w.prototype=Object.create(_);function j(t){["next","throw","return"].forEach((function(r){f(t,r,(function(t){return this._invoke(r,t)}))}))}function P(t,r){function e(o,a,i,s){var c=p(t[o],t,a);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==u(f)&&n.call(f,"__await")?r.resolve(f.__await).then((function(t){e("next",t,i,s)}),(function(t){e("throw",t,i,s)})):r.resolve(f).then((function(t){l.value=t,i(l)}),(function(t){return e("throw",t,i,s)}))}s(c.arg)}var a;o(this,"_invoke",{value:function(t,n){function o(){return new r((function(r,o){e(t,n,r,o)}))}return a=a?a.then(o,o):o()}})}function O(r,e,n){var o=d;return function(a,i){if(o===v)throw Error("Generator is already running");if(o===y){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var u=n.delegate;if(u){var s=C(u,n);if(s){if(s===g)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===d)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var c=p(r,e,n);if("normal"===c.type){if(o=n.done?y:m,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=y,n.method="throw",n.arg=c.arg)}}}function C(r,e){var n=e.method,o=r.iterator[n];if(o===t)return e.delegate=null,"throw"===n&&r.iterator.return&&(e.method="return",e.arg=t,C(r,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var a=p(o,r.iterator,e.arg);if("throw"===a.type)return e.method="throw",e.arg=a.arg,e.delegate=null,g;var i=a.arg;return i?i.done?(e[r.resultName]=i.value,e.next=r.nextLoc,"return"!==e.method&&(e.method="next",e.arg=t),e.delegate=null,g):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,g)}function k(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function N(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function F(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(k,this),this.reset(!0)}function A(r){if(r||""===r){var e=r[i];if(e)return e.call(r);if("function"==typeof r.next)return r;if(!isNaN(r.length)){var o=-1,a=function e(){for(;++o<r.length;)if(n.call(r,o))return e.value=r[o],e.done=!1,e;return e.value=t,e.done=!0,e};return a.next=a}}throw new TypeError(u(r)+" is not iterable")}return b.prototype=x,o(S,"constructor",{value:x,configurable:!0}),o(x,"constructor",{value:b,configurable:!0}),b.displayName=f(x,l,"GeneratorFunction"),r.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===b||"GeneratorFunction"===(r.displayName||r.name))},r.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,x):(t.__proto__=x,f(t,l,"GeneratorFunction")),t.prototype=Object.create(S),t},r.awrap=function(t){return{__await:t}},j(P.prototype),f(P.prototype,c,(function(){return this})),r.AsyncIterator=P,r.async=function(t,e,n,o,a){void 0===a&&(a=Promise);var i=new P(h(t,e,n,o),a);return r.isGeneratorFunction(e)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},j(S),f(S,l,"Generator"),f(S,i,(function(){return this})),f(S,"toString",(function(){return"[object Generator]"})),r.keys=function(t){var r=Object(t),e=[];for(var n in r)e.push(n);return e.reverse(),function t(){for(;e.length;){var n=e.pop();if(n in r)return t.value=n,t.done=!1,t}return t.done=!0,t}},r.values=A,F.prototype={constructor:F,reset:function(r){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(N),!r)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(r){if(this.done)throw r;var e=this;function o(n,o){return u.type="throw",u.arg=r,e.next=n,o&&(e.method="next",e.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],u=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var s=n.call(i,"catchLoc"),c=n.call(i,"finallyLoc");if(s&&c){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(s){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,r){for(var e=this.tryEntries.length-1;e>=0;--e){var o=this.tryEntries[e];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=r&&r<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=r,a?(this.method="next",this.next=a.finallyLoc,g):this.complete(i)},complete:function(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),g},finish:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.finallyLoc===t)return this.complete(e.completion,e.afterLoc),N(e),g}},catch:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.tryLoc===t){var n=e.completion;if("throw"===n.type){var o=n.arg;N(e)}return o}}throw Error("illegal catch attempt")},delegateYield:function(r,e,n){return this.delegate={iterator:A(r),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=t),g}},r}function c(t,r,e,n,o,a,i){try{var u=t[a](i),s=u.value}catch(t){return void e(t)}u.done?r(s):Promise.resolve(s).then(n,o)}var l=function(){var t,r=(t=s().mark((function t(){return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,n.AZ)("\n query GET_STORE_CONFIG {\n storeConfig {\n autocomplete_on_storefront\n minimum_password_length\n required_character_classes_number\n store_code\n store_name\n store_group_code\n locale\n create_account_confirmation\n }\n }\n",{method:"GET",cache:"force-cache"}).then((function(t){var r;return null!==(r=t.errors)&&void 0!==r&&r.length?(0,i.T)(t.errors):a(t)})).catch(o.n);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t)})),function(){var r=this,e=arguments;return new Promise((function(n,o){var a=t.apply(r,e);function i(t){c(a,n,o,i,u,"next",t)}function u(t){c(a,n,o,i,u,"throw",t)}i(void 0)}))});return function(){return r.apply(this,arguments)}}()},5678:(t,r,e)=>{e.d(r,{x:()=>c});var n=e(5883),o=e(294),a=function(t){var r,e,n,o="";return null!=t&&null!==(r=t.errors)&&void 0!==r&&r.length&&(o=null==t||null===(e=t.errors[0])||void 0===e?void 0:e.message),{message:o,success:Boolean(null==t||null===(n=t.data)||void 0===n?void 0:n.resetPassword)}};function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}function u(){u=function(){return r};var t,r={},e=Object.prototype,n=e.hasOwnProperty,o=Object.defineProperty||function(t,r,e){t[r]=e.value},a="function"==typeof Symbol?Symbol:{},s=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function f(t,r,e){return Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{f({},"")}catch(t){f=function(t,r,e){return t[r]=e}}function h(t,r,e,n){var a=r&&r.prototype instanceof w?r:w,i=Object.create(a.prototype),u=new F(n||[]);return o(i,"_invoke",{value:O(t,e,u)}),i}function p(t,r,e){try{return{type:"normal",arg:t.call(r,e)}}catch(t){return{type:"throw",arg:t}}}r.wrap=h;var d="suspendedStart",m="suspendedYield",v="executing",y="completed",g={};function w(){}function b(){}function x(){}var _={};f(_,s,(function(){return this}));var L=Object.getPrototypeOf,E=L&&L(L(A([])));E&&E!==e&&n.call(E,s)&&(_=E);var S=x.prototype=w.prototype=Object.create(_);function j(t){["next","throw","return"].forEach((function(r){f(t,r,(function(t){return this._invoke(r,t)}))}))}function P(t,r){function e(o,a,u,s){var c=p(t[o],t,a);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==i(f)&&n.call(f,"__await")?r.resolve(f.__await).then((function(t){e("next",t,u,s)}),(function(t){e("throw",t,u,s)})):r.resolve(f).then((function(t){l.value=t,u(l)}),(function(t){return e("throw",t,u,s)}))}s(c.arg)}var a;o(this,"_invoke",{value:function(t,n){function o(){return new r((function(r,o){e(t,n,r,o)}))}return a=a?a.then(o,o):o()}})}function O(r,e,n){var o=d;return function(a,i){if(o===v)throw Error("Generator is already running");if(o===y){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var u=n.delegate;if(u){var s=C(u,n);if(s){if(s===g)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===d)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var c=p(r,e,n);if("normal"===c.type){if(o=n.done?y:m,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=y,n.method="throw",n.arg=c.arg)}}}function C(r,e){var n=e.method,o=r.iterator[n];if(o===t)return e.delegate=null,"throw"===n&&r.iterator.return&&(e.method="return",e.arg=t,C(r,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var a=p(o,r.iterator,e.arg);if("throw"===a.type)return e.method="throw",e.arg=a.arg,e.delegate=null,g;var i=a.arg;return i?i.done?(e[r.resultName]=i.value,e.next=r.nextLoc,"return"!==e.method&&(e.method="next",e.arg=t),e.delegate=null,g):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,g)}function k(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function N(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function F(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(k,this),this.reset(!0)}function A(r){if(r||""===r){var e=r[s];if(e)return e.call(r);if("function"==typeof r.next)return r;if(!isNaN(r.length)){var o=-1,a=function e(){for(;++o<r.length;)if(n.call(r,o))return e.value=r[o],e.done=!1,e;return e.value=t,e.done=!0,e};return a.next=a}}throw new TypeError(i(r)+" is not iterable")}return b.prototype=x,o(S,"constructor",{value:x,configurable:!0}),o(x,"constructor",{value:b,configurable:!0}),b.displayName=f(x,l,"GeneratorFunction"),r.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===b||"GeneratorFunction"===(r.displayName||r.name))},r.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,x):(t.__proto__=x,f(t,l,"GeneratorFunction")),t.prototype=Object.create(S),t},r.awrap=function(t){return{__await:t}},j(P.prototype),f(P.prototype,c,(function(){return this})),r.AsyncIterator=P,r.async=function(t,e,n,o,a){void 0===a&&(a=Promise);var i=new P(h(t,e,n,o),a);return r.isGeneratorFunction(e)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},j(S),f(S,l,"Generator"),f(S,s,(function(){return this})),f(S,"toString",(function(){return"[object Generator]"})),r.keys=function(t){var r=Object(t),e=[];for(var n in r)e.push(n);return e.reverse(),function t(){for(;e.length;){var n=e.pop();if(n in r)return t.value=n,t.done=!1,t}return t.done=!0,t}},r.values=A,F.prototype={constructor:F,reset:function(r){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(N),!r)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(r){if(this.done)throw r;var e=this;function o(n,o){return u.type="throw",u.arg=r,e.next=n,o&&(e.method="next",e.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],u=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var s=n.call(i,"catchLoc"),c=n.call(i,"finallyLoc");if(s&&c){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(s){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,r){for(var e=this.tryEntries.length-1;e>=0;--e){var o=this.tryEntries[e];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=r&&r<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=r,a?(this.method="next",this.next=a.finallyLoc,g):this.complete(i)},complete:function(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),g},finish:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.finallyLoc===t)return this.complete(e.completion,e.afterLoc),N(e),g}},catch:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.tryLoc===t){var n=e.completion;if("throw"===n.type){var o=n.arg;N(e)}return o}}throw Error("illegal catch attempt")},delegateYield:function(r,e,n){return this.delegate={iterator:A(r),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=t),g}},r}function s(t,r,e,n,o,a,i){try{var u=t[a](i),s=u.value}catch(t){return void e(t)}u.done?r(s):Promise.resolve(s).then(n,o)}var c=function(){var t,r=(t=u().mark((function t(r,e,i){return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,o.AZ)("\n mutation RESET_PASSWORD($email: String!, $resetPasswordToken: String!, $newPassword: String!){\n resetPassword(email: $email,resetPasswordToken: $resetPasswordToken,newPassword: $newPassword)\n }\n",{method:"POST",variables:{email:r,resetPasswordToken:e,newPassword:i}}).then((function(t){return a(t)})).catch(n.n);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t)})),function(){var r=this,e=arguments;return new Promise((function(n,o){var a=t.apply(r,e);function i(t){s(a,n,o,i,u,"next",t)}function u(t){s(a,n,o,i,u,"throw",t)}i(void 0)}))});return function(t,e,n){return r.apply(this,arguments)}}()},1414:(t,r,e)=>{e.d(r,{R:()=>$,A:()=>$});var n=e(6613),o=e(5292),a=e.n(o),i=e(9893),u=e.n(i),s=e(9383),c=e.n(s),l=e(6884),f=e.n(l),h=e(9088),p=e.n(h),d=e(7997),m=e.n(d),v=e(7871),y={};y.styleTagTransform=m(),y.setAttributes=f(),y.insert=c().bind(null,"head"),y.domAPI=u(),y.insertStyleElement=p();a()(v.A,y);v.A&&v.A.locals&&v.A.locals;var g=e(6705),w=e(6263),b=e(1880),x=e(5678),_=e(2739),L=e(446),E=function(t,r){return t.split("&").filter((function(t){return t.includes(r)})).map((function(t){return t.split("=")[1]}))[0]},S=e(7622),j=e(2885),P=e(5808);function O(t){return O="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},O(t)}function C(){C=function(){return r};var t,r={},e=Object.prototype,n=e.hasOwnProperty,o=Object.defineProperty||function(t,r,e){t[r]=e.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",u=a.asyncIterator||"@@asyncIterator",s=a.toStringTag||"@@toStringTag";function c(t,r,e){return Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{c({},"")}catch(t){c=function(t,r,e){return t[r]=e}}function l(t,r,e,n){var a=r&&r.prototype instanceof y?r:y,i=Object.create(a.prototype),u=new F(n||[]);return o(i,"_invoke",{value:j(t,e,u)}),i}function f(t,r,e){try{return{type:"normal",arg:t.call(r,e)}}catch(t){return{type:"throw",arg:t}}}r.wrap=l;var h="suspendedStart",p="suspendedYield",d="executing",m="completed",v={};function y(){}function g(){}function w(){}var b={};c(b,i,(function(){return this}));var x=Object.getPrototypeOf,_=x&&x(x(A([])));_&&_!==e&&n.call(_,i)&&(b=_);var L=w.prototype=y.prototype=Object.create(b);function E(t){["next","throw","return"].forEach((function(r){c(t,r,(function(t){return this._invoke(r,t)}))}))}function S(t,r){function e(o,a,i,u){var s=f(t[o],t,a);if("throw"!==s.type){var c=s.arg,l=c.value;return l&&"object"==O(l)&&n.call(l,"__await")?r.resolve(l.__await).then((function(t){e("next",t,i,u)}),(function(t){e("throw",t,i,u)})):r.resolve(l).then((function(t){c.value=t,i(c)}),(function(t){return e("throw",t,i,u)}))}u(s.arg)}var a;o(this,"_invoke",{value:function(t,n){function o(){return new r((function(r,o){e(t,n,r,o)}))}return a=a?a.then(o,o):o()}})}function j(r,e,n){var o=h;return function(a,i){if(o===d)throw Error("Generator is already running");if(o===m){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var u=n.delegate;if(u){var s=P(u,n);if(s){if(s===v)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=d;var c=f(r,e,n);if("normal"===c.type){if(o=n.done?m:p,c.arg===v)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=m,n.method="throw",n.arg=c.arg)}}}function P(r,e){var n=e.method,o=r.iterator[n];if(o===t)return e.delegate=null,"throw"===n&&r.iterator.return&&(e.method="return",e.arg=t,P(r,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var a=f(o,r.iterator,e.arg);if("throw"===a.type)return e.method="throw",e.arg=a.arg,e.delegate=null,v;var i=a.arg;return i?i.done?(e[r.resultName]=i.value,e.next=r.nextLoc,"return"!==e.method&&(e.method="next",e.arg=t),e.delegate=null,v):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,v)}function k(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function N(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function F(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(k,this),this.reset(!0)}function A(r){if(r||""===r){var e=r[i];if(e)return e.call(r);if("function"==typeof r.next)return r;if(!isNaN(r.length)){var o=-1,a=function e(){for(;++o<r.length;)if(n.call(r,o))return e.value=r[o],e.done=!1,e;return e.value=t,e.done=!0,e};return a.next=a}}throw new TypeError(O(r)+" is not iterable")}return g.prototype=w,o(L,"constructor",{value:w,configurable:!0}),o(w,"constructor",{value:g,configurable:!0}),g.displayName=c(w,s,"GeneratorFunction"),r.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===g||"GeneratorFunction"===(r.displayName||r.name))},r.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,w):(t.__proto__=w,c(t,s,"GeneratorFunction")),t.prototype=Object.create(L),t},r.awrap=function(t){return{__await:t}},E(S.prototype),c(S.prototype,u,(function(){return this})),r.AsyncIterator=S,r.async=function(t,e,n,o,a){void 0===a&&(a=Promise);var i=new S(l(t,e,n,o),a);return r.isGeneratorFunction(e)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},E(L),c(L,s,"Generator"),c(L,i,(function(){return this})),c(L,"toString",(function(){return"[object Generator]"})),r.keys=function(t){var r=Object(t),e=[];for(var n in r)e.push(n);return e.reverse(),function t(){for(;e.length;){var n=e.pop();if(n in r)return t.value=n,t.done=!1,t}return t.done=!0,t}},r.values=A,F.prototype={constructor:F,reset:function(r){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(N),!r)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(r){if(this.done)throw r;var e=this;function o(n,o){return u.type="throw",u.arg=r,e.next=n,o&&(e.method="next",e.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],u=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var s=n.call(i,"catchLoc"),c=n.call(i,"finallyLoc");if(s&&c){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(s){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,r){for(var e=this.tryEntries.length-1;e>=0;--e){var o=this.tryEntries[e];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=r&&r<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=r,a?(this.method="next",this.next=a.finallyLoc,v):this.complete(i)},complete:function(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),v},finish:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.finallyLoc===t)return this.complete(e.completion,e.afterLoc),N(e),v}},catch:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.tryLoc===t){var n=e.completion;if("throw"===n.type){var o=n.arg;N(e)}return o}}throw Error("illegal catch attempt")},delegateYield:function(r,e,n){return this.delegate={iterator:A(r),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=t),v}},r}function k(t,r,e,n,o,a,i){try{var u=t[a](i),s=u.value}catch(t){return void e(t)}u.done?r(s):Promise.resolve(s).then(n,o)}function N(t,r){return function(t){if(Array.isArray(t))return t}(t)||function(t,r){var e=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=e){var n,o,a,i,u=[],s=!0,c=!1;try{if(a=(e=e.call(t)).next,0===r){if(Object(e)!==e)return;s=!1}else for(;!(s=(n=a.call(e)).done)&&(u.push(n.value),u.length!==r);s=!0);}catch(t){c=!0,o=t}finally{try{if(!s&&null!=e.return&&(i=e.return(),Object(i)!==i))return}finally{if(c)throw o}}return u}}(t,r)||function(t,r){if(!t)return;if("string"==typeof t)return F(t,r);var e=Object.prototype.toString.call(t).slice(8,-1);"Object"===e&&t.constructor&&(e=t.constructor.name);if("Map"===e||"Set"===e)return Array.from(t);if("Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return F(t,r)}(t,r)||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 F(t,r){(null==r||r>t.length)&&(r=t.length);for(var e=0,n=new Array(r);e<r;e++)n[e]=t[e];return n}var A=function(t){var r=t.signInOnSuccess,e=t.passwordConfigs,n=t.routeRedirectOnSignIn,o=t.routeWrongUrlRedirect,a=t.onErrorCallback,i=t.onSuccessCallback,u=t.handleSetUpdateNotification,s=(0,P.FV)({errorNotification:"Auth.Notification.errorNotification"}),c=N((0,j.useState)({userName:"",status:!1}),2),l=c[0],f=c[1],h=N((0,j.useState)(""),2),p=h[0],d=h[1],m=N((0,j.useState)(!1),2),v=m[0],y=m[1],g=N((0,j.useState)(""),2),w=g[0],b=g[1],O=N((0,j.useState)(""),2),F=O[0],A=O[1],T=N((0,j.useState)(!1),2),I=T[0],G=T[1];(0,j.useEffect)((function(){var t=window.location.search;t.includes("token=")||t.includes("email=")||"function"!=typeof o||(window.location.href=null==o?void 0:o());var r=decodeURIComponent(t),e=E(r,"token"),n=E(r,"email");b(n),A(e)}),[o]);var R=(0,j.useCallback)(function(){var t,o=(t=C().mark((function t(o){var c,l,h,p,d,m,v,g;return C().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(o.preventDefault(),G(!0),c=(0,L.r)(o.target),l=(null==c?void 0:c.password)&&w&&F,h=(null==e?void 0:e.requiredCharacterClasses)||0,p=(null==e?void 0:e.minLength)||0,(0,S.L)(null==c?void 0:c.password,h)&&!(c.password<p)){t.next=10;break}return y(!0),G(!1),t.abrupt("return");case 10:if(l){t.next=14;break}return null==u||u({status:"error",text:s.errorNotification}),G(!1),t.abrupt("return");case 14:return t.next=16,(0,x.x)(w,F,c.password);case 16:if(d=t.sent,m=d.message,!(v=d.success)||"function"!=typeof u){t.next=27;break}return r||"function"!=typeof n||(window.location.href=n()),t.next=23,(0,_.o)({email:w,password:c.password,handleSetUpdateNotification:u,onErrorCallback:a});case 23:null!=(g=t.sent)&&g.userName&&("function"==typeof n?window.location.href=n():(f({userName:null==g?void 0:g.userName,status:!0}),null==i||i(null==g?void 0:g.userName))),t.next=29;break;case 27:null==u||u({status:"error",text:m}),null==a||a({message:m,success:v});case 29:G(!1);case 30:case"end":return t.stop()}}),t)})),function(){var r=this,e=arguments;return new Promise((function(n,o){var a=t.apply(r,e);function i(t){k(a,n,o,i,u,"next",t)}function u(t){k(a,n,o,i,u,"throw",t)}i(void 0)}))});return function(t){return o.apply(this,arguments)}}(),[w,F,null==e?void 0:e.requiredCharacterClasses,null==e?void 0:e.minLength,u,s.errorNotification,r,a,n,i]);return{isSuccessful:l,updatePasswordValue:p,isClickSubmit:v,isLoading:I,submitUpdatePassword:R,handleSetUpdatePasswordValue:(0,j.useCallback)((function(t){d(t)}),[])}},T=e(9738),I=e(2623),G=e(5296),R=e(586),U=e(8837),M=e(7660),q=e(5127),V=function(t){var r=t.signInOnSuccess,e=void 0===r||r,o=t.formSize,a=void 0===o?"default":o,i=t.routeRedirectOnSignIn,u=t.routeWrongUrlRedirect,s=t.successNotificationForm,c=t.onErrorCallback,l=t.onSuccessCallback,f=(0,P.FV)({title:"Auth.UpdatePasswordForm.title",buttonPrimary:"Auth.UpdatePasswordForm.buttonPrimary"}),h=(0,w.i)().passwordConfigs,p=(0,M.S)(),d=p.updateNotification,m=p.handleSetUpdateNotification,v=A({signInOnSuccess:e,passwordConfigs:h,routeRedirectOnSignIn:i,routeWrongUrlRedirect:u,onErrorCallback:c,onSuccessCallback:l,handleSetUpdateNotification:m}),y=v.isSuccessful,x=v.updatePasswordValue,_=v.isClickSubmit,L=v.isLoading,E=v.submitUpdatePassword,S=v.handleSetUpdatePasswordValue,j=(0,b.d)({password:x,isClickSubmit:_,passwordConfigs:h}),O=j.isValidUniqueSymbols,C=j.defaultLengthMessage;return s&&y.status?s(y.userName):(0,q.jsxs)("div",{className:(0,n.L)(["auth-updatePasswordForm",a]),children:[(0,q.jsx)(T.h,{text:f.title,bottomLine:!1,className:"auth-updatePasswordForm__title"}),(0,q.jsx)(U.G,{className:"auth-updatePasswordForm__notification",notificationStatus:d.status,notificationText:d.text}),(0,q.jsxs)(I.l,{name:"updatePassword_form",className:"auth-updatePasswordForm__form",submitCallback:E,isLoading:L,fieldsConfig:[],children:[(0,q.jsx)(G.s,{initialPassword:x,required:!0,className:"auth-updatePasswordForm__form__item",setPasswordValueCallback:S,isError:"error"===O||"error"===(null==C?void 0:C.status),children:(0,q.jsx)(g.k,{minLength:null==h?void 0:h.minLength,requiredCharacterClasses:null==h?void 0:h.requiredCharacterClasses,validateLengthConfig:C,isValidUniqueSymbols:O})}),(0,q.jsx)("div",{className:"auth-updatePasswordForm__button",children:(0,q.jsx)(R.$,{type:"submit",buttonText:f.buttonPrimary,variant:"primary",enableLoader:L})})]})]})},$=function(t){var r=t.formSize,e=t.signInOnSuccess,n=t.loginOnPasswordUpdate,o=t.routeRedirectOnSignIn,a=t.routeWrongUrlRedirect,i=t.successNotificationForm,u=t.onErrorCallback,s=t.onSuccessCallback;return(0,q.jsx)("div",{className:"auth-update-password",children:(0,q.jsx)(V,{formSize:r,signInOnSuccess:e,loginOnPasswordUpdate:n,routeRedirectOnSignIn:o,routeWrongUrlRedirect:a,onErrorCallback:u,onSuccessCallback:s,successNotificationForm:i})})}},7871:(t,r,e)=>{e.d(r,{A:()=>u});var n=e(8645),o=e.n(n),a=e(278),i=e.n(a)()(o());i.push([t.id,".auth-updatePasswordForm{\n border-radius:var(--shape-border-radius-2);\n background-color:var(--color-neutral-50, #fff);\n padding:var(--spacing-small) var(--spacing-small) var(--spacing-medium) var(--spacing-small);\n}\n\n@media (min-width: 768px){\n .auth-updatePasswordForm{\n padding:var(--spacing-big) var(--spacing-xxbig) var(--spacing-xxbig) var(--spacing-xxbig);\n }\n}\n\n.auth-updatePasswordForm.small{\n padding:var(--spacing-small) var(--spacing-small) var(--spacing-medium) var(--spacing-small);\n}\n\n.auth-updatePasswordForm.small .auth-updatePasswordForm__form__item{\n margin-bottom:var(--spacing-big);\n}\n\n.auth-updatePasswordForm.small .auth-updatePasswordForm__title{\n margin-bottom:var(--spacing-small);\n}\n\n.auth-updatePasswordForm__title{\n margin-bottom:var(--spacing-big);\n}\n\n@media (min-width: 768px){\n .auth-updatePasswordForm__title{\n margin-bottom:var(--spacing-xxbig);\n }\n}\n\n.auth-updatePasswordForm__form .auth-updatePasswordForm__form__item{\n margin-bottom:var(--spacing-big);\n}\n\n@media (min-width: 768px){\n .auth-updatePasswordForm__form .auth-updatePasswordForm__form__item{\n margin-bottom:var(--spacing-xxbig);\n }\n}\n\n.auth-updatePasswordForm__notification{\n margin-bottom:var(--spacing-medium);\n}\n",""]);const u=i},278:t=>{t.exports=function(t){var r=[];return r.toString=function(){return this.map((function(r){var e="",n=void 0!==r[5];return r[4]&&(e+="@supports (".concat(r[4],") {")),r[2]&&(e+="@media ".concat(r[2]," {")),n&&(e+="@layer".concat(r[5].length>0?" ".concat(r[5]):""," {")),e+=t(r),n&&(e+="}"),r[2]&&(e+="}"),r[4]&&(e+="}"),e})).join("")},r.i=function(t,e,n,o,a){"string"==typeof t&&(t=[[null,t,void 0]]);var i={};if(n)for(var u=0;u<this.length;u++){var s=this[u][0];null!=s&&(i[s]=!0)}for(var c=0;c<t.length;c++){var l=[].concat(t[c]);n&&i[l[0]]||(void 0!==a&&(void 0===l[5]||(l[1]="@layer".concat(l[5].length>0?" ".concat(l[5]):""," {").concat(l[1],"}")),l[5]=a),e&&(l[2]?(l[1]="@media ".concat(l[2]," {").concat(l[1],"}"),l[2]=e):l[2]=e),o&&(l[4]?(l[1]="@supports (".concat(l[4],") {").concat(l[1],"}"),l[4]=o):l[4]="".concat(o)),r.push(l))}},r}},8645:t=>{t.exports=function(t){return t[1]}},5292:t=>{var r=[];function e(t){for(var e=-1,n=0;n<r.length;n++)if(r[n].identifier===t){e=n;break}return e}function n(t,n){for(var a={},i=[],u=0;u<t.length;u++){var s=t[u],c=n.base?s[0]+n.base:s[0],l=a[c]||0,f="".concat(c," ").concat(l);a[c]=l+1;var h=e(f),p={css:s[1],media:s[2],sourceMap:s[3],supports:s[4],layer:s[5]};if(-1!==h)r[h].references++,r[h].updater(p);else{var d=o(p,n);n.byIndex=u,r.splice(u,0,{identifier:f,updater:d,references:1})}i.push(f)}return i}function o(t,r){var e=r.domAPI(r);e.update(t);return function(r){if(r){if(r.css===t.css&&r.media===t.media&&r.sourceMap===t.sourceMap&&r.supports===t.supports&&r.layer===t.layer)return;e.update(t=r)}else e.remove()}}t.exports=function(t,o){var a=n(t=t||[],o=o||{});return function(t){t=t||[];for(var i=0;i<a.length;i++){var u=e(a[i]);r[u].references--}for(var s=n(t,o),c=0;c<a.length;c++){var l=e(a[c]);0===r[l].references&&(r[l].updater(),r.splice(l,1))}a=s}}},9383:t=>{var r={};t.exports=function(t,e){var n=function(t){if(void 0===r[t]){var e=document.querySelector(t);if(window.HTMLIFrameElement&&e instanceof window.HTMLIFrameElement)try{e=e.contentDocument.head}catch(t){e=null}r[t]=e}return r[t]}(t);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");n.appendChild(e)}},9088:t=>{t.exports=function(t){var r=document.createElement("style");return t.setAttributes(r,t.attributes),t.insert(r,t.options),r}},6884:(t,r,e)=>{t.exports=function(t){var r=e.nc;r&&t.setAttribute("nonce",r)}},9893:t=>{t.exports=function(t){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var r=t.insertStyleElement(t);return{update:function(e){!function(t,r,e){var n="";e.supports&&(n+="@supports (".concat(e.supports,") {")),e.media&&(n+="@media ".concat(e.media," {"));var o=void 0!==e.layer;o&&(n+="@layer".concat(e.layer.length>0?" ".concat(e.layer):""," {")),n+=e.css,o&&(n+="}"),e.media&&(n+="}"),e.supports&&(n+="}");var a=e.sourceMap;a&&"undefined"!=typeof btoa&&(n+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(a))))," */")),r.styleTagTransform(n,t,r.options)}(r,t,e)},remove:function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(r)}}}},7997:t=>{t.exports=function(t,r){if(r.styleSheet)r.styleSheet.cssText=t;else{for(;r.firstChild;)r.removeChild(r.firstChild);r.appendChild(document.createTextNode(t))}}},1178:(r,e,n)=>{r.exports=(t=>{var r={};return n.d(r,t),r})({events:()=>t.events})},5867:(t,e,n)=>{t.exports=(t=>{var r={};return n.d(r,t),r})({FetchGraphQL:()=>r.FetchGraphQL})},1771:(t,r,n)=>{t.exports=(t=>{var r={};return n.d(r,t),r})({Suspense:()=>e.Suspense,createContext:()=>e.createContext,lazy:()=>e.lazy,memo:()=>e.memo,useRef:()=>e.useRef,useState:()=>e.useState})},2885:(t,r,e)=>{t.exports=(t=>{var r={};return e.d(r,t),r})({useCallback:()=>n.useCallback,useContext:()=>n.useContext,useDebugValue:()=>n.useDebugValue,useEffect:()=>n.useEffect,useId:()=>n.useId,useImperativeHandle:()=>n.useImperativeHandle,useLayoutEffect:()=>n.useLayoutEffect,useMemo:()=>n.useMemo,useReducer:()=>n.useReducer,useRef:()=>n.useRef,useState:()=>n.useState})},997:(t,r,e)=>{t.exports=(t=>{var r={};return e.d(r,t),r})({Fragment:()=>o.Fragment,jsx:()=>o.jsx,jsxs:()=>o.jsxs})},7706:(t,r,e)=>{t.exports=(t=>{var r={};return e.d(r,t),r})({Component:()=>a.Component,Fragment:()=>a.Fragment,cloneElement:()=>a.cloneElement,createContext:()=>a.createContext,createElement:()=>a.createElement,createRef:()=>a.createRef,h:()=>a.h,hydrate:()=>a.hydrate,options:()=>a.options,render:()=>a.render,toChildArray:()=>a.toChildArray})},5127:(t,r,e)=>{e(1771);var n=e(997);e.o(n,"Fragment")&&e.d(r,{Fragment:function(){return n.Fragment}}),e.o(n,"jsx")&&e.d(r,{jsx:function(){return n.jsx}}),e.o(n,"jsxs")&&e.d(r,{jsxs:function(){return n.jsxs}})}};import i from"../runtime.js";import*as u from"../591.js";i.C(u);import*as s from"../246.js";i.C(s);import*as c from"../920.js";i.C(c);import*as l from"../739.js";i.C(l);import*as f from"../406.js";i.C(f);import*as h from"./UpdatePassword.js";i.C(h);var p,d=(p=1414,i(i.s=p)),m=d.R,v=d.A;export{m as UpdatePassword,v as default};
1
+ import{jsx as i,jsxs as M}from"@dropins/tools/preact-jsx-runtime.js";import{Slot as g,classes as z}from"@dropins/tools/lib.js";import{v as H,u as J,a as K}from"../chunks/usePasswordValidationMessage.js";import"@dropins/tools/event-bus.js";import"@dropins/tools/recaptcha.js";import{a as Q}from"../chunks/getCustomerToken.js";import{r as X}from"../chunks/resetPassword.js";import{c as S,g as Y,u as Z,T as $,F as W,B as E}from"../chunks/useInLineAlert.js";import{useState as h,useEffect as O,useCallback as k}from"@dropins/tools/preact-hooks.js";import{useText as j}from"@dropins/tools/i18n.js";import{InLineAlert as C,InputPassword as R}from"@dropins/tools/components.js";import"../chunks/getStoreConfig.js";import"../chunks/network-error.js";import"@dropins/tools/fetch-graphql.js";import"../chunks/initialize.js";import"../chunks/setReCaptchaToken.js";import"@dropins/tools/preact-compat.js";const I=(o,d)=>o.split("&").filter(r=>r.includes(d)).map(r=>r.split("=")[1])[0],tt=({isEmailConfirmationRequired:o,signInOnSuccess:d,passwordConfigs:e,routeRedirectOnSignIn:r,routeWrongUrlRedirect:a,onErrorCallback:u,onSuccessCallback:c,handleSetInLineAlertProps:m,routeRedirectOnPasswordUpdate:f})=>{const t=j({errorNotification:"Auth.Notification.errorNotification",updatePasswordMessage:"Auth.Notification.updatePasswordMessage",customerTokenErrorMessage:"Auth.Api.customerTokenErrorMessage"}),[U,P]=h({userName:"",status:!1}),[L,N]=h(""),[x,_]=h(!1),[p,T]=h(""),[y,v]=h(""),[w,F]=h(!1);O(()=>{const{search:l}=window.location;!l.includes("token=")&&!l.includes("email=")&&S(a)&&(window.location.href=a());const s=decodeURIComponent(l),b=I(s,"token"),q=I(s,"email");T(q),v(b)},[a]);const B=k(async l=>{l.preventDefault(),F(!0);const s=Y(l.target),b=(s==null?void 0:s.password)&&p&&y,q=(e==null?void 0:e.requiredCharacterClasses)||0,G=(e==null?void 0:e.minLength)||0;if(!H(s==null?void 0:s.password,q)||s.password.length<+G){_(!0),F(!1);return}if(!b){m({type:"error",text:t.errorNotification}),F(!1);return}const{message:V,success:A}=await X(p,y,s.password);if(A){if(o||!o&&!d){S(f)&&(window.location.href=f()),_(!0),F(!1),m({type:"success",text:t.updatePasswordMessage}),N("");return}const n=await Q({email:p,password:s.password,handleSetInLineAlertProps:m,onErrorCallback:u,translations:t});n!=null&&n.userName&&(S(r)?window.location.href=r():(P({userName:n==null?void 0:n.userName,status:!0}),c==null||c(n==null?void 0:n.userName)))}else m({type:"error",text:V}),u==null||u({message:V,success:A});F(!1)},[p,y,e,o,t,d,m,r,f,u,c]),D=k(l=>{N(l)},[]);return{isSuccessful:U,updatePasswordValue:L,isClickSubmit:x,isLoading:w,submitUpdatePassword:B,handleSetUpdatePasswordValue:D}},et=({signInOnSuccess:o=!0,formSize:d="default",routeRedirectOnSignIn:e,routeWrongUrlRedirect:r,slots:a,onErrorCallback:u,onSuccessCallback:c,routeRedirectOnPasswordUpdate:m})=>{const f=j({title:"Auth.UpdatePasswordForm.title",buttonPrimary:"Auth.UpdatePasswordForm.buttonPrimary"}),{passwordConfigs:t,isEmailConfirmationRequired:U}=J(),{inLineAlertProps:P,handleSetInLineAlertProps:L}=Z(),{isSuccessful:N,updatePasswordValue:x,isClickSubmit:_,isLoading:p,submitUpdatePassword:T,handleSetUpdatePasswordValue:y}=tt({isEmailConfirmationRequired:U,signInOnSuccess:o,passwordConfigs:t,routeRedirectOnSignIn:e,routeWrongUrlRedirect:r,onErrorCallback:u,onSuccessCallback:c,handleSetInLineAlertProps:L,routeRedirectOnPasswordUpdate:m}),{isValidUniqueSymbols:v,defaultLengthMessage:w}=K({password:x,isClickSubmit:_,passwordConfigs:t});return N.status&&(a!=null&&a.SuccessNotification)?i(g,{"data-testid":"successNotificationTestId",name:"SuccessNotification",slot:a==null?void 0:a.SuccessNotification,context:{isSuccessful:N}}):M("div",{className:z(["auth-updatePasswordForm",d]),children:[i($,{text:f.title,bottomLine:!1,className:"auth-updatePasswordForm__title"}),P.text?i(C,{className:"auth-updatePasswordForm__notification",variant:"secondary",heading:P.text,icon:P.icon}):null,M(W,{name:"updatePassword_form",className:"auth-updatePasswordForm__form",submitCallback:T,isLoading:p,fieldsConfig:[],children:[i("div",{style:"display: none;",children:i("input",{type:"text",id:"username",name:"username",autocomplete:"username"})}),i(R,{defaultValue:x,onValue:y,className:"auth-updatePasswordForm__form__item",autoComplete:"new-password",name:"password",required:!0,error:v==="error"||(w==null?void 0:w.status)==="error",minLength:t==null?void 0:t.minLength,uniqueSymbolsStatus:v,validateLengthConfig:w,requiredCharacterClasses:t==null?void 0:t.requiredCharacterClasses}),i("div",{className:"auth-updatePasswordForm__button",children:i(E,{type:"submit",buttonText:f.buttonPrimary,variant:"primary",enableLoader:p})})]})]})},yt=({slots:o,formSize:d,signInOnSuccess:e,routeRedirectOnPasswordUpdate:r,routeRedirectOnSignIn:a,routeWrongUrlRedirect:u,onErrorCallback:c,onSuccessCallback:m})=>i("div",{className:"auth-update-password",children:i(et,{formSize:d,signInOnSuccess:e,routeRedirectOnSignIn:a,routeWrongUrlRedirect:u,onErrorCallback:c,onSuccessCallback:m,slots:o,routeRedirectOnPasswordUpdate:r})});export{yt as UpdatePassword,yt as default};
@@ -0,0 +1,7 @@
1
+ export * from './UpdatePassword';
2
+ export * from './SuccessNotification';
3
+ export * from './SignUp';
4
+ export * from './SignIn';
5
+ export * from './ResetPassword';
6
+ export * from './AuthCombine';
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,25 @@
1
+ export interface AttributesFormItemsProps {
2
+ code: string;
3
+ name: string;
4
+ id: string;
5
+ defaultValue: string;
6
+ entity_type: string;
7
+ className: null | string;
8
+ fieldType: string;
9
+ required: boolean;
10
+ is_unique: boolean;
11
+ label: string;
12
+ orderNumber: number;
13
+ options: {
14
+ is_default: boolean;
15
+ label: string;
16
+ value: string;
17
+ }[];
18
+ }
19
+ export interface AttributesFormModel {
20
+ fields?: AttributesFormItemsProps[];
21
+ errors?: {
22
+ message: string;
23
+ }[];
24
+ }
25
+ //# sourceMappingURL=attributes-form.d.ts.map
@@ -0,0 +1,6 @@
1
+ export interface CustomerDataModel {
2
+ firstname: string;
3
+ lastname: string;
4
+ email: string;
5
+ }
6
+ //# sourceMappingURL=customer-data.d.ts.map
@@ -0,0 +1,7 @@
1
+ export * from './store-config';
2
+ export * from './reset-password';
3
+ export * from './password-reset-email';
4
+ export * from './revoke-customer-token';
5
+ export * from './customer-data';
6
+ export * from './attributes-form';
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,5 @@
1
+ export interface PasswordResetEmailModel {
2
+ message: string | '';
3
+ success: boolean;
4
+ }
5
+ //# sourceMappingURL=password-reset-email.d.ts.map
@@ -0,0 +1,5 @@
1
+ export interface ResetPasswordModel {
2
+ message: string | '';
3
+ success: boolean;
4
+ }
5
+ //# sourceMappingURL=reset-password.d.ts.map
@@ -0,0 +1,5 @@
1
+ export interface RevokeCustomerTokenModel {
2
+ message: string | '';
3
+ success: boolean;
4
+ }
5
+ //# sourceMappingURL=revoke-customer-token.d.ts.map
@@ -0,0 +1,8 @@
1
+ export interface StoreConfigModel {
2
+ autocompleteOnStorefront: boolean;
3
+ minLength: number;
4
+ requiredCharacterClasses: number;
5
+ createAccountConfirmation: boolean;
6
+ customerAccessTokenLifetime: number;
7
+ }
8
+ //# sourceMappingURL=store-config.d.ts.map
@@ -0,0 +1,7 @@
1
+ export * from './transform-auth';
2
+ export * from './transform-store-config';
3
+ export * from './transform-password-reset-email';
4
+ export * from './transform-revoke-customer-token';
5
+ export * from './transform-customer-data';
6
+ export * from './transform-attributes-form';
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,5 @@
1
+ import { getAttributesFormResponse } from '../../types';
2
+ import { AttributesFormModel } from '../models';
3
+
4
+ export declare const transformAttributesForm: (response: getAttributesFormResponse) => AttributesFormModel;
5
+ //# sourceMappingURL=transform-attributes-form.d.ts.map
@@ -0,0 +1,37 @@
1
+ export declare const loginContext: (ctx: any) => {
2
+ personalEmail: {
3
+ address: any;
4
+ };
5
+ userAccount: {
6
+ login: boolean;
7
+ };
8
+ commerce: {
9
+ commerceScope: {
10
+ storeCode: any;
11
+ };
12
+ };
13
+ };
14
+ export declare const logoutContext: (ctx: any) => {
15
+ userAccount: {
16
+ logout: boolean;
17
+ };
18
+ commerce: {
19
+ commerceScope: {
20
+ storeCode: any;
21
+ };
22
+ };
23
+ };
24
+ export declare const createAccountContext: (ctx: any) => {
25
+ personalEmail: {
26
+ address: any;
27
+ };
28
+ userAccount: {
29
+ updateProfile: any;
30
+ };
31
+ commerce: {
32
+ commerceScope: {
33
+ storeCode: any;
34
+ };
35
+ };
36
+ };
37
+ //# sourceMappingURL=transform-auth.d.ts.map
@@ -0,0 +1,5 @@
1
+ import { getCustomerDataResponse } from '../../types';
2
+ import { CustomerDataModel } from '../models';
3
+
4
+ export declare const transformCustomerData: (response: getCustomerDataResponse) => CustomerDataModel;
5
+ //# sourceMappingURL=transform-customer-data.d.ts.map
@@ -0,0 +1,5 @@
1
+ import { PasswordResetEmailResponse } from '../../types';
2
+ import { PasswordResetEmailModel } from '../models';
3
+
4
+ export declare const transformPasswordResetEmail: (response: PasswordResetEmailResponse) => PasswordResetEmailModel;
5
+ //# sourceMappingURL=transform-password-reset-email.d.ts.map
@@ -0,0 +1,5 @@
1
+ import { ResetPasswordResponse } from '../../types';
2
+ import { ResetPasswordModel } from '../models';
3
+
4
+ export declare const transformResetPassword: (response: ResetPasswordResponse) => ResetPasswordModel;
5
+ //# sourceMappingURL=transform-reset-password.d.ts.map
@@ -0,0 +1,5 @@
1
+ import { RevokeCustomerTokenResponse } from '../../types/api/revokeCustomerToken.types';
2
+ import { RevokeCustomerTokenModel } from '../models';
3
+
4
+ export declare const transformRevokeCustomerToken: (response: RevokeCustomerTokenResponse) => RevokeCustomerTokenModel;
5
+ //# sourceMappingURL=transform-revoke-customer-token.d.ts.map
@@ -0,0 +1,5 @@
1
+ import { getStoreConfigResponse } from '../../types';
2
+ import { StoreConfigModel } from '../models';
3
+
4
+ export declare const transformStoreConfig: (response: getStoreConfigResponse) => StoreConfigModel;
5
+ //# sourceMappingURL=transform-store-config.d.ts.map
@@ -0,0 +1,14 @@
1
+ import { inputsDefaultValueSetProps } from '../../types';
2
+ import { SignUpFieldsProps } from '../../configs/defaultCreateUserConfigs';
3
+ import { AttributesFormItemsProps } from '../../data/models';
4
+
5
+ interface UseGetAttributesFormProps {
6
+ fieldsConfigForApiVersion1: SignUpFieldsProps[];
7
+ apiVersion2: boolean;
8
+ inputsDefaultValueSet?: inputsDefaultValueSetProps[];
9
+ }
10
+ export declare const useGetAttributesForm: ({ inputsDefaultValueSet, fieldsConfigForApiVersion1, apiVersion2, }: UseGetAttributesFormProps) => {
11
+ fieldsListConfigs: AttributesFormItemsProps[];
12
+ };
13
+ export {};
14
+ //# sourceMappingURL=useGetAttributesForm.d.ts.map
@@ -0,0 +1,8 @@
1
+ export declare const useGetStoreConfigs: () => {
2
+ passwordConfigs: {
3
+ minLength: number;
4
+ requiredCharacterClasses: number;
5
+ } | null;
6
+ isEmailConfirmationRequired: boolean;
7
+ };
8
+ //# sourceMappingURL=useGetStoreConfigs.d.ts.map
@@ -0,0 +1,7 @@
1
+ import { useEmailConfirmationFormProps } from '../../types';
2
+
3
+ export declare const useEmailConfirmationForm: ({ userEmail, handleSetInLineAlertProps, }: useEmailConfirmationFormProps) => {
4
+ handleEmailConfirmation: () => Promise<void>;
5
+ disabledButton: boolean;
6
+ };
7
+ //# sourceMappingURL=useEmailConfirmationForm.d.ts.map
@@ -0,0 +1,16 @@
1
+ import { ValidateLengthConfigProps, statusTypes } from '../../types';
2
+
3
+ interface UsePasswordValidationMessageProps {
4
+ passwordConfigs: {
5
+ minLength: number;
6
+ requiredCharacterClasses: number;
7
+ } | null;
8
+ isClickSubmit: boolean;
9
+ password: string;
10
+ }
11
+ export declare const usePasswordValidationMessage: ({ passwordConfigs, isClickSubmit, password, }: UsePasswordValidationMessageProps) => {
12
+ isValidUniqueSymbols: statusTypes;
13
+ defaultLengthMessage: ValidateLengthConfigProps | undefined;
14
+ };
15
+ export {};
16
+ //# sourceMappingURL=usePasswordValidationMessage.d.ts.map
@@ -0,0 +1,8 @@
1
+ import { UseResetPasswordFormProps } from '../../types';
2
+
3
+ export declare const useResetPasswordForm: ({ routeSignIn, onErrorCallback, setActiveComponent, handleSetInLineAlertProps, }: UseResetPasswordFormProps) => {
4
+ isLoading: boolean;
5
+ submitResetPassword: (event: any) => Promise<void>;
6
+ redirectToSignInPage: () => void;
7
+ };
8
+ //# sourceMappingURL=useResetPasswordForm.d.ts.map
@@ -0,0 +1,21 @@
1
+ import { useSignInFormProps } from '../../types';
2
+
3
+ export declare const useSignInForm: ({ emailConfirmationStatusMessage, translations, initialEmailValue, routeSignUp, routeForgotPassword, routeRedirectOnSignIn, onErrorCallback, setActiveComponent, onSuccessCallback, onSignUpLinkClick, handleSetInLineAlertProps, routeRedirectOnEmailConfirmationClose, }: useSignInFormProps) => {
4
+ userEmail: string;
5
+ defaultEnhancedEmailFields: any;
6
+ passwordError: boolean;
7
+ isSuccessful: {
8
+ userName: string;
9
+ status: boolean;
10
+ };
11
+ isLoading: boolean;
12
+ signInPasswordValue: string;
13
+ showEmailConfirmationForm: boolean;
14
+ setShowEmailConfirmationForm: import('preact/hooks').Dispatch<import('preact/hooks').StateUpdater<boolean>>;
15
+ setSignInPasswordValue: import('preact/hooks').Dispatch<import('preact/hooks').StateUpdater<string>>;
16
+ submitLogInUser: (event: any) => Promise<void>;
17
+ forgotPasswordCallback: () => void;
18
+ onSignUpLinkClickCallback: () => void;
19
+ handledOnPrimaryButtonClick: () => void;
20
+ };
21
+ //# sourceMappingURL=useSignInForm.d.ts.map
@@ -0,0 +1,20 @@
1
+ import { UseSingUpFormProps } from '../../types';
2
+
3
+ export declare const useSignUpForm: ({ addressesData, translations, isEmailConfirmationRequired, apiVersion2, passwordConfigs, isAutoSignInEnabled, routeRedirectOnSignIn, routeSignIn, onErrorCallback, onSuccessCallback, setActiveComponent, handleSetInLineAlertProps, routeRedirectOnEmailConfirmationClose, }: UseSingUpFormProps) => {
4
+ isKeepMeLogged: boolean;
5
+ userEmail: string;
6
+ showEmailConfirmationForm: boolean;
7
+ isSuccessful: {
8
+ userName: string;
9
+ status: boolean;
10
+ };
11
+ isClickSubmit: boolean;
12
+ signUpPasswordValue: string;
13
+ isLoading: boolean;
14
+ onSubmitSignUp: (event: SubmitEvent, isValid: boolean) => Promise<void>;
15
+ signInButton: () => void;
16
+ handleSetSignUpPasswordValue: (value: string) => void;
17
+ onKeepMeLoggedChange: ({ target }: any) => void;
18
+ handleHideEmailConfirmationForm: () => void;
19
+ };
20
+ //# sourceMappingURL=useSignUpForm.d.ts.map
@@ -0,0 +1,14 @@
1
+ import { UseUpdatePasswordFormProps } from '../../types';
2
+
3
+ export declare const useUpdatePasswordForm: ({ isEmailConfirmationRequired, signInOnSuccess, passwordConfigs, routeRedirectOnSignIn, routeWrongUrlRedirect, onErrorCallback, onSuccessCallback, handleSetInLineAlertProps, routeRedirectOnPasswordUpdate, }: UseUpdatePasswordFormProps) => {
4
+ isSuccessful: {
5
+ userName: string;
6
+ status: boolean;
7
+ };
8
+ updatePasswordValue: string;
9
+ isClickSubmit: boolean;
10
+ isLoading: boolean;
11
+ submitUpdatePassword: (event: Event) => Promise<void>;
12
+ handleSetUpdatePasswordValue: (value: string) => void;
13
+ };
14
+ //# sourceMappingURL=useUpdatePasswordForm.d.ts.map
@@ -0,0 +1,11 @@
1
+ import { useFormProps } from '../../types';
2
+
3
+ export declare const useForm: ({ fieldsConfig, submitCallback }: useFormProps) => {
4
+ formData: Record<string, unknown>;
5
+ errors: Record<string, string>;
6
+ formRef: import('preact').RefObject<HTMLFormElement>;
7
+ handleChange: (event: Event) => void;
8
+ handleBlur: (event: Event) => void;
9
+ handleSubmit: (event: SubmitEvent) => void;
10
+ };
11
+ //# sourceMappingURL=useForm.d.ts.map
@@ -0,0 +1,11 @@
1
+ interface useEmailConfirmationProps {
2
+ enableEmailConfirmation: boolean;
3
+ }
4
+ export declare const useEmailConfirmation: ({ enableEmailConfirmation, }: useEmailConfirmationProps) => {
5
+ emailConfirmationStatusMessage: {
6
+ text: string;
7
+ status: '' | 'success' | 'error';
8
+ };
9
+ };
10
+ export {};
11
+ //# sourceMappingURL=useEmailConfirmation.d.ts.map
@@ -0,0 +1,7 @@
1
+ import { inLineAlertInterface } from '../types';
2
+
3
+ export declare const useInLineAlert: () => {
4
+ inLineAlertProps: inLineAlertInterface;
5
+ handleSetInLineAlertProps: (notification: inLineAlertInterface | undefined) => void;
6
+ };
7
+ //# sourceMappingURL=useInLineAlert.d.ts.map
@@ -0,0 +1,72 @@
1
+ declare const _default: {
2
+ "Auth": {
3
+ "PasswordValidationMessage": {
4
+ "chartTwoSymbols": "Use characters and numbers or symbols",
5
+ "chartThreeSymbols": "Use characters, numbers and symbols",
6
+ "chartFourSymbols": "Use uppercase characters, lowercase characters, numbers and symbols",
7
+ "messageLengthPassword": "At least {minLength} characters long"
8
+ },
9
+ "ResetPasswordForm": {
10
+ "title": "Reset your password",
11
+ "buttonPrimary": "Reset password",
12
+ "buttonSecondary": "Back to sign in"
13
+ },
14
+ "SignInForm": {
15
+ "title": "Sign in",
16
+ "buttonPrimary": "Sign in",
17
+ "buttonSecondary": "Sign up",
18
+ "buttonTertiary": "Forgot password?"
19
+ },
20
+ "SignUpForm": {
21
+ "title": "Sign up",
22
+ "buttonPrimary": "Create account",
23
+ "buttonSecondary": "Already a member? Sign in",
24
+ "privacyPolicyDefaultText": "I’ve read and accept the Terms of Use and Privacy Policy.",
25
+ "subscribedDefaultText": "Subscribe to our newsletter and be the first to know about new arrivals, sales and exclusive offers.",
26
+ "keepMeLoggedText": "Keep me logged in after account creation",
27
+ "failedCreateCustomerAddress": "Failed to create customer addresses:"
28
+ },
29
+ "UpdatePasswordForm": {
30
+ "title": "Update password",
31
+ "buttonPrimary": "Update password"
32
+ },
33
+ "FormText": {
34
+ "requiredFieldError": "This is a required field."
35
+ },
36
+ "EmailConfirmationForm": {
37
+ "title": "Verify your email address",
38
+ "subtitle": "We`ve sent an email to",
39
+ "mainText": "Check your inbox and click on the link we just send you to confirm your email address and activate your account.",
40
+ "buttonSecondary": "Resend email",
41
+ "buttonPrimary": "Close",
42
+ "accountConfirmMessage": "Account confirmed",
43
+ "accountConfirmationEmailSuccessMessage": "Congratulations! Your account at {email} email has been successfully confirmed."
44
+ },
45
+ "Notification": {
46
+ "errorNotification": "Your password update failed due to validation errors. Please check your information and try again.",
47
+ "updatePasswordMessage": "The password has been updated. Now you can log in with the new password.",
48
+ "successPasswordResetEmailNotification": "If there is an account associated with {email} you will receive an email with a link to reset your password.",
49
+ "resendEmailNotification": {
50
+ "informationText": "This account is not confirmed.",
51
+ "buttonText": "Click here",
52
+ "additionalText": "to resend confirmation email."
53
+ },
54
+ "emailConfirmationMessage": "Please check your email for confirmation link.",
55
+ "technicalErrors": {
56
+ "technicalErrorSendEmail": "A technical error occurred while trying to send the email. Please try again later."
57
+ }
58
+ },
59
+ "SuccessNotification": {
60
+ "headingText":"Welcome!",
61
+ "messageText":"We are glad to see you!",
62
+ "primaryButtonText":"Continue shopping",
63
+ "secondaryButtonText":"Logout"
64
+ },
65
+ "Api": {
66
+ "customerTokenErrorMessage": "Unable to log in. Please try again later or contact support if the issue persists."
67
+ }
68
+ }
69
+ }
70
+ ;
71
+
72
+ export default _default;
package/lib/acdl.d.ts ADDED
@@ -0,0 +1,9 @@
1
+ declare enum EventsList {
2
+ CREATE_ACCOUNT_EVENT = "create-account",
3
+ SIGN_IN = "sign-in",
4
+ SIGN_OUT = "sign-out"
5
+ }
6
+ export declare function pushEvent(event: string): void;
7
+ declare const publishEvents: (eventType: string, eventParams: any) => null | undefined;
8
+ export { EventsList, publishEvents };
9
+ //# sourceMappingURL=acdl.d.ts.map
@@ -0,0 +1,2 @@
1
+ export declare const checkIsFunction: (value: any) => value is Function;
2
+ //# sourceMappingURL=checkIsFunction.d.ts.map
@@ -0,0 +1,2 @@
1
+ export declare const clearUrlAndReplace: () => void;
2
+ //# sourceMappingURL=clearUrlAndReplace.d.ts.map
@@ -0,0 +1,2 @@
1
+ export declare const convertToInputDateFormat: (dateTimeString: string) => string;
2
+ //# sourceMappingURL=convertToInputDateFormat.d.ts.map
@@ -0,0 +1,3 @@
1
+ export declare const deleteCookie: (cookieName: string) => void;
2
+ export declare const getCookiesLifetime: () => Promise<string>;
3
+ //# sourceMappingURL=cookieUtils.d.ts.map
@@ -0,0 +1,5 @@
1
+ /** Actions */
2
+ export declare const handleFetchError: (errors: Array<{
3
+ message: string;
4
+ }>) => never;
5
+ //# sourceMappingURL=fetch-error.d.ts.map
@@ -0,0 +1,2 @@
1
+ export declare const generateRandomDigits: () => string;
2
+ //# sourceMappingURL=generateRandomDigits.d.ts.map
@@ -0,0 +1,2 @@
1
+ export declare const getFormValues: (form: any) => any;
2
+ //# sourceMappingURL=getFormValues.d.ts.map
@@ -0,0 +1,2 @@
1
+ export declare const getUrlParam: (url: string, param: string) => string;
2
+ //# sourceMappingURL=getUrlParam.d.ts.map
@@ -0,0 +1,3 @@
1
+ export declare const transformValue: (value: any) => any;
2
+ export declare const mergeFormObjects: (obj: Record<string, unknown>, apiVersion2: boolean) => any;
3
+ //# sourceMappingURL=mergeFormObjects.d.ts.map
@@ -0,0 +1,6 @@
1
+ /**
2
+ * A function which can be attached to fetchGraphQL to handle thrown errors in
3
+ * a generic way.
4
+ */
5
+ export declare const handleNetworkError: (error: Error) => never;
6
+ //# sourceMappingURL=network-error.d.ts.map
@@ -0,0 +1,2 @@
1
+ export declare const setReCaptchaToken: () => Promise<void>;
2
+ //# sourceMappingURL=setReCaptchaToken.d.ts.map
@@ -0,0 +1,2 @@
1
+ export declare const simplifyTransformAttributesForm: (defaultSignUpFields: any) => import('../data/models').AttributesFormItemsProps[] | undefined;
2
+ //# sourceMappingURL=simplifyTransformAttributesForm.d.ts.map
@@ -0,0 +1,2 @@
1
+ export declare const validationUniqueSymbolsPassword: (password: string, uniqueSymbolsCount: number) => boolean;
2
+ //# sourceMappingURL=validationUniqueSymbolsPassword.d.ts.map
package/package.json CHANGED
@@ -1 +1 @@
1
- {"name": "@dropins/storefront-auth", "version": "0.0.1-alpha1", "dependencies": { "@dropins/tools": "~0.19.0" } }
1
+ {"name": "@dropins/storefront-auth", "version": "0.0.1-alpha10", "@dropins/elsie": "0.26.0-alpha229"}
@@ -0,0 +1,8 @@
1
+ import { FunctionComponent } from 'preact';
2
+
3
+ interface CartProviderProps {
4
+ children?: any;
5
+ }
6
+ export declare const Provider: FunctionComponent<CartProviderProps>;
7
+ export {};
8
+ //# sourceMappingURL=Provider.d.ts.map
@@ -0,0 +1,2 @@
1
+ export * from './render';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,4 @@
1
+ import { Render } from '@dropins/tools/types/elsie/src/lib';
2
+
3
+ export declare const render: Render;
4
+ //# sourceMappingURL=render.d.ts.map