@thefittingroom/shop-ui 3.2.2 → 3.2.3
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.
- package/.rollup.cache/{Users/supagoku/projects/fit → home/runner/work/shop-sdk-ui}/shop-sdk-ui/dist/esm/components/SizeRec.js +0 -9
- package/.rollup.cache/home/runner/work/shop-sdk-ui/shop-sdk-ui/dist/esm/components/SizeRec.js.map +1 -0
- package/.rollup.cache/home/runner/work/shop-sdk-ui/shop-sdk-ui/dist/tsconfig.tsbuildinfo +1 -0
- package/dist/esm/index.js +1 -10
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/index.min.js +2 -2
- package/dist/esm/index.min.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/.rollup.cache/Users/supagoku/projects/fit/shop-sdk-ui/dist/esm/components/SizeRec.js.map +0 -1
- package/.rollup.cache/Users/supagoku/projects/fit/shop-sdk-ui/dist/tsconfig.tsbuildinfo +0 -1
- /package/.rollup.cache/{Users/supagoku/projects/fit → home/runner/work/shop-sdk-ui}/shop-sdk-ui/dist/esm/components/Modals/ErrorModal.js +0 -0
- /package/.rollup.cache/{Users/supagoku/projects/fit → home/runner/work/shop-sdk-ui}/shop-sdk-ui/dist/esm/components/Modals/ErrorModal.js.map +0 -0
- /package/.rollup.cache/{Users/supagoku/projects/fit → home/runner/work/shop-sdk-ui}/shop-sdk-ui/dist/esm/components/Modals/FitModal.js +0 -0
- /package/.rollup.cache/{Users/supagoku/projects/fit → home/runner/work/shop-sdk-ui}/shop-sdk-ui/dist/esm/components/Modals/FitModal.js.map +0 -0
- /package/.rollup.cache/{Users/supagoku/projects/fit → home/runner/work/shop-sdk-ui}/shop-sdk-ui/dist/esm/components/Modals/ForgotPasswordModal.js +0 -0
- /package/.rollup.cache/{Users/supagoku/projects/fit → home/runner/work/shop-sdk-ui}/shop-sdk-ui/dist/esm/components/Modals/ForgotPasswordModal.js.map +0 -0
- /package/.rollup.cache/{Users/supagoku/projects/fit → home/runner/work/shop-sdk-ui}/shop-sdk-ui/dist/esm/components/Modals/LoadingAvatarModal.js +0 -0
- /package/.rollup.cache/{Users/supagoku/projects/fit → home/runner/work/shop-sdk-ui}/shop-sdk-ui/dist/esm/components/Modals/LoadingAvatarModal.js.map +0 -0
- /package/.rollup.cache/{Users/supagoku/projects/fit → home/runner/work/shop-sdk-ui}/shop-sdk-ui/dist/esm/components/Modals/LoggedOutModal.js +0 -0
- /package/.rollup.cache/{Users/supagoku/projects/fit → home/runner/work/shop-sdk-ui}/shop-sdk-ui/dist/esm/components/Modals/LoggedOutModal.js.map +0 -0
- /package/.rollup.cache/{Users/supagoku/projects/fit → home/runner/work/shop-sdk-ui}/shop-sdk-ui/dist/esm/components/Modals/ModalManager.js +0 -0
- /package/.rollup.cache/{Users/supagoku/projects/fit → home/runner/work/shop-sdk-ui}/shop-sdk-ui/dist/esm/components/Modals/ModalManager.js.map +0 -0
- /package/.rollup.cache/{Users/supagoku/projects/fit → home/runner/work/shop-sdk-ui}/shop-sdk-ui/dist/esm/components/Modals/NoAvatarModal.js +0 -0
- /package/.rollup.cache/{Users/supagoku/projects/fit → home/runner/work/shop-sdk-ui}/shop-sdk-ui/dist/esm/components/Modals/NoAvatarModal.js.map +0 -0
- /package/.rollup.cache/{Users/supagoku/projects/fit → home/runner/work/shop-sdk-ui}/shop-sdk-ui/dist/esm/components/Modals/ResetLinkModal.js +0 -0
- /package/.rollup.cache/{Users/supagoku/projects/fit → home/runner/work/shop-sdk-ui}/shop-sdk-ui/dist/esm/components/Modals/ResetLinkModal.js.map +0 -0
- /package/.rollup.cache/{Users/supagoku/projects/fit → home/runner/work/shop-sdk-ui}/shop-sdk-ui/dist/esm/components/Modals/ScanCodeModal.js +0 -0
- /package/.rollup.cache/{Users/supagoku/projects/fit → home/runner/work/shop-sdk-ui}/shop-sdk-ui/dist/esm/components/Modals/ScanCodeModal.js.map +0 -0
- /package/.rollup.cache/{Users/supagoku/projects/fit → home/runner/work/shop-sdk-ui}/shop-sdk-ui/dist/esm/components/Modals/SignInModal.js +0 -0
- /package/.rollup.cache/{Users/supagoku/projects/fit → home/runner/work/shop-sdk-ui}/shop-sdk-ui/dist/esm/components/Modals/SignInModal.js.map +0 -0
- /package/.rollup.cache/{Users/supagoku/projects/fit → home/runner/work/shop-sdk-ui}/shop-sdk-ui/dist/esm/components/Modals/SizeErrorModal.js +0 -0
- /package/.rollup.cache/{Users/supagoku/projects/fit → home/runner/work/shop-sdk-ui}/shop-sdk-ui/dist/esm/components/Modals/SizeErrorModal.js.map +0 -0
- /package/.rollup.cache/{Users/supagoku/projects/fit → home/runner/work/shop-sdk-ui}/shop-sdk-ui/dist/esm/components/Modals/TryOnModal.js +0 -0
- /package/.rollup.cache/{Users/supagoku/projects/fit → home/runner/work/shop-sdk-ui}/shop-sdk-ui/dist/esm/components/Modals/TryOnModal.js.map +0 -0
- /package/.rollup.cache/{Users/supagoku/projects/fit → home/runner/work/shop-sdk-ui}/shop-sdk-ui/dist/esm/components/Vto.js +0 -0
- /package/.rollup.cache/{Users/supagoku/projects/fit → home/runner/work/shop-sdk-ui}/shop-sdk-ui/dist/esm/components/Vto.js.map +0 -0
- /package/.rollup.cache/{Users/supagoku/projects/fit → home/runner/work/shop-sdk-ui}/shop-sdk-ui/dist/esm/components/index.js +0 -0
- /package/.rollup.cache/{Users/supagoku/projects/fit → home/runner/work/shop-sdk-ui}/shop-sdk-ui/dist/esm/components/index.js.map +0 -0
- /package/.rollup.cache/{Users/supagoku/projects/fit → home/runner/work/shop-sdk-ui}/shop-sdk-ui/dist/esm/components/locale.js +0 -0
- /package/.rollup.cache/{Users/supagoku/projects/fit → home/runner/work/shop-sdk-ui}/shop-sdk-ui/dist/esm/components/locale.js.map +0 -0
- /package/.rollup.cache/{Users/supagoku/projects/fit → home/runner/work/shop-sdk-ui}/shop-sdk-ui/dist/esm/components/slider.js +0 -0
- /package/.rollup.cache/{Users/supagoku/projects/fit → home/runner/work/shop-sdk-ui}/shop-sdk-ui/dist/esm/components/slider.js.map +0 -0
- /package/.rollup.cache/{Users/supagoku/projects/fit → home/runner/work/shop-sdk-ui}/shop-sdk-ui/dist/esm/components/svgs.js +0 -0
- /package/.rollup.cache/{Users/supagoku/projects/fit → home/runner/work/shop-sdk-ui}/shop-sdk-ui/dist/esm/components/svgs.js.map +0 -0
- /package/.rollup.cache/{Users/supagoku/projects/fit → home/runner/work/shop-sdk-ui}/shop-sdk-ui/dist/esm/components/uiError.js +0 -0
- /package/.rollup.cache/{Users/supagoku/projects/fit → home/runner/work/shop-sdk-ui}/shop-sdk-ui/dist/esm/components/uiError.js.map +0 -0
- /package/.rollup.cache/{Users/supagoku/projects/fit → home/runner/work/shop-sdk-ui}/shop-sdk-ui/dist/esm/helpers/telephone.js +0 -0
- /package/.rollup.cache/{Users/supagoku/projects/fit → home/runner/work/shop-sdk-ui}/shop-sdk-ui/dist/esm/helpers/telephone.js.map +0 -0
- /package/.rollup.cache/{Users/supagoku/projects/fit → home/runner/work/shop-sdk-ui}/shop-sdk-ui/dist/esm/helpers/validations.js +0 -0
- /package/.rollup.cache/{Users/supagoku/projects/fit → home/runner/work/shop-sdk-ui}/shop-sdk-ui/dist/esm/helpers/validations.js.map +0 -0
- /package/.rollup.cache/{Users/supagoku/projects/fit → home/runner/work/shop-sdk-ui}/shop-sdk-ui/dist/esm/index.js +0 -0
- /package/.rollup.cache/{Users/supagoku/projects/fit → home/runner/work/shop-sdk-ui}/shop-sdk-ui/dist/esm/index.js.map +0 -0
- /package/.rollup.cache/{Users/supagoku/projects/fit → home/runner/work/shop-sdk-ui}/shop-sdk-ui/dist/esm/init.js +0 -0
- /package/.rollup.cache/{Users/supagoku/projects/fit → home/runner/work/shop-sdk-ui}/shop-sdk-ui/dist/esm/init.js.map +0 -0
- /package/.rollup.cache/{Users/supagoku/projects/fit → home/runner/work/shop-sdk-ui}/shop-sdk-ui/dist/esm/styles/index.js +0 -0
- /package/.rollup.cache/{Users/supagoku/projects/fit → home/runner/work/shop-sdk-ui}/shop-sdk-ui/dist/esm/styles/index.js.map +0 -0
- /package/.rollup.cache/{Users/supagoku/projects/fit → home/runner/work/shop-sdk-ui}/shop-sdk-ui/dist/esm/tfr-modal.js +0 -0
- /package/.rollup.cache/{Users/supagoku/projects/fit → home/runner/work/shop-sdk-ui}/shop-sdk-ui/dist/esm/tfr-modal.js.map +0 -0
- /package/.rollup.cache/{Users/supagoku/projects/fit → home/runner/work/shop-sdk-ui}/shop-sdk-ui/dist/esm/tfr-size-rec.js +0 -0
- /package/.rollup.cache/{Users/supagoku/projects/fit → home/runner/work/shop-sdk-ui}/shop-sdk-ui/dist/esm/tfr-size-rec.js.map +0 -0
- /package/.rollup.cache/{Users/supagoku/projects/fit → home/runner/work/shop-sdk-ui}/shop-sdk-ui/dist/esm/tfr.js +0 -0
- /package/.rollup.cache/{Users/supagoku/projects/fit → home/runner/work/shop-sdk-ui}/shop-sdk-ui/dist/esm/tfr.js.map +0 -0
- /package/.rollup.cache/{Users/supagoku/projects/fit → home/runner/work/shop-sdk-ui}/shop-sdk-ui/dist/esm/types/index.js +0 -0
- /package/.rollup.cache/{Users/supagoku/projects/fit → home/runner/work/shop-sdk-ui}/shop-sdk-ui/dist/esm/types/index.js.map +0 -0
package/dist/esm/index.min.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* thefittingroom v3.2.
|
|
2
|
+
* thefittingroom v3.2.3 (2025-09-09T18:41:38.889Z)
|
|
3
3
|
* Copyright 2022-present, TheFittingRoom, Inc. All rights reserved.
|
|
4
4
|
*/
|
|
5
5
|
function e(t,n){let i=function(){0!==n.length&&e(n.slice(-1),n.slice(0,-1))};var r=new Image;r.onload=i,r.onerror=i,r.src=t}function t(t){e(t.slice(-1),t.slice(0,-1))}const n=(e,n)=>{const i=document.getElementById(e);if(!i)throw new Error(`Slider with id ${e} not found`);return{Load(e,r){if(!Array.isArray(e)||!e.length)return console.debug("slider has no images to load"),new Error("slider has no images to load");t(e);const s=void 0!==r?r:0;i.value=s.toString(),i.max=(e.length-1).toString();const o=()=>{const t=parseInt(i.value);n(i,e[t])};return n(i,e[s]),i.removeEventListener("input",o),i.addEventListener("input",o),()=>{i.removeEventListener("input",o)}}}},i=function(e){const t=[];let n=0;for(let i=0;i<e.length;i++){let r=e.charCodeAt(i);r<128?t[n++]=r:r<2048?(t[n++]=r>>6|192,t[n++]=63&r|128):55296==(64512&r)&&i+1<e.length&&56320==(64512&e.charCodeAt(i+1))?(r=65536+((1023&r)<<10)+(1023&e.charCodeAt(++i)),t[n++]=r>>18|240,t[n++]=r>>12&63|128,t[n++]=r>>6&63|128,t[n++]=63&r|128):(t[n++]=r>>12|224,t[n++]=r>>6&63|128,t[n++]=63&r|128)}return t},r={byteToCharMap_:null,charToByteMap_:null,byteToCharMapWebSafe_:null,charToByteMapWebSafe_:null,ENCODED_VALS_BASE:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",get ENCODED_VALS(){return this.ENCODED_VALS_BASE+"+/="},get ENCODED_VALS_WEBSAFE(){return this.ENCODED_VALS_BASE+"-_."},HAS_NATIVE_SUPPORT:"function"==typeof atob,encodeByteArray(e,t){if(!Array.isArray(e))throw Error("encodeByteArray takes an array as a parameter");this.init_();const n=t?this.byteToCharMapWebSafe_:this.byteToCharMap_,i=[];for(let t=0;t<e.length;t+=3){const r=e[t],s=t+1<e.length,o=s?e[t+1]:0,a=t+2<e.length,c=a?e[t+2]:0,l=r>>2,u=(3&r)<<4|o>>4;let h=(15&o)<<2|c>>6,d=63&c;a||(d=64,s||(h=64)),i.push(n[l],n[u],n[h],n[d])}return i.join("")},encodeString(e,t){return this.HAS_NATIVE_SUPPORT&&!t?btoa(e):this.encodeByteArray(i(e),t)},decodeString(e,t){return this.HAS_NATIVE_SUPPORT&&!t?atob(e):function(e){const t=[];let n=0,i=0;for(;n<e.length;){const r=e[n++];if(r<128)t[i++]=String.fromCharCode(r);else if(r>191&&r<224){const s=e[n++];t[i++]=String.fromCharCode((31&r)<<6|63&s)}else if(r>239&&r<365){const s=((7&r)<<18|(63&e[n++])<<12|(63&e[n++])<<6|63&e[n++])-65536;t[i++]=String.fromCharCode(55296+(s>>10)),t[i++]=String.fromCharCode(56320+(1023&s))}else{const s=e[n++],o=e[n++];t[i++]=String.fromCharCode((15&r)<<12|(63&s)<<6|63&o)}}return t.join("")}(this.decodeStringToByteArray(e,t))},decodeStringToByteArray(e,t){this.init_();const n=t?this.charToByteMapWebSafe_:this.charToByteMap_,i=[];for(let t=0;t<e.length;){const r=n[e.charAt(t++)],o=t<e.length?n[e.charAt(t)]:0;++t;const a=t<e.length?n[e.charAt(t)]:64;++t;const c=t<e.length?n[e.charAt(t)]:64;if(++t,null==r||null==o||null==a||null==c)throw new s;const l=r<<2|o>>4;if(i.push(l),64!==a){const e=o<<4&240|a>>2;if(i.push(e),64!==c){const e=a<<6&192|c;i.push(e)}}}return i},init_(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(let e=0;e<this.ENCODED_VALS.length;e++)this.byteToCharMap_[e]=this.ENCODED_VALS.charAt(e),this.charToByteMap_[this.byteToCharMap_[e]]=e,this.byteToCharMapWebSafe_[e]=this.ENCODED_VALS_WEBSAFE.charAt(e),this.charToByteMapWebSafe_[this.byteToCharMapWebSafe_[e]]=e,e>=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(e)]=e,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(e)]=e)}}};
|
|
@@ -3395,5 +3395,5 @@ class Rf{constructor(e){this.auth=e,this.internalListeners=new Map}getUid(){var
|
|
|
3395
3395
|
* See the License for the specific language governing permissions and
|
|
3396
3396
|
* limitations under the License.
|
|
3397
3397
|
*/
|
|
3398
|
-
const xf=d("authIdTokenMaxAge")||300;let Nf=null;function Of(e=Ke()){const t=Be(e,"auth");if(t.isInitialized())return t.getImmediate();const n=function(e,t){const n=Be(e,"auth");if(n.isInitialized()){const e=n.getImmediate();if(T(n.getOptions(),null!=t?t:{}))return e;Lu(e,"already-initialized")}return n.initialize({options:t})}(e,{popupRedirectResolver:Cf,persistence:[jd,Id,kd]}),i=d("authTokenSyncURL");if(i&&"boolean"==typeof isSecureContext&&isSecureContext){const e=new URL(i,location.origin);if(location.origin===e.origin){const t=(r=e.toString(),async e=>{const t=e&&await e.getIdTokenResult(),n=t&&((new Date).getTime()-Date.parse(t.issuedAtTime))/1e3;if(n&&n>xf)return;const i=null==t?void 0:t.token;Nf!==i&&(Nf=i,await fetch(r,{method:i?"POST":"DELETE",headers:i?{Authorization:`Bearer ${i}`}:{}}))});!function(e,t,n){N(e).beforeAuthStateChanged(t,n)}(n,t,()=>t(n.currentUser)),function(e,t,n,i){N(e).onIdTokenChanged(t,n,i)}(n,e=>t(e))}}var r;const s=u("auth");return s&&Jh(n,`http://${s}`),n}var Lf;jh={loadJS:e=>new Promise((t,n)=>{const i=document.createElement("script");var r,s;i.setAttribute("src",e),i.onload=t,i.onerror=e=>{const t=Pu("internal-error");t.customData=e,n(t)},i.type="text/javascript",i.charset="UTF-8",(null!==(s=null===(r=document.getElementsByTagName("head"))||void 0===r?void 0:r[0])&&void 0!==s?s:document).appendChild(i)}),gapiScript:"https://apis.google.com/js/api.js",recaptchaV2Script:"https://www.google.com/recaptcha/api.js",recaptchaEnterpriseScript:"https://www.google.com/recaptcha/enterprise.js?render="},Lf="Browser",Ve(new O("auth",(e,{options:t})=>{const n=e.getProvider("app").getImmediate(),i=e.getProvider("heartbeat"),r=e.getProvider("app-check-internal"),{apiKey:s,authDomain:o}=n.options;Fu(s&&!s.includes(":"),"invalid-api-key",{appName:n.name});const a={apiKey:s,authDomain:o,clientPlatform:Lf,apiHost:"identitytoolkit.googleapis.com",tokenApiHost:"securetoken.googleapis.com",apiScheme:"https",sdkClientVersion:Mh(Lf)},c=new Uh(n,i,r,a);return function(e,t){const n=(null==t?void 0:t.persistence)||[],i=(Array.isArray(n)?n:[n]).map(bh);(null==t?void 0:t.errorMap)&&e._updateErrorMap(t.errorMap),e._initializeWithPersistence(i,null==t?void 0:t.popupRedirectResolver)}(c,t),c},"PUBLIC").setInstantiationMode("EXPLICIT").setInstanceCreatedCallback((e,t,n)=>{e.getProvider("auth-internal").initialize()})),Ve(new O("auth-internal",e=>(e=>new Rf(e))(Vh(e.getProvider("auth").getImmediate())),"PRIVATE").setInstantiationMode("EXPLICIT")),We(kf,Af,function(e){switch(e){case"Node":return"node";case"ReactNative":return"rn";case"Worker":return"webworker";case"Cordova":return"cordova";case"WebExtension":return"web-extension";default:return}}(Lf)),We(kf,Af,"esm2017");class Pf extends Error{constructor(){super("Avatar not created"),this.name="AvatarNotCreatedError"}}class Df extends Error{constructor(){super("user not logged in"),this.name="UserNotLoggedInError"}}class Mf extends Error{constructor(){super("no colorway size assets found"),this.name="NoColorwaySizeAssetsFoundError"}}class zf extends Error{constructor(){super("brand user id not set"),this.name="BrandUserIdNotSetError"}}class Ff extends Error{constructor(){super("no frames found"),this.name="NoFramesFoundError"}}class Uf extends Error{constructor(){super("no styles found"),this.name="NoStylesFoundError"}}const Vf="avatar not created";class Bf{constructor(e,t){this.firestore=e,this.brandUserId=null,this.auth=Of(t),this.auth.setPersistence(Id)}get id(){var e;return null===(e=this.user)||void 0===e?void 0:e.uid}async onInit(e){this.auth.onAuthStateChanged(t=>{this.setUser(t),t&&(this.logUserLogin(e,t),this.setBrandUserId(t.uid))}),await this.auth.authStateReady();const t=this.auth.currentUser;return this.setUser(t),this.setBrandUserId(null==t?void 0:t.uid),Boolean(t)}setUser(e){this.user=e}async logUserLogin(e,t){var n,i,r,s,o;try{const a=Wc(this.firestore,"user_logging",t.uid),c=await Hl(a),l=new Date,u=c.exists?c.data():null,h=null===(i=null===(n=null==u?void 0:u.brands)||void 0===n?void 0:n[e])||void 0===i?void 0:i.last_login;if(h&&Su(l).diff(Su(1e3*h.seconds),"seconds")<=10080)return;const d=null!==(o=null===(s=null===(r=null==u?void 0:u.brands)||void 0===r?void 0:r[e])||void 0===s?void 0:s.logins)&&void 0!==o?o:[];d.push(l);const f={brands:{[e]:{brand_id:e,last_login:l,logins:d}},last_brand_id:e,created_at:c.exists()?c.data().created_at:l,updated_at:l};await Gl(a,f,{merge:!0})}catch(e){console.error("LOGGING ERROR:",e)}}setBrandUserId(e){this.brandUserId=e}async getToken(){var e;if(!(null===(e=this.user)||void 0===e?void 0:e.uid))throw new Df;return await this.user.getIdToken()}get userId(){var e;if(!(null===(e=this.user)||void 0===e?void 0:e.uid))throw new Df;return this.user.uid}async getUserProfile(){var e;if(!(null===(e=this.user)||void 0===e?void 0:e.uid))throw new Df;return(await Hl(Wc(this.firestore,"users",this.id))).data()}watchUserProfileForChanges(e){let t;const n=xl(Kc(this.firestore,"users"),Ol(rl(),"==",this.id));return t=Kl(n,t=>e(t.docs[0].data())),()=>t()}watchUserProfileForFrames(e){let t;const n=xl(Kc(this.firestore,"users"),Ol(rl(),"==",this.id));return new Promise(i=>{t=Kl(n,async n=>{await e(n)&&(t(),i(n.docs[0].data()))})})}async login(e,t){this.auth.currentUser&&await this.auth.signOut();const n=await _d(this.auth,e,t);this.setUser(n.user)}async logout(){await this.auth.signOut(),this.setUser(null)}async sendPasswordResetEmail(e){await async function(e,t){const n=Vh(e),i={requestType:"PASSWORD_RESET",email:t,clientType:"CLIENT_TYPE_WEB"};await Qh(n,i,"getOobCode",nd)}(this.auth,e)}async confirmPasswordReset(e,t){await bd(this.auth,e,t)}}class jf{constructor(){this.promisefyOnSnapshot=(e,t)=>{let n;return{promise:new Promise(i=>{n=Kl(e,e=>{i(e),t&&n()})}),unsubscribe:()=>n()}};const e=Ge(Ql.getInstance().firebase);this.firestore=el(e),this.user=new Bf(this.firestore,e)}onInit(e){return this.user.onInit(e)}query(e,t,n=!0){const i=xl(Kc(this.firestore,e),t);return this.promisefyOnSnapshot(i,n)}getDocs(e,t){return ql(xl(Kc(this.firestore,e),...t))}async getDoc(e,t){const n=Wc(this.firestore,e,t),i=await Hl(n);return i.exists()?i.data():null}}const Hf=e=>{if(e.code===xu)throw new Error("account has been disabled");throw new Error(e.message)};class $f{static get endpoint(){return Ql.getInstance().api.url}static async Fetch({user:e,endpointPath:t,method:n,body:i,useToken:r=!0}){const s=this.getUrl(t,r),o={method:n,headers:await this.getHeaders(e,r),credentials:"omit"};i&&(o.body=JSON.stringify(i));const a=await fetch(s,o);if(a.ok)return a;if(500===a.status)throw new Error(a.statusText);const c=await a.json();return Promise.reject(c)}static getUrl(e,t){return t?`${this.endpoint}/v1${e}`:this.endpoint+e}static async getHeaders(e,t){if(!t)return{"Content-Type":"application/json"};return{"Content-Type":"application/json",Authorization:`Bearer ${await e.getToken()}`}}static Get(e,t,n){return this.Fetch({user:e,endpointPath:t,method:"GET",body:null,useToken:n})}static Post(e,t,n=null,i){return this.Fetch({user:e,endpointPath:t,method:"POST",body:n,useToken:i})}static Put(e,t,n,i){return this.Fetch({user:e,endpointPath:t,method:"PUT",body:n,useToken:i})}static Patch(e,t,n,i){return this.Fetch({user:e,endpointPath:t,method:"PATCH",body:n,useToken:i})}static Delete(e,t,n,i){return this.Fetch({user:e,endpointPath:t,method:"DELETE",body:n,useToken:i})}}const qf=e=>{const t=new Image;return t.src=e,new Promise(e=>{t.onerror=()=>e(!1),t.onload=()=>e(!0)})};class Gf{constructor(e,t){this.brandId=e,this.firebase=t,this.measurementLocations=new Map}get user(){return this.firebase.user}get isLoggedIn(){return!this.firebase||Boolean(this.user.id)}async onInit(){return await this.getMeasurementLocations(),this.firebase.onInit(this.brandId)}async getRecommendedSizes(e){var t,n;if(!this.isLoggedIn)throw new Df;try{const i=await $f.Get(this.user,`/styles/${e}/recommendation`),r=await i.json();return(null===(t=null==r?void 0:r.fits)||void 0===t?void 0:t.length)&&(null===(n=null==r?void 0:r.recommended_size)||void 0===n?void 0:n.id)?r:null}catch(e){if((null==e?void 0:e.error)===Vf)throw new Pf;throw e}}async submitTelephoneNumber(e){const t=e.replace(/[^\+0-9]/g,""),n=await $f.Post(this.user,"/ios-app-link",{phone_number:t},!1);console.log(n)}async getColorwaySizeAssetFromSku(e){const t=await this.getColorwaySizeAssets(null,[e]);if(!(null==t?void 0:t.size))throw new Mf;return Array.from(t.values())[0]}async getColorwaySizeAssetFromBrandStyleId(e){const t=await this.getColorwaySizeAssets(e);if(!(null==t?void 0:t.size))throw new Mf;return Array.from(t.values())[0]}async getMeasurementLocationsFromSku(e,t=[]){console.log({sku:e});const n=await this.getColorwaySizeAssetFromSku(e);if(!n)throw new Error("No colorway size asset found for sku");const i=await this.getStyle(n.style_id);if(!i)throw new Error("Style category not found for style id");const r=await this.getGetTaxonomy(i.style_garment_category_id);if(!r)throw new Error("Taxonomy not found for style garment category id");return(t.length?r.measurement_locations.female.filter(e=>t.includes(e)):r.measurement_locations.female).map(e=>this.measurementLocations.has(e)?this.measurementLocations.get(e):{name:e,sort_order:1/0}).sort((e,t)=>e.sort_order<t.sort_order?-1:0).map(e=>e.name)}async getMeasurementLocationsFromBrandStyleId(e,t=[]){const n=await this.getColorwaySizeAssetFromBrandStyleId(e);if(!n)throw new Error("No colorway size asset found for brand style id");const i=await this.getStyle(n.style_id);if(!i)throw new Error("Style category not found for style id");const r=await this.getGetTaxonomy(i.style_garment_category_id);if(!r)throw new Error("Taxonomy not found for style garment category id");return(t.length?r.measurement_locations.female.filter(e=>t.includes(e)):r.measurement_locations.female).map(e=>this.measurementLocations.has(e)?this.measurementLocations.get(e):{name:e,sort_order:1/0}).sort((e,t)=>e.sort_order<t.sort_order?-1:0).map(e=>e.name)}async getStyleByBrandStyleId(e){var t,n;try{const i=[Ol("brand_id","==",this.brandId)];i.push(Ol("brand_style_id","==",e));return null===(n=null===(t=(await this.firebase.getDocs("styles",i)).docs)||void 0===t?void 0:t[0])||void 0===n?void 0:n.data()}catch(e){return Hf(e)}}async getColorwaySizeAssets(e,t){const n=[Ol("brand_id","==",this.brandId)];e&&n.push(Ol("style_id","==",e)),(null==t?void 0:t.length)>0&&n.push(Ol("sku","in",t));try{const e=await this.firebase.getDocs("colorway_size_assets",n),t=new Map;return e.forEach(e=>{const n=e.data();t.set(n.id,n)}),t}catch(e){return Hf(e)}}async getStyle(e){try{return await this.firebase.getDoc("styles",String(e))}catch(e){return Hf(e)}}getMeasurementLocationName(e){return this.measurementLocations.has(e)?this.measurementLocations.get(e).name:e}getMeasurementLocationSortOrder(e){return this.measurementLocations.has(e)?this.measurementLocations.get(e).sort_order:1/0}async tryOn(e,t){if(!this.isLoggedIn)throw new Df;const n=await this.getColorwaySizeAssetSkuFromStyleIdAndSizeId(e,t);try{return await this.getColorwaySizeAssetFrames(n)}catch(e){if(!(e instanceof Ff))throw e;return this.requestThenGetColorwaySizeAssetFrames(n)}}async getColorwaySizeAssetSkuFromStyleIdAndSizeId(e,t){var n,i,r;try{const s=[Ol("brand_id","==",this.brandId)];s.push(Ol("style_id","==",e)),s.push(Ol("size_id","==",t));return null===(r=null===(i=null===(n=(await this.firebase.getDocs("colorway_size_assets",s)).docs)||void 0===n?void 0:n[0])||void 0===i?void 0:i.data())||void 0===r?void 0:r.sku}catch(e){return Hf(e)}}async getGetTaxonomy(e){try{return await this.firebase.getDoc("style_garment_categories",String(e))}catch(e){return Hf(e)}}async getMeasurementLocations(){(await this.fetchMeasurementLocations()).forEach(e=>{this.measurementLocations.set(e.name,{name:e.garment_label,sort_order:e.sort_order})})}async fetchMeasurementLocations(){try{return(await this.firebase.getDocs("measurement_locations",[])).docs.map(e=>e.data())}catch(e){return Hf(e)}}async requestThenGetColorwaySizeAssetFrames(e){const[t,n]=await(i=this.getColorwaySizeAssetFromSku(e),i.then(e=>[null,e]).catch(e=>[e]));var i;if(t)throw t;try{try{this.requestColorwaySizeAssetFrames(n.id)}catch(e){}return this.awaitColorwaySizeAssetFrames(e)}catch(t){if((null==t?void 0:t.error)===Vf)throw new Pf;throw new Uf}}async awaitColorwaySizeAssetFrames(e){var t,n,i,r;if(!this.isLoggedIn)throw new Df;const s=await this.user.watchUserProfileForFrames(async t=>{var n,i,r,s;const o=null===(s=null===(r=null===(i=null===(n=t.docs[0].data())||void 0===n?void 0:n.vto)||void 0===i?void 0:i[this.brandId])||void 0===r?void 0:r[e])||void 0===s?void 0:s.frames;return!!(null==o?void 0:o.length)&&qf(o[0])});if(!(null===(r=null===(i=null===(n=null===(t=null==s?void 0:s.vto)||void 0===t?void 0:t[this.brandId])||void 0===n?void 0:n[e])||void 0===i?void 0:i.frames)||void 0===r?void 0:r.length))throw new Ff;return s.vto[this.brandId][e].frames}async requestColorwaySizeAssetFrames(e){if(!this.isLoggedIn)throw new Df;if(!this.user.brandUserId)throw new zf;await $f.Post(this.user,`/colorway-size-assets/${e}/frames`,{brand_user_id:String(this.user.brandUserId)})}async getColorwaySizeAssetFrames(e){var t,n,i;const r=await this.user.getUserProfile(),s=(null===(i=null===(n=null===(t=null==r?void 0:r.vto)||void 0===t?void 0:t[this.brandId])||void 0===n?void 0:n[e])||void 0===i?void 0:i.frames)||[];if(!s.length)throw new Ff;if(!await qf(s[0]))throw new Ff;return s}}var Kf;!function(e){e.ACROSS_BACK="across_back",e.ACROSS_FRONT="across_front",e.ACROSS_SHOULDER="across_shoulder",e.ANKLE="ankle",e.ARMEYE="arm_eye",e.ARM_LENGTH_FROM_SHOULDER="arm_length_from_shoulder",e.BACK_CROTCH_LENGTH="back_crotch_length",e.BACK_NECK_TO_EBLOW="back_neck_to_elbow",e.BELOW_KNEE="below_knee",e.BICEP="bicep",e.BUST="bust",e.BUST_POINT_TO_BUST_POINT="bust_point_to_bust_point",e.CALF="calf",e.CB_NECK_TO_WAIST="cb_neck_to_waist",e.CB_NECK_TO_WRIST="cb_neck_to_wrist",e.CF_NECK_TO_WAIST="cf_neck_to_waist",e.ELBOW="elbow",e.FOREARM="forearm",e.FRONT_CROTCH_LENGTH="front_crotch_length",e.HIGH_HIP_PLACEMENT_FROM_WAIST="high_hip_placement",e.HIGH_HIP="high_hip",e.HSP_TO_ACROSS_BACK="hsp_to_across_back",e.HSP_TO_ACROSS_FRONT="hsp_to_across_front",e.HSP_TO_BUST_POINT="hsp_to_bust_point",e.HSP_TO_LOW_HIP_POSITION="hsp_to_low_hip_position",e.HSP_TO_WAIST_POSITION="hsp_to_waist_position",e.INSEAM="inseam",e.KNEE="knee",e.LOW_HIP="low_hip",e.LOW_HIP_PLACEMENT_FROM_WAIST="low_hip_placement",e.MID_NECK="mid_neck",e.NECK_AT_BASE="neck_base",e.SHOULDER_DROP="shoulder_drop",e.SHOULDER_TO_SHOULDER="shoulder_to_shoulder",e.SIDE_WAIST_TO_FLOOR="side_waist_to_floor",e.SIDE_WAIST_TO_KNEE="side_waist_to_knee",e.THIGH="thigh",e.TOTAL_RISE_LENGTH="total_rise_length",e.UNDER_BUST="under_bust",e.VERTICAL_TRUNK="vertical_trunk",e.WAIST="waist",e.WRIST="wrist"}(Kf||(Kf={}));const Wf={[Kf.ACROSS_BACK]:"Across back",[Kf.ACROSS_FRONT]:"Across front",[Kf.ACROSS_SHOULDER]:"Across shoulder",[Kf.ANKLE]:"Ankle",[Kf.ARMEYE]:"Armeye",[Kf.ARM_LENGTH_FROM_SHOULDER]:"Arm length from shoulder",[Kf.BACK_CROTCH_LENGTH]:"Back crotch length",[Kf.BACK_NECK_TO_EBLOW]:"Back neck to eblow",[Kf.BELOW_KNEE]:"Below knee",[Kf.BICEP]:"Bicep",[Kf.BUST]:"Chest/Bust",[Kf.BUST_POINT_TO_BUST_POINT]:"Bust point to bust point",[Kf.CALF]:"Calf",[Kf.CB_NECK_TO_WAIST]:"Cb neck to waist",[Kf.CB_NECK_TO_WRIST]:"Cb neck to wrist",[Kf.CF_NECK_TO_WAIST]:"Cf neck to waist",[Kf.ELBOW]:"Elbow",[Kf.FOREARM]:"Forearm",[Kf.FRONT_CROTCH_LENGTH]:"Front crotch length",[Kf.HIGH_HIP_PLACEMENT_FROM_WAIST]:"High hip placement from waist",[Kf.HIGH_HIP]:"High hip",[Kf.HSP_TO_ACROSS_BACK]:"Hsp to across back",[Kf.HSP_TO_ACROSS_FRONT]:"Hsp to across front",[Kf.HSP_TO_BUST_POINT]:"Hsp to bust point",[Kf.HSP_TO_LOW_HIP_POSITION]:"Hsp to low hip position",[Kf.HSP_TO_WAIST_POSITION]:"Hsp to waist position",[Kf.INSEAM]:"Inseam",[Kf.KNEE]:"Knee",[Kf.LOW_HIP]:"Low hip",[Kf.LOW_HIP_PLACEMENT_FROM_WAIST]:"Low hip placement from waist",[Kf.MID_NECK]:"Mid neck",[Kf.NECK_AT_BASE]:"Neck at base",[Kf.SHOULDER_DROP]:"Shoulder drop",[Kf.SHOULDER_TO_SHOULDER]:"Shoulder to shoulder",[Kf.SIDE_WAIST_TO_FLOOR]:"Side waist to floor",[Kf.SIDE_WAIST_TO_KNEE]:"Side waist to knee",[Kf.THIGH]:"Thigh",[Kf.TOTAL_RISE_LENGTH]:"Total rise length",[Kf.UNDER_BUST]:"Under bust",[Kf.VERTICAL_TRUNK]:"Vertical trunk",[Kf.WAIST]:"Waist",[Kf.WRIST]:"Wrist"};var Qf;!function(e){e.BLOUSES="blouses",e.COATS="coats",e.DRESSES="dresses",e.JACKETS="jackets",e.PANTS="pants",e.PUFFERS_AND_PARKAS="puffer_and_parkas",e.SHORTS="shorts",e.SKIRTS="skirts",e.SWEATERS="sweaters",e.T_SHIRTS_AND_TANKS="t_shirts_and_tanks"}(Qf||(Qf={}));const Jf={[Qf.BLOUSES]:[Kf.BUST,Kf.ACROSS_SHOULDER,Kf.WAIST,Kf.LOW_HIP,Kf.HIGH_HIP],[Qf.COATS]:[Kf.BUST,Kf.ACROSS_SHOULDER,Kf.WAIST,Kf.LOW_HIP,Kf.HIGH_HIP],[Qf.DRESSES]:[Kf.LOW_HIP,Kf.BUST,Kf.ACROSS_SHOULDER,Kf.WAIST],[Qf.JACKETS]:[Kf.BUST,Kf.ACROSS_SHOULDER,Kf.WAIST,Kf.LOW_HIP,Kf.HIGH_HIP],[Qf.PANTS]:[Kf.LOW_HIP,Kf.WAIST,Kf.THIGH,Kf.INSEAM],[Qf.PUFFERS_AND_PARKAS]:[Kf.BUST,Kf.ACROSS_SHOULDER,Kf.WAIST,Kf.LOW_HIP,Kf.HIGH_HIP],[Qf.SHORTS]:[Kf.LOW_HIP,Kf.WAIST,Kf.THIGH,Kf.INSEAM],[Qf.SKIRTS]:[Kf.LOW_HIP,Kf.WAIST],[Qf.SWEATERS]:[Kf.BUST,Kf.ACROSS_SHOULDER,Kf.WAIST,Kf.LOW_HIP,Kf.HIGH_HIP],[Qf.T_SHIRTS_AND_TANKS]:[Kf.BUST,Kf.ACROSS_SHOULDER,Kf.WAIST,Kf.LOW_HIP,Kf.HIGH_HIP]},Yf={activewear:"Active Wear",dresses:"Dresses",jackets_and_coats:"Jackets and Coats",jeans:"Jeans",jumpsuits_and_rompers:"Jumpsuits and Rompers",pants_and_shorts:"Pants and Shorts",skirts:"Skirts",suits_and_tailoring:"Suits and Tailoring",sweaters:"Sweaters",tops:"Tops"},Xf={a_line:"A Line",a_line_flared:"A Line Flared",blazers:"Blazers",bodycon:"Bodycon",bodysuits:"Bodysuits",boiler_suits:"Boiler Suits",bootcut:"Bootcut",cardigans:"Cardigans",cigarette:"Cigarette",corsets_and_bustiers:"Corsets and Bustiers",crewnecks:"Crewnecks",culottes:"Culottes",denim:"Denim",denim_jackets:"Denim Jackets",denim_shorts:"Denim Shorts",fit_and_flare:"Fit and Flare",flared:"Flared",hoodies_and_zipups:"Hoodies and Zipups",joggers:"Joggers",jumpsuits:"Jumpsuits",knit:"Knit",leggings:"Leggings",mom:"Mom",overalls:"Overalls",parkas:"Parkas",peacoats:"Peacoats",pencil:"Pencil",pleated:"Pleated",polos:"Polos",puffer_jackets:"Puffer Jackets",raincoats:"Raincoats",relaxed:"Relaxed",rompers:"Rompers",shackets:"Shackets",shirt:"Shirt",shirts_and_blouses:"Shirts and Blouses",skater:"Skater",skinny:"Skinny",slim:"Slim",slip:"Slip",sports_bras:"Sports Bras",straight:"Straight",suit_jackets:"Suit Jackets",suit_skirts:"Suit Skirts",suit_trousers:"Suit Trousers",suit_vests:"Suit Vests",sweatshirts:"Sweatshirts",t_shirts:"T-Shirts",tank_tops_and_camisoles:"Tank Tops and Camisoles",tapered:"Tapered",trench_coats:"Trench Coats",trousers:"Trousers",turtlenecks:"Turtleneck",unitards:"Unitards",v_necks:"V-Necks",wide_leg:"Wide Leg",wrap:"Wrap"},Zf={activewear:{leggings:Qf.PANTS,joggers:Qf.PANTS,sweatshirts:Qf.SWEATERS},dresses:{a_line:Qf.DRESSES,bodycon:Qf.DRESSES,fit_and_flare:Qf.DRESSES,knit:Qf.DRESSES,shirt:Qf.DRESSES,slip:Qf.DRESSES,straight:Qf.DRESSES,wrap:Qf.DRESSES},jackets_and_coats:{denim_jackets:Qf.JACKETS,parkas:Qf.PUFFERS_AND_PARKAS,peacoats:Qf.COATS,puffer_jackets:Qf.PUFFERS_AND_PARKAS,raincoats:Qf.COATS,rompers:Qf.COATS,shackets:Qf.JACKETS,trench_coats:Qf.COATS},jeans:{bootcut:Qf.PANTS,flared:Qf.PANTS,mom:Qf.PANTS,relaxed:Qf.PANTS,skinny:Qf.PANTS,slim:Qf.PANTS,straight:Qf.PANTS,tapered:Qf.PANTS,wide_leg:Qf.PANTS},jumpsuits_and_rompers:{boiler_suits:Qf.DRESSES,denim:Qf.DRESSES,jumpsuits:Qf.DRESSES,overalls:Qf.DRESSES,rompers:Qf.DRESSES,unitards:Qf.DRESSES},pants_and_shorts:{cigarette:Qf.PANTS,culottes:Qf.SHORTS,denim_shorts:Qf.SHORTS,flared:Qf.PANTS,joggers:Qf.PANTS,leggings:Qf.PANTS,skinny:Qf.PANTS,wide_leg:Qf.PANTS},skirts:{a_line_flared:Qf.SKIRTS,denim:Qf.SKIRTS,knit:Qf.SKIRTS,pencil:Qf.SKIRTS,pleated:Qf.SKIRTS,skater:Qf.SKIRTS,slip:Qf.SKIRTS,wrap:Qf.SKIRTS},suits_and_tailoring:{blazers:Qf.JACKETS,suit_jackets:Qf.JACKETS,suit_skirts:Qf.SKIRTS,suit_trousers:Qf.PANTS,suit_vests:Qf.SWEATERS,trousers:Qf.PANTS},sweaters:{cardigans:Qf.SWEATERS,crewnecks:Qf.SWEATERS,hoodies_and_zipups:Qf.SWEATERS,sweatshirts:Qf.SWEATERS,turtlenecks:Qf.SWEATERS,v_necks:Qf.SWEATERS},tops:{bodysuits:Qf.BLOUSES,corsets_and_bustiers:Qf.BLOUSES,polos:Qf.T_SHIRTS_AND_TANKS,shirts_and_blouses:Qf.BLOUSES,t_shirts:Qf.T_SHIRTS_AND_TANKS,tank_tops_and_camisoles:Qf.T_SHIRTS_AND_TANKS}};var ep;!function(e){e.TOO_TIGHT="too_tight",e.TIGHT="tight",e.SLIGHTLY_TIGHT="slightly_tight",e.PERFECT_FIT="perfect_fit",e.SLIGHTLY_LOOSE="slightly_loose",e.LOOSE="loose",e.OVERSIZED="oversized",e.TOO_SHORT="too_short",e.SHORT="short",e.SLIGHTLY_SHORT="slightly_short",e.SLIGHTLY_LONG="slightly_long",e.LONG="long",e.TOO_LONG="too_long"}(ep||(ep={}));const tp={[ep.TOO_TIGHT]:"Too Tight",[ep.TIGHT]:"Tight",[ep.SLIGHTLY_TIGHT]:"Slightly Tight",[ep.PERFECT_FIT]:"Perfect Fit",[ep.SLIGHTLY_LOOSE]:"Slightly Loose",[ep.LOOSE]:"Loose",[ep.OVERSIZED]:"Oversized",[ep.TOO_SHORT]:"Too Short",[ep.SHORT]:"Short",[ep.SLIGHTLY_SHORT]:"Slightly Short",[ep.SLIGHTLY_LONG]:"Slightly Long",[ep.LONG]:"Long",[ep.TOO_LONG]:"Too Long"};var np;!function(e){e.NOT_CREATED="NOT_CREATED",e.CREATED="CREATED",e.PENDING="PENDING"}(np||(np={}));var ip=Object.freeze({__proto__:null,get AvatarState(){return np},Categories:["activewear","dresses","jackets_and_coats","jeans","jumpsuits_and_rompers","pants_and_shorts","skirts","suits_and_tailoring","sweaters","tops"],CategoryNames:Yf,get Classification(){return Qf},ClassificationLocations:Jf,get Fit(){return ep},FitNames:tp,get MeasurementLocation(){return Kf},MeasurementLocationName:Wf,SubcategoryNames:Xf,Taxonomy:Zf});class rp{constructor(e){this.vtoMainDivId=e,this.isInit=!1,this.currentSliderValue=0,this.slider=null}init(){if(this.isInit)return;const e=document.getElementById(this.vtoMainDivId);if(!e)throw new Error(`Element with id ${this.vtoMainDivId} not found`);e.innerHTML='\n <div class="tfr-slider-wrapper">\n <img id="tfr-tryon-image" src="" />\n <input type="range" id="tfr-slider" />\n </div>\n ';const t=document.getElementById("tfr-tryon-image");this.slider=n("tfr-slider",(e,n)=>{console.debug("slider change",e,n),t.src=n,this.currentSliderValue=parseInt(e.value)}),this.isInit=!0}onNewFramesReady(e){if(this.isInit||this.init(),Array.isArray(e)&&e.length>0){const t=Math.min(this.currentSliderValue,e.length-1),n=this.slider.Load(e,t);if(n instanceof Error)return void console.error(n);const i=document.getElementById("tfr-slider");if(i&&this.currentSliderValue<e.length){i.value=this.currentSliderValue.toString();document.getElementById("tfr-tryon-image").src=e[this.currentSliderValue]}}}}var sp="Back to sign in",op="Click here to download the app",ap="Don't have an account?",cp="Whoops! Looks like you don't have an avatar yet.",lp="Email address",up="Please enter a valid email address.",hp="Enter your email address, we will send you a link to reset your password.",dp="Forgot password?",fp="Have an account? Sign in",pp="Your avatar is loading...",gp="Unfortunately, that size is not available for try on.",mp="or",yp="Password",vp="Please enter a valid password (at least 7 characters).",wp="Return to Catalog Page",bp="Return to Product Page",_p="Return to site",Sp="Please return to The Fitting Room app to create your avatar.",Ep="Scan to download the app",Tp="Send",Ip="Sign back in",Cp="Sign in",kp="Something went wrong. Try again!",Ap="You have successfully logged out!",Rp="The Fitting Room",xp="Username or password is empty.",Np="Username or password is incorrect.",Op="End size uncertainty with",Lp="Our technology captures your precise measurements, and considers things like fabric stretch and your individual physique to find your perfect fit every time.";function Pp(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css","top"===n&&i.firstChild?i.insertBefore(r,i.firstChild):i.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}}Pp(".tfr-c-white{color:var(--tfr-white)}.tfr-c-brand{color:var(--tfr-brand-color)}.tfr-c-brand-bg{background-color:var(--tfr-brand-color)}.tfr-c-black{color:var(--tfr-black)}.tfr-c-black-o5{color:rgba(0,0,0,.5)}.tfr-c-red{color:var(--tfr-red)}");Pp('#fit-title{margin-bottom:20px;margin-top:-30px}#fit-subtitle,#fit-title{color:#209da7;font-size:24px;font-weight:700}#fit-subtitle{position:absolute;right:17px;top:100px}#fit-subtitle-mobile{color:#7d7d7d;font-size:24px;font-weight:700;margin-top:20px}#fit-outline-container{display:flex;justify-content:center}#fit-outline-inner{position:relative}#fit-outline-inner,#tfr-fit-outline-img{width:184px}#fit-outline-inner,#fit-outline-inner-left,#fit-outline-inner-right,#tfr-fit-outline-img{height:701px}#fit-outline-inner-left,#fit-outline-inner-right{position:relative;width:260px}#fit-outline-container .fit-outline-line{display:block}.fit-outline-line{background:#000;height:1px;position:absolute}.fit-outline-line-text{border-bottom:1px solid #000;font-size:24px;position:absolute}.fit-outline-line-chest-text{left:-11px;text-align:right;top:163px;width:254px}.fit-outline-line-n-waist-text{left:-11px;text-align:right;top:208px;width:254px}.fit-outline-line-p-waist-text{right:-10px;text-align:left;top:233px;width:253px}.fit-outline-line-h-hip-text{left:-3px;text-align:right;top:255px;width:246px}.fit-outline-line-l-hip-text{left:-3px;text-align:right;top:302px;width:246px}.fit-outline-line-thigh-text{right:3px;text-align:left;top:341px;width:240px}.fit-outline-line-chest{left:42px;top:194px;width:99px}.fit-outline-line-n-waist{left:50px;top:239px;width:83px}.fit-outline-line-p-waist{left:45px;top:264px;width:93px}.fit-outline-line-h-hip{left:30px;top:286px;width:122px}.fit-outline-line-l-hip{left:21px;top:333px;width:141px}.fit-outline-line-thigh-l{left:27px;top:372px;width:60px}.fit-outline-line-thigh-r{left:95px;top:372px;width:61px}#fit-line-container{position:relative;width:100%}#fit-line-text-container{align-items:center;display:flex;justify-content:space-between}.fit-line-item{font-weight:700;width:110px}.fit-line-item .light-text{font-weight:500}.fit-line-item-green{color:#209da7}#fit-line{display:flex;justify-content:space-around;margin-bottom:4px;margin-top:30px}#fit-line-1,#fit-line-2,#fit-line-3,#fit-line-4,#fit-line-5,#fit-line-6,#fit-line-7{background:#000;height:2px;position:relative;width:110px}#fit-line-3,#fit-line-4,#fit-line-5{background:#209da7}#fit-line-1:before,#fit-line-2:before,#fit-line-3:before,#fit-line-5:before,#fit-line-6:before,#fit-line-7:before{background:#000;border-radius:50%;content:"";height:12px;position:absolute;top:-5px;width:12px}#fit-line-1:before,#fit-line-2:before,#fit-line-3:before{left:0}#fit-line-5:before,#fit-line-6:before,#fit-line-7:before{right:0}#fit-line-1:before,#fit-line-2:before,#fit-line-6:before,#fit-line-7:before{background:#000}#fit-line-3:before,#fit-line-5:before{background:#209da7}#fit-line-2:before,#fit-line-6:before{display:none}#fit-line-1:after,#fit-line-2:after,#fit-line-3:after,#fit-line-4:after,#fit-line-5:after,#fit-line-6:after,#fit-line-7:after{border-left:2px dashed #000;content:"";display:block;height:20px;left:50%;position:absolute;top:-20px}#fit-line-3:after,#fit-line-4:after,#fit-line-5:after{border-left:2px dashed #209da7}#fit-line-texts{display:flex;justify-content:space-between;padding:0 70px}#fit-line-texts div:nth-of-type(2){color:#209da7}.margin-top-10{margin-top:10px}.desktop-hidden{display:none}#cta-link{cursor:pointer;font-size:20px;margin:auto;text-decoration:underline;width:150px}.powered-by{align-items:center;display:flex;justify-content:center;margin-top:10px}@media screen and (max-width:599px){#fit-outline-inner,#fit-outline-inner-left,#fit-outline-inner-right{height:400px}#fit-outline-inner{flex-shrink:0;overflow:hidden}#fit-title{margin-top:0}#fit-outline-container{margin-top:-50px;transform:scale(.7)}.fit-line-item{font-size:10px;font-weight:500}.fit-outline-line-text{font-size:16px;line-height:31px}.fit-outline-line-chest-text,.fit-outline-line-n-waist-text{left:-11px;width:auto}.fit-outline-line-p-waist-text{right:-10px;width:auto}.fit-outline-line-h-hip-text,.fit-outline-line-l-hip-text{left:-3px;width:auto}.fit-outline-line-thigh-text{right:3px;width:auto}#fit-line{margin-top:10px}#fit-line-texts{font-size:12px;padding:0 15px}#cta-section{margin-top:-30px}#fit-line-2:before,#fit-line-6:before,.desktop-hidden{display:block}#fit-line-1:after,#fit-line-2:after,#fit-line-3:after,#fit-line-4:after,#fit-line-5:after,#fit-line-6:after,#fit-line-7:after,.mobile-hidden{display:none}}');Pp(".tfr-home-button-container{display:flex;flex-wrap:wrap;margin:20px}.tfr-home-button-container>button{border:0;cursor:pointer;height:60px;margin:20px;width:200px}.tfr-home-button-container>button:hover{background-color:#e6e6e6}[data-tfr=hidden]{display:none}.tfr-modal{background-color:rgba(0,0,0,.53);display:flex;height:100%;left:0;position:fixed;top:0;width:100%;z-index:10000}.tfr-modal-content{margin:0 auto;text-align:center;width:90%}.tfr-modal-content-flex{align-items:center;display:flex}.tfr-modal-content-container{background-color:#fff;border:1px solid #434343;border-radius:0;box-shadow:0 6px 6px #00000029;line-height:normal;max-height:100vh;max-width:850px;overflow:auto;width:100%}#tfr-close-container{padding-right:10px}.tfr-close-container{text-align:end}.tfr-close{color:#aaa;font-size:28px;font-weight:700;height:50px;width:50px}.tfr-close:focus,.tfr-close:hover{color:#000;text-decoration:none}.tfr-cursor:hover{cursor:pointer}.tfr-underline{text-decoration:underline}.tfr-standard-button{border:0;border-radius:3px;color:#fff;height:43px;width:138px}.tfr-logo-container{align-items:center;display:flex}.tfr-modal-title-logo-container{align-items:center;display:flex;justify-content:center}.tfr-girl-clothes{display:inline-block;height:316px;width:253px}.tfr-t-a-center{text-align:center}.tfr-w-70-p{width:70%}.tfr-w-80-p{width:80%}.tfr-w-85-p{width:85%}.tfr-w-150{width:150px}.tfr-h-150{height:150px}.tfr-d-none{display:none}.tfr-d-block{display:block}.tfr-d-flex{display:flex}.tfr-how-it-works-item{align-items:center;display:flex;justify-items:center}.tfr-try-on-content{margin-left:60px}#tfr-tryon-image{max-width:30vw}.progress-bar{background-color:#fff;border:1px solid #bdbdbd;height:10px;margin:15px auto 0;width:55%}.progress-bar-fill{animation-duration:120s;animation-name:progress;background-color:#209da7;color:#fff;display:block;font-size:16px;height:100%;text-align:center;transition:width .6s linear}#tfr-video{height:100%;max-height:350px;max-width:350px}.tfr-logo-box{display:flex;margin:auto;max-height:400px;max-width:860px;padding:20px}.tfr-flex,.tfr-logo-box{align-items:center;justify-content:center}.tfr-qr-code{width:200px}.tfr-space-above{margin-top:10px}.tfr-max-w-600{margin:auto;max-width:600px}#tfr-qr-border-box{align-items:center;border:2px solid var(--tfr-brand-color);border-radius:16px;display:flex;flex-direction:column;height:350px;justify-content:center;margin-left:20px;padding:0 30px;width:300px}.tfr-mobile-logo{height:60px}#email-input,#password-input{font-size:16px}.tfr-door-icon,.tfr-user-icon{color:#209da7}.tfr-logged-in,.tfr-toggle-closed{display:none}.tfr-flex{display:flex}.tfr-gap{gap:4px}.tfr-items-center{align-items:center}.tfr-mb-2{margin-bottom:8px}#tfr-logged-out-overlay-container{position:relative}#tfr-logged-out-overlay{align-items:center;background:hsla(0,0%,100%,.8);bottom:0;display:flex;font-size:16px;font-weight:700;justify-content:center;left:0;line-height:16px;position:absolute;right:0;text-align:center;top:0}.tfr-slider-wrapper{align-items:center;display:flex;flex-direction:column}#tfr-slider{accent-color:var(--tfr-brand-color)}");Pp("input{border:none;box-shadow:none!important;width:100%}input:focus,select:focus,textarea:focus{border:none;outline:none}.tfr-fieldset{margin-left:auto;margin-right:auto;width:65%}.tfr-fieldset,.tfr-fieldset-inline{border-color:rgba(0,0,0,.5);border-radius:10px;border-width:1px;padding:5px 10px 10px;text-align:left}.tfr-fieldset-inline{margin-right:10px;width:250px}.tfr-fieldset-err{border-color:red}");Pp(".lds-ellipsis{display:inline-block;height:80px;position:relative;width:80px}.lds-ellipsis div{animation-timing-function:cubic-bezier(0,1,1,0);background:var(--tfr-brand-color);border-radius:50%;display:block;height:13px;position:absolute;top:33px;width:13px}.lds-ellipsis div:first-child{animation:lds-ellipsis1 .6s infinite;left:8px}.lds-ellipsis div:nth-child(2){animation:lds-ellipsis2 .6s infinite;left:8px}.lds-ellipsis div:nth-child(3){animation:lds-ellipsis2 .6s infinite;left:32px}.lds-ellipsis div:nth-child(4){animation:lds-ellipsis3 .6s infinite;left:56px}@keyframes lds-ellipsis1{0%{transform:scale(0)}to{transform:scale(1)}}@keyframes lds-ellipsis3{0%{transform:scale(1)}to{transform:scale(0)}}@keyframes lds-ellipsis2{0%{transform:translate(0)}to{transform:translate(24px)}}");Pp("@media screen and (max-width:702px){.tfr-modal-title-logo-container{display:flex;flex-direction:column}}@media screen and (min-width:600px){.tfr-modal-content-container{border-radius:10px;height:auto;margin:auto;width:100%}}@media screen and (max-width:599px){#tfr-size-recommendations{width:calc(100vw - 30px)!important}.tfr-mobile-small-text{font-size:12px}.tfr-mobile-hidden{display:none}.tfr-modal-content{overflow:hidden}.tfr-modal-content-container{max-height:none;max-width:100vw;min-height:100vh;min-width:100vw}.trf-logo-title{margin-bottom:10px}.tfr-modal-content-flex{overflow:auto}}@media screen and (max-width:500px){.tfr-fieldset{width:90%}.tfr-how-it-works-item{flex-direction:column}.tfr-try-on-content{margin-left:0;margin-top:20px}}@media screen and (max-height:800px){.tfr-video-responsive{height:280px!important}}");Pp('#tfr-size-recommendations{align-items:center;background-color:var(--tfr-main-bg-color);border:var(--tfr-main-border-width) solid var(--tfr-main-border-color);border-radius:var(--tfr-main-border-radius);color:var(--tfr-dark);display:flex;flex-direction:column;font-family:var(--tfr-main-font);justify-content:center;padding:var(--tfr-main-v-padding) var(--tfr-main-h-padding);width:var(--tfr-main-width)}#tfr-size-recommendations-container{align-items:center;display:none;flex-direction:column;justify-content:center;position:relative;width:100%}#tfr-size-rec-select-container{align-items:center;display:none;flex-direction:column;font-size:13px;width:100%}#tfr-size-rec-title{align-items:center;display:flex;font-family:var(--tfr-title-font);margin-bottom:8px}#tfr-size-rec-title-toggle{color:var(--tfr-grey);cursor:pointer;position:absolute;right:0;top:0;transition:all .3s ease}.tfr-chevron-up{transform:rotate(180deg) scaleY(.6)}.tfr-chevron-down{transform:rotate(0deg) scaleY(.6)}#tfr-info-icon{cursor:pointer}#tfr-size-rec-subtitle{border-bottom:2px solid #000;font-size:18px;font-weight:700;text-align:center;width:100%}#tfr-size-rec-title{font-size:14px}#tfr-size-rec-table{display:flex;flex-direction:column;font-size:12px;padding:0 10px;width:100%}.tfr-size-rec-table-row:first-of-type{border-top-width:0}.tfr-size-rec-table-row{align-items:center;border-top:var(--tfr-main-border-width) solid var(--tfr-main-border-color);display:flex;font-family:var(--tfr-row-font);justify-content:center;min-height:40px}.tfr-size-rec-table-cell-left,.tfr-size-rec-table-cell-right{flex:1 1 0px}.tfr-size-rec-table-cell-left{flex-grow:1;padding-left:8px;padding-right:8px;text-align:right}.tfr-size-rec-table-cell-right{flex-grow:1;padding-left:8px;padding-right:8px;text-align:left}.tfr-size-rec-table-cell-right.perfect{color:var(--tfr-brand-color)}#tfr-size-rec-size{display:inline-block}#tfr-size-rec-size>.tfr-size-rec-login-cta{font-weight:500;margin-left:10px}.tfr-size-rec-login-cta,.tfr-size-rec-table-cell-right{font-size:12px}.tfr-size-rec-login-cta{color:var(--tfr-muted);display:flex;width:150px}#tfr-size-rec-action-login,#tfr-size-rec-action-logout{display:none;font-family:var(--tfr-cta-font)}#tfr-size-rec-action{cursor:pointer;font-size:16px;text-decoration:underline}#tfr-size-rec-select{background-color:var(--tfr-size-selector-bg-color);border-color:var(--tfr-size-selector-border-color);border-radius:var(--tfr-size-selector-button-radius);border-style:solid;border-width:var(--tfr-size-selector-border-width);box-shadow:var(--tfr-size-selector-button-shadow);color:var(--tfr-size-selector-text-color);display:none;font-size:var(--tfr-size-selector-font-size);font-weight:var(--tfr-size-selector-font-weight);margin-bottom:20px;margin-top:10px}#tfr-size-rec-select,.tfr-size-rec-select-button{align-items:center;height:var(--tfr-size-selector-button-height);justify-content:center}.tfr-size-rec-select-button{cursor:pointer;display:flex;transition:all .15s ease-in;width:80px}.tfr-size-rec-select-button:hover:not(.active):not(.tfr-disabled){background-color:var(--tfr-size-selector-bg-color-hover);opacity:.7}.tfr-size-rec-select-button.active{background-color:var(--tfr-size-selector-bg-color-active);border-color:var(--tfr-size-selector-button-active-border-color);border-style:solid;border-width:var(--tfr-size-selector-button-active-border-width);height:var(--tfr-size-selector-button-active-height)}.tfr-size-rec-select-button.active,.tfr-size-rec-select-button:first-of-type{border-bottom-left-radius:var(--tfr-size-selector-button-radius);border-top-left-radius:var(--tfr-size-selector-button-radius)}.tfr-size-rec-select-button.active,.tfr-size-rec-select-button:last-of-type{border-bottom-right-radius:var(--tfr-size-selector-button-radius);border-top-right-radius:var(--tfr-size-selector-button-radius)}.tfr-powered-by{align-items:center;display:flex;font-size:10px;margin-top:10px}.tfr-powered-by-logo{margin:0 4px}.tfr-powered-by-logo,.tfr-powered-by-logo img,.tfr-powered-by-logo svg{height:24px;width:12px}.tfr-powered-by-text-bold{font-weight:700}#tfr-size-recommendation-error{color:#8d0000;display:none}#tfr-sign-in-nav{margin-bottom:80px}.tfr-disabled{cursor:default}#tfr-login-to-view{cursor:pointer}.tfr-try-on-button{align-items:center;background-color:var(--tfr-size-selector-bg-color-active);border-color:var(--tfr-size-selector-border-color);border-radius:var(--tfr-size-selector-button-radius);border-style:solid;border-width:var(--tfr-size-selector-border-width);box-shadow:var(--tfr-size-selector-button-shadow);color:var(--tfr-size-selector-text-color);cursor:pointer;display:flex;font-size:var(--tfr-size-selector-font-size);font-weight:var(--tfr-size-selector-font-weight);height:var(--tfr-size-selector-button-height);justify-content:center;margin-bottom:10px;margin-top:20px;max-width:200px;position:relative;transition:all .15s ease-in;width:100%}.tfr-try-on-button.loading,.tfr-try-on-button:disabled{cursor:not-allowed;opacity:.7}.tfr-try-on-button.hide{display:none}.tfr-try-on-button.loading:after{animation:spin 1s linear infinite;border:2px solid var(--tfr-size-selector-text-color);border-radius:50%;border-top:2px solid transparent;content:"";height:16px;margin-left:8px;position:absolute;width:16px}@keyframes spin{to{transform:rotate(1turn)}}');Pp(".tfr-mt-10{margin-top:10px}.tfr-mt-20{margin-top:20px}.tfr-mt-15{margin-top:15px}.tfr-mt-30{margin-top:30px}.mt-40{margin-top:40px}.tfr-mb-40{margin-bottom:40px}.tfr-mb-20{margin-bottom:20px}.tfr-mr-10{margin-right:10px}.tfr-mr-15{margin-right:15px}.tfr-mt-50{margin-top:50px}.tfr-mt-60{margin-top:60px}.tfr-mb-60{margin-bottom:60px}.tfr-mr-20{margin-right:20px}.tfr-mt-15-p{margin-top:15%}.tfr-mb-13-p{margin-bottom:13%}.tfr-m-h-auto{margin-left:auto;margin-right:auto}.tfr-pt-20{padding-top:20px}.tfr-pb-50{padding-bottom:50px}.tfr-p-20{padding:20px 10px}.tfr-pr-20{padding-right:20px}.tfr-pl-20{padding-left:20px}.tfr-pb-7-p{padding-bottom:7%}");Pp(".flag-container{bottom:0;left:0;padding:1px;right:0;right:auto;top:0}.flag-container:hover{cursor:pointer}.selected-flag{align-items:center;display:flex;height:100%;padding:0 6px 0 8px;position:relative;z-index:1}.flag.bd{background-position:-418px 0;height:12px}.arrow{border-left:6px solid transparent;border-right:6px solid transparent;border-top:6px solid #555;height:0;margin-left:6px;width:0}.arrow-up{border-bottom:6px solid #555;border-top:none}.country-list{-webkit-overflow-scrolling:touch;background-color:#fff;border-radius:5px;box-shadow:0 8px 10px 1px rgba(57,64,78,.7),0 3px 14px 2px rgba(57,64,78,.7),0 5px 5px -3px rgba(57,64,78,.7);cursor:pointer;display:none;font-size:16px;line-height:18px;list-style:none;margin:0 0 0 -1px;max-height:500px;overflow:auto;padding:0;position:absolute;text-align:left;top:50%;transform:translateY(-50%);white-space:nowrap;width:100%;width:auto;z-index:2}.country-list.active{display:inline-block}.country{outline:0;padding:5px 26px 5px 15px}.country-list .divider{border-bottom:1px solid rgba(0,0,0,.12);margin-bottom:5px;padding-bottom:5px}.country.highlight{background-color:#c7cace}.flag-box{display:inline-block;width:20px}.country-name,.flag-box{margin-right:6px}.country-name,.dial-code,.flag-box{vertical-align:middle}");Pp(".tfr-title-font{font-family:Poppins,sans-serif}.tfr-body-font{font-family:Roboto,sans-serif}.tfr-light-24-300{font-size:24px;font-weight:300}.tfr-light-24-500{font-size:24px;font-weight:500}.tfr-light-22-300{font-size:22px;font-weight:300}.tfr-light-16-300{font-size:16px;font-weight:300}.tfr-medium-16-default{font-size:16px}.tfr-12-default{font-size:12px}.tfr-14-default{font-size:14px}.tfr-16-default{font-size:16px}.tfr-24-bold{font-size:24px;font-weight:700}");Pp(":root{--tfr-brand-color:#209da7;--tfr-black:#000;--tfr-red:red;--tfr-white:#fff;--tfr-muted:#a7a7a7;--tfr-dark:#121212;--tfr-grey:#878787;--tfr-light-grey:#dbdcdc;--tfr-dark-grey:#3f3f3f;--tfr-main-border-color:hsla(0,0%,7%,.55);--tfr-main-border-radius:0;--tfr-main-border-width:1px;--tfr-main-bg-color:inherit;--tfr-main-width:440px;--tfr-main-v-padding:14px;--tfr-main-h-padding:20px;--tfr-main-font:inherit;--tfr-title-font:var(--tfr-main-font);--tfr-subtitle-font:var(--tfr-main-font);--tfr-row-font:var(--tfr-main-font);--tfr-cta-font:var(--tfr-main-font);--tfr-size-selector-text-color:var(--tfr-white);--tfr-size-selector-font-size:14px;--tfr-size-selector-font-weight:400;--tfr-size-selector-border-color:transparent;--tfr-size-selector-border-width:0;--tfr-size-selector-bg-color:var(--tfr-grey);--tfr-size-selector-bg-color-hover:var(--tfr-dark-grey);--tfr-size-selector-bg-color-active:var(--tfr-dark);--tfr-size-selector-button-height:35px;--tfr-size-selector-button-active-height:45px;--tfr-size-selector-button-active-border-color:transparent;--tfr-size-selector-button-active-border-width:0;--tfr-size-selector-button-radius:8px;--tfr-size-selector-button-shadow:0 4px 4px 0 rgba(0,0,0,.3)}");const Dp='\n<svg class="tfr-door-icon" width="68" height="124" viewBox="0 0 68 124" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M0.911938 0L67.4819 17.09V106.49L0.911938 123.51V0Z" fill="currentColor">\n </path>\n <path d="M52.8019 64.44C54.7791 64.44 56.3819 62.4387 56.3819 59.97C56.3819 57.5013 54.7791 55.5 52.8019 55.5C50.8248 55.5 49.2219 57.5013 49.2219 59.97C49.2219 62.4387 50.8248 64.44 52.8019 64.44Z" fill="white">\n</path>\n</svg>',Mp='<svg class="tfr-user-icon" width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">\n <g clip-path="url(#clip0_82_11365)">\n <path fill-rule="evenodd" clip-rule="evenodd"\n d="M4.3125 4.78125C4.3125 3.02084 5.73959 1.59375 7.5 1.59375C9.26041 1.59375 10.6875 3.02084 10.6875 4.78125C10.6875 6.54166 9.26041 7.96875 7.5 7.96875C5.73959 7.96875 4.3125 6.54166 4.3125 4.78125ZM9.625 4.78125C9.625 3.60764 8.6736 2.65625 7.5 2.65625C6.32639 2.65625 5.375 3.60764 5.375 4.78125C5.375 5.95485 6.32639 6.90625 7.5 6.90625C8.6736 6.90625 9.625 5.95485 9.625 4.78125Z"\n fill="currentColor" fill-opacity="0.7" />\n <path fill-rule="evenodd" clip-rule="evenodd"\n d="M2.1875 13.1634C2.1875 10.5693 4.58181 8.5 7.5 8.5C10.4182 8.5 12.8125 10.5693 12.8125 13.1634C12.8125 16.1539 2.1875 16.1539 2.1875 13.1634ZM11.75 13.1634C11.75 11.1933 9.86303 9.5625 7.5 9.5625C5.13697 9.5625 3.25 11.1933 3.25 13.1634C3.25 13.7564 4.45689 14.126 5.96113 14.2721L6.31312 14.3019C7.08543 14.3577 7.91457 14.3577 8.68688 14.3019L9.03887 14.2721C10.5431 14.126 11.75 13.7564 11.75 13.1634Z"\n fill="currentColor" fill-opacity="0.7" />\n </g>\n <defs>\n <clipPath id="clip0_82_11365">\n <rect width="16" height="16" fill="white" />\n </clipPath>\n </defs>\n</svg>',zp=e=>({Hook:()=>{const t=document.querySelector(".progress-bar-fill");!function(e,t){let n=0;const i=e/200;t.style.width=n+"%";const r=setInterval(()=>{n>=100?clearInterval(r):(n+=.5,t.style.width=n+"%")},i)}(e.timeoutMS,t)},Unhook:()=>{},Body:()=>`\n <div tfr-element="true" class="tfr-title-font tfr-light-22-300 tfr-c-black tfr-mt-60" > ${pp} </div>\n <div class="progress-bar">\n <span class="progress-bar-fill"></span>\n </div>\n `,useFullModalContent:!0}),Fp=e=>{const t=document.getElementById(e),n=document.querySelector("body");if(!t)throw new Error(`element with id ${e} not found`);let i;const r=e=>e?`\n <div class="tfr-modal-title-logo-container">\n <div tfr-element="true" class="trf-logo-title tfr-title-font tfr-light-24-300 tfr-c-black tfr-mr-10">${Op}</div>\n <div tfr-element="true" class="tfr-logo-container">\n <div class="tfr-mr-15">\n <svg width="26" height="47" viewBox="0 0 68 124" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M0.911938 0L67.4819 17.09V106.49L0.911938 123.51V0Z" fill="#209DA7">\n </path>\n <path d="M52.8019 64.44C54.7791 64.44 56.3819 62.4387 56.3819 59.97C56.3819 57.5013 54.7791 55.5 52.8019 55.5C50.8248 55.5 49.2219 57.5013 49.2219 59.97C49.2219 62.4387 50.8248 64.44 52.8019 64.44Z" fill="white">\n </path>\n </svg>\n </div>\n <div tfr-element="true" class="tfr-title-font tfr-light-24-500 tfr-c-black tfr-mr-10">${Rp}</div>\n </div>\n </div>\n `:"",s=()=>{n.style.overflow="auto",i&&(i.Unhook(),l()),t.style.display="none"},o=e=>{"Escape"===e.key&&s()},a=e=>{const n=t.querySelector("#tfr-modal-background");e.target===n&&(console.debug("container close"),s())},c=()=>{t.querySelector("#tfr-close-container").addEventListener("click",s),document.addEventListener("keydown",o),document.addEventListener("click",a)},l=()=>{var n;const i=t.querySelector("#tfr-close-container");i?i.removeEventListener("click",s):(console.error("#tfr-close-container not found on unhook"),console.debug(null===(n=document.getElementById(e))||void 0===n?void 0:n.innerHTML)),document.removeEventListener("keydown",o),document.removeEventListener("click",a)};return{open:e=>{var s,o;n.style.overflow="hidden",i&&i.Unhook(),t.innerHTML=(s=e.Body(),o=e.useFullModalContent,console.log({useFullModalContent:o}),`\n <div class="tfr-modal" id="tfr-modal-background">\n <div class="tfr-modal-content-container tfr-p-20">\n <div class="tfr-close-container">\n <span id="tfr-close-container" class="tfr-close tfr-cursor">×</span>\n </div>\n\n <div class="tfr-modal-content-flex">\n <div class="tfr-modal-content">\n ${r(o)}\n ${s}\n </div>\n </div>\n </div>\n </div>\n `),c(),e.Hook(),t.style.display="block",i=e},close:s,Content:()=>i}},Up=e=>{const t=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),n=()=>{e.onSignInNav()},i=()=>{window.open("https://apps.apple.com/us/app/the-fitting-room-3d-body-scan/id1577417373","_blank")},r=()=>{window.open("https://play.google.com/store/apps/details?id=com.thefittingroom.marketplace","_blank")},s="https://assets.dev.thefittingroom.xyz/images/";return{Hook:()=>{var e,s,o;if(t||(document.getElementById("tfr-sign-in-nav").style.marginBottom="0"),t){document.getElementById("tfr-video").classList.add("tfr-video-responsive")}null===(e=document.getElementById("tfr-sign-in-nav"))||void 0===e||e.addEventListener("click",n),null===(s=document.getElementById("tfr-app-store"))||void 0===s||s.addEventListener("click",i),null===(o=document.getElementById("tfr-google-play"))||void 0===o||o.addEventListener("click",r)},Unhook:()=>{var e,t,s;null===(e=document.getElementById("tfr-sign-in-nav"))||void 0===e||e.removeEventListener("click",n),null===(t=document.getElementById("tfr-app-store"))||void 0===t||t.removeEventListener("click",i),null===(s=document.getElementById("tfr-google-play"))||void 0===s||s.removeEventListener("click",r)},Body:()=>`\n <div tfr-element="true">\n <div tfr-element="true" class="tfr-title-font tfr-light-16-300 tfr-mt-10">${Lp}</div>\n \n </div>\n <div tfr-element="true" class="tfr-logo-box">\n <video id="tfr-video" controls loop autoplay playsinline>\n <source src="https://assets.dev.thefittingroom.xyz/videos/the-fitting-room.mp4" />\n </video>\n\n ${t?"":`<div id="tfr-qr-border-box">\n <div tfr-element="true" class="tfr-title-font tfr-24-bold">${Ep}</div>\n \n <img src="${s}qr.png" class="tfr-qr-code" />\n\n <div id="tfr-sign-in-nav" tfr-element="true" class="tfr-body-font tfr-mt-20 tfr-16-default tfr-c-black-o5 tfr-underline tfr-cursor">${fp}</div>\n </div>`}\n </div>\n\n ${t?`<div tfr-element="true" class="tfr-title-font tfr-light-16-300 tfr-mt-10 tfr-max-w-600">${op}</div>\n\n <div tfr-element="true" class="tfr-flex tfr-space-above">\n <img class="tfr-mobile-logo" src="${s}apple.png" id="tfr-app-store" />\n <img class="tfr-mobile-logo" src="${s}google.png" id="tfr-google-play" />\n </div>\n \n <div id="tfr-sign-in-nav" tfr-element="true" class="tfr-body-font tfr-mt-20 tfr-16-default tfr-c-black-o5 tfr-underline tfr-cursor">${fp}</div>\n `:""}\n `,useFullModalContent:!0}};class Vp{constructor(e,t,n,i){this.signIn=t,this.forgotPassword=n,this.submitTel=i,this.manager=Fp(e)}close(){this.manager.close()}onSignOut(){this.manager.open((e=>{const t=()=>{e.onNavSignIn("")},n=()=>{e.onClose()};return{Hook:()=>{var e,i;null===(e=document.getElementById("tfr-sign-in"))||void 0===e||e.addEventListener("click",t),null===(i=document.getElementById("tfr-close"))||void 0===i||i.addEventListener("click",n)},Unhook:()=>{var e,i;null===(e=document.getElementById("tfr-sign-in"))||void 0===e||e.removeEventListener("click",t),null===(i=document.getElementById("tfr-close"))||void 0===i||i.removeEventListener("click",n)},Body:()=>`\n <div tfr-element="true" class="tfr-title-font tfr-light-22-300 tfr-mt-15-p tfr-mb-13-p">${Ap}</div>\n <div class="tfr-t-a-center">\n <span id="tfr-sign-in" tfr-element="true" class="tfr-body-font tfr-16-default tfr-c-black-o5 tfr-underline tfr-cursor tfr-mr-20">${Ip}</span>\n <span id="tfr-close" tfr-element="true" class="tfr-body-font tfr-16-default tfr-c-black-o5 tfr-underline tfr-cursor" >${_p}</span>\n </div>\n `,useFullModalContent:!0}})({onNavSignIn:()=>this.toSignIn(),onClose:()=>this.close()}))}onNotCreated(){this.manager.open({Body:()=>`\n <div tfr-element="true" class="tfr-title-font tfr-light-22-300 tfr-c-black tfr-mt-60">${cp}</div>\n <div tfr-element="true" class="tfr-title-font tfr-light-22-300 tfr-c-black tfr-mb-60">${Sp}</div>\n `,Hook:()=>{},Unhook:()=>{},useFullModalContent:!0})}onLoading(){this.manager.open(zp({timeoutMS:1e4}))}toScan(){this.manager.open(Up({onSignInNav:()=>this.toSignIn(),onTelSubmit:e=>this.submitTel(e)}))}toSignIn(){this.manager.open((e=>{const{email:t}=e,n=t=>{t.preventDefault();const n=document.getElementById("email-input").value,i=document.getElementById("password-input").value;s(),e.onSignIn(n,i,o)},i=()=>{const t=document.getElementById("email-input").value;e.onNavForgotPassword(t)},r=()=>{e.onNavScanCode()},s=()=>{document.querySelectorAll(".tfr-fieldset-element").forEach(e=>{e.classList.remove("tfr-fieldset-err")}),document.querySelectorAll(".tfr-label-element").forEach(e=>{e.classList.remove("tfr-c-red")});const e=document.querySelector("#tfr-form-error");e.classList.remove("tfr-d-block"),e.innerHTML=""},o=e=>{document.querySelectorAll(".tfr-fieldset-element").forEach(e=>{e.classList.add("tfr-fieldset-err")}),document.querySelectorAll(".tfr-label-element").forEach(e=>{e.classList.add("tfr-c-red")});const t=document.querySelector("#tfr-form-error");t.innerHTML=e||"Something went wrong",t.classList.add("tfr-d-block")};return{Hook:()=>{var e,t,s,o;null===(e=document.getElementById("tfr-sign-in-form"))||void 0===e||e.addEventListener("submit",n),null===(t=document.getElementById("tfr-sign-in"))||void 0===t||t.addEventListener("click",n),null===(s=document.getElementById("tfr-forgot-password"))||void 0===s||s.addEventListener("click",i),null===(o=document.getElementById("tfr-scan-code"))||void 0===o||o.addEventListener("click",r)},Unhook:()=>{var e,t,s,o;null===(e=document.getElementById("tfr-sign-in-form"))||void 0===e||e.removeEventListener("submit",n),null===(t=document.getElementById("tfr-sign-in"))||void 0===t||t.removeEventListener("click",n),null===(s=document.getElementById("tfr-forgot-password"))||void 0===s||s.removeEventListener("click",i),null===(o=document.getElementById("tfr-scan-code"))||void 0===o||o.removeEventListener("click",r)},Body:()=>`\n <form id="tfr-sign-in-form">\n <div class="tfr-title-font tfr-light-22-300 tfr-mt-10">${Cp}</div>\n\n <fieldset class="tfr-fieldset-element tfr-fieldset tfr-mt-20">\n <legend tfr-element="true" class="tfr-label-element tfr-body-font tfr-14-default tfr-c-black-o5">${lp}</legend>\n <input tfr-element="true" type="email" id="email-input" value="${t||""}" />\n </fieldset>\n\n <fieldset class="tfr-fieldset-element tfr-fieldset tfr-mt-20">\n <legend tfr-element="true" class="tfr-label-element tfr-body-font tfr-14-default tfr-c-black-o5">${yp}</legend>\n <input tfr-element="true" type="password" id="password-input" />\n </fieldset>\n\n <div tfr-element="true" class="tfr-body-font tfr-12-default tfr-c-red tfr-mt-10 tfr-d-none" id="tfr-form-error"></div>\n\n <div class="tfr-mt-20">\n <span id="tfr-forgot-password" tfr-element="true" class="tfr-body-font tfr-14-default tfr-c-black-o5 tfr-underline tfr-cursor tfr-mr-15">${dp}</span>\n <span id="tfr-scan-code" tfr-element="true" class="tfr-body-font tfr-14-default tfr-c-black-o5 tfr-underline tfr-cursor">${ap}</span>\n </div>\n\n <button id="tfr-sign-in" tfr-element="true" class="tfr-standard-button tfr-c-brand-bg tfr-c-whitetfr-title-font tfr-medium-16-default tfr-cursor tfr-mt-30" id="sign-in-button" type="submit">\n ${Cp}\n </button>\n </form>\n `,useFullModalContent:!0}})({onSignIn:this.signIn,onNavForgotPassword:()=>this.toForgotPassword(),onNavScanCode:()=>this.toScan()}))}toForgotPassword(){this.manager.open((e=>{const t=()=>{const t=document.getElementById("tfr-email").value;e.onNavSignIn(t)},n=()=>{const t=document.getElementById("tfr-email").value;e.onPasswordReset(t)};return{Hook:()=>{var e,i;null===(e=document.getElementById("tfr-send-password-reset"))||void 0===e||e.addEventListener("click",n),null===(i=document.getElementById("tfr-back-to-signin"))||void 0===i||i.addEventListener("click",t)},Unhook:()=>{var e,i;null===(e=document.getElementById("tfr-send-password-reset"))||void 0===e||e.removeEventListener("click",n),null===(i=document.getElementById("tfr-back-to-signin"))||void 0===i||i.removeEventListener("click",t)},Body:()=>`\n <div tfr-element="true" class="tfr-title-font tfr-light-16-300 tfr-mt-20 tfr-w-70-p tfr-m-h-auto">${hp}</div>\n <fieldset class="tfr-fieldset-element tfr-fieldset tfr-mt-30">\n <legend tfr-element="true" class="tfr-label-element tfr-body-font tfr-14-default tfr-c-black-o5">${lp}</legend>\n <input tfr-element="true" type="email" id="tfr-email" />\n </fieldset>\n <div tfr-element="true" class="tfr-body-font tfr-12-default tfr-c-red tfr-mt-10 tfr-d-none" id="error-msg"></div>\n <div id="tfr-back-to-signin" tfr-element="true" class="tfr-body-font tfr-12-default tfr-c-black-o5 tfr-underline tfr-cursor tfr-mt-30">${sp}</div>\n <button id="tfr-send-password-reset" tfr-element="true" class="tfr-standard-button tfr-c-brand-bg tfr-c-whitetfr-title-font tfr-medium-16-default tfr-cursor tfr-mt-30">\n ${Tp}\n </button>\n `,useFullModalContent:!0}})({onNavSignIn:()=>this.toSignIn(),onPasswordReset:this.forgotPassword}))}toPasswordReset(){}onTryOn(e){this.manager.open((e=>{let t=()=>{};const i=()=>{e.onNavBack()},r=()=>{e.onClose()};return{Hook:()=>{var s,o;const a=document.getElementById("tfr-tryon-image"),c=n("tfr-slider",(e,t)=>{console.debug("slider change",e,t),a.src=t});if(Array.isArray(e.frames)&&e.frames.length>0){const n=c.Load(e.frames);if(n instanceof Error)return void console.error(n);t=n}null===(s=document.getElementById("tfr-back"))||void 0===s||s.addEventListener("click",i),null===(o=document.getElementById("tfr-close"))||void 0===o||o.addEventListener("click",r)},Unhook:()=>{var e,n;t(),null===(e=document.getElementById("tfr-back"))||void 0===e||e.removeEventListener("click",i),null===(n=document.getElementById("tfr-close"))||void 0===n||n.removeEventListener("click",r)},Body:()=>'\n <div class="tfr-slider-wrapper">\n\t\t\t\t<img id="tfr-tryon-image" src="" />\n\t\t\t\t<input type="range" id="tfr-slider" />\n\t\t\t\t</div>\n ',useFullModalContent:!0}})({frames:e,onClose:()=>this.close(),onNavBack:()=>this.navBack()}))}onError(e){this.manager.open((e=>{const{error:t}=e,n=()=>{e.onNavBack()},i=()=>{e.onClose()};return{Hook:()=>{var e,t;null===(e=document.getElementById("tfr-back"))||void 0===e||e.addEventListener("click",n),null===(t=document.getElementById("tfr-close"))||void 0===t||t.addEventListener("click",i)},Unhook:()=>{var e,t;null===(e=document.getElementById("tfr-back"))||void 0===e||e.removeEventListener("click",n),null===(t=document.getElementById("tfr-close"))||void 0===t||t.removeEventListener("click",i)},Body:()=>(t||console.error("ErrorModal: No error provided"),`\n <div class="tfr-mt-15-p tfr-mb-13-p">\n <div tfr-element="true" class="tfr-title-font tfr-light-22-300 tfr-c-black">${t||kp}</div>\n </div>\n\n <div class="tfr-t-a-center">\n <span id="tfr-back" tfr-element="true" class="tfr-body-font tfr-16-default tfr-c-black-o5 tfr-underline tfr-cursor tfr-mr-20">${wp}</span>\n <span id="tfr-close" tfr-element="true" class="tfr-body-font tfr-16-default tfr-c-black-o5 tfr-underline tfr-cursor" id="returnToSite">${bp}</span>\n </div>\n `),useFullModalContent:!0}})({error:e,onClose:()=>this.close(),onNavBack:()=>this.navBack()}))}onSizeError(e,t){this.manager.open((e=>{const t=()=>{e.onNavBack()},n=()=>{e.onClose()};return{Hook:()=>{var e,i;null===(e=document.getElementById("tfr-back"))||void 0===e||e.addEventListener("click",t),null===(i=document.getElementById("tfr-close"))||void 0===i||i.addEventListener("click",n)},Unhook:()=>{var e,i;null===(e=document.getElementById("tfr-back"))||void 0===e||e.removeEventListener("click",t),null===(i=document.getElementById("tfr-close"))||void 0===i||i.removeEventListener("click",n)},Body:()=>{var t,n,i;return console.debug("rendering size error modal",e),`\n <div class="tfr-mt-15-p tfr-mb-13-p">\n <div tfr-element="true" class="tfr-title-font tfr-light-22-300 tfr-c-black">\n\t\t\t\t\t\t\t${gp} ${null===(t=e.sizes)||void 0===t?void 0:t.recommended} ${mp} ${null===(i=null===(n=e.sizes)||void 0===n?void 0:n.available)||void 0===i?void 0:i.join(" or ")}\n\t\t\t\t\t\t</div>\n </div>\n\n <div class="tfr-t-a-center">\n <span id="tfr-back" tfr-element="true" class="tfr-body-font tfr-16-default tfr-c-black-o5 tfr-underline tfr-cursor tfr-mr-20">${wp}</span>\n <span id="tfr-close" tfr-element="true" class="tfr-body-font tfr-16-default tfr-c-black-o5 tfr-underline tfr-cursor">${bp}</span>\n </div>\n `},useFullModalContent:!0}})({sizes:{recommended:e,available:t},onClose:()=>this.close(),onNavBack:()=>this.navBack()}))}toFitInfo(){this.manager.open((e=>{const t=()=>e.onSignInNav();return{Hook:()=>{document.getElementById("cta-link").addEventListener("click",t)},Unhook:()=>{document.getElementById("cta-link").removeEventListener("click",t)},Body:()=>`\n <div>\n <div id="fit-title">Fit Scale</div>\n\n <div id="fit-line-container">\n <div id="fit-line-text-container">\n <div class="fit-line-item mobile-hidden">Too Tight</div>\n\n <div class="fit-line-item">\n <div>Tight <span class="light-text">or</span><br /> More fitted</div>\n\n <div class="desktop-hidden margin-top-10">Too Tight</div>\n </div>\n\n <div class="fit-line-item fit-line-item-green">Slightly tight <br /><span class="light-text">or</span> Fitted</div>\n <div class="fit-line-item fit-line-item-green">Perfect Fit</div>\n <div class="fit-line-item fit-line-item-green">Slightly loose <br /><span class="light-text">or</span> Less fitted</div>\n\n <div class="fit-line-item">\n <div>Loose <span class="light-text">or</span><br /> Not fitted</div>\n\n <div class="desktop-hidden margin-top-10">Oversized</div>\n </div>\n\n <div class="fit-line-item mobile-hidden">Oversized</div>\n </div>\n\n <div id="fit-line">\n <div id="fit-line-1" class="mobile-hidden"> </div>\n <div id="fit-line-2"> </div>\n <div id="fit-line-3"> </div>\n <div id="fit-line-4"> </div>\n <div id="fit-line-5"> </div>\n <div id="fit-line-6"> </div>\n <div id="fit-line-7" class="mobile-hidden"> </div>\n </div>\n\n <div id="fit-line-texts">\n <div>Poor Fit</div>\n <div>Acceptable Fit</div>\n <div>Poor Fit</div>\n </div>\n </div>\n\n <div id="fit-subtitle-mobile" class="desktop-hidden">Measurement Points</div>\n\n <div id="fit-outline-container">\n <div id="fit-outline-inner-left">\n <div class="fit-outline-line-text fit-outline-line-p-waist-text">Pant Waist</div>\n <div class="fit-outline-line-text fit-outline-line-thigh-text">Thigh</div>\n </div>\n\n <div id="fit-outline-inner">\n <div class="fit-outline-line fit-outline-line-chest"></div>\n <div class="fit-outline-line fit-outline-line-n-waist"></div>\n <div class="fit-outline-line fit-outline-line-p-waist"></div>\n <div class="fit-outline-line fit-outline-line-h-hip"></div>\n <div class="fit-outline-line fit-outline-line-l-hip"></div>\n <div class="fit-outline-line fit-outline-line-thigh-l"></div>\n <div class="fit-outline-line fit-outline-line-thigh-r"></div>\n\n <img id="tfr-fit-outline-img" src="https://assets.dev.thefittingroom.xyz/images/fit-outline.png" />\n </div>\n\n <div id="fit-outline-inner-right">\n <div id="fit-subtitle" class="mobile-hidden">Measurement Points</div>\n\n <div class="fit-outline-line-text fit-outline-line-chest-text">Chest/Bust</div>\n <div class="fit-outline-line-text fit-outline-line-n-waist-text">Natural Waist</div>\n <div class="fit-outline-line-text fit-outline-line-h-hip-text">High Hip</div>\n <div class="fit-outline-line-text fit-outline-line-l-hip-text">Low Hip</div>\n </div>\n </div>\n </div>\n\n <div id="cta-section">\n <div id="cta-link">Sign Up or Login</div>\n\n <div class="powered-by">\n <div>Powered by</div>\n <div class="tfr-powered-by-logo">${Dp}</div>\n <div class="tfr-powered-by-text-bold">The Fitting Room</div>\n </div>\n </div>\n `,useFullModalContent:!1}})({onSignInNav:()=>this.toScan(),onClose:()=>this.close()}))}navBack(){window.history.back()}}class Bp{constructor(e,t,n,i,r){this.onSignInClick=t,this.onSignOutClick=n,this.onFitInfoClick=i,this.onTryOnClick=r,this._sku="",this._styleId=null,this.isLoggedIn=!1,this.tfrLoggedInElements=[],this.tfrLoggedOutElements=[],this.tfrToggleOpenElements=[],this.tfrToggleClosedElements=[],this.isCollapsed=!1,this.redraw=null,this.init(e)}get sku(){return this._sku}setSku(e){this._sku=e}get styleId(){return this._styleId}setStyleId(e){this._styleId=e}setIsLoggedIn(e){this.isLoggedIn=e,this.tfrSizeRecSelectContainer.style.display="flex",this.tfrSizeRecSelect.style.display="flex",this.tfrSizeHowItFits.style.display="block",e?(this.tfrSizeHowItFits.style.opacity="1",this.tfrSizeRecSelect.style.opacity="1",this.tfrLoggedInElements.forEach(e=>e.style.display="block"),this.tfrLoggedOutElements.forEach(e=>e.style.display="none"),this.tfrSizeRecActionLogin.style.display="none",this.tfrSizeRecActionLogout.style.display="block",this.tfrSizeRecTitle.style.display="flex",this.isCollapsed=!1,this.tfrSizeRecTitleToggle.classList.add("tfr-chevron-up"),this.tfrSizeRecTitleToggle.classList.remove("tfr-chevron-down"),this.tfrSizeRecSelectContainer.style.display="flex",this.tfrSizeRecSelectContainer.style.opacity="1"):(this.tfrSizeHowItFits.style.opacity="0.4",this.tfrSizeRecSelect.style.opacity="0.4",this.tfrLoggedInElements.forEach(e=>e.style.display="none"),this.tfrLoggedOutElements.forEach(e=>e.style.display="block"),this.tfrSizeRecActionLogin.style.display="block",this.tfrSizeRecActionLogout.style.display="none",this.tfrSizeRecTitle.style.display="flex",this.tfrSizeRecommendationError.style.display="none",this.tfrSizeRecommendationError.innerHTML="",this.renderSizeRecSelectLoggedOut())}setLoading(e){e?(this.tfrSizeRecLoading.style.display="block",this.tfrSizeRecommendationsContainer.style.display="none"):(this.tfrSizeRecLoading.style.display="none",this.tfrSizeRecommendationsContainer.style.display="flex")}setGarmentLocations(e){e&&e.length?this.renderGarmentLocations(e):this.tfrSizeRecTitle.style.display="none"}setRecommendedSize({recommended:e,sizes:t}){this.renderSizeRec(e,t)}setError(){this.tfrSizeRecTitle.style.display="none",this.isLoggedIn&&(this.tfrSizeRecommendationError.style.display="block",this.tfrSizeRecommendationError.innerHTML="No recommended size found.")}hide(){this.sizeRecMainDiv&&(this.sizeRecMainDiv.style.display="none")}show(){this.sizeRecMainDiv&&(this.sizeRecMainDiv.style.display="block")}init(e){const t=document.getElementById(e);if(!t)throw new Error("Size rec main div not found");this.sizeRecMainDiv=t,this.render(t),this.setElements(),this.bindEvents()}setElements(){this.tfrSizeHowItFits=document.getElementById("tfr-size-how-it-fits"),this.tfrSizeRecTitle=document.getElementById("tfr-size-rec-title"),this.tfrInfoIcon=document.getElementById("tfr-info-icon"),this.tfrLoginToView=document.getElementById("tfr-login-to-view"),this.tfrSizeRecActionLogin=document.getElementById("tfr-size-rec-action-login"),this.tfrSizeRecActionLogout=document.getElementById("tfr-size-rec-action-logout"),this.tfrSizeRecTable=document.getElementById("tfr-size-rec-table"),this.tfrSizeRecommendationError=document.getElementById("tfr-size-recommendation-error"),this.tfrSizeRecSize=document.getElementById("tfr-size-rec-size"),this.tfrSizeRecSelect=document.getElementById("tfr-size-rec-select"),this.tfrSizeRecLoading=document.getElementById("tfr-size-rec-loading"),this.tfrSizeRecTitleToggle=document.getElementById("tfr-size-rec-title-toggle"),this.tfrSizeRecSelectContainer=document.getElementById("tfr-size-rec-select-container"),this.tfrSizeRecommendationsContainer=document.getElementById("tfr-size-recommendations-container"),this.tfrLoggedInElements=document.querySelectorAll(".tfr-logged-in"),this.tfrLoggedOutElements=document.querySelectorAll(".tfr-logged-out"),this.tfrToggleOpenElements=document.querySelectorAll(".tfr-toggle-open"),this.tfrToggleClosedElements=document.querySelectorAll(".tfr-toggle-closed")}bindEvents(){this.tfrSizeRecActionLogin.addEventListener("click",this.onSignInClick),this.tfrSizeRecActionLogout.addEventListener("click",this.onSignOutClick),this.tfrSizeRecSelect.addEventListener("click",this.onSizeRecSelectClick.bind(this)),this.tfrSizeRecTitleToggle.addEventListener("click",this.toggletSizeRecSelectContainer.bind(this)),this.tfrInfoIcon.addEventListener("click",this.onFitInfoClick),this.tfrLoginToView.addEventListener("click",this.onSignInClick);const e=document.getElementById("tfr-try-on-button");e&&e.addEventListener("click",async()=>{if(e.classList.contains("loading"))return;const t=document.querySelector(".tfr-size-rec-select-button.active");if(!t)return;const n=Number(t.getAttribute("data-size-id"));if(Number.isNaN(n))return;e.classList.add("loading");const i=e.textContent;e.textContent=" ",e.setAttribute("disabled","true");try{const e=Array.from(document.querySelectorAll(".tfr-size-rec-select-button")),i=e.indexOf(t);if(null!==this.styleId){try{await this.onTryOnClick(this.styleId,n,!0)}catch(e){console.error(`Error trying on active size ${n}:`,e)}if(i>0){const t=e[i-1];await this._preloadNeighborVTO(t)}if(i>=0&&i<e.length-1){const t=e[i+1];await this._preloadNeighborVTO(t)}}}catch(e){console.error("Error during sequential try-on process:",e)}finally{e.classList.remove("loading"),e.textContent=i,e.removeAttribute("disabled")}})}async _preloadNeighborVTO(e){var t;const n=Number(e.getAttribute("data-size-id"));if(!Number.isNaN(n))try{await this.onTryOnClick(this.styleId,n,!1)}catch(i){const r=(null===(t=e.textContent)||void 0===t?void 0:t.trim())||"N/A";console.error(`Error pre-loading try-on for size ${n} (button: ${r}):`,i)}}onSizeRecSelectClick(e){const t=e.target;if(!t.classList.contains("tfr-size-rec-select-button")||t.classList.contains("tfr-disabled"))return;e.preventDefault();const n=Number(t.getAttribute("data-index"));if(Number.isNaN(n))return;const i=document.querySelectorAll(".tfr-size-rec-select-button");i.forEach(e=>e.classList.remove("active")),i.item(n).classList.add("active"),this.redraw(n);const r=Number(t.getAttribute("data-size-id"));Number.isNaN(r)||this.onTryOnClick(this.styleId,r,!0)}renderSizeRec(e,t){this.tfrSizeRecSize.innerHTML=` ${e}`;const n=t.findIndex(({size:t})=>t===e);this.redraw=e=>this.renderSizeRecTable(t,e),this.redraw(n),this.renderSizeRecSelect(t,n)}renderSizeRecTable(e,t){const{locations:n}=e[t],i=n.map(({location:e,fit:t,isPerfect:n})=>this.renderSizeRecTableRow(e,t,n)).join("");this.tfrSizeRecTable.innerHTML=i}renderSizeRecSelect(e,t){const n=e.map(({size:e})=>e).map((n,i)=>`<div class="tfr-size-rec-select-button ${i===t?"active":""}" data-index="${i}" data-size-id="${e[i].size_id}">${n}</div>`).join("");this.tfrSizeRecSelect.innerHTML=n}renderSizeRecSelectLoggedOut(){const e=['<div class="tfr-size-rec-select-button tfr-disabled">M</div>','<div class="tfr-size-rec-select-button tfr-disabled active">L</div>','<div class="tfr-size-rec-select-button tfr-disabled">XL</div>'].join("");this.tfrSizeRecSelect.innerHTML=e}renderSizeRecTableRow(e,t,n=!1){return`<div class="tfr-size-rec-table-row">\n <div class="tfr-size-rec-table-cell-left">${e}</div>\n <div class="tfr-size-rec-table-cell-right ${n?"perfect":""}">\n ${t}\n </div>\n </div>`}renderGarmentLocations(e){const t=e.map((e,t)=>this.renderSizeRecTableRow(e,this.randomFit(t),!0)).join(""),n=`<div id="tfr-logged-out-overlay-container">\n <div id="tfr-logged-out-overlay">\n Login to reveal how this item will fit specifically at each area of your body in different sizes\n </div>\n <div>\n ${t}\n </div>\n </div>`;this.tfrSizeRecTable.innerHTML=n}randomFit(e){const t=["Slightly Tight","Perfect Fit","Perfect Fit","Slightly Loose","Perfect Fit"];return t[e%t.length]}toggletSizeRecSelectContainer(){this.isCollapsed?(this.isCollapsed=!1,this.tfrSizeRecTitleToggle.classList.add("tfr-chevron-up"),this.tfrSizeRecTitleToggle.classList.remove("tfr-chevron-down"),this.tfrToggleOpenElements.forEach(e=>e.style.display="block"),this.tfrToggleClosedElements.forEach(e=>e.style.display="none")):(this.isCollapsed=!0,this.tfrSizeRecTitleToggle.classList.remove("tfr-chevron-up"),this.tfrSizeRecTitleToggle.classList.add("tfr-chevron-down"),this.tfrToggleOpenElements.forEach(e=>e.style.display="none"),this.tfrToggleClosedElements.forEach(e=>e.style.display="block"))}render(e){const t=`<div id="tfr-size-recommendations">\n <div id="tfr-size-rec-loading">\n <div class="lds-ellipsis">\n <div></div>\n <div></div>\n <div></div>\n <div></div>\n </div>\n </div>\n <div id="tfr-size-recommendations-container">\n <div id="tfr-size-rec-title-toggle" class="tfr-chevron-up">v</div>\n\n <div class="tfr-logged-out">\n <div class="tfr-flex tfr-gap tfr-mb-2 tfr-mobile-small-text">\n <div>Uncertain of your size?</div>\n \n <div class="tfr-toggle-closed">\n <div class="tfr-flex tfr-items-center">\n <div>Try</div>\n <div class="tfr-powered-by-logo">${Dp}</div>\n <div class="tfr-powered-by-text-bold">The Fitting Room</div>\n </div>\n </div>\n\n <div class="tfr-toggle-open">\n <div id="tfr-login-to-view" class="tfr-flex tfr-items-center">\n ${Mp} Login to view\n </div>\n </div>\n </div>\n </div>\n\n <div class="tfr-logged-in">\n <div id="tfr-size-rec-title">\n Recommended Size:\n <div id="tfr-size-rec-size">\n <div class="tfr-size-rec-login-cta">\n ${Mp} Sign up to view\n </div>\n </div>\n </div>\n </div>\n\n <div class="tfr-toggle-open" style="width: 100%">\n <div id="tfr-size-rec-select-container">\n <div id="tfr-size-how-it-fits">Select size to see how it fits:</div>\n\n <div id="tfr-size-rec-select"></div>\n\n <div id="tfr-size-rec-subtitle">\n How it fits\n <span id="tfr-info-icon"><svg width="13" height="13" viewBox="0 0 13 13" fill="none" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n<rect width="13" height="13" fill="url(#pattern0_641_1375)"/>\n<defs>\n<pattern id="pattern0_641_1375" patternContentUnits="objectBoundingBox" width="1" height="1">\n<use xlink:href="#image0_641_1375" transform="scale(0.00793651)"/>\n</pattern>\n<image id="image0_641_1375" width="126" height="126" xlink:href="data:image/png;base64,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"/>\n</defs>\n</svg>\n</span>\n </div>\n\n <div id="tfr-size-rec-table"></div>\n\n <div id="tfr-try-on-button" class="tfr-try-on-button">Try On</div>\n </div>\n </div>\n\n <div id="tfr-size-rec-action">\n <div id="tfr-size-rec-action-login">Sign up or login</div>\n <div id="tfr-size-rec-action-logout">Log out</div>\n </div>\n\n <div class="tfr-toggle-open">\n <div class="tfr-powered-by">\n <div>Powered by</div>\n <div class="tfr-powered-by-logo">${Dp}</div>\n <div class="tfr-powered-by-text-bold">The Fitting Room</div>\n </div>\n </div>\n </div>\n </div>\n <div id="tfr-size-recommendation-error"></div>`;e.innerHTML=t}}class jp{constructor(e,t,n,i,r,s,o){this.tfrShop=n,this.onSignInClick=i,this.onSignOutClick=r,this.onFitInfoClick=s,this.onTryOnClick=o,this.perfectFits=[ip.Fit.PERFECT_FIT,ip.Fit.SLIGHTLY_LOOSE,ip.Fit.SLIGHTLY_TIGHT],this.setCssVariables(t),this.sizeRecComponent=new Bp(e,this.onSignInClick,this.onSignOutClick,this.onFitInfoClick,this.onTryOnClick)}get sku(){return this.sizeRecComponent.sku}setSku(e){this.sizeRecComponent.setSku(e)}get styleId(){return this.sizeRecComponent.styleId}setStyleId(e){this.sizeRecComponent.setStyleId(e)}setIsLoggedIn(e){this.sizeRecComponent.setIsLoggedIn(e)}async setGarmentLocations(e=[]){this.sizeRecComponent.setLoading(!0);const t=e.length>0?e:await this.getGarmentLocations(e);console.debug("locations",t),console.debug("filledLocations",e),t&&t.length>0&&(this.sizeRecComponent.show(),this.sizeRecComponent.setGarmentLocations(t)),this.sizeRecComponent.setLoading(!1)}async recommendSize(){this.sizeRecComponent.setLoading(!0);const e=await this.getRecommendedSize();if(!e)return console.error("No sizes found for sku"),void this.sizeRecComponent.setLoading(!1);this.sizeRecComponent.show(),this.sizeRecComponent.setRecommendedSize(e),this.sizeRecComponent.setLoading(!1)}async getGarmentLocations(e){try{return await this.tfrShop.getMeasurementLocationsFromSku(this.sku,e)}catch(t){try{const t=await this.tfrShop.getStyleByBrandStyleId(this.sku);if(!t)return console.error("Style not found for brand style ID:",this.sku),this.sizeRecComponent.hide(),null;return await this.tfrShop.getMeasurementLocationsFromBrandStyleId(t.id,e)}catch(e){return console.error(e),this.sizeRecComponent.hide(),null}}}async getRecommendedSize(){try{const e=await this.tfrShop.getColorwaySizeAssetFromSku(this.sku),t=await this.getRecommendedSizes(String(e.style_id));return this.setStyleId(e.style_id),t}catch(e){try{const e=await this.tfrShop.getStyleByBrandStyleId(this.sku);if(!e)return console.error("Style not found for brand style ID:",this.sku),this.sizeRecComponent.hide(),null;const t=await this.getRecommendedSizes(String(e.id));return this.setStyleId(e.id),t}catch(e){return console.error(e),this.sizeRecComponent.hide(),null}}}async getRecommendedSizes(e){const t=await this.tfrShop.getRecommendedSizes(e);return t?{recommended:t.recommended_size.size_value.name,sizes:t.fits.map(e=>({size:t.available_sizes.find(t=>t.id===e.size_id).size_value.name,size_id:e.size_id,locations:e.measurement_location_fits.map(e=>({fit:"string"==typeof e.fit_label&&e.fit_label?e.fit_label:ip.FitNames[e.fit],isPerfect:this.perfectFits.includes(e.fit),location:this.tfrShop.getMeasurementLocationName(e.measurement_location),sortOrder:this.tfrShop.getMeasurementLocationSortOrder(e.measurement_location)})).sort((e,t)=>e.sortOrder<t.sortOrder?-1:1)}))}:null}setCssVariables(e){const t=document.querySelector(":root");e.brandColor&&t.style.setProperty("--tfr-brand-color",e.brandColor),e.black&&t.style.setProperty("--tfr-black",e.black),e.red&&t.style.setProperty("--tfr-red",e.red),e.white&&t.style.setProperty("--tfr-white",e.white),e.muted&&t.style.setProperty("--tfr-muted",e.muted),e.dark&&t.style.setProperty("--tfr-dark",e.dark),e.grey&&t.style.setProperty("--tfr-grey",e.grey),e.lightGrey&&t.style.setProperty("--tfr-light-grey",e.lightGrey),e.mainBorderColor&&t.style.setProperty("--tfr-main-border-color",e.mainBorderColor),e.mainBorderRadius&&t.style.setProperty("--tfr-main-border-radius",e.mainBorderRadius),e.mainBorderWidth&&t.style.setProperty("--tfr-main-border-width",e.mainBorderWidth),e.mainBgColor&&t.style.setProperty("--tfr-main-bg-color",e.mainBgColor),e.mainWidth&&t.style.setProperty("--tfr-main-width",e.mainWidth),e.mainVPadding&&t.style.setProperty("--tfr-main-v-padding",e.mainVPadding),e.mainHPadding&&t.style.setProperty("--tfr-main-h-padding",e.mainHPadding),e.mainFont&&t.style.setProperty("--tfr-main-font",e.mainFont),e.titleFont&&t.style.setProperty("--tfr-title-font",e.titleFont),e.subtitleFont&&t.style.setProperty("--tfr-subtitle-font",e.subtitleFont),e.rowFont&&t.style.setProperty("--tfr-row-font",e.rowFont),e.ctaFont&&t.style.setProperty("--tfr-cta-font",e.ctaFont),e.sizeSelectorTextColor&&t.style.setProperty("--tfr-size-selector-text-color",e.sizeSelectorTextColor),e.sizeSelectorFontSize&&t.style.setProperty("--tfr-size-selector-font-size",e.sizeSelectorFontSize),e.sizeSelectorFontWeight&&t.style.setProperty("--tfr-size-selector-font-weight",e.sizeSelectorFontWeight),e.sizeSelectorBgColor&&t.style.setProperty("--tfr-size-selector-bg-color",e.sizeSelectorBgColor),e.sizeSelectorBorderColor&&t.style.setProperty("--tfr-size-selector-border-color",e.sizeSelectorBorderColor),e.sizeSelectorBorderWidth&&t.style.setProperty("--tfr-size-selector-border-width",e.sizeSelectorBorderWidth),e.sizeSelectorBgColorHover&&t.style.setProperty("--tfr-size-selector-bg-color-hover",e.sizeSelectorBgColorHover),e.sizeSelectorBgColorActive&&t.style.setProperty("--tfr-size-selector-bg-color-active",e.sizeSelectorBgColorActive),e.sizeSelectorButtonHeight&&t.style.setProperty("--tfr-size-selector-button-height",e.sizeSelectorButtonHeight),e.sizeSelectorButtonActiveHeight&&t.style.setProperty("--tfr-size-selector-button-active-height",e.sizeSelectorButtonActiveHeight),e.sizeSelectorButtonActiveBorderColor&&t.style.setProperty("--tfr-size-selector-button-active-border-color",e.sizeSelectorButtonActiveBorderColor),e.sizeSelectorButtonActiveBorderWidth&&t.style.setProperty("--tfr-size-selector-button-active-border-width",e.sizeSelectorButtonActiveBorderWidth),e.sizeSelectorButtonRadius&&t.style.setProperty("--tfr-size-selector-button-radius",e.sizeSelectorButtonRadius),e.sizeSelectorButtonShadow&&t.style.setProperty("--tfr-size-selector-button-shadow",e.sizeSelectorButtonShadow)}}var Hp;!function(e){e.NOT_CREATED="NOT_CREATED",e.CREATED="CREATED",e.PENDING="PENDING"}(Hp||(Hp={}));class $p{constructor(e,t,n,i,r={},s,o){this.shopId=e,this.hooks=r,this.isLoggedIn=!1,this.unsub=null;const a=o||("undefined"!=typeof process?process.env.NODE_ENV:"dev");console.log("tfr-env",a),this.tfrModal=new Vp(t,this.signIn.bind(this),this.forgotPassword.bind(this),this.submitTel.bind(this)),this.tfrShop=((e,t="dev")=>("dev"!==t&&"development"!==t||console.warn("TfrShop is in development mode"),Ql.getInstance().setEnv(t),new Gf(e,new jf)))(Number(this.shopId),a),this.tfrSizeRec=new jp(n,s,this.tfrShop,this.onSignInClick.bind(this),this.signOut.bind(this),this.onFitInfoClick.bind(this),this.onTryOnClick.bind(this)),i&&(this.vtoComponent=new rp(i))}get shop(){return this.tfrShop}get sku(){return this.tfrSizeRec.sku}async setSku(e){var t,n;this.tfrSizeRec.setSku(e);const i=await this.getStyle(this.sku);i?(this.style=i,i.is_published?console.log(`style ${i.id} is published`):(document.getElementById("tfr-size-recommendations").style.display="none",console.log(`style ${i.id} is not published`)),console.log(`style ${i.id} virtual try on is disabled`),i.is_vto?null===(t=document.getElementById("tfr-try-on-button"))||void 0===t||t.classList.remove("hide"):null===(n=document.getElementById("tfr-try-on-button"))||void 0===n||n.classList.add("hide"),this.isLoggedIn?this.tfrSizeRec.recommendSize():this.setGarmentLocations(i)):document.getElementById("tfr-size-recommendations").style.display="none"}async onInit(){var e,t;return this.isLoggedIn=await this.tfrShop.onInit(),this.tfrSizeRec.setIsLoggedIn(this.isLoggedIn),this.isLoggedIn?((null===(e=this.hooks)||void 0===e?void 0:e.onLogin)&&this.hooks.onLogin(),this.subscribeToProfileChanges()):((null===(t=this.hooks)||void 0===t?void 0:t.onLogout)&&this.hooks.onLogout(),this.unsubscribeFromProfileChanges()),this.isLoggedIn}close(){this.tfrModal.close()}async signOut(){var e;await this.tfrShop.user.logout(),(null===(e=this.hooks)||void 0===e?void 0:e.onLogout)&&this.hooks.onLogout(),this.isLoggedIn=!1,this.tfrSizeRec.setIsLoggedIn(!1),this.setGarmentLocations(this.style),this.unsubscribeFromProfileChanges()}async signIn(e,t,n){var i;if(0==e.length||0==t.length)return n(xp);if(!/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,})+$/.test(e))return n(up);if(!(e=>!!e.match(/^.{7,}$/))(t))return n(vp);try{await this.tfrShop.user.login(e,t),(null===(i=this.hooks)||void 0===i?void 0:i.onLogin)&&this.hooks.onLogin(),this.tfrModal.close(),this.isLoggedIn=!0,this.tfrSizeRec.setIsLoggedIn(!0),this.tfrSizeRec.recommendSize(),this.subscribeToProfileChanges()}catch(e){return n(Np)}}setBrandUserId(e){this.tfrShop.user.setBrandUserId(e)}async submitTel(e){try{await this.tfrShop.submitTelephoneNumber(e),this.tfrModal.toSignIn()}catch(e){this.tfrModal.onError(kp)}}async forgotPassword(e){await this.tfrShop.user.sendPasswordResetEmail(e),this.tfrModal.toSignIn()}async passwordReset(e,t){await this.tfrShop.user.confirmPasswordReset(e,t),this.tfrModal.toPasswordReset()}async getMeasurementLocationsFromSku(e){return this.tfrShop.getMeasurementLocationsFromSku(e)}onSignInClick(){this.tfrModal.toScan()}onFitInfoClick(){this.tfrModal.toFitInfo()}async onTryOnClick(e,t,n=!0){if(!this.vtoComponent)return console.error("VtoComponent is not initialized. Please check if the vtoMainDivId is correct.");const i=await this.shop.tryOn(e,t);if(n)try{this.vtoComponent.init(),this.vtoComponent.onNewFramesReady(i)}catch(e){console.error("Error initializing VTO:",e),this.tfrModal.onError(kp)}}onUserProfileChange(e){var t,n,i,r;switch(e.avatar_status){case Hp.NOT_CREATED:(null===(t=this.hooks)||void 0===t?void 0:t.onError)&&this.hooks.onError(cp),this.tfrModal.onNotCreated();break;case Hp.PENDING:(null===(n=this.hooks)||void 0===n?void 0:n.onLoading)&&this.hooks.onLoading();break;case Hp.CREATED:(null===(i=this.hooks)||void 0===i?void 0:i.onLoadingComplete)&&this.hooks.onLoadingComplete();break;default:(null===(r=this.hooks)||void 0===r?void 0:r.onError)&&this.hooks.onError(kp),this.tfrModal.onError(kp)}}subscribeToProfileChanges(){this.unsub||(this.unsub=this.tfrShop.user.watchUserProfileForChanges(e=>this.onUserProfileChange(e)))}unsubscribeFromProfileChanges(){this.unsub&&(this.unsub(),this.unsub=null)}async setGarmentLocations(e){var t,n;const i=(null===(n=null===(t=null==e?void 0:e.sizes)||void 0===t?void 0:t[0])||void 0===n?void 0:n.garment_measurements.map(e=>e.measurement_location))||[];this.tfrSizeRec.setGarmentLocations(i)}async getStyle(e){try{const t=await this.tfrShop.getColorwaySizeAssetFromSku(e);return await this.tfrShop.getStyle(t.style_id)}catch(t){try{return await this.tfrShop.getStyleByBrandStyleId(e)}catch(e){return null}}}}const qp=async({shopId:e,modalDivId:t,sizeRecMainDivId:n,vtoMainDivId:i,hooks:r={},cssVariables:s={},env:o="dev"})=>{const a=new $p(e,t,n,i,r,s,o);return await a.onInit(),a};export{n as InitImageSlider,qp as initFittingRoom};
|
|
3398
|
+
const xf=d("authIdTokenMaxAge")||300;let Nf=null;function Of(e=Ke()){const t=Be(e,"auth");if(t.isInitialized())return t.getImmediate();const n=function(e,t){const n=Be(e,"auth");if(n.isInitialized()){const e=n.getImmediate();if(T(n.getOptions(),null!=t?t:{}))return e;Lu(e,"already-initialized")}return n.initialize({options:t})}(e,{popupRedirectResolver:Cf,persistence:[jd,Id,kd]}),i=d("authTokenSyncURL");if(i&&"boolean"==typeof isSecureContext&&isSecureContext){const e=new URL(i,location.origin);if(location.origin===e.origin){const t=(r=e.toString(),async e=>{const t=e&&await e.getIdTokenResult(),n=t&&((new Date).getTime()-Date.parse(t.issuedAtTime))/1e3;if(n&&n>xf)return;const i=null==t?void 0:t.token;Nf!==i&&(Nf=i,await fetch(r,{method:i?"POST":"DELETE",headers:i?{Authorization:`Bearer ${i}`}:{}}))});!function(e,t,n){N(e).beforeAuthStateChanged(t,n)}(n,t,()=>t(n.currentUser)),function(e,t,n,i){N(e).onIdTokenChanged(t,n,i)}(n,e=>t(e))}}var r;const s=u("auth");return s&&Jh(n,`http://${s}`),n}var Lf;jh={loadJS:e=>new Promise((t,n)=>{const i=document.createElement("script");var r,s;i.setAttribute("src",e),i.onload=t,i.onerror=e=>{const t=Pu("internal-error");t.customData=e,n(t)},i.type="text/javascript",i.charset="UTF-8",(null!==(s=null===(r=document.getElementsByTagName("head"))||void 0===r?void 0:r[0])&&void 0!==s?s:document).appendChild(i)}),gapiScript:"https://apis.google.com/js/api.js",recaptchaV2Script:"https://www.google.com/recaptcha/api.js",recaptchaEnterpriseScript:"https://www.google.com/recaptcha/enterprise.js?render="},Lf="Browser",Ve(new O("auth",(e,{options:t})=>{const n=e.getProvider("app").getImmediate(),i=e.getProvider("heartbeat"),r=e.getProvider("app-check-internal"),{apiKey:s,authDomain:o}=n.options;Fu(s&&!s.includes(":"),"invalid-api-key",{appName:n.name});const a={apiKey:s,authDomain:o,clientPlatform:Lf,apiHost:"identitytoolkit.googleapis.com",tokenApiHost:"securetoken.googleapis.com",apiScheme:"https",sdkClientVersion:Mh(Lf)},c=new Uh(n,i,r,a);return function(e,t){const n=(null==t?void 0:t.persistence)||[],i=(Array.isArray(n)?n:[n]).map(bh);(null==t?void 0:t.errorMap)&&e._updateErrorMap(t.errorMap),e._initializeWithPersistence(i,null==t?void 0:t.popupRedirectResolver)}(c,t),c},"PUBLIC").setInstantiationMode("EXPLICIT").setInstanceCreatedCallback((e,t,n)=>{e.getProvider("auth-internal").initialize()})),Ve(new O("auth-internal",e=>(e=>new Rf(e))(Vh(e.getProvider("auth").getImmediate())),"PRIVATE").setInstantiationMode("EXPLICIT")),We(kf,Af,function(e){switch(e){case"Node":return"node";case"ReactNative":return"rn";case"Worker":return"webworker";case"Cordova":return"cordova";case"WebExtension":return"web-extension";default:return}}(Lf)),We(kf,Af,"esm2017");class Pf extends Error{constructor(){super("Avatar not created"),this.name="AvatarNotCreatedError"}}class Df extends Error{constructor(){super("user not logged in"),this.name="UserNotLoggedInError"}}class Mf extends Error{constructor(){super("no colorway size assets found"),this.name="NoColorwaySizeAssetsFoundError"}}class zf extends Error{constructor(){super("brand user id not set"),this.name="BrandUserIdNotSetError"}}class Ff extends Error{constructor(){super("no frames found"),this.name="NoFramesFoundError"}}class Uf extends Error{constructor(){super("no styles found"),this.name="NoStylesFoundError"}}const Vf="avatar not created";class Bf{constructor(e,t){this.firestore=e,this.brandUserId=null,this.auth=Of(t),this.auth.setPersistence(Id)}get id(){var e;return null===(e=this.user)||void 0===e?void 0:e.uid}async onInit(e){this.auth.onAuthStateChanged(t=>{this.setUser(t),t&&(this.logUserLogin(e,t),this.setBrandUserId(t.uid))}),await this.auth.authStateReady();const t=this.auth.currentUser;return this.setUser(t),this.setBrandUserId(null==t?void 0:t.uid),Boolean(t)}setUser(e){this.user=e}async logUserLogin(e,t){var n,i,r,s,o;try{const a=Wc(this.firestore,"user_logging",t.uid),c=await Hl(a),l=new Date,u=c.exists?c.data():null,h=null===(i=null===(n=null==u?void 0:u.brands)||void 0===n?void 0:n[e])||void 0===i?void 0:i.last_login;if(h&&Su(l).diff(Su(1e3*h.seconds),"seconds")<=10080)return;const d=null!==(o=null===(s=null===(r=null==u?void 0:u.brands)||void 0===r?void 0:r[e])||void 0===s?void 0:s.logins)&&void 0!==o?o:[];d.push(l);const f={brands:{[e]:{brand_id:e,last_login:l,logins:d}},last_brand_id:e,created_at:c.exists()?c.data().created_at:l,updated_at:l};await Gl(a,f,{merge:!0})}catch(e){console.error("LOGGING ERROR:",e)}}setBrandUserId(e){this.brandUserId=e}async getToken(){var e;if(!(null===(e=this.user)||void 0===e?void 0:e.uid))throw new Df;return await this.user.getIdToken()}get userId(){var e;if(!(null===(e=this.user)||void 0===e?void 0:e.uid))throw new Df;return this.user.uid}async getUserProfile(){var e;if(!(null===(e=this.user)||void 0===e?void 0:e.uid))throw new Df;return(await Hl(Wc(this.firestore,"users",this.id))).data()}watchUserProfileForChanges(e){let t;const n=xl(Kc(this.firestore,"users"),Ol(rl(),"==",this.id));return t=Kl(n,t=>e(t.docs[0].data())),()=>t()}watchUserProfileForFrames(e){let t;const n=xl(Kc(this.firestore,"users"),Ol(rl(),"==",this.id));return new Promise(i=>{t=Kl(n,async n=>{await e(n)&&(t(),i(n.docs[0].data()))})})}async login(e,t){this.auth.currentUser&&await this.auth.signOut();const n=await _d(this.auth,e,t);this.setUser(n.user)}async logout(){await this.auth.signOut(),this.setUser(null)}async sendPasswordResetEmail(e){await async function(e,t){const n=Vh(e),i={requestType:"PASSWORD_RESET",email:t,clientType:"CLIENT_TYPE_WEB"};await Qh(n,i,"getOobCode",nd)}(this.auth,e)}async confirmPasswordReset(e,t){await bd(this.auth,e,t)}}class jf{constructor(){this.promisefyOnSnapshot=(e,t)=>{let n;return{promise:new Promise(i=>{n=Kl(e,e=>{i(e),t&&n()})}),unsubscribe:()=>n()}};const e=Ge(Ql.getInstance().firebase);this.firestore=el(e),this.user=new Bf(this.firestore,e)}onInit(e){return this.user.onInit(e)}query(e,t,n=!0){const i=xl(Kc(this.firestore,e),t);return this.promisefyOnSnapshot(i,n)}getDocs(e,t){return ql(xl(Kc(this.firestore,e),...t))}async getDoc(e,t){const n=Wc(this.firestore,e,t),i=await Hl(n);return i.exists()?i.data():null}}const Hf=e=>{if(e.code===xu)throw new Error("account has been disabled");throw new Error(e.message)};class $f{static get endpoint(){return Ql.getInstance().api.url}static async Fetch({user:e,endpointPath:t,method:n,body:i,useToken:r=!0}){const s=this.getUrl(t,r),o={method:n,headers:await this.getHeaders(e,r),credentials:"omit"};i&&(o.body=JSON.stringify(i));const a=await fetch(s,o);if(a.ok)return a;if(500===a.status)throw new Error(a.statusText);const c=await a.json();return Promise.reject(c)}static getUrl(e,t){return t?`${this.endpoint}/v1${e}`:this.endpoint+e}static async getHeaders(e,t){if(!t)return{"Content-Type":"application/json"};return{"Content-Type":"application/json",Authorization:`Bearer ${await e.getToken()}`}}static Get(e,t,n){return this.Fetch({user:e,endpointPath:t,method:"GET",body:null,useToken:n})}static Post(e,t,n=null,i){return this.Fetch({user:e,endpointPath:t,method:"POST",body:n,useToken:i})}static Put(e,t,n,i){return this.Fetch({user:e,endpointPath:t,method:"PUT",body:n,useToken:i})}static Patch(e,t,n,i){return this.Fetch({user:e,endpointPath:t,method:"PATCH",body:n,useToken:i})}static Delete(e,t,n,i){return this.Fetch({user:e,endpointPath:t,method:"DELETE",body:n,useToken:i})}}const qf=e=>{const t=new Image;return t.src=e,new Promise(e=>{t.onerror=()=>e(!1),t.onload=()=>e(!0)})};class Gf{constructor(e,t){this.brandId=e,this.firebase=t,this.measurementLocations=new Map}get user(){return this.firebase.user}get isLoggedIn(){return!this.firebase||Boolean(this.user.id)}async onInit(){return await this.getMeasurementLocations(),this.firebase.onInit(this.brandId)}async getRecommendedSizes(e){var t,n;if(!this.isLoggedIn)throw new Df;try{const i=await $f.Get(this.user,`/styles/${e}/recommendation`),r=await i.json();return(null===(t=null==r?void 0:r.fits)||void 0===t?void 0:t.length)&&(null===(n=null==r?void 0:r.recommended_size)||void 0===n?void 0:n.id)?r:null}catch(e){if((null==e?void 0:e.error)===Vf)throw new Pf;throw e}}async submitTelephoneNumber(e){const t=e.replace(/[^\+0-9]/g,""),n=await $f.Post(this.user,"/ios-app-link",{phone_number:t},!1);console.log(n)}async getColorwaySizeAssetFromSku(e){const t=await this.getColorwaySizeAssets(null,[e]);if(!(null==t?void 0:t.size))throw new Mf;return Array.from(t.values())[0]}async getColorwaySizeAssetFromBrandStyleId(e){const t=await this.getColorwaySizeAssets(e);if(!(null==t?void 0:t.size))throw new Mf;return Array.from(t.values())[0]}async getMeasurementLocationsFromSku(e,t=[]){console.log({sku:e});const n=await this.getColorwaySizeAssetFromSku(e);if(!n)throw new Error("No colorway size asset found for sku");const i=await this.getStyle(n.style_id);if(!i)throw new Error("Style category not found for style id");const r=await this.getGetTaxonomy(i.style_garment_category_id);if(!r)throw new Error("Taxonomy not found for style garment category id");return(t.length?r.measurement_locations.female.filter(e=>t.includes(e)):r.measurement_locations.female).map(e=>this.measurementLocations.has(e)?this.measurementLocations.get(e):{name:e,sort_order:1/0}).sort((e,t)=>e.sort_order<t.sort_order?-1:0).map(e=>e.name)}async getMeasurementLocationsFromBrandStyleId(e,t=[]){const n=await this.getColorwaySizeAssetFromBrandStyleId(e);if(!n)throw new Error("No colorway size asset found for brand style id");const i=await this.getStyle(n.style_id);if(!i)throw new Error("Style category not found for style id");const r=await this.getGetTaxonomy(i.style_garment_category_id);if(!r)throw new Error("Taxonomy not found for style garment category id");return(t.length?r.measurement_locations.female.filter(e=>t.includes(e)):r.measurement_locations.female).map(e=>this.measurementLocations.has(e)?this.measurementLocations.get(e):{name:e,sort_order:1/0}).sort((e,t)=>e.sort_order<t.sort_order?-1:0).map(e=>e.name)}async getStyleByBrandStyleId(e){var t,n;try{const i=[Ol("brand_id","==",this.brandId)];i.push(Ol("brand_style_id","==",e));return null===(n=null===(t=(await this.firebase.getDocs("styles",i)).docs)||void 0===t?void 0:t[0])||void 0===n?void 0:n.data()}catch(e){return Hf(e)}}async getColorwaySizeAssets(e,t){const n=[Ol("brand_id","==",this.brandId)];e&&n.push(Ol("style_id","==",e)),(null==t?void 0:t.length)>0&&n.push(Ol("sku","in",t));try{const e=await this.firebase.getDocs("colorway_size_assets",n),t=new Map;return e.forEach(e=>{const n=e.data();t.set(n.id,n)}),t}catch(e){return Hf(e)}}async getStyle(e){try{return await this.firebase.getDoc("styles",String(e))}catch(e){return Hf(e)}}getMeasurementLocationName(e){return this.measurementLocations.has(e)?this.measurementLocations.get(e).name:e}getMeasurementLocationSortOrder(e){return this.measurementLocations.has(e)?this.measurementLocations.get(e).sort_order:1/0}async tryOn(e,t){if(!this.isLoggedIn)throw new Df;const n=await this.getColorwaySizeAssetSkuFromStyleIdAndSizeId(e,t);try{return await this.getColorwaySizeAssetFrames(n)}catch(e){if(!(e instanceof Ff))throw e;return this.requestThenGetColorwaySizeAssetFrames(n)}}async getColorwaySizeAssetSkuFromStyleIdAndSizeId(e,t){var n,i,r;try{const s=[Ol("brand_id","==",this.brandId)];s.push(Ol("style_id","==",e)),s.push(Ol("size_id","==",t));return null===(r=null===(i=null===(n=(await this.firebase.getDocs("colorway_size_assets",s)).docs)||void 0===n?void 0:n[0])||void 0===i?void 0:i.data())||void 0===r?void 0:r.sku}catch(e){return Hf(e)}}async getGetTaxonomy(e){try{return await this.firebase.getDoc("style_garment_categories",String(e))}catch(e){return Hf(e)}}async getMeasurementLocations(){(await this.fetchMeasurementLocations()).forEach(e=>{this.measurementLocations.set(e.name,{name:e.garment_label,sort_order:e.sort_order})})}async fetchMeasurementLocations(){try{return(await this.firebase.getDocs("measurement_locations",[])).docs.map(e=>e.data())}catch(e){return Hf(e)}}async requestThenGetColorwaySizeAssetFrames(e){const[t,n]=await(i=this.getColorwaySizeAssetFromSku(e),i.then(e=>[null,e]).catch(e=>[e]));var i;if(t)throw t;try{try{this.requestColorwaySizeAssetFrames(n.id)}catch(e){}return this.awaitColorwaySizeAssetFrames(e)}catch(t){if((null==t?void 0:t.error)===Vf)throw new Pf;throw new Uf}}async awaitColorwaySizeAssetFrames(e){var t,n,i,r;if(!this.isLoggedIn)throw new Df;const s=await this.user.watchUserProfileForFrames(async t=>{var n,i,r,s;const o=null===(s=null===(r=null===(i=null===(n=t.docs[0].data())||void 0===n?void 0:n.vto)||void 0===i?void 0:i[this.brandId])||void 0===r?void 0:r[e])||void 0===s?void 0:s.frames;return!!(null==o?void 0:o.length)&&qf(o[0])});if(!(null===(r=null===(i=null===(n=null===(t=null==s?void 0:s.vto)||void 0===t?void 0:t[this.brandId])||void 0===n?void 0:n[e])||void 0===i?void 0:i.frames)||void 0===r?void 0:r.length))throw new Ff;return s.vto[this.brandId][e].frames}async requestColorwaySizeAssetFrames(e){if(!this.isLoggedIn)throw new Df;if(!this.user.brandUserId)throw new zf;await $f.Post(this.user,`/colorway-size-assets/${e}/frames`,{brand_user_id:String(this.user.brandUserId)})}async getColorwaySizeAssetFrames(e){var t,n,i;const r=await this.user.getUserProfile(),s=(null===(i=null===(n=null===(t=null==r?void 0:r.vto)||void 0===t?void 0:t[this.brandId])||void 0===n?void 0:n[e])||void 0===i?void 0:i.frames)||[];if(!s.length)throw new Ff;if(!await qf(s[0]))throw new Ff;return s}}var Kf;!function(e){e.ACROSS_BACK="across_back",e.ACROSS_FRONT="across_front",e.ACROSS_SHOULDER="across_shoulder",e.ANKLE="ankle",e.ARMEYE="arm_eye",e.ARM_LENGTH_FROM_SHOULDER="arm_length_from_shoulder",e.BACK_CROTCH_LENGTH="back_crotch_length",e.BACK_NECK_TO_EBLOW="back_neck_to_elbow",e.BELOW_KNEE="below_knee",e.BICEP="bicep",e.BUST="bust",e.BUST_POINT_TO_BUST_POINT="bust_point_to_bust_point",e.CALF="calf",e.CB_NECK_TO_WAIST="cb_neck_to_waist",e.CB_NECK_TO_WRIST="cb_neck_to_wrist",e.CF_NECK_TO_WAIST="cf_neck_to_waist",e.ELBOW="elbow",e.FOREARM="forearm",e.FRONT_CROTCH_LENGTH="front_crotch_length",e.HIGH_HIP_PLACEMENT_FROM_WAIST="high_hip_placement",e.HIGH_HIP="high_hip",e.HSP_TO_ACROSS_BACK="hsp_to_across_back",e.HSP_TO_ACROSS_FRONT="hsp_to_across_front",e.HSP_TO_BUST_POINT="hsp_to_bust_point",e.HSP_TO_LOW_HIP_POSITION="hsp_to_low_hip_position",e.HSP_TO_WAIST_POSITION="hsp_to_waist_position",e.INSEAM="inseam",e.KNEE="knee",e.LOW_HIP="low_hip",e.LOW_HIP_PLACEMENT_FROM_WAIST="low_hip_placement",e.MID_NECK="mid_neck",e.NECK_AT_BASE="neck_base",e.SHOULDER_DROP="shoulder_drop",e.SHOULDER_TO_SHOULDER="shoulder_to_shoulder",e.SIDE_WAIST_TO_FLOOR="side_waist_to_floor",e.SIDE_WAIST_TO_KNEE="side_waist_to_knee",e.THIGH="thigh",e.TOTAL_RISE_LENGTH="total_rise_length",e.UNDER_BUST="under_bust",e.VERTICAL_TRUNK="vertical_trunk",e.WAIST="waist",e.WRIST="wrist"}(Kf||(Kf={}));const Wf={[Kf.ACROSS_BACK]:"Across back",[Kf.ACROSS_FRONT]:"Across front",[Kf.ACROSS_SHOULDER]:"Across shoulder",[Kf.ANKLE]:"Ankle",[Kf.ARMEYE]:"Armeye",[Kf.ARM_LENGTH_FROM_SHOULDER]:"Arm length from shoulder",[Kf.BACK_CROTCH_LENGTH]:"Back crotch length",[Kf.BACK_NECK_TO_EBLOW]:"Back neck to eblow",[Kf.BELOW_KNEE]:"Below knee",[Kf.BICEP]:"Bicep",[Kf.BUST]:"Chest/Bust",[Kf.BUST_POINT_TO_BUST_POINT]:"Bust point to bust point",[Kf.CALF]:"Calf",[Kf.CB_NECK_TO_WAIST]:"Cb neck to waist",[Kf.CB_NECK_TO_WRIST]:"Cb neck to wrist",[Kf.CF_NECK_TO_WAIST]:"Cf neck to waist",[Kf.ELBOW]:"Elbow",[Kf.FOREARM]:"Forearm",[Kf.FRONT_CROTCH_LENGTH]:"Front crotch length",[Kf.HIGH_HIP_PLACEMENT_FROM_WAIST]:"High hip placement from waist",[Kf.HIGH_HIP]:"High hip",[Kf.HSP_TO_ACROSS_BACK]:"Hsp to across back",[Kf.HSP_TO_ACROSS_FRONT]:"Hsp to across front",[Kf.HSP_TO_BUST_POINT]:"Hsp to bust point",[Kf.HSP_TO_LOW_HIP_POSITION]:"Hsp to low hip position",[Kf.HSP_TO_WAIST_POSITION]:"Hsp to waist position",[Kf.INSEAM]:"Inseam",[Kf.KNEE]:"Knee",[Kf.LOW_HIP]:"Low hip",[Kf.LOW_HIP_PLACEMENT_FROM_WAIST]:"Low hip placement from waist",[Kf.MID_NECK]:"Mid neck",[Kf.NECK_AT_BASE]:"Neck at base",[Kf.SHOULDER_DROP]:"Shoulder drop",[Kf.SHOULDER_TO_SHOULDER]:"Shoulder to shoulder",[Kf.SIDE_WAIST_TO_FLOOR]:"Side waist to floor",[Kf.SIDE_WAIST_TO_KNEE]:"Side waist to knee",[Kf.THIGH]:"Thigh",[Kf.TOTAL_RISE_LENGTH]:"Total rise length",[Kf.UNDER_BUST]:"Under bust",[Kf.VERTICAL_TRUNK]:"Vertical trunk",[Kf.WAIST]:"Waist",[Kf.WRIST]:"Wrist"};var Qf;!function(e){e.BLOUSES="blouses",e.COATS="coats",e.DRESSES="dresses",e.JACKETS="jackets",e.PANTS="pants",e.PUFFERS_AND_PARKAS="puffer_and_parkas",e.SHORTS="shorts",e.SKIRTS="skirts",e.SWEATERS="sweaters",e.T_SHIRTS_AND_TANKS="t_shirts_and_tanks"}(Qf||(Qf={}));const Jf={[Qf.BLOUSES]:[Kf.BUST,Kf.ACROSS_SHOULDER,Kf.WAIST,Kf.LOW_HIP,Kf.HIGH_HIP],[Qf.COATS]:[Kf.BUST,Kf.ACROSS_SHOULDER,Kf.WAIST,Kf.LOW_HIP,Kf.HIGH_HIP],[Qf.DRESSES]:[Kf.LOW_HIP,Kf.BUST,Kf.ACROSS_SHOULDER,Kf.WAIST],[Qf.JACKETS]:[Kf.BUST,Kf.ACROSS_SHOULDER,Kf.WAIST,Kf.LOW_HIP,Kf.HIGH_HIP],[Qf.PANTS]:[Kf.LOW_HIP,Kf.WAIST,Kf.THIGH,Kf.INSEAM],[Qf.PUFFERS_AND_PARKAS]:[Kf.BUST,Kf.ACROSS_SHOULDER,Kf.WAIST,Kf.LOW_HIP,Kf.HIGH_HIP],[Qf.SHORTS]:[Kf.LOW_HIP,Kf.WAIST,Kf.THIGH,Kf.INSEAM],[Qf.SKIRTS]:[Kf.LOW_HIP,Kf.WAIST],[Qf.SWEATERS]:[Kf.BUST,Kf.ACROSS_SHOULDER,Kf.WAIST,Kf.LOW_HIP,Kf.HIGH_HIP],[Qf.T_SHIRTS_AND_TANKS]:[Kf.BUST,Kf.ACROSS_SHOULDER,Kf.WAIST,Kf.LOW_HIP,Kf.HIGH_HIP]},Yf={activewear:"Active Wear",dresses:"Dresses",jackets_and_coats:"Jackets and Coats",jeans:"Jeans",jumpsuits_and_rompers:"Jumpsuits and Rompers",pants_and_shorts:"Pants and Shorts",skirts:"Skirts",suits_and_tailoring:"Suits and Tailoring",sweaters:"Sweaters",tops:"Tops"},Xf={a_line:"A Line",a_line_flared:"A Line Flared",blazers:"Blazers",bodycon:"Bodycon",bodysuits:"Bodysuits",boiler_suits:"Boiler Suits",bootcut:"Bootcut",cardigans:"Cardigans",cigarette:"Cigarette",corsets_and_bustiers:"Corsets and Bustiers",crewnecks:"Crewnecks",culottes:"Culottes",denim:"Denim",denim_jackets:"Denim Jackets",denim_shorts:"Denim Shorts",fit_and_flare:"Fit and Flare",flared:"Flared",hoodies_and_zipups:"Hoodies and Zipups",joggers:"Joggers",jumpsuits:"Jumpsuits",knit:"Knit",leggings:"Leggings",mom:"Mom",overalls:"Overalls",parkas:"Parkas",peacoats:"Peacoats",pencil:"Pencil",pleated:"Pleated",polos:"Polos",puffer_jackets:"Puffer Jackets",raincoats:"Raincoats",relaxed:"Relaxed",rompers:"Rompers",shackets:"Shackets",shirt:"Shirt",shirts_and_blouses:"Shirts and Blouses",skater:"Skater",skinny:"Skinny",slim:"Slim",slip:"Slip",sports_bras:"Sports Bras",straight:"Straight",suit_jackets:"Suit Jackets",suit_skirts:"Suit Skirts",suit_trousers:"Suit Trousers",suit_vests:"Suit Vests",sweatshirts:"Sweatshirts",t_shirts:"T-Shirts",tank_tops_and_camisoles:"Tank Tops and Camisoles",tapered:"Tapered",trench_coats:"Trench Coats",trousers:"Trousers",turtlenecks:"Turtleneck",unitards:"Unitards",v_necks:"V-Necks",wide_leg:"Wide Leg",wrap:"Wrap"},Zf={activewear:{leggings:Qf.PANTS,joggers:Qf.PANTS,sweatshirts:Qf.SWEATERS},dresses:{a_line:Qf.DRESSES,bodycon:Qf.DRESSES,fit_and_flare:Qf.DRESSES,knit:Qf.DRESSES,shirt:Qf.DRESSES,slip:Qf.DRESSES,straight:Qf.DRESSES,wrap:Qf.DRESSES},jackets_and_coats:{denim_jackets:Qf.JACKETS,parkas:Qf.PUFFERS_AND_PARKAS,peacoats:Qf.COATS,puffer_jackets:Qf.PUFFERS_AND_PARKAS,raincoats:Qf.COATS,rompers:Qf.COATS,shackets:Qf.JACKETS,trench_coats:Qf.COATS},jeans:{bootcut:Qf.PANTS,flared:Qf.PANTS,mom:Qf.PANTS,relaxed:Qf.PANTS,skinny:Qf.PANTS,slim:Qf.PANTS,straight:Qf.PANTS,tapered:Qf.PANTS,wide_leg:Qf.PANTS},jumpsuits_and_rompers:{boiler_suits:Qf.DRESSES,denim:Qf.DRESSES,jumpsuits:Qf.DRESSES,overalls:Qf.DRESSES,rompers:Qf.DRESSES,unitards:Qf.DRESSES},pants_and_shorts:{cigarette:Qf.PANTS,culottes:Qf.SHORTS,denim_shorts:Qf.SHORTS,flared:Qf.PANTS,joggers:Qf.PANTS,leggings:Qf.PANTS,skinny:Qf.PANTS,wide_leg:Qf.PANTS},skirts:{a_line_flared:Qf.SKIRTS,denim:Qf.SKIRTS,knit:Qf.SKIRTS,pencil:Qf.SKIRTS,pleated:Qf.SKIRTS,skater:Qf.SKIRTS,slip:Qf.SKIRTS,wrap:Qf.SKIRTS},suits_and_tailoring:{blazers:Qf.JACKETS,suit_jackets:Qf.JACKETS,suit_skirts:Qf.SKIRTS,suit_trousers:Qf.PANTS,suit_vests:Qf.SWEATERS,trousers:Qf.PANTS},sweaters:{cardigans:Qf.SWEATERS,crewnecks:Qf.SWEATERS,hoodies_and_zipups:Qf.SWEATERS,sweatshirts:Qf.SWEATERS,turtlenecks:Qf.SWEATERS,v_necks:Qf.SWEATERS},tops:{bodysuits:Qf.BLOUSES,corsets_and_bustiers:Qf.BLOUSES,polos:Qf.T_SHIRTS_AND_TANKS,shirts_and_blouses:Qf.BLOUSES,t_shirts:Qf.T_SHIRTS_AND_TANKS,tank_tops_and_camisoles:Qf.T_SHIRTS_AND_TANKS}};var ep;!function(e){e.TOO_TIGHT="too_tight",e.TIGHT="tight",e.SLIGHTLY_TIGHT="slightly_tight",e.PERFECT_FIT="perfect_fit",e.SLIGHTLY_LOOSE="slightly_loose",e.LOOSE="loose",e.OVERSIZED="oversized",e.TOO_SHORT="too_short",e.SHORT="short",e.SLIGHTLY_SHORT="slightly_short",e.SLIGHTLY_LONG="slightly_long",e.LONG="long",e.TOO_LONG="too_long"}(ep||(ep={}));const tp={[ep.TOO_TIGHT]:"Too Tight",[ep.TIGHT]:"Tight",[ep.SLIGHTLY_TIGHT]:"Slightly Tight",[ep.PERFECT_FIT]:"Perfect Fit",[ep.SLIGHTLY_LOOSE]:"Slightly Loose",[ep.LOOSE]:"Loose",[ep.OVERSIZED]:"Oversized",[ep.TOO_SHORT]:"Too Short",[ep.SHORT]:"Short",[ep.SLIGHTLY_SHORT]:"Slightly Short",[ep.SLIGHTLY_LONG]:"Slightly Long",[ep.LONG]:"Long",[ep.TOO_LONG]:"Too Long"};var np;!function(e){e.NOT_CREATED="NOT_CREATED",e.CREATED="CREATED",e.PENDING="PENDING"}(np||(np={}));var ip=Object.freeze({__proto__:null,get AvatarState(){return np},Categories:["activewear","dresses","jackets_and_coats","jeans","jumpsuits_and_rompers","pants_and_shorts","skirts","suits_and_tailoring","sweaters","tops"],CategoryNames:Yf,get Classification(){return Qf},ClassificationLocations:Jf,get Fit(){return ep},FitNames:tp,get MeasurementLocation(){return Kf},MeasurementLocationName:Wf,SubcategoryNames:Xf,Taxonomy:Zf});class rp{constructor(e){this.vtoMainDivId=e,this.isInit=!1,this.currentSliderValue=0,this.slider=null}init(){if(this.isInit)return;const e=document.getElementById(this.vtoMainDivId);if(!e)throw new Error(`Element with id ${this.vtoMainDivId} not found`);e.innerHTML='\n <div class="tfr-slider-wrapper">\n <img id="tfr-tryon-image" src="" />\n <input type="range" id="tfr-slider" />\n </div>\n ';const t=document.getElementById("tfr-tryon-image");this.slider=n("tfr-slider",(e,n)=>{console.debug("slider change",e,n),t.src=n,this.currentSliderValue=parseInt(e.value)}),this.isInit=!0}onNewFramesReady(e){if(this.isInit||this.init(),Array.isArray(e)&&e.length>0){const t=Math.min(this.currentSliderValue,e.length-1),n=this.slider.Load(e,t);if(n instanceof Error)return void console.error(n);const i=document.getElementById("tfr-slider");if(i&&this.currentSliderValue<e.length){i.value=this.currentSliderValue.toString();document.getElementById("tfr-tryon-image").src=e[this.currentSliderValue]}}}}var sp="Back to sign in",op="Click here to download the app",ap="Don't have an account?",cp="Whoops! Looks like you don't have an avatar yet.",lp="Email address",up="Please enter a valid email address.",hp="Enter your email address, we will send you a link to reset your password.",dp="Forgot password?",fp="Have an account? Sign in",pp="Your avatar is loading...",gp="Unfortunately, that size is not available for try on.",mp="or",yp="Password",vp="Please enter a valid password (at least 7 characters).",wp="Return to Catalog Page",bp="Return to Product Page",_p="Return to site",Sp="Please return to The Fitting Room app to create your avatar.",Ep="Scan to download the app",Tp="Send",Ip="Sign back in",Cp="Sign in",kp="Something went wrong. Try again!",Ap="You have successfully logged out!",Rp="The Fitting Room",xp="Username or password is empty.",Np="Username or password is incorrect.",Op="End size uncertainty with",Lp="Our technology captures your precise measurements, and considers things like fabric stretch and your individual physique to find your perfect fit every time.";function Pp(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css","top"===n&&i.firstChild?i.insertBefore(r,i.firstChild):i.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}}Pp(".tfr-c-white{color:var(--tfr-white)}.tfr-c-brand{color:var(--tfr-brand-color)}.tfr-c-brand-bg{background-color:var(--tfr-brand-color)}.tfr-c-black{color:var(--tfr-black)}.tfr-c-black-o5{color:rgba(0,0,0,.5)}.tfr-c-red{color:var(--tfr-red)}");Pp('#fit-title{margin-bottom:20px;margin-top:-30px}#fit-subtitle,#fit-title{color:#209da7;font-size:24px;font-weight:700}#fit-subtitle{position:absolute;right:17px;top:100px}#fit-subtitle-mobile{color:#7d7d7d;font-size:24px;font-weight:700;margin-top:20px}#fit-outline-container{display:flex;justify-content:center}#fit-outline-inner{position:relative}#fit-outline-inner,#tfr-fit-outline-img{width:184px}#fit-outline-inner,#fit-outline-inner-left,#fit-outline-inner-right,#tfr-fit-outline-img{height:701px}#fit-outline-inner-left,#fit-outline-inner-right{position:relative;width:260px}#fit-outline-container .fit-outline-line{display:block}.fit-outline-line{background:#000;height:1px;position:absolute}.fit-outline-line-text{border-bottom:1px solid #000;font-size:24px;position:absolute}.fit-outline-line-chest-text{left:-11px;text-align:right;top:163px;width:254px}.fit-outline-line-n-waist-text{left:-11px;text-align:right;top:208px;width:254px}.fit-outline-line-p-waist-text{right:-10px;text-align:left;top:233px;width:253px}.fit-outline-line-h-hip-text{left:-3px;text-align:right;top:255px;width:246px}.fit-outline-line-l-hip-text{left:-3px;text-align:right;top:302px;width:246px}.fit-outline-line-thigh-text{right:3px;text-align:left;top:341px;width:240px}.fit-outline-line-chest{left:42px;top:194px;width:99px}.fit-outline-line-n-waist{left:50px;top:239px;width:83px}.fit-outline-line-p-waist{left:45px;top:264px;width:93px}.fit-outline-line-h-hip{left:30px;top:286px;width:122px}.fit-outline-line-l-hip{left:21px;top:333px;width:141px}.fit-outline-line-thigh-l{left:27px;top:372px;width:60px}.fit-outline-line-thigh-r{left:95px;top:372px;width:61px}#fit-line-container{position:relative;width:100%}#fit-line-text-container{align-items:center;display:flex;justify-content:space-between}.fit-line-item{font-weight:700;width:110px}.fit-line-item .light-text{font-weight:500}.fit-line-item-green{color:#209da7}#fit-line{display:flex;justify-content:space-around;margin-bottom:4px;margin-top:30px}#fit-line-1,#fit-line-2,#fit-line-3,#fit-line-4,#fit-line-5,#fit-line-6,#fit-line-7{background:#000;height:2px;position:relative;width:110px}#fit-line-3,#fit-line-4,#fit-line-5{background:#209da7}#fit-line-1:before,#fit-line-2:before,#fit-line-3:before,#fit-line-5:before,#fit-line-6:before,#fit-line-7:before{background:#000;border-radius:50%;content:"";height:12px;position:absolute;top:-5px;width:12px}#fit-line-1:before,#fit-line-2:before,#fit-line-3:before{left:0}#fit-line-5:before,#fit-line-6:before,#fit-line-7:before{right:0}#fit-line-1:before,#fit-line-2:before,#fit-line-6:before,#fit-line-7:before{background:#000}#fit-line-3:before,#fit-line-5:before{background:#209da7}#fit-line-2:before,#fit-line-6:before{display:none}#fit-line-1:after,#fit-line-2:after,#fit-line-3:after,#fit-line-4:after,#fit-line-5:after,#fit-line-6:after,#fit-line-7:after{border-left:2px dashed #000;content:"";display:block;height:20px;left:50%;position:absolute;top:-20px}#fit-line-3:after,#fit-line-4:after,#fit-line-5:after{border-left:2px dashed #209da7}#fit-line-texts{display:flex;justify-content:space-between;padding:0 70px}#fit-line-texts div:nth-of-type(2){color:#209da7}.margin-top-10{margin-top:10px}.desktop-hidden{display:none}#cta-link{cursor:pointer;font-size:20px;margin:auto;text-decoration:underline;width:150px}.powered-by{align-items:center;display:flex;justify-content:center;margin-top:10px}@media screen and (max-width:599px){#fit-outline-inner,#fit-outline-inner-left,#fit-outline-inner-right{height:400px}#fit-outline-inner{flex-shrink:0;overflow:hidden}#fit-title{margin-top:0}#fit-outline-container{margin-top:-50px;transform:scale(.7)}.fit-line-item{font-size:10px;font-weight:500}.fit-outline-line-text{font-size:16px;line-height:31px}.fit-outline-line-chest-text,.fit-outline-line-n-waist-text{left:-11px;width:auto}.fit-outline-line-p-waist-text{right:-10px;width:auto}.fit-outline-line-h-hip-text,.fit-outline-line-l-hip-text{left:-3px;width:auto}.fit-outline-line-thigh-text{right:3px;width:auto}#fit-line{margin-top:10px}#fit-line-texts{font-size:12px;padding:0 15px}#cta-section{margin-top:-30px}#fit-line-2:before,#fit-line-6:before,.desktop-hidden{display:block}#fit-line-1:after,#fit-line-2:after,#fit-line-3:after,#fit-line-4:after,#fit-line-5:after,#fit-line-6:after,#fit-line-7:after,.mobile-hidden{display:none}}');Pp(".tfr-home-button-container{display:flex;flex-wrap:wrap;margin:20px}.tfr-home-button-container>button{border:0;cursor:pointer;height:60px;margin:20px;width:200px}.tfr-home-button-container>button:hover{background-color:#e6e6e6}[data-tfr=hidden]{display:none}.tfr-modal{background-color:rgba(0,0,0,.53);display:flex;height:100%;left:0;position:fixed;top:0;width:100%;z-index:10000}.tfr-modal-content{margin:0 auto;text-align:center;width:90%}.tfr-modal-content-flex{align-items:center;display:flex}.tfr-modal-content-container{background-color:#fff;border:1px solid #434343;border-radius:0;box-shadow:0 6px 6px #00000029;line-height:normal;max-height:100vh;max-width:850px;overflow:auto;width:100%}#tfr-close-container{padding-right:10px}.tfr-close-container{text-align:end}.tfr-close{color:#aaa;font-size:28px;font-weight:700;height:50px;width:50px}.tfr-close:focus,.tfr-close:hover{color:#000;text-decoration:none}.tfr-cursor:hover{cursor:pointer}.tfr-underline{text-decoration:underline}.tfr-standard-button{border:0;border-radius:3px;color:#fff;height:43px;width:138px}.tfr-logo-container{align-items:center;display:flex}.tfr-modal-title-logo-container{align-items:center;display:flex;justify-content:center}.tfr-girl-clothes{display:inline-block;height:316px;width:253px}.tfr-t-a-center{text-align:center}.tfr-w-70-p{width:70%}.tfr-w-80-p{width:80%}.tfr-w-85-p{width:85%}.tfr-w-150{width:150px}.tfr-h-150{height:150px}.tfr-d-none{display:none}.tfr-d-block{display:block}.tfr-d-flex{display:flex}.tfr-how-it-works-item{align-items:center;display:flex;justify-items:center}.tfr-try-on-content{margin-left:60px}#tfr-tryon-image{max-width:30vw}.progress-bar{background-color:#fff;border:1px solid #bdbdbd;height:10px;margin:15px auto 0;width:55%}.progress-bar-fill{animation-duration:120s;animation-name:progress;background-color:#209da7;color:#fff;display:block;font-size:16px;height:100%;text-align:center;transition:width .6s linear}#tfr-video{height:100%;max-height:350px;max-width:350px}.tfr-logo-box{display:flex;margin:auto;max-height:400px;max-width:860px;padding:20px}.tfr-flex,.tfr-logo-box{align-items:center;justify-content:center}.tfr-qr-code{width:200px}.tfr-space-above{margin-top:10px}.tfr-max-w-600{margin:auto;max-width:600px}#tfr-qr-border-box{align-items:center;border:2px solid var(--tfr-brand-color);border-radius:16px;display:flex;flex-direction:column;height:350px;justify-content:center;margin-left:20px;padding:0 30px;width:300px}.tfr-mobile-logo{height:60px}#email-input,#password-input{font-size:16px}.tfr-door-icon,.tfr-user-icon{color:#209da7}.tfr-logged-in,.tfr-toggle-closed{display:none}.tfr-flex{display:flex}.tfr-gap{gap:4px}.tfr-items-center{align-items:center}.tfr-mb-2{margin-bottom:8px}#tfr-logged-out-overlay-container{position:relative}#tfr-logged-out-overlay{align-items:center;background:hsla(0,0%,100%,.8);bottom:0;display:flex;font-size:16px;font-weight:700;justify-content:center;left:0;line-height:16px;position:absolute;right:0;text-align:center;top:0}.tfr-slider-wrapper{align-items:center;display:flex;flex-direction:column}#tfr-slider{accent-color:var(--tfr-brand-color)}");Pp("input{border:none;box-shadow:none!important;width:100%}input:focus,select:focus,textarea:focus{border:none;outline:none}.tfr-fieldset{margin-left:auto;margin-right:auto;width:65%}.tfr-fieldset,.tfr-fieldset-inline{border-color:rgba(0,0,0,.5);border-radius:10px;border-width:1px;padding:5px 10px 10px;text-align:left}.tfr-fieldset-inline{margin-right:10px;width:250px}.tfr-fieldset-err{border-color:red}");Pp(".lds-ellipsis{display:inline-block;height:80px;position:relative;width:80px}.lds-ellipsis div{animation-timing-function:cubic-bezier(0,1,1,0);background:var(--tfr-brand-color);border-radius:50%;display:block;height:13px;position:absolute;top:33px;width:13px}.lds-ellipsis div:first-child{animation:lds-ellipsis1 .6s infinite;left:8px}.lds-ellipsis div:nth-child(2){animation:lds-ellipsis2 .6s infinite;left:8px}.lds-ellipsis div:nth-child(3){animation:lds-ellipsis2 .6s infinite;left:32px}.lds-ellipsis div:nth-child(4){animation:lds-ellipsis3 .6s infinite;left:56px}@keyframes lds-ellipsis1{0%{transform:scale(0)}to{transform:scale(1)}}@keyframes lds-ellipsis3{0%{transform:scale(1)}to{transform:scale(0)}}@keyframes lds-ellipsis2{0%{transform:translate(0)}to{transform:translate(24px)}}");Pp("@media screen and (max-width:702px){.tfr-modal-title-logo-container{display:flex;flex-direction:column}}@media screen and (min-width:600px){.tfr-modal-content-container{border-radius:10px;height:auto;margin:auto;width:100%}}@media screen and (max-width:599px){#tfr-size-recommendations{width:calc(100vw - 30px)!important}.tfr-mobile-small-text{font-size:12px}.tfr-mobile-hidden{display:none}.tfr-modal-content{overflow:hidden}.tfr-modal-content-container{max-height:none;max-width:100vw;min-height:100vh;min-width:100vw}.trf-logo-title{margin-bottom:10px}.tfr-modal-content-flex{overflow:auto}}@media screen and (max-width:500px){.tfr-fieldset{width:90%}.tfr-how-it-works-item{flex-direction:column}.tfr-try-on-content{margin-left:0;margin-top:20px}}@media screen and (max-height:800px){.tfr-video-responsive{height:280px!important}}");Pp('#tfr-size-recommendations{align-items:center;background-color:var(--tfr-main-bg-color);border:var(--tfr-main-border-width) solid var(--tfr-main-border-color);border-radius:var(--tfr-main-border-radius);color:var(--tfr-dark);display:flex;flex-direction:column;font-family:var(--tfr-main-font);justify-content:center;padding:var(--tfr-main-v-padding) var(--tfr-main-h-padding);width:var(--tfr-main-width)}#tfr-size-recommendations-container{align-items:center;display:none;flex-direction:column;justify-content:center;position:relative;width:100%}#tfr-size-rec-select-container{align-items:center;display:none;flex-direction:column;font-size:13px;width:100%}#tfr-size-rec-title{align-items:center;display:flex;font-family:var(--tfr-title-font);margin-bottom:8px}#tfr-size-rec-title-toggle{color:var(--tfr-grey);cursor:pointer;position:absolute;right:0;top:0;transition:all .3s ease}.tfr-chevron-up{transform:rotate(180deg) scaleY(.6)}.tfr-chevron-down{transform:rotate(0deg) scaleY(.6)}#tfr-info-icon{cursor:pointer}#tfr-size-rec-subtitle{border-bottom:2px solid #000;font-size:18px;font-weight:700;text-align:center;width:100%}#tfr-size-rec-title{font-size:14px}#tfr-size-rec-table{display:flex;flex-direction:column;font-size:12px;padding:0 10px;width:100%}.tfr-size-rec-table-row:first-of-type{border-top-width:0}.tfr-size-rec-table-row{align-items:center;border-top:var(--tfr-main-border-width) solid var(--tfr-main-border-color);display:flex;font-family:var(--tfr-row-font);justify-content:center;min-height:40px}.tfr-size-rec-table-cell-left,.tfr-size-rec-table-cell-right{flex:1 1 0px}.tfr-size-rec-table-cell-left{flex-grow:1;padding-left:8px;padding-right:8px;text-align:right}.tfr-size-rec-table-cell-right{flex-grow:1;padding-left:8px;padding-right:8px;text-align:left}.tfr-size-rec-table-cell-right.perfect{color:var(--tfr-brand-color)}#tfr-size-rec-size{display:inline-block}#tfr-size-rec-size>.tfr-size-rec-login-cta{font-weight:500;margin-left:10px}.tfr-size-rec-login-cta,.tfr-size-rec-table-cell-right{font-size:12px}.tfr-size-rec-login-cta{color:var(--tfr-muted);display:flex;width:150px}#tfr-size-rec-action-login,#tfr-size-rec-action-logout{display:none;font-family:var(--tfr-cta-font)}#tfr-size-rec-action{cursor:pointer;font-size:16px;text-decoration:underline}#tfr-size-rec-select{background-color:var(--tfr-size-selector-bg-color);border-color:var(--tfr-size-selector-border-color);border-radius:var(--tfr-size-selector-button-radius);border-style:solid;border-width:var(--tfr-size-selector-border-width);box-shadow:var(--tfr-size-selector-button-shadow);color:var(--tfr-size-selector-text-color);display:none;font-size:var(--tfr-size-selector-font-size);font-weight:var(--tfr-size-selector-font-weight);margin-bottom:20px;margin-top:10px}#tfr-size-rec-select,.tfr-size-rec-select-button{align-items:center;height:var(--tfr-size-selector-button-height);justify-content:center}.tfr-size-rec-select-button{cursor:pointer;display:flex;transition:all .15s ease-in;width:80px}.tfr-size-rec-select-button:hover:not(.active):not(.tfr-disabled){background-color:var(--tfr-size-selector-bg-color-hover);opacity:.7}.tfr-size-rec-select-button.active{background-color:var(--tfr-size-selector-bg-color-active);border-color:var(--tfr-size-selector-button-active-border-color);border-style:solid;border-width:var(--tfr-size-selector-button-active-border-width);height:var(--tfr-size-selector-button-active-height)}.tfr-size-rec-select-button.active,.tfr-size-rec-select-button:first-of-type{border-bottom-left-radius:var(--tfr-size-selector-button-radius);border-top-left-radius:var(--tfr-size-selector-button-radius)}.tfr-size-rec-select-button.active,.tfr-size-rec-select-button:last-of-type{border-bottom-right-radius:var(--tfr-size-selector-button-radius);border-top-right-radius:var(--tfr-size-selector-button-radius)}.tfr-powered-by{align-items:center;display:flex;font-size:10px;margin-top:10px}.tfr-powered-by-logo{margin:0 4px}.tfr-powered-by-logo,.tfr-powered-by-logo img,.tfr-powered-by-logo svg{height:24px;width:12px}.tfr-powered-by-text-bold{font-weight:700}#tfr-size-recommendation-error{color:#8d0000;display:none}#tfr-sign-in-nav{margin-bottom:80px}.tfr-disabled{cursor:default}#tfr-login-to-view{cursor:pointer}.tfr-try-on-button{align-items:center;background-color:var(--tfr-size-selector-bg-color-active);border-color:var(--tfr-size-selector-border-color);border-radius:var(--tfr-size-selector-button-radius);border-style:solid;border-width:var(--tfr-size-selector-border-width);box-shadow:var(--tfr-size-selector-button-shadow);color:var(--tfr-size-selector-text-color);cursor:pointer;display:flex;font-size:var(--tfr-size-selector-font-size);font-weight:var(--tfr-size-selector-font-weight);height:var(--tfr-size-selector-button-height);justify-content:center;margin-bottom:10px;margin-top:20px;max-width:200px;position:relative;transition:all .15s ease-in;width:100%}.tfr-try-on-button.loading,.tfr-try-on-button:disabled{cursor:not-allowed;opacity:.7}.tfr-try-on-button.hide{display:none}.tfr-try-on-button.loading:after{animation:spin 1s linear infinite;border:2px solid var(--tfr-size-selector-text-color);border-radius:50%;border-top:2px solid transparent;content:"";height:16px;margin-left:8px;position:absolute;width:16px}@keyframes spin{to{transform:rotate(1turn)}}');Pp(".tfr-mt-10{margin-top:10px}.tfr-mt-20{margin-top:20px}.tfr-mt-15{margin-top:15px}.tfr-mt-30{margin-top:30px}.mt-40{margin-top:40px}.tfr-mb-40{margin-bottom:40px}.tfr-mb-20{margin-bottom:20px}.tfr-mr-10{margin-right:10px}.tfr-mr-15{margin-right:15px}.tfr-mt-50{margin-top:50px}.tfr-mt-60{margin-top:60px}.tfr-mb-60{margin-bottom:60px}.tfr-mr-20{margin-right:20px}.tfr-mt-15-p{margin-top:15%}.tfr-mb-13-p{margin-bottom:13%}.tfr-m-h-auto{margin-left:auto;margin-right:auto}.tfr-pt-20{padding-top:20px}.tfr-pb-50{padding-bottom:50px}.tfr-p-20{padding:20px 10px}.tfr-pr-20{padding-right:20px}.tfr-pl-20{padding-left:20px}.tfr-pb-7-p{padding-bottom:7%}");Pp(".flag-container{bottom:0;left:0;padding:1px;right:0;right:auto;top:0}.flag-container:hover{cursor:pointer}.selected-flag{align-items:center;display:flex;height:100%;padding:0 6px 0 8px;position:relative;z-index:1}.flag.bd{background-position:-418px 0;height:12px}.arrow{border-left:6px solid transparent;border-right:6px solid transparent;border-top:6px solid #555;height:0;margin-left:6px;width:0}.arrow-up{border-bottom:6px solid #555;border-top:none}.country-list{-webkit-overflow-scrolling:touch;background-color:#fff;border-radius:5px;box-shadow:0 8px 10px 1px rgba(57,64,78,.7),0 3px 14px 2px rgba(57,64,78,.7),0 5px 5px -3px rgba(57,64,78,.7);cursor:pointer;display:none;font-size:16px;line-height:18px;list-style:none;margin:0 0 0 -1px;max-height:500px;overflow:auto;padding:0;position:absolute;text-align:left;top:50%;transform:translateY(-50%);white-space:nowrap;width:100%;width:auto;z-index:2}.country-list.active{display:inline-block}.country{outline:0;padding:5px 26px 5px 15px}.country-list .divider{border-bottom:1px solid rgba(0,0,0,.12);margin-bottom:5px;padding-bottom:5px}.country.highlight{background-color:#c7cace}.flag-box{display:inline-block;width:20px}.country-name,.flag-box{margin-right:6px}.country-name,.dial-code,.flag-box{vertical-align:middle}");Pp(".tfr-title-font{font-family:Poppins,sans-serif}.tfr-body-font{font-family:Roboto,sans-serif}.tfr-light-24-300{font-size:24px;font-weight:300}.tfr-light-24-500{font-size:24px;font-weight:500}.tfr-light-22-300{font-size:22px;font-weight:300}.tfr-light-16-300{font-size:16px;font-weight:300}.tfr-medium-16-default{font-size:16px}.tfr-12-default{font-size:12px}.tfr-14-default{font-size:14px}.tfr-16-default{font-size:16px}.tfr-24-bold{font-size:24px;font-weight:700}");Pp(":root{--tfr-brand-color:#209da7;--tfr-black:#000;--tfr-red:red;--tfr-white:#fff;--tfr-muted:#a7a7a7;--tfr-dark:#121212;--tfr-grey:#878787;--tfr-light-grey:#dbdcdc;--tfr-dark-grey:#3f3f3f;--tfr-main-border-color:hsla(0,0%,7%,.55);--tfr-main-border-radius:0;--tfr-main-border-width:1px;--tfr-main-bg-color:inherit;--tfr-main-width:440px;--tfr-main-v-padding:14px;--tfr-main-h-padding:20px;--tfr-main-font:inherit;--tfr-title-font:var(--tfr-main-font);--tfr-subtitle-font:var(--tfr-main-font);--tfr-row-font:var(--tfr-main-font);--tfr-cta-font:var(--tfr-main-font);--tfr-size-selector-text-color:var(--tfr-white);--tfr-size-selector-font-size:14px;--tfr-size-selector-font-weight:400;--tfr-size-selector-border-color:transparent;--tfr-size-selector-border-width:0;--tfr-size-selector-bg-color:var(--tfr-grey);--tfr-size-selector-bg-color-hover:var(--tfr-dark-grey);--tfr-size-selector-bg-color-active:var(--tfr-dark);--tfr-size-selector-button-height:35px;--tfr-size-selector-button-active-height:45px;--tfr-size-selector-button-active-border-color:transparent;--tfr-size-selector-button-active-border-width:0;--tfr-size-selector-button-radius:8px;--tfr-size-selector-button-shadow:0 4px 4px 0 rgba(0,0,0,.3)}");const Dp='\n<svg class="tfr-door-icon" width="68" height="124" viewBox="0 0 68 124" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M0.911938 0L67.4819 17.09V106.49L0.911938 123.51V0Z" fill="currentColor">\n </path>\n <path d="M52.8019 64.44C54.7791 64.44 56.3819 62.4387 56.3819 59.97C56.3819 57.5013 54.7791 55.5 52.8019 55.5C50.8248 55.5 49.2219 57.5013 49.2219 59.97C49.2219 62.4387 50.8248 64.44 52.8019 64.44Z" fill="white">\n</path>\n</svg>',Mp='<svg class="tfr-user-icon" width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">\n <g clip-path="url(#clip0_82_11365)">\n <path fill-rule="evenodd" clip-rule="evenodd"\n d="M4.3125 4.78125C4.3125 3.02084 5.73959 1.59375 7.5 1.59375C9.26041 1.59375 10.6875 3.02084 10.6875 4.78125C10.6875 6.54166 9.26041 7.96875 7.5 7.96875C5.73959 7.96875 4.3125 6.54166 4.3125 4.78125ZM9.625 4.78125C9.625 3.60764 8.6736 2.65625 7.5 2.65625C6.32639 2.65625 5.375 3.60764 5.375 4.78125C5.375 5.95485 6.32639 6.90625 7.5 6.90625C8.6736 6.90625 9.625 5.95485 9.625 4.78125Z"\n fill="currentColor" fill-opacity="0.7" />\n <path fill-rule="evenodd" clip-rule="evenodd"\n d="M2.1875 13.1634C2.1875 10.5693 4.58181 8.5 7.5 8.5C10.4182 8.5 12.8125 10.5693 12.8125 13.1634C12.8125 16.1539 2.1875 16.1539 2.1875 13.1634ZM11.75 13.1634C11.75 11.1933 9.86303 9.5625 7.5 9.5625C5.13697 9.5625 3.25 11.1933 3.25 13.1634C3.25 13.7564 4.45689 14.126 5.96113 14.2721L6.31312 14.3019C7.08543 14.3577 7.91457 14.3577 8.68688 14.3019L9.03887 14.2721C10.5431 14.126 11.75 13.7564 11.75 13.1634Z"\n fill="currentColor" fill-opacity="0.7" />\n </g>\n <defs>\n <clipPath id="clip0_82_11365">\n <rect width="16" height="16" fill="white" />\n </clipPath>\n </defs>\n</svg>',zp=e=>({Hook:()=>{const t=document.querySelector(".progress-bar-fill");!function(e,t){let n=0;const i=e/200;t.style.width=n+"%";const r=setInterval(()=>{n>=100?clearInterval(r):(n+=.5,t.style.width=n+"%")},i)}(e.timeoutMS,t)},Unhook:()=>{},Body:()=>`\n <div tfr-element="true" class="tfr-title-font tfr-light-22-300 tfr-c-black tfr-mt-60" > ${pp} </div>\n <div class="progress-bar">\n <span class="progress-bar-fill"></span>\n </div>\n `,useFullModalContent:!0}),Fp=e=>{const t=document.getElementById(e),n=document.querySelector("body");if(!t)throw new Error(`element with id ${e} not found`);let i;const r=e=>e?`\n <div class="tfr-modal-title-logo-container">\n <div tfr-element="true" class="trf-logo-title tfr-title-font tfr-light-24-300 tfr-c-black tfr-mr-10">${Op}</div>\n <div tfr-element="true" class="tfr-logo-container">\n <div class="tfr-mr-15">\n <svg width="26" height="47" viewBox="0 0 68 124" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M0.911938 0L67.4819 17.09V106.49L0.911938 123.51V0Z" fill="#209DA7">\n </path>\n <path d="M52.8019 64.44C54.7791 64.44 56.3819 62.4387 56.3819 59.97C56.3819 57.5013 54.7791 55.5 52.8019 55.5C50.8248 55.5 49.2219 57.5013 49.2219 59.97C49.2219 62.4387 50.8248 64.44 52.8019 64.44Z" fill="white">\n </path>\n </svg>\n </div>\n <div tfr-element="true" class="tfr-title-font tfr-light-24-500 tfr-c-black tfr-mr-10">${Rp}</div>\n </div>\n </div>\n `:"",s=()=>{n.style.overflow="auto",i&&(i.Unhook(),l()),t.style.display="none"},o=e=>{"Escape"===e.key&&s()},a=e=>{const n=t.querySelector("#tfr-modal-background");e.target===n&&(console.debug("container close"),s())},c=()=>{t.querySelector("#tfr-close-container").addEventListener("click",s),document.addEventListener("keydown",o),document.addEventListener("click",a)},l=()=>{var n;const i=t.querySelector("#tfr-close-container");i?i.removeEventListener("click",s):(console.error("#tfr-close-container not found on unhook"),console.debug(null===(n=document.getElementById(e))||void 0===n?void 0:n.innerHTML)),document.removeEventListener("keydown",o),document.removeEventListener("click",a)};return{open:e=>{var s,o;n.style.overflow="hidden",i&&i.Unhook(),t.innerHTML=(s=e.Body(),o=e.useFullModalContent,console.log({useFullModalContent:o}),`\n <div class="tfr-modal" id="tfr-modal-background">\n <div class="tfr-modal-content-container tfr-p-20">\n <div class="tfr-close-container">\n <span id="tfr-close-container" class="tfr-close tfr-cursor">×</span>\n </div>\n\n <div class="tfr-modal-content-flex">\n <div class="tfr-modal-content">\n ${r(o)}\n ${s}\n </div>\n </div>\n </div>\n </div>\n `),c(),e.Hook(),t.style.display="block",i=e},close:s,Content:()=>i}},Up=e=>{const t=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),n=()=>{e.onSignInNav()},i=()=>{window.open("https://apps.apple.com/us/app/the-fitting-room-3d-body-scan/id1577417373","_blank")},r=()=>{window.open("https://play.google.com/store/apps/details?id=com.thefittingroom.marketplace","_blank")},s="https://assets.dev.thefittingroom.xyz/images/";return{Hook:()=>{var e,s,o;if(t||(document.getElementById("tfr-sign-in-nav").style.marginBottom="0"),t){document.getElementById("tfr-video").classList.add("tfr-video-responsive")}null===(e=document.getElementById("tfr-sign-in-nav"))||void 0===e||e.addEventListener("click",n),null===(s=document.getElementById("tfr-app-store"))||void 0===s||s.addEventListener("click",i),null===(o=document.getElementById("tfr-google-play"))||void 0===o||o.addEventListener("click",r)},Unhook:()=>{var e,t,s;null===(e=document.getElementById("tfr-sign-in-nav"))||void 0===e||e.removeEventListener("click",n),null===(t=document.getElementById("tfr-app-store"))||void 0===t||t.removeEventListener("click",i),null===(s=document.getElementById("tfr-google-play"))||void 0===s||s.removeEventListener("click",r)},Body:()=>`\n <div tfr-element="true">\n <div tfr-element="true" class="tfr-title-font tfr-light-16-300 tfr-mt-10">${Lp}</div>\n \n </div>\n <div tfr-element="true" class="tfr-logo-box">\n <video id="tfr-video" controls loop autoplay playsinline>\n <source src="https://assets.dev.thefittingroom.xyz/videos/the-fitting-room.mp4" />\n </video>\n\n ${t?"":`<div id="tfr-qr-border-box">\n <div tfr-element="true" class="tfr-title-font tfr-24-bold">${Ep}</div>\n \n <img src="${s}qr.png" class="tfr-qr-code" />\n\n <div id="tfr-sign-in-nav" tfr-element="true" class="tfr-body-font tfr-mt-20 tfr-16-default tfr-c-black-o5 tfr-underline tfr-cursor">${fp}</div>\n </div>`}\n </div>\n\n ${t?`<div tfr-element="true" class="tfr-title-font tfr-light-16-300 tfr-mt-10 tfr-max-w-600">${op}</div>\n\n <div tfr-element="true" class="tfr-flex tfr-space-above">\n <img class="tfr-mobile-logo" src="${s}apple.png" id="tfr-app-store" />\n <img class="tfr-mobile-logo" src="${s}google.png" id="tfr-google-play" />\n </div>\n \n <div id="tfr-sign-in-nav" tfr-element="true" class="tfr-body-font tfr-mt-20 tfr-16-default tfr-c-black-o5 tfr-underline tfr-cursor">${fp}</div>\n `:""}\n `,useFullModalContent:!0}};class Vp{constructor(e,t,n,i){this.signIn=t,this.forgotPassword=n,this.submitTel=i,this.manager=Fp(e)}close(){this.manager.close()}onSignOut(){this.manager.open((e=>{const t=()=>{e.onNavSignIn("")},n=()=>{e.onClose()};return{Hook:()=>{var e,i;null===(e=document.getElementById("tfr-sign-in"))||void 0===e||e.addEventListener("click",t),null===(i=document.getElementById("tfr-close"))||void 0===i||i.addEventListener("click",n)},Unhook:()=>{var e,i;null===(e=document.getElementById("tfr-sign-in"))||void 0===e||e.removeEventListener("click",t),null===(i=document.getElementById("tfr-close"))||void 0===i||i.removeEventListener("click",n)},Body:()=>`\n <div tfr-element="true" class="tfr-title-font tfr-light-22-300 tfr-mt-15-p tfr-mb-13-p">${Ap}</div>\n <div class="tfr-t-a-center">\n <span id="tfr-sign-in" tfr-element="true" class="tfr-body-font tfr-16-default tfr-c-black-o5 tfr-underline tfr-cursor tfr-mr-20">${Ip}</span>\n <span id="tfr-close" tfr-element="true" class="tfr-body-font tfr-16-default tfr-c-black-o5 tfr-underline tfr-cursor" >${_p}</span>\n </div>\n `,useFullModalContent:!0}})({onNavSignIn:()=>this.toSignIn(),onClose:()=>this.close()}))}onNotCreated(){this.manager.open({Body:()=>`\n <div tfr-element="true" class="tfr-title-font tfr-light-22-300 tfr-c-black tfr-mt-60">${cp}</div>\n <div tfr-element="true" class="tfr-title-font tfr-light-22-300 tfr-c-black tfr-mb-60">${Sp}</div>\n `,Hook:()=>{},Unhook:()=>{},useFullModalContent:!0})}onLoading(){this.manager.open(zp({timeoutMS:1e4}))}toScan(){this.manager.open(Up({onSignInNav:()=>this.toSignIn(),onTelSubmit:e=>this.submitTel(e)}))}toSignIn(){this.manager.open((e=>{const{email:t}=e,n=t=>{t.preventDefault();const n=document.getElementById("email-input").value,i=document.getElementById("password-input").value;s(),e.onSignIn(n,i,o)},i=()=>{const t=document.getElementById("email-input").value;e.onNavForgotPassword(t)},r=()=>{e.onNavScanCode()},s=()=>{document.querySelectorAll(".tfr-fieldset-element").forEach(e=>{e.classList.remove("tfr-fieldset-err")}),document.querySelectorAll(".tfr-label-element").forEach(e=>{e.classList.remove("tfr-c-red")});const e=document.querySelector("#tfr-form-error");e.classList.remove("tfr-d-block"),e.innerHTML=""},o=e=>{document.querySelectorAll(".tfr-fieldset-element").forEach(e=>{e.classList.add("tfr-fieldset-err")}),document.querySelectorAll(".tfr-label-element").forEach(e=>{e.classList.add("tfr-c-red")});const t=document.querySelector("#tfr-form-error");t.innerHTML=e||"Something went wrong",t.classList.add("tfr-d-block")};return{Hook:()=>{var e,t,s,o;null===(e=document.getElementById("tfr-sign-in-form"))||void 0===e||e.addEventListener("submit",n),null===(t=document.getElementById("tfr-sign-in"))||void 0===t||t.addEventListener("click",n),null===(s=document.getElementById("tfr-forgot-password"))||void 0===s||s.addEventListener("click",i),null===(o=document.getElementById("tfr-scan-code"))||void 0===o||o.addEventListener("click",r)},Unhook:()=>{var e,t,s,o;null===(e=document.getElementById("tfr-sign-in-form"))||void 0===e||e.removeEventListener("submit",n),null===(t=document.getElementById("tfr-sign-in"))||void 0===t||t.removeEventListener("click",n),null===(s=document.getElementById("tfr-forgot-password"))||void 0===s||s.removeEventListener("click",i),null===(o=document.getElementById("tfr-scan-code"))||void 0===o||o.removeEventListener("click",r)},Body:()=>`\n <form id="tfr-sign-in-form">\n <div class="tfr-title-font tfr-light-22-300 tfr-mt-10">${Cp}</div>\n\n <fieldset class="tfr-fieldset-element tfr-fieldset tfr-mt-20">\n <legend tfr-element="true" class="tfr-label-element tfr-body-font tfr-14-default tfr-c-black-o5">${lp}</legend>\n <input tfr-element="true" type="email" id="email-input" value="${t||""}" />\n </fieldset>\n\n <fieldset class="tfr-fieldset-element tfr-fieldset tfr-mt-20">\n <legend tfr-element="true" class="tfr-label-element tfr-body-font tfr-14-default tfr-c-black-o5">${yp}</legend>\n <input tfr-element="true" type="password" id="password-input" />\n </fieldset>\n\n <div tfr-element="true" class="tfr-body-font tfr-12-default tfr-c-red tfr-mt-10 tfr-d-none" id="tfr-form-error"></div>\n\n <div class="tfr-mt-20">\n <span id="tfr-forgot-password" tfr-element="true" class="tfr-body-font tfr-14-default tfr-c-black-o5 tfr-underline tfr-cursor tfr-mr-15">${dp}</span>\n <span id="tfr-scan-code" tfr-element="true" class="tfr-body-font tfr-14-default tfr-c-black-o5 tfr-underline tfr-cursor">${ap}</span>\n </div>\n\n <button id="tfr-sign-in" tfr-element="true" class="tfr-standard-button tfr-c-brand-bg tfr-c-whitetfr-title-font tfr-medium-16-default tfr-cursor tfr-mt-30" id="sign-in-button" type="submit">\n ${Cp}\n </button>\n </form>\n `,useFullModalContent:!0}})({onSignIn:this.signIn,onNavForgotPassword:()=>this.toForgotPassword(),onNavScanCode:()=>this.toScan()}))}toForgotPassword(){this.manager.open((e=>{const t=()=>{const t=document.getElementById("tfr-email").value;e.onNavSignIn(t)},n=()=>{const t=document.getElementById("tfr-email").value;e.onPasswordReset(t)};return{Hook:()=>{var e,i;null===(e=document.getElementById("tfr-send-password-reset"))||void 0===e||e.addEventListener("click",n),null===(i=document.getElementById("tfr-back-to-signin"))||void 0===i||i.addEventListener("click",t)},Unhook:()=>{var e,i;null===(e=document.getElementById("tfr-send-password-reset"))||void 0===e||e.removeEventListener("click",n),null===(i=document.getElementById("tfr-back-to-signin"))||void 0===i||i.removeEventListener("click",t)},Body:()=>`\n <div tfr-element="true" class="tfr-title-font tfr-light-16-300 tfr-mt-20 tfr-w-70-p tfr-m-h-auto">${hp}</div>\n <fieldset class="tfr-fieldset-element tfr-fieldset tfr-mt-30">\n <legend tfr-element="true" class="tfr-label-element tfr-body-font tfr-14-default tfr-c-black-o5">${lp}</legend>\n <input tfr-element="true" type="email" id="tfr-email" />\n </fieldset>\n <div tfr-element="true" class="tfr-body-font tfr-12-default tfr-c-red tfr-mt-10 tfr-d-none" id="error-msg"></div>\n <div id="tfr-back-to-signin" tfr-element="true" class="tfr-body-font tfr-12-default tfr-c-black-o5 tfr-underline tfr-cursor tfr-mt-30">${sp}</div>\n <button id="tfr-send-password-reset" tfr-element="true" class="tfr-standard-button tfr-c-brand-bg tfr-c-whitetfr-title-font tfr-medium-16-default tfr-cursor tfr-mt-30">\n ${Tp}\n </button>\n `,useFullModalContent:!0}})({onNavSignIn:()=>this.toSignIn(),onPasswordReset:this.forgotPassword}))}toPasswordReset(){}onTryOn(e){this.manager.open((e=>{let t=()=>{};const i=()=>{e.onNavBack()},r=()=>{e.onClose()};return{Hook:()=>{var s,o;const a=document.getElementById("tfr-tryon-image"),c=n("tfr-slider",(e,t)=>{console.debug("slider change",e,t),a.src=t});if(Array.isArray(e.frames)&&e.frames.length>0){const n=c.Load(e.frames);if(n instanceof Error)return void console.error(n);t=n}null===(s=document.getElementById("tfr-back"))||void 0===s||s.addEventListener("click",i),null===(o=document.getElementById("tfr-close"))||void 0===o||o.addEventListener("click",r)},Unhook:()=>{var e,n;t(),null===(e=document.getElementById("tfr-back"))||void 0===e||e.removeEventListener("click",i),null===(n=document.getElementById("tfr-close"))||void 0===n||n.removeEventListener("click",r)},Body:()=>'\n <div class="tfr-slider-wrapper">\n\t\t\t\t<img id="tfr-tryon-image" src="" />\n\t\t\t\t<input type="range" id="tfr-slider" />\n\t\t\t\t</div>\n ',useFullModalContent:!0}})({frames:e,onClose:()=>this.close(),onNavBack:()=>this.navBack()}))}onError(e){this.manager.open((e=>{const{error:t}=e,n=()=>{e.onNavBack()},i=()=>{e.onClose()};return{Hook:()=>{var e,t;null===(e=document.getElementById("tfr-back"))||void 0===e||e.addEventListener("click",n),null===(t=document.getElementById("tfr-close"))||void 0===t||t.addEventListener("click",i)},Unhook:()=>{var e,t;null===(e=document.getElementById("tfr-back"))||void 0===e||e.removeEventListener("click",n),null===(t=document.getElementById("tfr-close"))||void 0===t||t.removeEventListener("click",i)},Body:()=>(t||console.error("ErrorModal: No error provided"),`\n <div class="tfr-mt-15-p tfr-mb-13-p">\n <div tfr-element="true" class="tfr-title-font tfr-light-22-300 tfr-c-black">${t||kp}</div>\n </div>\n\n <div class="tfr-t-a-center">\n <span id="tfr-back" tfr-element="true" class="tfr-body-font tfr-16-default tfr-c-black-o5 tfr-underline tfr-cursor tfr-mr-20">${wp}</span>\n <span id="tfr-close" tfr-element="true" class="tfr-body-font tfr-16-default tfr-c-black-o5 tfr-underline tfr-cursor" id="returnToSite">${bp}</span>\n </div>\n `),useFullModalContent:!0}})({error:e,onClose:()=>this.close(),onNavBack:()=>this.navBack()}))}onSizeError(e,t){this.manager.open((e=>{const t=()=>{e.onNavBack()},n=()=>{e.onClose()};return{Hook:()=>{var e,i;null===(e=document.getElementById("tfr-back"))||void 0===e||e.addEventListener("click",t),null===(i=document.getElementById("tfr-close"))||void 0===i||i.addEventListener("click",n)},Unhook:()=>{var e,i;null===(e=document.getElementById("tfr-back"))||void 0===e||e.removeEventListener("click",t),null===(i=document.getElementById("tfr-close"))||void 0===i||i.removeEventListener("click",n)},Body:()=>{var t,n,i;return console.debug("rendering size error modal",e),`\n <div class="tfr-mt-15-p tfr-mb-13-p">\n <div tfr-element="true" class="tfr-title-font tfr-light-22-300 tfr-c-black">\n\t\t\t\t\t\t\t${gp} ${null===(t=e.sizes)||void 0===t?void 0:t.recommended} ${mp} ${null===(i=null===(n=e.sizes)||void 0===n?void 0:n.available)||void 0===i?void 0:i.join(" or ")}\n\t\t\t\t\t\t</div>\n </div>\n\n <div class="tfr-t-a-center">\n <span id="tfr-back" tfr-element="true" class="tfr-body-font tfr-16-default tfr-c-black-o5 tfr-underline tfr-cursor tfr-mr-20">${wp}</span>\n <span id="tfr-close" tfr-element="true" class="tfr-body-font tfr-16-default tfr-c-black-o5 tfr-underline tfr-cursor">${bp}</span>\n </div>\n `},useFullModalContent:!0}})({sizes:{recommended:e,available:t},onClose:()=>this.close(),onNavBack:()=>this.navBack()}))}toFitInfo(){this.manager.open((e=>{const t=()=>e.onSignInNav();return{Hook:()=>{document.getElementById("cta-link").addEventListener("click",t)},Unhook:()=>{document.getElementById("cta-link").removeEventListener("click",t)},Body:()=>`\n <div>\n <div id="fit-title">Fit Scale</div>\n\n <div id="fit-line-container">\n <div id="fit-line-text-container">\n <div class="fit-line-item mobile-hidden">Too Tight</div>\n\n <div class="fit-line-item">\n <div>Tight <span class="light-text">or</span><br /> More fitted</div>\n\n <div class="desktop-hidden margin-top-10">Too Tight</div>\n </div>\n\n <div class="fit-line-item fit-line-item-green">Slightly tight <br /><span class="light-text">or</span> Fitted</div>\n <div class="fit-line-item fit-line-item-green">Perfect Fit</div>\n <div class="fit-line-item fit-line-item-green">Slightly loose <br /><span class="light-text">or</span> Less fitted</div>\n\n <div class="fit-line-item">\n <div>Loose <span class="light-text">or</span><br /> Not fitted</div>\n\n <div class="desktop-hidden margin-top-10">Oversized</div>\n </div>\n\n <div class="fit-line-item mobile-hidden">Oversized</div>\n </div>\n\n <div id="fit-line">\n <div id="fit-line-1" class="mobile-hidden"> </div>\n <div id="fit-line-2"> </div>\n <div id="fit-line-3"> </div>\n <div id="fit-line-4"> </div>\n <div id="fit-line-5"> </div>\n <div id="fit-line-6"> </div>\n <div id="fit-line-7" class="mobile-hidden"> </div>\n </div>\n\n <div id="fit-line-texts">\n <div>Poor Fit</div>\n <div>Acceptable Fit</div>\n <div>Poor Fit</div>\n </div>\n </div>\n\n <div id="fit-subtitle-mobile" class="desktop-hidden">Measurement Points</div>\n\n <div id="fit-outline-container">\n <div id="fit-outline-inner-left">\n <div class="fit-outline-line-text fit-outline-line-p-waist-text">Pant Waist</div>\n <div class="fit-outline-line-text fit-outline-line-thigh-text">Thigh</div>\n </div>\n\n <div id="fit-outline-inner">\n <div class="fit-outline-line fit-outline-line-chest"></div>\n <div class="fit-outline-line fit-outline-line-n-waist"></div>\n <div class="fit-outline-line fit-outline-line-p-waist"></div>\n <div class="fit-outline-line fit-outline-line-h-hip"></div>\n <div class="fit-outline-line fit-outline-line-l-hip"></div>\n <div class="fit-outline-line fit-outline-line-thigh-l"></div>\n <div class="fit-outline-line fit-outline-line-thigh-r"></div>\n\n <img id="tfr-fit-outline-img" src="https://assets.dev.thefittingroom.xyz/images/fit-outline.png" />\n </div>\n\n <div id="fit-outline-inner-right">\n <div id="fit-subtitle" class="mobile-hidden">Measurement Points</div>\n\n <div class="fit-outline-line-text fit-outline-line-chest-text">Chest/Bust</div>\n <div class="fit-outline-line-text fit-outline-line-n-waist-text">Natural Waist</div>\n <div class="fit-outline-line-text fit-outline-line-h-hip-text">High Hip</div>\n <div class="fit-outline-line-text fit-outline-line-l-hip-text">Low Hip</div>\n </div>\n </div>\n </div>\n\n <div id="cta-section">\n <div id="cta-link">Sign Up or Login</div>\n\n <div class="powered-by">\n <div>Powered by</div>\n <div class="tfr-powered-by-logo">${Dp}</div>\n <div class="tfr-powered-by-text-bold">The Fitting Room</div>\n </div>\n </div>\n `,useFullModalContent:!1}})({onSignInNav:()=>this.toScan(),onClose:()=>this.close()}))}navBack(){window.history.back()}}class Bp{constructor(e,t,n,i,r){this.onSignInClick=t,this.onSignOutClick=n,this.onFitInfoClick=i,this.onTryOnClick=r,this._sku="",this._styleId=null,this.tfrLoggedInElements=[],this.tfrLoggedOutElements=[],this.tfrToggleOpenElements=[],this.tfrToggleClosedElements=[],this.isCollapsed=!1,this.redraw=null,this.init(e)}get sku(){return this._sku}setSku(e){this._sku=e}get styleId(){return this._styleId}setStyleId(e){this._styleId=e}setIsLoggedIn(e){this.tfrSizeRecSelectContainer.style.display="flex",this.tfrSizeRecSelect.style.display="flex",this.tfrSizeHowItFits.style.display="block",e?(this.tfrSizeHowItFits.style.opacity="1",this.tfrSizeRecSelect.style.opacity="1",this.tfrLoggedInElements.forEach(e=>e.style.display="block"),this.tfrLoggedOutElements.forEach(e=>e.style.display="none"),this.tfrSizeRecActionLogin.style.display="none",this.tfrSizeRecActionLogout.style.display="block",this.tfrSizeRecTitle.style.display="flex",this.isCollapsed=!1,this.tfrSizeRecTitleToggle.classList.add("tfr-chevron-up"),this.tfrSizeRecTitleToggle.classList.remove("tfr-chevron-down"),this.tfrSizeRecSelectContainer.style.display="flex",this.tfrSizeRecSelectContainer.style.opacity="1"):(this.tfrSizeHowItFits.style.opacity="0.4",this.tfrSizeRecSelect.style.opacity="0.4",this.tfrLoggedInElements.forEach(e=>e.style.display="none"),this.tfrLoggedOutElements.forEach(e=>e.style.display="block"),this.tfrSizeRecActionLogin.style.display="block",this.tfrSizeRecActionLogout.style.display="none",this.tfrSizeRecTitle.style.display="flex",this.tfrSizeRecommendationError.style.display="none",this.tfrSizeRecommendationError.innerHTML="",this.renderSizeRecSelectLoggedOut())}setLoading(e){e?(this.tfrSizeRecLoading.style.display="block",this.tfrSizeRecommendationsContainer.style.display="none"):(this.tfrSizeRecLoading.style.display="none",this.tfrSizeRecommendationsContainer.style.display="flex")}setGarmentLocations(e){e&&e.length?this.renderGarmentLocations(e):this.tfrSizeRecTitle.style.display="none"}setRecommendedSize({recommended:e,sizes:t}){this.renderSizeRec(e,t)}hide(){this.sizeRecMainDiv&&(this.sizeRecMainDiv.style.display="none")}show(){this.sizeRecMainDiv&&(this.sizeRecMainDiv.style.display="block")}init(e){const t=document.getElementById(e);if(!t)throw new Error("Size rec main div not found");this.sizeRecMainDiv=t,this.render(t),this.setElements(),this.bindEvents()}setElements(){this.tfrSizeHowItFits=document.getElementById("tfr-size-how-it-fits"),this.tfrSizeRecTitle=document.getElementById("tfr-size-rec-title"),this.tfrInfoIcon=document.getElementById("tfr-info-icon"),this.tfrLoginToView=document.getElementById("tfr-login-to-view"),this.tfrSizeRecActionLogin=document.getElementById("tfr-size-rec-action-login"),this.tfrSizeRecActionLogout=document.getElementById("tfr-size-rec-action-logout"),this.tfrSizeRecTable=document.getElementById("tfr-size-rec-table"),this.tfrSizeRecommendationError=document.getElementById("tfr-size-recommendation-error"),this.tfrSizeRecSize=document.getElementById("tfr-size-rec-size"),this.tfrSizeRecSelect=document.getElementById("tfr-size-rec-select"),this.tfrSizeRecLoading=document.getElementById("tfr-size-rec-loading"),this.tfrSizeRecTitleToggle=document.getElementById("tfr-size-rec-title-toggle"),this.tfrSizeRecSelectContainer=document.getElementById("tfr-size-rec-select-container"),this.tfrSizeRecommendationsContainer=document.getElementById("tfr-size-recommendations-container"),this.tfrLoggedInElements=document.querySelectorAll(".tfr-logged-in"),this.tfrLoggedOutElements=document.querySelectorAll(".tfr-logged-out"),this.tfrToggleOpenElements=document.querySelectorAll(".tfr-toggle-open"),this.tfrToggleClosedElements=document.querySelectorAll(".tfr-toggle-closed")}bindEvents(){this.tfrSizeRecActionLogin.addEventListener("click",this.onSignInClick),this.tfrSizeRecActionLogout.addEventListener("click",this.onSignOutClick),this.tfrSizeRecSelect.addEventListener("click",this.onSizeRecSelectClick.bind(this)),this.tfrSizeRecTitleToggle.addEventListener("click",this.toggletSizeRecSelectContainer.bind(this)),this.tfrInfoIcon.addEventListener("click",this.onFitInfoClick),this.tfrLoginToView.addEventListener("click",this.onSignInClick);const e=document.getElementById("tfr-try-on-button");e&&e.addEventListener("click",async()=>{if(e.classList.contains("loading"))return;const t=document.querySelector(".tfr-size-rec-select-button.active");if(!t)return;const n=Number(t.getAttribute("data-size-id"));if(Number.isNaN(n))return;e.classList.add("loading");const i=e.textContent;e.textContent=" ",e.setAttribute("disabled","true");try{const e=Array.from(document.querySelectorAll(".tfr-size-rec-select-button")),i=e.indexOf(t);if(null!==this.styleId){try{await this.onTryOnClick(this.styleId,n,!0)}catch(e){console.error(`Error trying on active size ${n}:`,e)}if(i>0){const t=e[i-1];await this._preloadNeighborVTO(t)}if(i>=0&&i<e.length-1){const t=e[i+1];await this._preloadNeighborVTO(t)}}}catch(e){console.error("Error during sequential try-on process:",e)}finally{e.classList.remove("loading"),e.textContent=i,e.removeAttribute("disabled")}})}async _preloadNeighborVTO(e){var t;const n=Number(e.getAttribute("data-size-id"));if(!Number.isNaN(n))try{await this.onTryOnClick(this.styleId,n,!1)}catch(i){const r=(null===(t=e.textContent)||void 0===t?void 0:t.trim())||"N/A";console.error(`Error pre-loading try-on for size ${n} (button: ${r}):`,i)}}onSizeRecSelectClick(e){const t=e.target;if(!t.classList.contains("tfr-size-rec-select-button")||t.classList.contains("tfr-disabled"))return;e.preventDefault();const n=Number(t.getAttribute("data-index"));if(Number.isNaN(n))return;const i=document.querySelectorAll(".tfr-size-rec-select-button");i.forEach(e=>e.classList.remove("active")),i.item(n).classList.add("active"),this.redraw(n);const r=Number(t.getAttribute("data-size-id"));Number.isNaN(r)||this.onTryOnClick(this.styleId,r,!0)}renderSizeRec(e,t){this.tfrSizeRecSize.innerHTML=` ${e}`;const n=t.findIndex(({size:t})=>t===e);this.redraw=e=>this.renderSizeRecTable(t,e),this.redraw(n),this.renderSizeRecSelect(t,n)}renderSizeRecTable(e,t){const{locations:n}=e[t],i=n.map(({location:e,fit:t,isPerfect:n})=>this.renderSizeRecTableRow(e,t,n)).join("");this.tfrSizeRecTable.innerHTML=i}renderSizeRecSelect(e,t){const n=e.map(({size:e})=>e).map((n,i)=>`<div class="tfr-size-rec-select-button ${i===t?"active":""}" data-index="${i}" data-size-id="${e[i].size_id}">${n}</div>`).join("");this.tfrSizeRecSelect.innerHTML=n}renderSizeRecSelectLoggedOut(){const e=['<div class="tfr-size-rec-select-button tfr-disabled">M</div>','<div class="tfr-size-rec-select-button tfr-disabled active">L</div>','<div class="tfr-size-rec-select-button tfr-disabled">XL</div>'].join("");this.tfrSizeRecSelect.innerHTML=e}renderSizeRecTableRow(e,t,n=!1){return`<div class="tfr-size-rec-table-row">\n <div class="tfr-size-rec-table-cell-left">${e}</div>\n <div class="tfr-size-rec-table-cell-right ${n?"perfect":""}">\n ${t}\n </div>\n </div>`}renderGarmentLocations(e){const t=e.map((e,t)=>this.renderSizeRecTableRow(e,this.randomFit(t),!0)).join(""),n=`<div id="tfr-logged-out-overlay-container">\n <div id="tfr-logged-out-overlay">\n Login to reveal how this item will fit specifically at each area of your body in different sizes\n </div>\n <div>\n ${t}\n </div>\n </div>`;this.tfrSizeRecTable.innerHTML=n}randomFit(e){const t=["Slightly Tight","Perfect Fit","Perfect Fit","Slightly Loose","Perfect Fit"];return t[e%t.length]}toggletSizeRecSelectContainer(){this.isCollapsed?(this.isCollapsed=!1,this.tfrSizeRecTitleToggle.classList.add("tfr-chevron-up"),this.tfrSizeRecTitleToggle.classList.remove("tfr-chevron-down"),this.tfrToggleOpenElements.forEach(e=>e.style.display="block"),this.tfrToggleClosedElements.forEach(e=>e.style.display="none")):(this.isCollapsed=!0,this.tfrSizeRecTitleToggle.classList.remove("tfr-chevron-up"),this.tfrSizeRecTitleToggle.classList.add("tfr-chevron-down"),this.tfrToggleOpenElements.forEach(e=>e.style.display="none"),this.tfrToggleClosedElements.forEach(e=>e.style.display="block"))}render(e){const t=`<div id="tfr-size-recommendations">\n <div id="tfr-size-rec-loading">\n <div class="lds-ellipsis">\n <div></div>\n <div></div>\n <div></div>\n <div></div>\n </div>\n </div>\n <div id="tfr-size-recommendations-container">\n <div id="tfr-size-rec-title-toggle" class="tfr-chevron-up">v</div>\n\n <div class="tfr-logged-out">\n <div class="tfr-flex tfr-gap tfr-mb-2 tfr-mobile-small-text">\n <div>Uncertain of your size?</div>\n \n <div class="tfr-toggle-closed">\n <div class="tfr-flex tfr-items-center">\n <div>Try</div>\n <div class="tfr-powered-by-logo">${Dp}</div>\n <div class="tfr-powered-by-text-bold">The Fitting Room</div>\n </div>\n </div>\n\n <div class="tfr-toggle-open">\n <div id="tfr-login-to-view" class="tfr-flex tfr-items-center">\n ${Mp} Login to view\n </div>\n </div>\n </div>\n </div>\n\n <div class="tfr-logged-in">\n <div id="tfr-size-rec-title">\n Recommended Size:\n <div id="tfr-size-rec-size">\n <div class="tfr-size-rec-login-cta">\n ${Mp} Sign up to view\n </div>\n </div>\n </div>\n </div>\n\n <div class="tfr-toggle-open" style="width: 100%">\n <div id="tfr-size-rec-select-container">\n <div id="tfr-size-how-it-fits">Select size to see how it fits:</div>\n\n <div id="tfr-size-rec-select"></div>\n\n <div id="tfr-size-rec-subtitle">\n How it fits\n <span id="tfr-info-icon"><svg width="13" height="13" viewBox="0 0 13 13" fill="none" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n<rect width="13" height="13" fill="url(#pattern0_641_1375)"/>\n<defs>\n<pattern id="pattern0_641_1375" patternContentUnits="objectBoundingBox" width="1" height="1">\n<use xlink:href="#image0_641_1375" transform="scale(0.00793651)"/>\n</pattern>\n<image id="image0_641_1375" width="126" height="126" xlink:href="data:image/png;base64,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"/>\n</defs>\n</svg>\n</span>\n </div>\n\n <div id="tfr-size-rec-table"></div>\n\n <div id="tfr-try-on-button" class="tfr-try-on-button">Try On</div>\n </div>\n </div>\n\n <div id="tfr-size-rec-action">\n <div id="tfr-size-rec-action-login">Sign up or login</div>\n <div id="tfr-size-rec-action-logout">Log out</div>\n </div>\n\n <div class="tfr-toggle-open">\n <div class="tfr-powered-by">\n <div>Powered by</div>\n <div class="tfr-powered-by-logo">${Dp}</div>\n <div class="tfr-powered-by-text-bold">The Fitting Room</div>\n </div>\n </div>\n </div>\n </div>\n <div id="tfr-size-recommendation-error"></div>`;e.innerHTML=t}}class jp{constructor(e,t,n,i,r,s,o){this.tfrShop=n,this.onSignInClick=i,this.onSignOutClick=r,this.onFitInfoClick=s,this.onTryOnClick=o,this.perfectFits=[ip.Fit.PERFECT_FIT,ip.Fit.SLIGHTLY_LOOSE,ip.Fit.SLIGHTLY_TIGHT],this.setCssVariables(t),this.sizeRecComponent=new Bp(e,this.onSignInClick,this.onSignOutClick,this.onFitInfoClick,this.onTryOnClick)}get sku(){return this.sizeRecComponent.sku}setSku(e){this.sizeRecComponent.setSku(e)}get styleId(){return this.sizeRecComponent.styleId}setStyleId(e){this.sizeRecComponent.setStyleId(e)}setIsLoggedIn(e){this.sizeRecComponent.setIsLoggedIn(e)}async setGarmentLocations(e=[]){this.sizeRecComponent.setLoading(!0);const t=e.length>0?e:await this.getGarmentLocations(e);console.debug("locations",t),console.debug("filledLocations",e),t&&t.length>0&&(this.sizeRecComponent.show(),this.sizeRecComponent.setGarmentLocations(t)),this.sizeRecComponent.setLoading(!1)}async recommendSize(){this.sizeRecComponent.setLoading(!0);const e=await this.getRecommendedSize();if(!e)return console.error("No sizes found for sku"),void this.sizeRecComponent.setLoading(!1);this.sizeRecComponent.show(),this.sizeRecComponent.setRecommendedSize(e),this.sizeRecComponent.setLoading(!1)}async getGarmentLocations(e){try{return await this.tfrShop.getMeasurementLocationsFromSku(this.sku,e)}catch(t){try{const t=await this.tfrShop.getStyleByBrandStyleId(this.sku);if(!t)return console.error("Style not found for brand style ID:",this.sku),this.sizeRecComponent.hide(),null;return await this.tfrShop.getMeasurementLocationsFromBrandStyleId(t.id,e)}catch(e){return console.error(e),this.sizeRecComponent.hide(),null}}}async getRecommendedSize(){try{const e=await this.tfrShop.getColorwaySizeAssetFromSku(this.sku),t=await this.getRecommendedSizes(String(e.style_id));return this.setStyleId(e.style_id),t}catch(e){try{const e=await this.tfrShop.getStyleByBrandStyleId(this.sku);if(!e)return console.error("Style not found for brand style ID:",this.sku),this.sizeRecComponent.hide(),null;const t=await this.getRecommendedSizes(String(e.id));return this.setStyleId(e.id),t}catch(e){return console.error(e),this.sizeRecComponent.hide(),null}}}async getRecommendedSizes(e){const t=await this.tfrShop.getRecommendedSizes(e);return t?{recommended:t.recommended_size.size_value.name,sizes:t.fits.map(e=>({size:t.available_sizes.find(t=>t.id===e.size_id).size_value.name,size_id:e.size_id,locations:e.measurement_location_fits.map(e=>({fit:"string"==typeof e.fit_label&&e.fit_label?e.fit_label:ip.FitNames[e.fit],isPerfect:this.perfectFits.includes(e.fit),location:this.tfrShop.getMeasurementLocationName(e.measurement_location),sortOrder:this.tfrShop.getMeasurementLocationSortOrder(e.measurement_location)})).sort((e,t)=>e.sortOrder<t.sortOrder?-1:1)}))}:null}setCssVariables(e){const t=document.querySelector(":root");e.brandColor&&t.style.setProperty("--tfr-brand-color",e.brandColor),e.black&&t.style.setProperty("--tfr-black",e.black),e.red&&t.style.setProperty("--tfr-red",e.red),e.white&&t.style.setProperty("--tfr-white",e.white),e.muted&&t.style.setProperty("--tfr-muted",e.muted),e.dark&&t.style.setProperty("--tfr-dark",e.dark),e.grey&&t.style.setProperty("--tfr-grey",e.grey),e.lightGrey&&t.style.setProperty("--tfr-light-grey",e.lightGrey),e.mainBorderColor&&t.style.setProperty("--tfr-main-border-color",e.mainBorderColor),e.mainBorderRadius&&t.style.setProperty("--tfr-main-border-radius",e.mainBorderRadius),e.mainBorderWidth&&t.style.setProperty("--tfr-main-border-width",e.mainBorderWidth),e.mainBgColor&&t.style.setProperty("--tfr-main-bg-color",e.mainBgColor),e.mainWidth&&t.style.setProperty("--tfr-main-width",e.mainWidth),e.mainVPadding&&t.style.setProperty("--tfr-main-v-padding",e.mainVPadding),e.mainHPadding&&t.style.setProperty("--tfr-main-h-padding",e.mainHPadding),e.mainFont&&t.style.setProperty("--tfr-main-font",e.mainFont),e.titleFont&&t.style.setProperty("--tfr-title-font",e.titleFont),e.subtitleFont&&t.style.setProperty("--tfr-subtitle-font",e.subtitleFont),e.rowFont&&t.style.setProperty("--tfr-row-font",e.rowFont),e.ctaFont&&t.style.setProperty("--tfr-cta-font",e.ctaFont),e.sizeSelectorTextColor&&t.style.setProperty("--tfr-size-selector-text-color",e.sizeSelectorTextColor),e.sizeSelectorFontSize&&t.style.setProperty("--tfr-size-selector-font-size",e.sizeSelectorFontSize),e.sizeSelectorFontWeight&&t.style.setProperty("--tfr-size-selector-font-weight",e.sizeSelectorFontWeight),e.sizeSelectorBgColor&&t.style.setProperty("--tfr-size-selector-bg-color",e.sizeSelectorBgColor),e.sizeSelectorBorderColor&&t.style.setProperty("--tfr-size-selector-border-color",e.sizeSelectorBorderColor),e.sizeSelectorBorderWidth&&t.style.setProperty("--tfr-size-selector-border-width",e.sizeSelectorBorderWidth),e.sizeSelectorBgColorHover&&t.style.setProperty("--tfr-size-selector-bg-color-hover",e.sizeSelectorBgColorHover),e.sizeSelectorBgColorActive&&t.style.setProperty("--tfr-size-selector-bg-color-active",e.sizeSelectorBgColorActive),e.sizeSelectorButtonHeight&&t.style.setProperty("--tfr-size-selector-button-height",e.sizeSelectorButtonHeight),e.sizeSelectorButtonActiveHeight&&t.style.setProperty("--tfr-size-selector-button-active-height",e.sizeSelectorButtonActiveHeight),e.sizeSelectorButtonActiveBorderColor&&t.style.setProperty("--tfr-size-selector-button-active-border-color",e.sizeSelectorButtonActiveBorderColor),e.sizeSelectorButtonActiveBorderWidth&&t.style.setProperty("--tfr-size-selector-button-active-border-width",e.sizeSelectorButtonActiveBorderWidth),e.sizeSelectorButtonRadius&&t.style.setProperty("--tfr-size-selector-button-radius",e.sizeSelectorButtonRadius),e.sizeSelectorButtonShadow&&t.style.setProperty("--tfr-size-selector-button-shadow",e.sizeSelectorButtonShadow)}}var Hp;!function(e){e.NOT_CREATED="NOT_CREATED",e.CREATED="CREATED",e.PENDING="PENDING"}(Hp||(Hp={}));class $p{constructor(e,t,n,i,r={},s,o){this.shopId=e,this.hooks=r,this.isLoggedIn=!1,this.unsub=null;const a=o||("undefined"!=typeof process?process.env.NODE_ENV:"dev");console.log("tfr-env",a),this.tfrModal=new Vp(t,this.signIn.bind(this),this.forgotPassword.bind(this),this.submitTel.bind(this)),this.tfrShop=((e,t="dev")=>("dev"!==t&&"development"!==t||console.warn("TfrShop is in development mode"),Ql.getInstance().setEnv(t),new Gf(e,new jf)))(Number(this.shopId),a),this.tfrSizeRec=new jp(n,s,this.tfrShop,this.onSignInClick.bind(this),this.signOut.bind(this),this.onFitInfoClick.bind(this),this.onTryOnClick.bind(this)),i&&(this.vtoComponent=new rp(i))}get shop(){return this.tfrShop}get sku(){return this.tfrSizeRec.sku}async setSku(e){var t,n;this.tfrSizeRec.setSku(e);const i=await this.getStyle(this.sku);i?(this.style=i,i.is_published?console.log(`style ${i.id} is published`):(document.getElementById("tfr-size-recommendations").style.display="none",console.log(`style ${i.id} is not published`)),console.log(`style ${i.id} virtual try on is disabled`),i.is_vto?null===(t=document.getElementById("tfr-try-on-button"))||void 0===t||t.classList.remove("hide"):null===(n=document.getElementById("tfr-try-on-button"))||void 0===n||n.classList.add("hide"),this.isLoggedIn?this.tfrSizeRec.recommendSize():this.setGarmentLocations(i)):document.getElementById("tfr-size-recommendations").style.display="none"}async onInit(){var e,t;return this.isLoggedIn=await this.tfrShop.onInit(),this.tfrSizeRec.setIsLoggedIn(this.isLoggedIn),this.isLoggedIn?((null===(e=this.hooks)||void 0===e?void 0:e.onLogin)&&this.hooks.onLogin(),this.subscribeToProfileChanges()):((null===(t=this.hooks)||void 0===t?void 0:t.onLogout)&&this.hooks.onLogout(),this.unsubscribeFromProfileChanges()),this.isLoggedIn}close(){this.tfrModal.close()}async signOut(){var e;await this.tfrShop.user.logout(),(null===(e=this.hooks)||void 0===e?void 0:e.onLogout)&&this.hooks.onLogout(),this.isLoggedIn=!1,this.tfrSizeRec.setIsLoggedIn(!1),this.setGarmentLocations(this.style),this.unsubscribeFromProfileChanges()}async signIn(e,t,n){var i;if(0==e.length||0==t.length)return n(xp);if(!/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,})+$/.test(e))return n(up);if(!(e=>!!e.match(/^.{7,}$/))(t))return n(vp);try{await this.tfrShop.user.login(e,t),(null===(i=this.hooks)||void 0===i?void 0:i.onLogin)&&this.hooks.onLogin(),this.tfrModal.close(),this.isLoggedIn=!0,this.tfrSizeRec.setIsLoggedIn(!0),this.tfrSizeRec.recommendSize(),this.subscribeToProfileChanges()}catch(e){return n(Np)}}setBrandUserId(e){this.tfrShop.user.setBrandUserId(e)}async submitTel(e){try{await this.tfrShop.submitTelephoneNumber(e),this.tfrModal.toSignIn()}catch(e){this.tfrModal.onError(kp)}}async forgotPassword(e){await this.tfrShop.user.sendPasswordResetEmail(e),this.tfrModal.toSignIn()}async passwordReset(e,t){await this.tfrShop.user.confirmPasswordReset(e,t),this.tfrModal.toPasswordReset()}async getMeasurementLocationsFromSku(e){return this.tfrShop.getMeasurementLocationsFromSku(e)}onSignInClick(){this.tfrModal.toScan()}onFitInfoClick(){this.tfrModal.toFitInfo()}async onTryOnClick(e,t,n=!0){if(!this.vtoComponent)return console.error("VtoComponent is not initialized. Please check if the vtoMainDivId is correct.");const i=await this.shop.tryOn(e,t);if(n)try{this.vtoComponent.init(),this.vtoComponent.onNewFramesReady(i)}catch(e){console.error("Error initializing VTO:",e),this.tfrModal.onError(kp)}}onUserProfileChange(e){var t,n,i,r;switch(e.avatar_status){case Hp.NOT_CREATED:(null===(t=this.hooks)||void 0===t?void 0:t.onError)&&this.hooks.onError(cp),this.tfrModal.onNotCreated();break;case Hp.PENDING:(null===(n=this.hooks)||void 0===n?void 0:n.onLoading)&&this.hooks.onLoading();break;case Hp.CREATED:(null===(i=this.hooks)||void 0===i?void 0:i.onLoadingComplete)&&this.hooks.onLoadingComplete();break;default:(null===(r=this.hooks)||void 0===r?void 0:r.onError)&&this.hooks.onError(kp),this.tfrModal.onError(kp)}}subscribeToProfileChanges(){this.unsub||(this.unsub=this.tfrShop.user.watchUserProfileForChanges(e=>this.onUserProfileChange(e)))}unsubscribeFromProfileChanges(){this.unsub&&(this.unsub(),this.unsub=null)}async setGarmentLocations(e){var t,n;const i=(null===(n=null===(t=null==e?void 0:e.sizes)||void 0===t?void 0:t[0])||void 0===n?void 0:n.garment_measurements.map(e=>e.measurement_location))||[];this.tfrSizeRec.setGarmentLocations(i)}async getStyle(e){try{const t=await this.tfrShop.getColorwaySizeAssetFromSku(e);return await this.tfrShop.getStyle(t.style_id)}catch(t){try{return await this.tfrShop.getStyleByBrandStyleId(e)}catch(e){return null}}}}const qp=async({shopId:e,modalDivId:t,sizeRecMainDivId:n,vtoMainDivId:i,hooks:r={},cssVariables:s={},env:o="dev"})=>{const a=new $p(e,t,n,i,r,s,o);return await a.onInit(),a};export{n as InitImageSlider,qp as initFittingRoom};
|
|
3399
3399
|
//# sourceMappingURL=index.min.js.map
|