@epigraph/configurator 1.7.6-alpha → 1.7.8-alpha
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/dist/index.js +6 -6
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -8693,7 +8693,7 @@ Valid keys: `+JSON.stringify(Object.keys(U),null," "));var ce=he(q,Z,H,K,J+"."+
|
|
|
8693
8693
|
Dependency:
|
|
8694
8694
|
`;for(const he of q)Q+=`- ${he}
|
|
8695
8695
|
`}for(const he of q)Q+=`- ${he}
|
|
8696
|
-
`;N(Q)},[R]),V=re.useCallback(()=>{a.isMobile!==!0&&D!==!0&&(B(!0),!$t.getState().CORE_API.sceneSettings.draggableUI&&(P===!0?(N(null),r(n)):z()))},[P,D,R]),j=re.useCallback(()=>{a.isMobile!==!0&&(B(!1),!$t.getState().CORE_API.sceneSettings.draggableUI&&(window.mouseDragging||P===!0&&t&&t()))},[P,D]),H=re.useCallback(J=>{$t.getState().CORE_API.sceneSettings.draggableUI!==!1&&P!==!1&&(window.pointerDownPos=J.offsetX,window.mouseDragging=!1,window.mouseDownImgSrc=a.getResolvedAssetUrl(_),window.mouseDownSkuID=n)},[P]),K=re.useCallback(J=>{const q=b.lookDetails[u];q.productCategory={id:b.categoryID,label:b.categoryLabel},a.isMobile===!0?(o(q),l(!0)):(J.stopPropagation(),P&&t&&t(),o(q),l(!0))},[P,u,b]);return te(li,{children:te("div",{className:i?"imageContainer active":"imageContainer",draggable:!1,children:[te("div",{className:"contentContainer",children:[te("div",{id:"itemCard"+n,className:"contentOverlay ".concat(`${P===!0&&D===!0?"enabled-item-overlay":"disabled-item-overlay"}`),ref:s,onClick:J=>U(J),onTouchStart:J=>H(J),onMouseEnter:V,onMouseLeave:j,onMouseDown:H,children:te("img",{draggable:!1,className:"addIcon",src:kr+"/Icon/Plus.svg"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/ItemCard.js",lineNumber:283,columnNumber:13},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/ItemCard.js",lineNumber:267,columnNumber:11},globalThis),te("img",{className:"product-image product-image-default-state ".concat(`${P===!1?"product-image-disabled":""}`),draggable:!1,alt:x,src:a.getResolvedAssetUrl(_)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/ItemCard.js",lineNumber:290,columnNumber:11},globalThis),te("div",{className:"spawning-requirements-container",hidden:!(P===!1&&D===!0&&R),children:te("p",{className:"spawning-requirements-text",children:R},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/ItemCard.js",lineNumber:303,columnNumber:13},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/ItemCard.js",lineNumber:299,columnNumber:11},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/ItemCard.js",lineNumber:266,columnNumber:9},globalThis),te("div",{className:a.isMobile?"showAlways itemDetails":"itemDetails",onClick:K,children:[te("div",{className:"item-details-icon"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/ItemCard.js",lineNumber:313,columnNumber:11},globalThis),te("p",{className:"truncate",children:x},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/ItemCard.js",lineNumber:314,columnNumber:11},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/ItemCard.js",lineNumber:307,columnNumber:9},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/ItemCard.js",lineNumber:262,columnNumber:7},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/ItemCard.js",lineNumber:261,columnNumber:5},globalThis)},hOe=({visible:r})=>{const e=Ya(h=>h),t=Jo(h=>h.allActiveVariants),n=sf(h=>h.infoObject),i=sf(h=>h.infoModalOpen),a=sf(h=>h.updateInfoModalOpen),[s,o]=re.useState(""),[l,u]=re.useState([]),f=$t(h=>h.CORE_API);return re.useEffect(()=>{Object.keys(e.categoryData).length!=0&&u(e.categoryData.build)},[e.categoryData]),re.useEffect(()=>(o(t[Object.keys(t)[0]]),()=>{}),[t]),te(li,{children:te("div",{className:i?"infoModal open":"infoModal",children:[te("button",{className:"closeButton",onClick:()=>{a(!1)},children:te("img",{src:kr+"/Icon/X.svg"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/InfoModal.js",lineNumber:51,columnNumber:11},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/InfoModal.js",lineNumber:45,columnNumber:9},globalThis),te("a",{href:n.productPageUrl,className:"categoryLink",target:"_blank",style:n?.productPageUrl?{pointerEvents:"all"}:{pointerEvents:"none"},children:[te("h2",{className:"categoryTitle",children:n?.productCategory?.label},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/InfoModal.js",lineNumber:63,columnNumber:11},globalThis),n.productPageUrl&&te("img",{src:kr+"/Icon/OpenTab.svg"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/InfoModal.js",lineNumber:68,columnNumber:13},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/InfoModal.js",lineNumber:53,columnNumber:9},globalThis),te("div",{className:"infoModalImageContainer",children:n?.thumbnails?.high?te("img",{className:"itemImage",src:f.getResolvedAssetUrl(n.thumbnails.high)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/InfoModal.js",lineNumber:75,columnNumber:13},globalThis):""},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/InfoModal.js",lineNumber:73,columnNumber:9},globalThis),te("div",{className:"infoModalTextContainer",children:[te("h2",{className:"itemTitle",children:n.title},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/InfoModal.js",lineNumber:86,columnNumber:11},globalThis),te("pre",{className:"itemDescription",children:n.description},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/InfoModal.js",lineNumber:87,columnNumber:11},globalThis),n.boundingBoxSize?te("p",{className:"infoModalDimensions",children:[n.boundingBoxSize.x.toFixed(1),"” W x"," ",n.boundingBoxSize.y.toFixed(1),"” D x"," ",n.boundingBoxSize.z.toFixed(1),"” H"]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/InfoModal.js",lineNumber:90,columnNumber:13},globalThis):""]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/InfoModal.js",lineNumber:85,columnNumber:9},globalThis),te("div",{className:"infoModalActions",children:te("button",{className:"item-price",disabled:!0,children:n.price&&`$${b6(parseFloat(n.price).toFixed(2))}`},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/InfoModal.js",lineNumber:101,columnNumber:11},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/InfoModal.js",lineNumber:100,columnNumber:9},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/InfoModal.js",lineNumber:44,columnNumber:7},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/InfoModal.js",lineNumber:43,columnNumber:5},globalThis)};function fOe({element:r,index:e,elementsLength:t,spawnGhosts:n,spawnItem:i,removeAllGhosts:a,infoModalOpen:s,setItemAllowed:o,activeItems:l}){return te("div",{className:"subContainer topContainer",children:[te("h4",{className:"subheading",children:r.label},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/BuildUI.js",lineNumber:36,columnNumber:7},this),te("div",{className:"sidemenuContent",children:te("div",{className:"item-grid",children:r.skus.map(u=>te(ine,{skuId:u,categoryID:r.categoryID,spawnGhosts:n,spawnItem:i,removeAllGhosts:a,modalOpen:s,categoryDataIndex:e,setItemAllowed:o,active:l.includes(u)},"itemCardB"+u,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/BuildUI.js",lineNumber:41,columnNumber:13},this))},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/BuildUI.js",lineNumber:39,columnNumber:9},this)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/BuildUI.js",lineNumber:38,columnNumber:7},this),e!==t-1?te("div",{className:"itemGridDivider"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/BuildUI.js",lineNumber:58,columnNumber:9},this):""]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/BuildUI.js",lineNumber:35,columnNumber:5},this)}function dOe({categoryID:r,index:e,categories:t,activeTab:n,tabsRef:i,mobileGrid:a}){const s=re.useCallback(o=>{if(a.current.scrollLeft===o)return;let l,u,f,h=!1;function p(m){l===void 0&&(l=m);const A=m-l;if(u!==m){const E=A/200;a.current.scrollLeft>o?(f=(a.current.scrollLeft-o)*Math.min(E,1),a.current.scrollLeft-=f,a.current.scrollLeft===o&&(h=!0)):a.current.scrollLeft<o&&(f=(o-a.current.scrollLeft)*Math.min(E,1),a.current.scrollLeft+=f,a.current.scrollLeft===o&&(h=!0))}A<200&&(u=m,!h&&window.requestAnimationFrame(p))}window.requestAnimationFrame(p)},[]);return te(li,{children:te("a",{className:n===e?"mobileTab scrolled":"mobileTab",onClick:()=>{for(let o=0;o<t.length;o++)o===e&&s(i.current[o].offsetLeft)},children:t[r].label},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/BuildUI.js",lineNumber:130,columnNumber:7},this)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/BuildUI.js",lineNumber:129,columnNumber:5},this)}function pOe({element:r,index:e,elementsLength:t,spawnGhosts:n,spawnItem:i,removeAllGhosts:a,infoModalOpen:s,setItemAllowed:o,activeItems:l,tabsRef:u}){return te(li,{children:[te("section",{id:`section-${r.categoryID}`,className:"mobileGridSection",ref:f=>u.current[e]=f,children:r.skus.map(f=>te(ine,{skuId:f,categoryID:r.categoryID,spawnGhosts:n,spawnItem:i,removeAllGhosts:a,modalOpen:s,setItemAllowed:o,active:l.includes(f)},"itemCardB"+f,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/BuildUI.js",lineNumber:176,columnNumber:11},this))},"mobileGridSection"+e,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/BuildUI.js",lineNumber:169,columnNumber:7},this),e!==t-1?te("div",{className:"itemGridDivider"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/BuildUI.js",lineNumber:191,columnNumber:9},this):""]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/BuildUI.js",lineNumber:168,columnNumber:5},this)}const AX=({visible:r})=>{const e=Ya(w=>w),[t,n]=re.useState([]),i=sf(w=>w.infoModalOpen),[a,s]=re.useState(0),[o,l]=re.useState(!1),[u,f]=re.useState([]),h=sf(w=>w.populateInfoObject),p=sf(w=>w.updateInfoModalOpen),m=$t(w=>w.CORE_API),A=re.useRef(null),E=re.useCallback(w=>{let R=[];for(const[N,P]of Object.entries(w))R.push(P);f(R)},[]);yr(m.EVENTS.UI.ContextMenu_InfoBtnClicked,w=>{const R=w.itemData.lookDetails[w.currentVariant];let N=R;N.price=R.price,N.id=w.currentVariant,N.productCategory={id:w.itemData.categoryID,label:w.itemData.categoryLabel},h(N),p(!0)}),yr(m.EVENTS.UI.ContextMenu_Hide,w=>{iy.info({title:"Context Menu Closed"})}),yr(m.EVENTS.SCENE.ReplaceableCategory_Updated,E),re.useEffect(()=>{const w=m.getCurrentItemsInReplaceableCategory();return E(w),()=>{}},[m]),re.useEffect(()=>{Object.keys(e.categoryData).length!==0&&n(e.categoryData.build)},[e.categoryData]);const b=re.useCallback((w,R)=>{$t.getState().CORE_API.spawnItemBySkuID(w,R)},[]),v=re.useCallback(w=>{$t.getState().CORE_API.spawnGhostsForSkuID(w,!1,1)},[]),x=re.useCallback(w=>{i||$t.getState().CORE_API.removeAllGhosts(w)},[i]),S=re.useRef([]);re.useEffect(()=>{S.current=S.current.slice(0,t.length)},[t]);const _=re.useCallback(()=>{let w=-3e3,R=-1;for(let N=0;N<t.length;N++){let P=S.current[N].getBoundingClientRect().left;P<28&&w<P&&(w=P,R=N)}R!==-1&&s(R)},[S,t]);return te(li,{children:[te("div",{className:"mobileTabContent",hidden:!r,children:te("div",{className:"scrollSpyTabs",children:[te("div",{className:"secondMobileTabs",children:Object.keys(t).map((w,R)=>te(dOe,{categoryID:w,index:R,categories:t,activeTab:a,tabsRef:S,mobileGrid:A},"mobileTabs"+w,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/BuildUI.js",lineNumber:318,columnNumber:15},globalThis))},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/BuildUI.js",lineNumber:316,columnNumber:11},globalThis),te("div",{className:"mobileGrid",ref:A,onScroll:_,children:t.map((w,R)=>te(pOe,{element:w,index:R,spawnGhosts:v,spawnItem:b,removeAllGhosts:x,infoModalOpen:i,setItemAllowed:l,activeItems:u,tabsRef:S,elementsLength:t.length},"mobileGrid"+R,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/BuildUI.js",lineNumber:331,columnNumber:15},globalThis))},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/BuildUI.js",lineNumber:329,columnNumber:11},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/BuildUI.js",lineNumber:315,columnNumber:9},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/BuildUI.js",lineNumber:314,columnNumber:7},globalThis),te("div",{className:"container desktop",hidden:!r,children:t.map((w,R)=>te(fOe,{element:w,index:R,spawnGhosts:v,spawnItem:b,removeAllGhosts:x,infoModalOpen:i,setItemAllowed:l,activeItems:u,elementsLength:t.length},`category_${w.categoryID}_${R}`,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/BuildUI.js",lineNumber:352,columnNumber:11},globalThis))},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/BuildUI.js",lineNumber:350,columnNumber:7},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/BuildUI.js",lineNumber:313,columnNumber:5},globalThis)},mOe=(r,e)=>{$t.getState().CORE_API.switchGlobalVariant(r,e)};function gOe(r,e){return te(li,{children:r!==e.length-1?te("div",{className:"itemGridDivider"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/Color.js",lineNumber:20,columnNumber:9},this):""},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/Color.js",lineNumber:18,columnNumber:5},this)}const vOe=({visible:r})=>{const e=Ya.getState().categoryData.color,t=Jo(s=>s.allActiveVariants),n=$t(s=>s.materialOverrideExists),i=$t(s=>s.CORE_API),a=re.useCallback(()=>{$t.getState().CORE_API.removeAllVariantOverrides()},[]);return te(li,{children:te("div",{className:"container desktop",style:{height:"auto"},hidden:!r,children:[n&&te("button",{className:"removeAllColorOverridesButton",onClick:a,disabled:!n,children:"Remove all overrides"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/Color.js",lineNumber:47,columnNumber:11},globalThis),e.map((s,o)=>te("div",{className:"subContainer topContainer",children:[te("h4",{className:"subheading",children:s.label},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/Color.js",lineNumber:62,columnNumber:15},globalThis),te("div",{className:"sidemenuContent",children:te("div",{className:"color-grid color-variants-selection",children:s.looks.map((l,u)=>te("div",{onClick:()=>mOe(s.id,l),className:t[s.id]==l?"colorSelector selected":"colorSelector",children:[te("div",{className:"colorThumbnailContainer",children:te("div",{className:"colorThumbnail",children:[te("div",{className:"checkMark",children:te("img",{src:kr+"/Icon/Check.svg"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/Color.js",lineNumber:82,columnNumber:31},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/Color.js",lineNumber:81,columnNumber:29},globalThis),te("img",{className:"contextColorThumbnail",src:i.getResolvedAssetUrl(Ya.getState().lookData[l]?.thumbnail)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/Color.js",lineNumber:89,columnNumber:29},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/Color.js",lineNumber:80,columnNumber:27},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/Color.js",lineNumber:79,columnNumber:25},globalThis),te("div",{className:"colorDetails",children:[te("p",{className:"truncate colorDetailsLabel",children:Ay(Ya.getState().lookData[l]?.label)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/Color.js",lineNumber:99,columnNumber:27},globalThis),te("p",{className:"truncate colorDetailsLabel",children:Ay(Ya.getState().lookData[l]?.accent)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/Color.js",lineNumber:104,columnNumber:27},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/Color.js",lineNumber:98,columnNumber:25},globalThis)]},"Color-"+u,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/Color.js",lineNumber:68,columnNumber:23},globalThis))},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/Color.js",lineNumber:65,columnNumber:17},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/Color.js",lineNumber:64,columnNumber:15},globalThis),te(gOe,{},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/Color.js",lineNumber:117,columnNumber:15},globalThis)]},`${s.label}-${o}`,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/Color.js",lineNumber:58,columnNumber:13},globalThis))]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/Color.js",lineNumber:41,columnNumber:7},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/Color.js",lineNumber:39,columnNumber:5},globalThis)},rne=To((r,e)=>({activeHotspotData:null,activeFeatureID:"",actions:{enterHotspotInFeaturesTab(n){$t.getState().sideMenuState!==2&&$t.setState({sideMenuState:2}),r({activeFeatureID:n})},exitHotspot(){r({activeFeatureID:null})}}}));function yOe(r,e){if(r.current.scrollTop===e)return;let t,n,i,a=!1;function s(o){t===void 0&&(t=o);const l=o-t;if(n!==o){const u=l/200;r.current.scrollTop>e?(i=(r.current.scrollTop-e)*Math.min(u,1),r.current.scrollTop-=i,r.current.scrollTop===e&&(a=!0)):r.current.scrollTop<e&&(i=(e-r.current.scrollTop)*Math.min(u,1),r.current.scrollTop+=i,r.current.scrollTop===e&&(a=!0))}l<200&&(n=o,!a&&window.requestAnimationFrame(s))}window.requestAnimationFrame(s)}function bX({carouselTabKey:r,hotspotContentRef:e}){const t=re.useRef(null),n=$t(a=>a.CORE_API),i=a=>{a.target.style.width="100%"};return te(PZ,{children:te("div",{className:"carouselTabParent",ref:t,children:[r.type==="img"&&te("img",{src:n.getResolvedAssetUrl(r.link),alt:r.alt?r.alt:r.type,onLoad:a=>i(a)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/ProductFeaturesUI.js",lineNumber:74,columnNumber:11},this),r.type==="video"&&te(li,{children:[te("p",{className:"carouselVideoPlaceholderText",children:r.alt?r.alt:r.type},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/ProductFeaturesUI.js",lineNumber:82,columnNumber:13},this),te("video",{src:n.getResolvedAssetUrl(r.link),muted:!0,loop:!0,autoPlay:!0,playsInline:!0,controls:!1,onLoad:a=>i(a)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/ProductFeaturesUI.js",lineNumber:85,columnNumber:13},this)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/ProductFeaturesUI.js",lineNumber:81,columnNumber:11},this)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/ProductFeaturesUI.js",lineNumber:72,columnNumber:7},this)},"SplideSlide-"+r.link,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/ProductFeaturesUI.js",lineNumber:71,columnNumber:5},this)}function AOe({tabs:r,tabKey:e,index:t,activeFeatureID:n}){const[i,a]=re.useState([]),s=re.useRef(null),o=re.useRef(null);$t(p=>p.CORE_API);const l=re.useRef(null),u=re.useCallback(p=>{$t.getState().CORE_API.clickHotspot("hotspot3D_"+p,{ignoreUI:!0})},[]);re.useEffect(()=>{let p=[],m=e.hotspotData;for(let A=0;A<m.carousel.length;A++)m.carousel[A].type!==""&&m.carousel[A].link!==""&&(p=[...p,{...m.carousel[A],index:A}]);a(p)},[e]),re.useEffect(()=>{const{current:p}=o;p&&(n===p.id?f(p):h(p))},[n]);const f=re.useCallback(p=>{p.checked=!0,p.nextElementSibling.nextElementSibling.setAttribute("style","max-height: 800px;");let E=p.nextElementSibling.clientHeight*t;yOe(r,E)},[]),h=re.useCallback(p=>{p.nextElementSibling.nextElementSibling.setAttribute("style","max-height: 0px;"),p.checked=!1},[]);return te(li,{children:e.hotspotData&&te("div",{className:"accordionTab",children:[te("input",{type:"checkbox",name:"accordion",id:"rd_"+e.itemData.skuID+"_"+e.hotspotData.hotspotID,defaultChecked:!1,ref:o,onClick:p=>{u(e.itemData.skuID+"_"+e.hotspotData.hotspotID,{ignoreUI:!1})}},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/ProductFeaturesUI.js",lineNumber:169,columnNumber:11},this),te("label",{className:"tab-label",htmlFor:"rd_"+e.itemData.skuID+"_"+e.hotspotData.hotspotID,children:[te("span",{children:e.hotspotData.title},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/ProductFeaturesUI.js",lineNumber:191,columnNumber:13},this),te("img",{className:"accordion-closed",src:kr+"/Icon/Plus.svg"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/ProductFeaturesUI.js",lineNumber:192,columnNumber:13},this),te("img",{className:"accordion-open",src:kr+"/Icon/Minus.svg"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/ProductFeaturesUI.js",lineNumber:196,columnNumber:13},this)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/ProductFeaturesUI.js",lineNumber:185,columnNumber:11},this),te("div",{className:"tab-content",children:te("div",{className:"hotspot-content",ref:l,children:[te($Z,{className:"ignore",modules:{toolbar:!1},theme:"bubble",readOnly:!0,value:e.hotspotData.description},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/ProductFeaturesUI.js",lineNumber:204,columnNumber:15},this),i.length==1&&i[0].type!=""&&i[0].link!=""&&te(bX,{carouselTabKey:i[0],index:0,hotspotContentRef:l},"carouselTabs_"+e.itemData.skuID+"_"+e.hotspotData.hotspotID+"_0",!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/ProductFeaturesUI.js",lineNumber:214,columnNumber:19},this),i.length>1&&te("div",{className:"carousel",children:te(LZ,{options:{perPage:1,preloadPages:3},ref:s,children:i.map((p,m)=>p.type!=""&&p.link!=""&&te(bX,{carouselTabKey:p,index:m,hotspotContentRef:l},"carouselTabs_"+e.itemData.skuID+"_"+e.hotspotData.hotspotID+"_"+p.index,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/ProductFeaturesUI.js",lineNumber:241,columnNumber:27},this))},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/ProductFeaturesUI.js",lineNumber:230,columnNumber:19},this)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/ProductFeaturesUI.js",lineNumber:229,columnNumber:17},this)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/ProductFeaturesUI.js",lineNumber:203,columnNumber:13},this)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/ProductFeaturesUI.js",lineNumber:202,columnNumber:11},this)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/ProductFeaturesUI.js",lineNumber:168,columnNumber:9},this)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/ProductFeaturesUI.js",lineNumber:166,columnNumber:5},this)}const bOe=({visible:r})=>{const e=$t(i=>i.tabSpawnCount),t=re.useRef(null),n=rne(i=>i.activeFeatureID);return te(li,{children:te("div",{className:"col desktop productFeatureUIDic",hidden:!r,ref:t,children:te("div",{className:"tabs",children:[e.length==0&&te("div",{className:"tabEmptyText",children:"*Please add an item to the scene to see the features"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/ProductFeaturesUI.js",lineNumber:282,columnNumber:13},globalThis),e.map((i,a)=>te(AOe,{tabs:t,activeFeatureID:n,tabKey:i,index:a},"tabs_"+i.itemData.skuID+"_"+i.hotspotData.hotspotID,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/ProductFeaturesUI.js",lineNumber:287,columnNumber:13},globalThis))]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/ProductFeaturesUI.js",lineNumber:280,columnNumber:9},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/ProductFeaturesUI.js",lineNumber:275,columnNumber:7},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/ProductFeaturesUI.js",lineNumber:274,columnNumber:5},globalThis)},_Oe=function(r,e){return r.filter(function(t,n){return e!==n})},EOe=function(r,e,t){let n=r.slice();return n[e].quantity=t,n},Bm=To((r,e)=>({cart:[],cartTotalPrice:0,deleteCartItem:t=>{r(n=>({cart:_Oe(n.cart,t)}))},addToCart:t=>{r(n=>({cart:[...n.cart,t]}))},updateQuantity:(t,n)=>{r(i=>({cart:EOe(i.cart,t,n)}))},previewCartModalOpen:!1,togglePreviewCartModal:()=>{const{previewCartModalOpen:t}=e();t===!0?$t.getState().CORE_API.reviewCartHidden():$t.getState().CORE_API.reviewCartShown(),r({previewCartModalOpen:!t})},actions:{setCartTotalPrice:t=>{r(()=>({cartTotalPrice:t}))}}})),ane=({itemObject:r})=>{const e=$t(a=>a.CORE_API),t=$t(a=>a.disableCart),[n,i]=re.useState(e.sceneSettings.currency);return te(li,{children:te("div",{className:r.countUnavailable=="0"||t?"cartItem":"cartItem cartItemOutOfStock",draggable:!1,style:{display:r?"":"none"},children:[te("div",{className:"cartItemImage",children:te("img",{draggable:!1,src:e.getResolvedAssetUrl(r.thumbnails.review?r.thumbnails.review:r.thumbnails.low),alt:r.title},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/CartItem.js",lineNumber:24,columnNumber:11},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/CartItem.js",lineNumber:23,columnNumber:9},globalThis),te("div",{className:"cartItemDetails",children:[te("h4",{children:r.title},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/CartItem.js",lineNumber:35,columnNumber:11},globalThis),te("h5",{children:r.subtitle},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/CartItem.js",lineNumber:36,columnNumber:11},globalThis),te("div",{className:"cartRow",children:[te("span",{className:"itemCount",children:[e.sceneSettings.textSettings.cartQuantityText,":"," ",r.count]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/CartItem.js",lineNumber:38,columnNumber:13},globalThis),te("h3",{className:"itemPrice".concat(t===!0?" hide":""),children:[n,parseFloat(r.price).toFixed(2)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/CartItem.js",lineNumber:42,columnNumber:13},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/CartItem.js",lineNumber:37,columnNumber:11},globalThis),r.actionButton&&te("span",{className:"actionButton",onClick:()=>e.actionButtonClicked(r),children:r.actionButton.text},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/CartItem.js",lineNumber:52,columnNumber:13},globalThis),te("div",{className:"cartRow".concat(t===!0||r.countUnavailable=="0"?" hide":""),children:[te("img",{className:"cartRowImage",src:kr+"/Icon/Info_red.png"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/CartItem.js",lineNumber:66,columnNumber:13},globalThis),te("h3",{className:"itemAvailable",children:[r.countAvailable," IN STOCK"]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/CartItem.js",lineNumber:70,columnNumber:13},globalThis),te("span",{className:"itemCount",children:"- quantities requested not available"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/CartItem.js",lineNumber:74,columnNumber:13},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/CartItem.js",lineNumber:59,columnNumber:11},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/CartItem.js",lineNumber:34,columnNumber:9},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/CartItem.js",lineNumber:14,columnNumber:7},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/CartItem.js",lineNumber:13,columnNumber:5},globalThis)},SOe=({})=>{const r=Bm(o=>o.cart),e=Bm(o=>o.previewCartModalOpen),t=Bm(o=>o.togglePreviewCartModal),n=$t(o=>o.CORE_API),i=$t(o=>o.disableCart),a=$t(o=>o.cartMessage),s=re.useCallback(()=>{n.checkout()},[]);return te(li,{children:te("div",{className:e?"previewCartModal open":"previewCartModal",children:[te("div",{className:"previewCartModalChild",children:[te("button",{className:"closeButton",onClick:()=>{t()},children:te("img",{src:kr+"/Icon/X.svg"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/PreviewCart.js",lineNumber:46,columnNumber:13},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/PreviewCart.js",lineNumber:40,columnNumber:11},globalThis),r.length<=0&&te("h3",{className:"cartEmptyText",children:"Your cart is currently empty"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/PreviewCart.js",lineNumber:49,columnNumber:13},globalThis),r.length>0&&te(li,{children:[te("h2",{className:"cartTitle",children:n.sceneSettings.textSettings.cartHeadingText},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/PreviewCart.js",lineNumber:53,columnNumber:15},globalThis),te("div",{className:"previewCartContentParentDiv",children:te("div",{className:"previewCartContent",children:r.map((o,l)=>te(ane,{itemObject:o,index:l},`Cart Item-${l}`,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/PreviewCart.js",lineNumber:59,columnNumber:21},globalThis))},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/PreviewCart.js",lineNumber:57,columnNumber:17},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/PreviewCart.js",lineNumber:56,columnNumber:15},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/PreviewCart.js",lineNumber:52,columnNumber:13},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/PreviewCart.js",lineNumber:39,columnNumber:9},globalThis),te("div",{className:"checkButtonParentDiv".concat(i===!0?" hide":""),children:[a&&te("div",{className:"cartMessageDiv",children:te("span",{children:a},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/PreviewCart.js",lineNumber:77,columnNumber:15},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/PreviewCart.js",lineNumber:76,columnNumber:13},globalThis),te("button",{className:"checkoutButton",onClick:s,children:te("span",{children:n.sceneSettings.addToCartCTAText},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/PreviewCart.js",lineNumber:81,columnNumber:13},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/PreviewCart.js",lineNumber:80,columnNumber:11},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/PreviewCart.js",lineNumber:70,columnNumber:9},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/PreviewCart.js",lineNumber:34,columnNumber:7},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/PreviewCart.js",lineNumber:33,columnNumber:5},globalThis)},xOe=(r,e)=>{$t.getState().CORE_API.switchGlobalGeometryVariant(r,e)};function TOe(r,e){return te(li,{children:r!==e.length-1?te("div",{className:"itemGridDivider"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/GeometryVariants.js",lineNumber:22,columnNumber:9},this):""},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/GeometryVariants.js",lineNumber:20,columnNumber:5},this)}const wOe=({visible:r})=>{const e=Ya.getState().categoryData.geometryVariants,t=Jo(i=>i.allActiveGeometryVariants),n=$t(i=>i.CORE_API);return te(li,{children:te("div",{className:"container desktop",style:{height:"auto"},hidden:!r,children:e.map((i,a)=>te("div",{className:"subContainer topContainer",children:[te("h4",{className:"subheading",children:i.label},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/GeometryVariants.js",lineNumber:52,columnNumber:15},globalThis),te("div",{className:"sidemenuContent",children:te("div",{className:"color-grid geometry-variants-selection",children:Object.keys(i.variants).map((s,o)=>te("div",{onClick:()=>xOe(i.id,s),className:t[i.id]==s?"colorSelector selected":"colorSelector",children:[te("div",{className:"colorThumbnailContainer",children:te("div",{className:"colorThumbnail",style:{borderRadius:"0%"},children:[te("div",{className:"checkMark",children:te("img",{src:kr+"/Icon/Check.svg"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/GeometryVariants.js",lineNumber:78,columnNumber:31},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/GeometryVariants.js",lineNumber:77,columnNumber:29},globalThis),te("img",{className:"contextColorThumbnail",src:n.getResolvedAssetUrl(i.variants[s].thumbnail)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/GeometryVariants.js",lineNumber:85,columnNumber:29},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/GeometryVariants.js",lineNumber:73,columnNumber:27},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/GeometryVariants.js",lineNumber:72,columnNumber:25},globalThis),te("div",{className:"colorDetails",children:te("p",{className:"truncate colorDetailsLabel",children:Ay(i.variants[s].label)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/GeometryVariants.js",lineNumber:94,columnNumber:27},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/GeometryVariants.js",lineNumber:93,columnNumber:25},globalThis)]},"Color-"+o,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/GeometryVariants.js",lineNumber:58,columnNumber:23},globalThis))},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/GeometryVariants.js",lineNumber:55,columnNumber:17},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/GeometryVariants.js",lineNumber:54,columnNumber:15},globalThis),te(TOe,{},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/GeometryVariants.js",lineNumber:104,columnNumber:15},globalThis)]},`${i.label}-${a}`,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/GeometryVariants.js",lineNumber:48,columnNumber:13},globalThis))},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/GeometryVariants.js",lineNumber:41,columnNumber:7},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/GeometryVariants.js",lineNumber:39,columnNumber:5},globalThis)},COe=(r,e)=>{$t.getState().CORE_API.switchGlobalGeometryVariant(r,e)},MOe=(r,e)=>{$t.getState().CORE_API.switchGlobalVariant(r,e)};function ROe({color:r,index:e,elementId:t,allActiveVariants:n}){return te("div",{onClick:()=>MOe(t,r),className:n[t]==r?"colorSelector selected":"colorSelector",children:[te("div",{className:"colorThumbnailContainer",children:te("div",{className:"colorThumbnail",children:[te("div",{className:"checkMark",children:te("img",{src:kr+"/Icon/Check.svg"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/VariantMobile.js",lineNumber:39,columnNumber:13},this)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/VariantMobile.js",lineNumber:38,columnNumber:11},this),te("img",{className:"contextColorThumbnail",src:$t.getState().CORE_API.getResolvedAssetUrl(Ya.getState().lookData[r]?.thumbnail)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/VariantMobile.js",lineNumber:41,columnNumber:11},this)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/VariantMobile.js",lineNumber:37,columnNumber:9},this)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/VariantMobile.js",lineNumber:36,columnNumber:7},this),te("div",{className:"colorDetails",children:te("p",{className:"truncate-mobile colorDetailsLabel",children:Ay(Ya.getState().lookData[r]?.label)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/VariantMobile.js",lineNumber:52,columnNumber:9},this)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/VariantMobile.js",lineNumber:51,columnNumber:7},this)]},"Color-"+e,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/VariantMobile.js",lineNumber:27,columnNumber:5},this)}function IOe({variant:r,variantId:e,index:t,elementId:n,allActiveGeometryVariants:i}){return te("div",{onClick:()=>COe(n,e),className:i[n]==e?"colorSelector selected":"colorSelector",children:[te("div",{className:"colorThumbnailContainer",children:te("div",{className:"colorThumbnail",children:[te("div",{className:"checkMark",children:te("img",{src:kr+"/Icon/Check.svg"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/VariantMobile.js",lineNumber:80,columnNumber:13},this)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/VariantMobile.js",lineNumber:79,columnNumber:11},this),te("img",{className:"contextColorThumbnail",src:$t.getState().CORE_API.getResolvedAssetUrl(r.thumbnail)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/VariantMobile.js",lineNumber:82,columnNumber:11},this)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/VariantMobile.js",lineNumber:78,columnNumber:9},this)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/VariantMobile.js",lineNumber:77,columnNumber:7},this),te("div",{className:"colorDetails",children:te("p",{className:"truncate-mobile colorDetailsLabel",children:Ay(r.label)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/VariantMobile.js",lineNumber:91,columnNumber:9},this)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/VariantMobile.js",lineNumber:90,columnNumber:7},this)]},"GeometryVariant-"+t,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/VariantMobile.js",lineNumber:68,columnNumber:5},this)}function _X({variantType:r,element:e,allActiveVariants:t,startIndex:n}){return te(li,{children:[r=="color"&&e.looks.map((i,a)=>te(ROe,{color:i,index:a,elementId:e.id,allActiveVariants:t},"MobileGridInternal_"+a,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/VariantMobile.js",lineNumber:105,columnNumber:13},this)),r=="geometry"&&Object.keys(e.variants).map((i,a)=>te(IOe,{variant:e.variants[i],index:a,elementId:e.id,variantId:i,allActiveGeometryVariants:t},"MobileGridVariantInternal_"+a,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/VariantMobile.js",lineNumber:117,columnNumber:13},this))]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/VariantMobile.js",lineNumber:101,columnNumber:5},this)}const NOe=({sortedVariantsTabOrder:r})=>{const e=Ya.getState().categoryData.color,t=Ya.getState().categoryData.geometryVariants,n=Jo(v=>v.allActiveVariants),i=Jo(v=>v.allActiveGeometryVariants),a=$t(v=>v.materialOverrideExists);$t(v=>v.CORE_API);const[s,o]=re.useState(0),[l,u]=re.useState(0);re.useEffect(()=>{let v=0;r.includes("color")===!0&&(v+=e.length),r.includes("geometryVariants")===!0&&(v+=t.length),u(v)},[e,t]);const f=re.useCallback(({index:v})=>te(li,{children:v!==l-1?te("div",{className:"itemGridDivider"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/VariantMobile.js",lineNumber:160,columnNumber:13},globalThis):te("div",{className:"itemGridPlaceholder"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/VariantMobile.js",lineNumber:162,columnNumber:13},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/VariantMobile.js",lineNumber:158,columnNumber:9},globalThis),[e,t,l]),h=re.useCallback(()=>{$t.getState().CORE_API.removeAllVariantOverrides()},[]),p=re.useCallback(v=>{if(A.current.scrollLeft===v)return;let x,S,_,w=!1;function R(N){x===void 0&&(x=N);const P=N-x;if(S!==N){const I=P/200;A.current.scrollLeft>v?(_=(A.current.scrollLeft-v)*Math.min(I,1),A.current.scrollLeft-=_,A.current.scrollLeft===v&&(w=!0)):A.current.scrollLeft<v&&(_=(v-A.current.scrollLeft)*Math.min(I,1),A.current.scrollLeft+=_,A.current.scrollLeft===v&&(w=!0))}P<200&&(S=N,!w&&window.requestAnimationFrame(R))}window.requestAnimationFrame(R)},[]),m=re.useRef([]);re.useEffect(()=>{m.current=m.current.slice(0,l)},[l]);const A=re.useRef(null),E=re.useCallback(({categoryID:v,label:x,index:S,totalLength:_})=>te(li,{children:te("a",{className:s===S?"mobileTab scrolled":"mobileTab",onClick:()=>{for(let w=0;w<_;w++)w===S&&p(m.current[w].offsetLeft)},children:x},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/VariantMobile.js",lineNumber:232,columnNumber:11},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/VariantMobile.js",lineNumber:231,columnNumber:9},globalThis),[s,m]),b=re.useCallback(()=>{let v=-3e3,x=-1;for(let S=0;S<l;S++){let _=m.current[S].getBoundingClientRect().left;_<28&&v<_&&(v=_,x=S)}x!==-1&&o(x)},[m,e,t,l]);return te(li,{children:te("div",{className:"mobileTabContent",children:te("div",{className:"scrollSpyTabs",children:[te("div",{className:"secondMobileTabs",children:r.map((v,x)=>{if(v=="color")return e.map((S,_)=>te(E,{categoryID:S.id,label:S.label,index:x==0?_:r.includes("geometryVariants")?t.length+_:_,totalLength:l},"mobileTabsColors"+S.id,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/VariantMobile.js",lineNumber:274,columnNumber:19},globalThis));if(v=="geometryVariants")return t.map((S,_)=>te(E,{categoryID:S.id,label:S.label,index:x==0?_:r.includes("color")?e.length+_:_,totalLength:l},"mobileTabsVariants"+S.id,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/VariantMobile.js",lineNumber:290,columnNumber:19},globalThis))})},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/VariantMobile.js",lineNumber:270,columnNumber:11},globalThis),te("div",{children:te("div",{className:"mobileGrid mobileGridCenter",ref:A,onScroll:b,children:te("section",{className:"mobileGridSection",children:[a&&te("button",{onClick:h,className:"removeAllColorOverridesButton",disabled:!a,children:[te("div",{className:"iconContainer",children:te("img",{src:kr+"/Icon/TrashSimple.svg",alt:"Remove"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/VariantMobile.js",lineNumber:321,columnNumber:23},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/VariantMobile.js",lineNumber:320,columnNumber:21},globalThis),"Remove all",te("br",{},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/VariantMobile.js",lineNumber:330,columnNumber:21},globalThis),"overrides"]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/VariantMobile.js",lineNumber:315,columnNumber:19},globalThis),r.map((v,x)=>{if(v=="color")return e.map((S,_)=>te("section",{className:"mobileGridCategorySection color-variants-selection",id:`section-${S.categoryID}`,ref:w=>m.current[x==0?_:r.includes("geometryVariants")?t.length+_:_]=w,children:[te(_X,{variantType:"color",element:S,allActiveVariants:n},`mobileGrid-${S.categoryID}`,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/VariantMobile.js",lineNumber:355,columnNumber:27},globalThis),te(f,{index:x==0?_:r.includes("geometryVariants")?t.length+_:_},"divider"+S.categoryID,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/VariantMobile.js",lineNumber:361,columnNumber:27},globalThis)]},`sectionz-${S.categoryID}-${_}`,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/VariantMobile.js",lineNumber:339,columnNumber:25},globalThis));if(v=="geometryVariants")return t.map((S,_)=>te("section",{className:"mobileGridCategorySection geometry-variants-selection",id:`section-${S.id}`,ref:w=>m.current[x==0?_:r.includes("color")?e.length+_:_]=w,children:[te(_X,{variantType:"geometry",element:S,allActiveVariants:i},`mobileGrid-variants-${S.id}`,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/VariantMobile.js",lineNumber:393,columnNumber:27},globalThis),te(f,{index:x==0?_:r.includes("color")?e.length+_:_},"divider-variants-"+S.id,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/VariantMobile.js",lineNumber:399,columnNumber:27},globalThis)]},`sectionz-variants-${S.id}-${_}`,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/VariantMobile.js",lineNumber:379,columnNumber:25},globalThis))})]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/VariantMobile.js",lineNumber:313,columnNumber:15},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/VariantMobile.js",lineNumber:308,columnNumber:13},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/VariantMobile.js",lineNumber:307,columnNumber:11},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/VariantMobile.js",lineNumber:269,columnNumber:9},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/VariantMobile.js",lineNumber:268,columnNumber:7},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/VariantMobile.js",lineNumber:267,columnNumber:5},globalThis)},DOe=({sideMenuOpen:r,sideMenuRef:e,toggleSideMenuOpen:t,configuratorWcRef:n,PUBLIC_DESIGN_ASSETS_ENDPOINT:i,handleSideButtonClick:a,useTabIcon:s,GENERIC_PROJECT_ASSET_DATA_ROOT_URL:o,sideMenuState:l,togglePreviewCartModal:u,getItemCount:f,currency:h,numberWithCommas:p})=>{const m=Ya(_=>_.hotspotsData),A=Ya.getState().categoryData.color,E=Ya.getState().categoryData.geometryVariants,b=$t(_=>_.disableCart),v=$t(_=>_.CORE_API),[x,S]=re.useState([]);return re.useEffect(()=>{const _=v.sceneSettings.variantsTabOrder,w=Object.entries(_);w.sort(([,N],[,P])=>N.priority-P.priority);const R=[];w.forEach(([N,P])=>{P.enabled&&R.push(N)}),S(R)},[v]),re.useEffect(()=>{if(!$t.getState().CORE_API.isMobile)return;const{current:_}=e;!_||n.shadowRoot.getElementById("_leftShell")},[r,e]),te("div",{className:`sideMenu interactable ${r===!0?"":"side-menu-collapsed"}`,ref:e,children:[te("div",{className:r?"mobileExpandButton sideMenuOpen":"mobileExpandButton",children:[te("span",{children:"EXPAND CONFIGURATOR"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/SideMenu.js",lineNumber:88,columnNumber:9},globalThis),te("button",{role:"button",onClick:t,children:te("img",{src:i+"/Icon/CaretDoubleDown.svg"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/SideMenu.js",lineNumber:94,columnNumber:11},globalThis)},"expandSideMenuButton",!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/SideMenu.js",lineNumber:89,columnNumber:9},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/SideMenu.js",lineNumber:81,columnNumber:7},globalThis),te("div",{className:r===!0?"sideMenuTabContainer":"sideMenuTabContainer side-menu-container-hide",children:te(GU,{className:"firstMobileTab",children:[te(HU,{className:"firstMobileTabs",children:[te(oI,{children:te("div",{className:"mobileTab",onClick:()=>{a(0)},children:[s?te("img",{className:"icon",alt:"null",src:o+"/thumbnails/common-ui/BuildTabIcon.svg"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/SideMenu.js",lineNumber:118,columnNumber:19},globalThis):"",v.sceneSettings.textSettings.buildTabHeadingText]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/SideMenu.js",lineNumber:111,columnNumber:15},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/SideMenu.js",lineNumber:110,columnNumber:13},globalThis),(A.length>0||E.length>0)&&te(oI,{children:te("div",{className:"mobileTab",onClick:()=>{a(1)},children:[s?te("img",{className:"icon",alt:"null",src:o+"/thumbnails/common-ui/ColorTabIcon.svg"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/SideMenu.js",lineNumber:141,columnNumber:21},globalThis):"",v.sceneSettings.textSettings.colorTabHeadingText]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/SideMenu.js",lineNumber:134,columnNumber:17},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/SideMenu.js",lineNumber:133,columnNumber:15},globalThis),te("button",{className:`collapse-side-menu-button ${r===!0?"":"set-display-none"}`,role:"button",onClick:t,children:te("img",{src:i+"/Icon/CaretDoubleDown.svg"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/SideMenu.js",lineNumber:165,columnNumber:15},globalThis)},"collapseSideMenuButton",!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/SideMenu.js",lineNumber:157,columnNumber:13},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/SideMenu.js",lineNumber:109,columnNumber:11},globalThis),te(lI,{children:te(AX,{sideMenuState:0},"BuildUI1",!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/SideMenu.js",lineNumber:176,columnNumber:13},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/SideMenu.js",lineNumber:174,columnNumber:11},globalThis),(A.length>0||E.length>0)&&te(lI,{children:te("div",{className:"variantContainer",children:te(NOe,{sortedVariantsTabOrder:x},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/SideMenu.js",lineNumber:182,columnNumber:17},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/SideMenu.js",lineNumber:181,columnNumber:15},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/SideMenu.js",lineNumber:180,columnNumber:13},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/SideMenu.js",lineNumber:108,columnNumber:9},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/SideMenu.js",lineNumber:100,columnNumber:7},globalThis),te("div",{className:"desktopSideMenu",children:[te("div",{className:"sideMenuTabs",children:[te("div",{className:l===0?"activeSideMenuTab rightTopBarButton button":"inactiveSideMenuTab rightTopBarButton button",onClick:()=>{a(0)},children:[s?te("img",{className:"icon",alt:"null",src:o+"BuildTabIcon.png"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/SideMenu.js",lineNumber:204,columnNumber:15},globalThis):"",te("span",{children:v.sceneSettings.textSettings.buildTabHeadingText},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/SideMenu.js",lineNumber:212,columnNumber:13},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/SideMenu.js",lineNumber:193,columnNumber:11},globalThis),(A.length>0||E.length>0)&&te("div",{className:l===1?"activeSideMenuTab rightTopBarButton button":"inactiveSideMenuTab rightTopBarButton button",onClick:()=>{a(1)},children:[s?te("img",{className:"icon",alt:"null",src:o+"/thumbnails/common-ui/ColorTabIcon.svg"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/SideMenu.js",lineNumber:228,columnNumber:17},globalThis):"",te("span",{children:v.sceneSettings.textSettings.colorTabHeadingText},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/SideMenu.js",lineNumber:239,columnNumber:15},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/SideMenu.js",lineNumber:217,columnNumber:13},globalThis),Object.keys(m).length>0&&te("div",{className:l===2?"activeSideMenuTab rightTopBarButton button":"inactiveSideMenuTab rightTopBarButton button",onClick:()=>{a(2)},children:[s?te("img",{className:"icon",alt:"null",src:o+"/thumbnails/common-ui/ProductFeaturesTabIcon.png"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/SideMenu.js",lineNumber:256,columnNumber:17},globalThis):"",te("span",{children:v.sceneSettings.textSettings.featuresTabHeadingText},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/SideMenu.js",lineNumber:267,columnNumber:15},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/SideMenu.js",lineNumber:245,columnNumber:13},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/SideMenu.js",lineNumber:192,columnNumber:9},globalThis),te("div",{className:"sideMenuContent",children:[te(SOe,{},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/SideMenu.js",lineNumber:274,columnNumber:11},globalThis),te(hOe,{visible:l===0},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/SideMenu.js",lineNumber:275,columnNumber:11},globalThis),te(AX,{visible:l===0},"buildUi-desktop",!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/SideMenu.js",lineNumber:277,columnNumber:12},globalThis),te("div",{className:"variantContainer",children:x.map(_=>{if(_=="color"){if(A.length>0)return te(vOe,{visible:l===1},"colourTab-desktop",!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/SideMenu.js",lineNumber:284,columnNumber:21},globalThis)}else if(_=="geometryVariants"&&E.length>0)return te(wOe,{visible:l===1},"geometryVariantsTab-desktop",!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/SideMenu.js",lineNumber:293,columnNumber:21},globalThis)})},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/SideMenu.js",lineNumber:279,columnNumber:11},globalThis),te(bOe,{visible:l===2},"featuresTab-desktop",!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/SideMenu.js",lineNumber:303,columnNumber:13},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/SideMenu.js",lineNumber:273,columnNumber:9},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/SideMenu.js",lineNumber:191,columnNumber:7},globalThis),te("div",{className:"bottomBar right button",onClick:()=>{u()},children:[te("div",{className:"bottomBarChildDiv",children:[te("span",{children:v.sceneSettings.textSettings.reviewButtonText},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/SideMenu.js",lineNumber:318,columnNumber:11},globalThis),te("div",{className:"cartNumber",children:f()},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/SideMenu.js",lineNumber:319,columnNumber:11},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/SideMenu.js",lineNumber:317,columnNumber:9},globalThis),te("div",{className:"reviewButtonParentDiv",children:te("div",{className:"button reviewButton".concat(b===!0?" hide":""),children:te("div",{className:"",children:`${h}${p(Bm.getState().cartTotalPrice)}`},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/SideMenu.js",lineNumber:327,columnNumber:13},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/SideMenu.js",lineNumber:322,columnNumber:11},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/SideMenu.js",lineNumber:321,columnNumber:9},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/SideMenu.js",lineNumber:311,columnNumber:7},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/SideMenu.js",lineNumber:75,columnNumber:5},globalThis)},OOe=({previewCartModalOpen:r,togglePreviewCartModal:e,PUBLIC_DESIGN_ASSETS_ENDPOINT:t,cart:n})=>{const i=$t(l=>l.disableCart),a=$t(l=>l.CORE_API),s=$t(l=>l.cartMessage),o=re.useCallback(()=>{a.checkout()},[]);return te("div",{className:r?"previewCartModal mobile open":"previewCartModal mobile",children:[te("button",{className:"closeButton",onClick:()=>{e()},children:te("img",{src:t+"/Icon/X.svg"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/PreviewCartMobile.js",lineNumber:33,columnNumber:9},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/PreviewCartMobile.js",lineNumber:27,columnNumber:7},globalThis),te("h2",{className:"cartTitle",children:a.sceneSettings.textSettings.cartHeadingText},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/PreviewCartMobile.js",lineNumber:35,columnNumber:7},globalThis),n.length>0?te("div",{className:"previewCartContentParentDiv",children:[te("div",{className:"previewCartContent",children:n.map(function(l,u){return te(ane,{itemObject:l,index:u},`Cart Item - ${u}`,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/PreviewCartMobile.js",lineNumber:43,columnNumber:17},this)})},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/PreviewCartMobile.js",lineNumber:40,columnNumber:11},globalThis),te("div",{className:"previewCartButtonContainer".concat(i===!0?" hide":""),children:[s&&te("div",{className:"cartMessageDiv",children:te("span",{children:s},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/PreviewCartMobile.js",lineNumber:58,columnNumber:17},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/PreviewCartMobile.js",lineNumber:57,columnNumber:15},globalThis),te("button",{className:"checkoutButton",onClick:o,children:[te("span",{children:a.sceneSettings.addToCartCTAText},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/PreviewCartMobile.js",lineNumber:62,columnNumber:15},globalThis),te("img",{src:t+"/Icon/ArrowRight.svg"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/PreviewCartMobile.js",lineNumber:63,columnNumber:15},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/PreviewCartMobile.js",lineNumber:61,columnNumber:13},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/PreviewCartMobile.js",lineNumber:51,columnNumber:11},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/PreviewCartMobile.js",lineNumber:39,columnNumber:9},globalThis):te("h3",{className:"cartEmptyText",children:"Your cart is currently empty"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/PreviewCartMobile.js",lineNumber:70,columnNumber:9},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/PreviewCartMobile.js",lineNumber:20,columnNumber:5},globalThis)},LOe=({selectedItemData:r,colors:e,colorsCategoryName:t})=>{const n=$t(A=>A.CORE_API),[i,a]=re.useState(null),[s,o]=re.useState(0),[l,u]=re.useState(0),[f,h]=re.useState(null),p=re.useRef(null),m=re.useCallback(()=>{n.fireEvent(n.EVENTS.UI.ContextMenu_InfoBtnClicked,r)},[r]);return re.useEffect(()=>{h(null),r&&(h({...r}),r.overrideVariant?a(r.overrideVariant):a(r.currentVariant))},[r]),re.useEffect(()=>{if(!f||!r||!p.current)return;const A=n.getCanvasSize();let E=r.offsetX+p.current.children[0].clientWidth,b=r.offsetY+p.current.children[0].clientHeight,v=A.width-E;v<0?o(r.offsetX+v-10):o(r.offsetX);let x=A.height-b;x<0?u(r.offsetY+x-10):u(r.offsetY)},[f,r,p]),te("div",{ref:p,children:r!==null&&te("div",{className:"contextMenuParent interactable",style:{left:s+"px",top:l+"px"},children:te("div",{className:"contextContentDiv",children:te("div",{className:"contextContent",children:[te("div",{className:"contextContentChildDiv",children:[te("div",{className:"contextNameContent",children:[te("h3",{children:r.itemData.name},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/ContextMenuDesktop.js",lineNumber:84,columnNumber:19},globalThis),te("img",{className:"infoButton",src:kr+"/Icon/Info.svg",onClick:()=>m()},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/ContextMenuDesktop.js",lineNumber:85,columnNumber:19},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/ContextMenuDesktop.js",lineNumber:83,columnNumber:17},globalThis),te("div",{className:"closeContainer",onClick:()=>n.exitSelectedItem(),children:te("button",{role:"button",title:"Close",children:te("img",{src:kr+"/Icon/X.svg"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/ContextMenuDesktop.js",lineNumber:96,columnNumber:21},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/ContextMenuDesktop.js",lineNumber:95,columnNumber:19},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/ContextMenuDesktop.js",lineNumber:91,columnNumber:17},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/ContextMenuDesktop.js",lineNumber:82,columnNumber:15},globalThis),e.length>0&&n.sceneSettings.disableLocalColorOverride===!1&&te("div",{className:"contextColorContent",children:[te("span",{className:"colorSwatchTitle",children:["Select ",t]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/ContextMenuDesktop.js",lineNumber:106,columnNumber:21},globalThis),te("div",{className:"color-grid color-variants-selection",children:e.map((A,E)=>te("div",{onClick:async()=>{await n.overrideSelectedItemMaterial(A.id),a(A.id)},asgaga:A.id,asd:i,className:i==A.id?"colorSelector selected":"colorSelector",children:[te("div",{className:"colorThumbnailContainer",children:te("div",{className:"colorThumbnail",children:[te("div",{className:"checkMark",children:te("img",{src:kr+"/Icon/Check.svg"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/ContextMenuDesktop.js",lineNumber:131,columnNumber:33},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/ContextMenuDesktop.js",lineNumber:130,columnNumber:31},globalThis),te("img",{className:"contextColorThumbnail",src:n.getResolvedAssetUrl(A.thumbnail)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/ContextMenuDesktop.js",lineNumber:138,columnNumber:31},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/ContextMenuDesktop.js",lineNumber:129,columnNumber:29},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/ContextMenuDesktop.js",lineNumber:128,columnNumber:27},globalThis),te("div",{className:"colorDetails",children:te("p",{className:"truncate colorDetailsLabel",children:[Ay(A.label),te("br",{},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/ContextMenuDesktop.js",lineNumber:149,columnNumber:31},globalThis),te("span",{className:"redText",children:A.outOfStock?"OUT OF STOCK":te("br",{},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/ContextMenuDesktop.js",lineNumber:151,columnNumber:70},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/ContextMenuDesktop.js",lineNumber:150,columnNumber:31},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/ContextMenuDesktop.js",lineNumber:147,columnNumber:29},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/ContextMenuDesktop.js",lineNumber:146,columnNumber:27},globalThis)]},"Color-"+E,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/ContextMenuDesktop.js",lineNumber:111,columnNumber:25},globalThis))},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/ContextMenuDesktop.js",lineNumber:109,columnNumber:21},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/ContextMenuDesktop.js",lineNumber:105,columnNumber:19},globalThis),te("div",{className:"contextButtons",children:[n.canSelectedItemDrag()&&te("button",{role:"button",onClick:()=>{n.doesSelectedItemHasAttachedDependency()?$t.getState().setRemoveModalOpen(!0):n.removeSelectedItem()},children:[te("img",{src:kr+"/Icon/TrashSimple.svg",alt:"Remove"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/ContextMenuDesktop.js",lineNumber:174,columnNumber:21},globalThis),te("span",{children:"Remove"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/ContextMenuDesktop.js",lineNumber:180,columnNumber:21},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/ContextMenuDesktop.js",lineNumber:162,columnNumber:19},globalThis),n.canSelectedItemRotate()&&te("button",{role:"button",onClick:()=>n.rotateSelectedItem(),children:[te("img",{src:kr+"/Icon/Rotate.svg"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/ContextMenuDesktop.js",lineNumber:188,columnNumber:21},globalThis),te("span",{children:"Rotate"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/ContextMenuDesktop.js",lineNumber:191,columnNumber:21},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/ContextMenuDesktop.js",lineNumber:184,columnNumber:19},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/ContextMenuDesktop.js",lineNumber:160,columnNumber:15},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/ContextMenuDesktop.js",lineNumber:81,columnNumber:13},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/ContextMenuDesktop.js",lineNumber:80,columnNumber:11},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/ContextMenuDesktop.js",lineNumber:73,columnNumber:9},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/ContextMenuDesktop.js",lineNumber:71,columnNumber:5},globalThis)},POe=({selectedItemData:r,contextMenuDrawerOpen:e,dismissContextMenuDrawer:t,colors:n,colorsCategoryName:i})=>{const[a,s]=re.useState(e),o=re.useRef(null),l=$t(p=>p.CORE_API),[u,f]=re.useState(null);re.useEffect(()=>{o.current.addEventListener("drawerClosed",()=>{t()})},[o]),re.useEffect(()=>(s(e),()=>{}),[e]),re.useEffect(()=>{!r||!r.itemData||(r.overrideVariant?f(r.overrideVariant):f(r.currentVariant))},[r]);function h(){l.doesSelectedItemHasAttachedDependency()?$t.getState().setRemoveModalOpen(!0):(l.removeSelectedItem(),t())}return te("bottom-drawer",{id:"contextDrawer",ref:o,open:`${a}`,"initial-screen-coverage":"60%",children:te("div",{className:"contextMenuDrawer epigraphDrawer",slot:"bottom-drawer-content",children:te("div",{className:"contextMenuParent interactable",children:[te("div",{className:"contextContent",children:r&&r.itemData?te(li,{children:te("div",{className:"contextContentNameDiv",children:te("h3",{children:r.itemData.name},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/ContextMenuMobile.js",lineNumber:69,columnNumber:19},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/ContextMenuMobile.js",lineNumber:68,columnNumber:17},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/ContextMenuMobile.js",lineNumber:67,columnNumber:15},globalThis):""},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/ContextMenuMobile.js",lineNumber:65,columnNumber:11},globalThis),n.length>0&&l.sceneSettings.disableLocalColorOverride===!1&&te(li,{children:[te("p",{className:"colorSwatchTitle",children:["Select ",i]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/ContextMenuMobile.js",lineNumber:79,columnNumber:17},globalThis),te("div",{className:"color-grid color-variants-selection",children:n.map((p,m)=>te("div",{onClick:async()=>{await $t.getState().CORE_API.overrideSelectedItemMaterial(p.id),f(p.id)},className:u==p.id?"colorSelector selected":"colorSelector",children:[te("div",{className:"colorThumbnailContainer",children:[te("div",{className:"colorThumbnail",children:te("img",{className:"colorThumbnailImg",src:l.getResolvedAssetUrl(p.thumbnail)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/ContextMenuMobile.js",lineNumber:98,columnNumber:27},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/ContextMenuMobile.js",lineNumber:97,columnNumber:25},globalThis),te("div",{className:"checkMark",children:te("img",{src:kr+"/Icon/Check.svg"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/ContextMenuMobile.js",lineNumber:104,columnNumber:27},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/ContextMenuMobile.js",lineNumber:103,columnNumber:25},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/ContextMenuMobile.js",lineNumber:96,columnNumber:23},globalThis),te("div",{className:"colorDetails",children:te("p",{className:"truncate colorDetailsLabel",children:[Ay(p.label),te("br",{},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/ContextMenuMobile.js",lineNumber:114,columnNumber:27},globalThis),te("span",{className:"redText",children:p.outOfStock?"OUT OF STOCK":te("br",{},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/ContextMenuMobile.js",lineNumber:116,columnNumber:66},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/ContextMenuMobile.js",lineNumber:115,columnNumber:27},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/ContextMenuMobile.js",lineNumber:112,columnNumber:25},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/ContextMenuMobile.js",lineNumber:111,columnNumber:23},globalThis)]},"Color-"+m,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/ContextMenuMobile.js",lineNumber:82,columnNumber:21},globalThis))},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/ContextMenuMobile.js",lineNumber:80,columnNumber:17},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/ContextMenuMobile.js",lineNumber:78,columnNumber:15},globalThis),te("div",{className:"contextButtons",children:[l.canSelectedItemDrag()&&te("button",{role:"button",onClick:()=>h(),children:[te("img",{src:kr+"/Icon/Trash.svg"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/ContextMenuMobile.js",lineNumber:128,columnNumber:17},globalThis),te("span",{children:"Remove"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/ContextMenuMobile.js",lineNumber:131,columnNumber:17},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/ContextMenuMobile.js",lineNumber:127,columnNumber:15},globalThis),l.canSelectedItemRotate()&&te("button",{role:"button",onClick:()=>l.rotateSelectedItem(),children:[te("img",{src:kr+"/Icon/Rotate.svg"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/ContextMenuMobile.js",lineNumber:139,columnNumber:17},globalThis),te("span",{children:"Rotate"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/ContextMenuMobile.js",lineNumber:142,columnNumber:17},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/ContextMenuMobile.js",lineNumber:135,columnNumber:15},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/ContextMenuMobile.js",lineNumber:125,columnNumber:11},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/ContextMenuMobile.js",lineNumber:64,columnNumber:9},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/ContextMenuMobile.js",lineNumber:60,columnNumber:7},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/ContextMenuMobile.js",lineNumber:54,columnNumber:5},globalThis)},UOe=({selectedItemData:r,contextMenuOpen:e,dismissContextMenuDrawer:t})=>{const n=$t(p=>p.CORE_API),[i,a]=re.useState(!1),[s,o]=re.useState([]),[l,u]=re.useState(""),f=$t(p=>p.inventoryData);re.useEffect(()=>(a(e),()=>{}),[e]),re.useEffect(()=>{if(o([]),r===void 0||!r.itemData||n===null)return;const p=n.getSelectedItemColors(),m=n.getInventoryInfo()[r.itemData.skuID];if(p.map(E=>{E.outOfStock=!1,m[E.id].countAvailable==0&&(E.outOfStock=!0)}),o(p),p.length===0)return;const A=n.categoryData;A.color&&A.color.map(E=>{E.looks.map(b=>{b===p[0].id&&u(E.label)})})},[r]),re.useEffect(()=>{f!=null&&h(f)},[f]);const h=re.useCallback(p=>{const m=n.getSelectedItemData();if(m==null)return;const A=n.getSelectedItemColors(),E=p[m.itemData.skuID];A.map(b=>{b.outOfStock=!1,E[b.id].countAvailable==0&&(b.outOfStock=!0)}),o(A)},[r]);return te(li,{children:n.isMobile?te(POe,{selectedItemData:r,contextMenuDrawerOpen:i,dismissContextMenuDrawer:t,colors:s,colorsCategoryName:l},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/ContextMenu.js",lineNumber:87,columnNumber:9},globalThis):i&&te(LOe,{contextMenuDesktopOpen:i,selectedItemData:r,colors:s,colorsCategoryName:l},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/ContextMenu.js",lineNumber:96,columnNumber:11},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/ContextMenu.js",lineNumber:85,columnNumber:5},globalThis)},BOe=({configuratorWcRef:r,coreRef:e,viewInYourSpaceRef:t,disableUI:n})=>{Ya(Ct=>Ct);const i=$t(Ct=>Ct.setSideMenuState),a=$t(Ct=>Ct.sideMenuState),[s,o]=re.useState(!0),[l,u]=re.useState(!1),[f,h]=re.useState(!1),p=sf(Ct=>Ct.infoModalOpen),m=sf(Ct=>Ct.updateInfoModalOpen),[A,E]=re.useState(!1),[b,v]=re.useState(!1),[x,S]=re.useState("Link not generated!"),[_,w]=re.useState(!1),R=$t(Ct=>Ct.removeModalOpen),N=$t(Ct=>Ct.setRemoveModalOpen),P=$t(Ct=>Ct.moveModalOpen),I=$t(Ct=>Ct.setMoveModalOpen),D=$t(Ct=>Ct.outOfStockModalOpen),B=$t(Ct=>Ct.setOutOfStockModalOpen),k=re.useRef(null),U=re.useRef(null),z=re.useRef(null),[V,j]=re.useState({}),[H,K]=re.useState({}),[J,q]=re.useState(!1),[Q,$]=re.useState(""),[Z,he]=re.useState(""),ce=Ya(Ct=>Ct.productData),oe=Bm(Ct=>Ct.cart),se=Bm(Ct=>Ct.previewCartModalOpen),_e=Bm(Ct=>Ct.togglePreviewCartModal),[we,Ce]=re.useState(!1),[ze,pe]=re.useState(!1),[Pe,Ie]=re.useState(!0),tt=rne(Ct=>Ct),Ye=$t(Ct=>Ct.CORE_API),[_t,De]=re.useState(!1),[Ne,it]=re.useState(!0),[gt,de]=re.useState(Ye.getSceneItemCount()>0),[X,ie]=re.useState(Ye.sceneSettings.showSaveButton),[xe,He]=re.useState(Ye.sceneSettings.showContextMenu),Qe=$t(Ct=>Ct.viewInYourSpaceMenuBtnVisible),[at,At]=re.useState(Ye.sceneSettings.showResetBtn),[Le,be]=re.useState(Ye.sceneSettings.showDimensionBtn),[ke,et]=re.useState(Ye.sceneSettings.showHotspotsBtn),[nt,Ke]=re.useState(Ye.sceneSettings.currency);re.useEffect(()=>(Ie(Ye.areHotspotsVisible()),()=>{}),[a]);const Et=re.useCallback(()=>{Ie(!Ye.areHotspotsVisible()),Ye.areHotspotsVisible()?Ye.hideAllHotspots():Ye.showAllHotspots()},[]),Pt=re.useCallback(()=>{De(!Ye.areDimensionsVisible()),Ye.areDimensionsVisible()?Ye.hideDimensions():Ye.showDimensions()},[]);function Nt(){w(!0)}const ae=re.useCallback(()=>{pe(!0),v(!0),Ye.shareScene().then(Ct=>{S(Ct),pe(!1),Ye.alert({alertMsg:"Configuration saved succesfully!",alertTime:4e3,alertType:"success",alertLabel:"Success"})}).catch(Ct=>{pe(!1),Ye.alert({alertMsg:"Error saving this configuration!",alertTime:5e3,alertType:"error",alertLabel:"Unsaved Changes",persistant:!0})})},[]);re.useEffect(()=>{U.current&&U.current.appendChild(e.current)},[U]),re.useEffect(()=>{z.current&&z.current.appendChild(t.current)},[z]),yr(Ye.EVENTS.SCENE.Hotspot_Enter,Ct=>{if($t.getState().CORE_API.isMobile)iy.info({title:Ye.getActiveHotspot()}),K(Ye.getActiveHotspot().hotspotData),h(!0);else{const{hotspotAbsID:an}=Ct;tt.actions.enterHotspotInFeaturesTab(an)}}),yr(Ye.EVENTS.SCENE.Hotspot_Exit,Ct=>{tt.actions.exitHotspot()}),yr(Ye.EVENTS.SCENE.MaterialOverrides_Exists,Ct=>{$t.setState({materialOverrideExists:Ct})}),yr(Ye.EVENTS.UI.UtilityMenu_Hide,Ct=>{it(!1)}),yr(Ye.EVENTS.UI.UtilityMenu_Show,Ct=>{it(!0)}),yr(Ye.EVENTS.UI.ShareButton_Hide,Ct=>{de(!1)}),yr(Ye.EVENTS.UI.ShareButton_Show,Ct=>{de(!0)}),yr(Ye.EVENTS.UI.ContextMenu_Show,Ct=>{j(Ct?.primary.data),Ce(!0)}),yr(Ye.EVENTS.UI.ContextMenu_Hide,Ct=>{Ce(!1)}),yr(Ye.EVENTS.SCENE.DraggingOnDrop_CollsionDetected,Ct=>{I(!0);let an="";Object.keys(Ct).length==1?an=`The item below will be lost if you place this here:
|
|
8696
|
+
`;N(Q)},[R]),V=re.useCallback(()=>{a.isMobile!==!0&&D!==!0&&(B(!0),!$t.getState().CORE_API.sceneSettings.draggableUI&&(P===!0?(N(null),r(n)):z()))},[P,D,R]),j=re.useCallback(()=>{a.isMobile!==!0&&(B(!1),!$t.getState().CORE_API.sceneSettings.draggableUI&&(window.mouseDragging||P===!0&&t&&t()))},[P,D]),H=re.useCallback(J=>{$t.getState().CORE_API.sceneSettings.draggableUI!==!1&&P!==!1&&(window.pointerDownPos=J.offsetX,window.mouseDragging=!1,window.mouseDownImgSrc=a.getResolvedAssetUrl(_),window.mouseDownSkuID=n)},[P]),K=re.useCallback(J=>{const q=b.lookDetails[u];q.productCategory={id:b.categoryID,label:b.categoryLabel},a.isMobile===!0?(o(q),l(!0)):(J.stopPropagation(),P&&t&&t(),o(q),l(!0))},[P,u,b]);return te(li,{children:te("div",{className:i?"imageContainer active":"imageContainer",draggable:!1,children:[te("div",{className:"contentContainer",children:[te("div",{id:"itemCard"+n,className:"contentOverlay ".concat(`${P===!0&&D===!0?"enabled-item-overlay":"disabled-item-overlay"}`),ref:s,onClick:J=>U(J),onTouchStart:J=>H(J),onMouseEnter:V,onMouseLeave:j,onMouseDown:H,children:te("img",{draggable:!1,className:"addIcon",src:kr+"/Icon/Plus.svg"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/ItemCard.js",lineNumber:283,columnNumber:13},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/ItemCard.js",lineNumber:267,columnNumber:11},globalThis),te("img",{className:"product-image product-image-default-state ".concat(`${P===!1?"product-image-disabled":""}`),draggable:!1,alt:x,src:a.getResolvedAssetUrl(_)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/ItemCard.js",lineNumber:290,columnNumber:11},globalThis),te("div",{className:"spawning-requirements-container",hidden:!(P===!1&&D===!0&&R),children:te("p",{className:"spawning-requirements-text",children:R},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/ItemCard.js",lineNumber:303,columnNumber:13},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/ItemCard.js",lineNumber:299,columnNumber:11},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/ItemCard.js",lineNumber:266,columnNumber:9},globalThis),te("div",{className:a.isMobile?"showAlways itemDetails":"itemDetails",onClick:K,children:[te("div",{className:"item-details-icon"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/ItemCard.js",lineNumber:313,columnNumber:11},globalThis),te("p",{className:"truncate",children:x},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/ItemCard.js",lineNumber:314,columnNumber:11},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/ItemCard.js",lineNumber:307,columnNumber:9},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/ItemCard.js",lineNumber:262,columnNumber:7},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/ItemCard.js",lineNumber:261,columnNumber:5},globalThis)},hOe=({visible:r})=>{const e=Ya(h=>h),t=Jo(h=>h.allActiveVariants),n=sf(h=>h.infoObject),i=sf(h=>h.infoModalOpen),a=sf(h=>h.updateInfoModalOpen),[s,o]=re.useState(""),[l,u]=re.useState([]),f=$t(h=>h.CORE_API);return re.useEffect(()=>{Object.keys(e.categoryData).length!=0&&u(e.categoryData.build)},[e.categoryData]),re.useEffect(()=>(o(t[Object.keys(t)[0]]),()=>{}),[t]),te(li,{children:te("div",{className:i?"infoModal open":"infoModal",children:[te("button",{className:"closeButton",onClick:()=>{a(!1)},children:te("img",{src:kr+"/Icon/X.svg"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/InfoModal.js",lineNumber:51,columnNumber:11},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/InfoModal.js",lineNumber:45,columnNumber:9},globalThis),te("a",{href:n.productPageUrl,className:"categoryLink",target:"_blank",style:n?.productPageUrl?{pointerEvents:"all"}:{pointerEvents:"none"},children:[te("h2",{className:"categoryTitle",children:n?.productCategory?.label},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/InfoModal.js",lineNumber:63,columnNumber:11},globalThis),n.productPageUrl&&te("img",{src:kr+"/Icon/OpenTab.svg"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/InfoModal.js",lineNumber:68,columnNumber:13},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/InfoModal.js",lineNumber:53,columnNumber:9},globalThis),te("div",{className:"infoModalImageContainer",children:n?.thumbnails?.high?te("img",{className:"itemImage",src:f.getResolvedAssetUrl(n.thumbnails.high)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/InfoModal.js",lineNumber:75,columnNumber:13},globalThis):""},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/InfoModal.js",lineNumber:73,columnNumber:9},globalThis),te("div",{className:"infoModalTextContainer",children:[te("h2",{className:"itemTitle",children:n.title},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/InfoModal.js",lineNumber:86,columnNumber:11},globalThis),te("pre",{className:"itemDescription",children:n.description},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/InfoModal.js",lineNumber:87,columnNumber:11},globalThis),n.boundingBoxSize?te("p",{className:"infoModalDimensions",children:[n.boundingBoxSize.x.toFixed(1),"” W x"," ",n.boundingBoxSize.y.toFixed(1),"” D x"," ",n.boundingBoxSize.z.toFixed(1),"” H"]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/InfoModal.js",lineNumber:90,columnNumber:13},globalThis):""]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/InfoModal.js",lineNumber:85,columnNumber:9},globalThis),te("div",{className:"infoModalActions",children:te("button",{className:"item-price",disabled:!0,children:n.price&&`$${b6(parseFloat(n.price).toFixed(2))}`},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/InfoModal.js",lineNumber:101,columnNumber:11},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/InfoModal.js",lineNumber:100,columnNumber:9},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/InfoModal.js",lineNumber:44,columnNumber:7},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/InfoModal.js",lineNumber:43,columnNumber:5},globalThis)};function fOe({element:r,index:e,elementsLength:t,spawnGhosts:n,spawnItem:i,removeAllGhosts:a,infoModalOpen:s,setItemAllowed:o,activeItems:l}){return te("div",{className:"subContainer topContainer",children:[te("h4",{className:"subheading",children:r.label},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/BuildUI.js",lineNumber:36,columnNumber:7},this),te("div",{className:"sidemenuContent",children:te("div",{className:"item-grid",children:r.skus.map(u=>te(ine,{skuId:u,categoryID:r.categoryID,spawnGhosts:n,spawnItem:i,removeAllGhosts:a,modalOpen:s,categoryDataIndex:e,setItemAllowed:o,active:l.includes(u)},"itemCardB"+u,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/BuildUI.js",lineNumber:41,columnNumber:13},this))},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/BuildUI.js",lineNumber:39,columnNumber:9},this)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/BuildUI.js",lineNumber:38,columnNumber:7},this),e!==t-1?te("div",{className:"itemGridDivider"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/BuildUI.js",lineNumber:58,columnNumber:9},this):""]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/BuildUI.js",lineNumber:35,columnNumber:5},this)}function dOe({categoryID:r,index:e,categories:t,activeTab:n,tabsRef:i,mobileGrid:a}){const s=re.useCallback(o=>{if(a.current.scrollLeft===o)return;let l,u,f,h=!1;function p(m){l===void 0&&(l=m);const A=m-l;if(u!==m){const E=A/200;a.current.scrollLeft>o?(f=(a.current.scrollLeft-o)*Math.min(E,1),a.current.scrollLeft-=f,a.current.scrollLeft===o&&(h=!0)):a.current.scrollLeft<o&&(f=(o-a.current.scrollLeft)*Math.min(E,1),a.current.scrollLeft+=f,a.current.scrollLeft===o&&(h=!0))}A<200&&(u=m,!h&&window.requestAnimationFrame(p))}window.requestAnimationFrame(p)},[]);return te(li,{children:te("a",{className:n===e?"mobileTab scrolled":"mobileTab",onClick:()=>{for(let o=0;o<t.length;o++)o===e&&s(i.current[o].offsetLeft)},children:t[r].label},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/BuildUI.js",lineNumber:130,columnNumber:7},this)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/BuildUI.js",lineNumber:129,columnNumber:5},this)}function pOe({element:r,index:e,elementsLength:t,spawnGhosts:n,spawnItem:i,removeAllGhosts:a,infoModalOpen:s,setItemAllowed:o,activeItems:l,tabsRef:u}){return te(li,{children:[te("section",{id:`section-${r.categoryID}`,className:"mobileGridSection",ref:f=>u.current[e]=f,children:r.skus.map(f=>te(ine,{skuId:f,categoryID:r.categoryID,spawnGhosts:n,spawnItem:i,removeAllGhosts:a,modalOpen:s,setItemAllowed:o,active:l.includes(f)},"itemCardB"+f,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/BuildUI.js",lineNumber:176,columnNumber:11},this))},"mobileGridSection"+e,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/BuildUI.js",lineNumber:169,columnNumber:7},this),e!==t-1?te("div",{className:"itemGridDivider"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/BuildUI.js",lineNumber:191,columnNumber:9},this):""]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/BuildUI.js",lineNumber:168,columnNumber:5},this)}const AX=({visible:r})=>{const e=Ya(w=>w),[t,n]=re.useState([]),i=sf(w=>w.infoModalOpen),[a,s]=re.useState(0),[o,l]=re.useState(!1),[u,f]=re.useState([]),h=sf(w=>w.populateInfoObject),p=sf(w=>w.updateInfoModalOpen),m=$t(w=>w.CORE_API),A=re.useRef(null),E=re.useCallback(w=>{let R=[];for(const[N,P]of Object.entries(w))R.push(P);f(R)},[]);yr(m.EVENTS.UI.ContextMenu_InfoBtnClicked,w=>{const R=w.itemData.lookDetails[w.currentVariant];let N=R;N.price=R.price,N.id=w.currentVariant,N.productCategory={id:w.itemData.categoryID,label:w.itemData.categoryLabel},h(N),p(!0)}),yr(m.EVENTS.UI.ContextMenu_Hide,w=>{iy.info({title:"Context Menu Closed"})}),yr(m.EVENTS.SCENE.ReplaceableCategory_Updated,E),re.useEffect(()=>{const w=m.getCurrentItemsInReplaceableCategory();return E(w),()=>{}},[m]),re.useEffect(()=>{Object.keys(e.categoryData).length!==0&&n(e.categoryData.build)},[e.categoryData]);const b=re.useCallback((w,R)=>{$t.getState().CORE_API.spawnItemBySkuID(w,R)},[]),v=re.useCallback(w=>{$t.getState().CORE_API.spawnGhostsForSkuID(w,!1,1)},[]),x=re.useCallback(w=>{i||$t.getState().CORE_API.removeAllGhosts(w)},[i]),S=re.useRef([]);re.useEffect(()=>{S.current=S.current.slice(0,t.length)},[t]);const _=re.useCallback(()=>{let w=-3e3,R=-1;for(let N=0;N<t.length;N++){let P=S.current[N].getBoundingClientRect().left;P<28&&w<P&&(w=P,R=N)}R!==-1&&s(R)},[S,t]);return te(li,{children:[te("div",{className:"mobileTabContent",hidden:!r,children:te("div",{className:"scrollSpyTabs",children:[te("div",{className:"secondMobileTabs",children:Object.keys(t).map((w,R)=>te(dOe,{categoryID:w,index:R,categories:t,activeTab:a,tabsRef:S,mobileGrid:A},"mobileTabs"+w,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/BuildUI.js",lineNumber:318,columnNumber:15},globalThis))},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/BuildUI.js",lineNumber:316,columnNumber:11},globalThis),te("div",{className:"mobileGrid",ref:A,onScroll:_,children:t.map((w,R)=>te(pOe,{element:w,index:R,spawnGhosts:v,spawnItem:b,removeAllGhosts:x,infoModalOpen:i,setItemAllowed:l,activeItems:u,tabsRef:S,elementsLength:t.length},"mobileGrid"+R,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/BuildUI.js",lineNumber:331,columnNumber:15},globalThis))},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/BuildUI.js",lineNumber:329,columnNumber:11},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/BuildUI.js",lineNumber:315,columnNumber:9},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/BuildUI.js",lineNumber:314,columnNumber:7},globalThis),te("div",{className:"container desktop",hidden:!r,children:t.map((w,R)=>te(fOe,{element:w,index:R,spawnGhosts:v,spawnItem:b,removeAllGhosts:x,infoModalOpen:i,setItemAllowed:l,activeItems:u,elementsLength:t.length},`category_${w.categoryID}_${R}`,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/BuildUI.js",lineNumber:352,columnNumber:11},globalThis))},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/BuildUI.js",lineNumber:350,columnNumber:7},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/BuildUI.js",lineNumber:313,columnNumber:5},globalThis)},mOe=(r,e)=>{$t.getState().CORE_API.switchGlobalVariant(r,e)};function gOe(r,e){return te(li,{children:r!==e.length-1?te("div",{className:"itemGridDivider"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/Color.js",lineNumber:20,columnNumber:9},this):""},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/Color.js",lineNumber:18,columnNumber:5},this)}const vOe=({visible:r})=>{const e=Ya.getState().categoryData.color,t=Jo(s=>s.allActiveVariants),n=$t(s=>s.materialOverrideExists),i=$t(s=>s.CORE_API),a=re.useCallback(()=>{$t.getState().CORE_API.removeAllVariantOverrides()},[]);return te(li,{children:te("div",{className:"container desktop",style:{height:"auto"},hidden:!r,children:[n&&te("button",{className:"removeAllColorOverridesButton",onClick:a,disabled:!n,children:"Remove all overrides"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/Color.js",lineNumber:47,columnNumber:11},globalThis),e.map((s,o)=>te("div",{className:"subContainer topContainer",children:[te("h4",{className:"subheading",children:s.label},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/Color.js",lineNumber:62,columnNumber:15},globalThis),te("div",{className:"sidemenuContent",children:te("div",{className:"color-grid color-variants-selection",children:s.looks.map((l,u)=>te("div",{onClick:()=>mOe(s.id,l),className:t[s.id]==l?"colorSelector selected":"colorSelector",children:[te("div",{className:"colorThumbnailContainer",children:te("div",{className:"colorThumbnail",children:[te("div",{className:"checkMark",children:te("img",{src:kr+"/Icon/Check.svg"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/Color.js",lineNumber:82,columnNumber:31},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/Color.js",lineNumber:81,columnNumber:29},globalThis),te("img",{className:"contextColorThumbnail",src:i.getResolvedAssetUrl(Ya.getState().lookData[l]?.thumbnail)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/Color.js",lineNumber:89,columnNumber:29},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/Color.js",lineNumber:80,columnNumber:27},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/Color.js",lineNumber:79,columnNumber:25},globalThis),te("div",{className:"colorDetails",children:[te("p",{className:"truncate colorDetailsLabel",children:Ay(Ya.getState().lookData[l]?.label)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/Color.js",lineNumber:99,columnNumber:27},globalThis),te("p",{className:"truncate colorDetailsLabel",children:Ay(Ya.getState().lookData[l]?.accent)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/Color.js",lineNumber:104,columnNumber:27},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/Color.js",lineNumber:98,columnNumber:25},globalThis)]},"Color-"+u,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/Color.js",lineNumber:68,columnNumber:23},globalThis))},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/Color.js",lineNumber:65,columnNumber:17},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/Color.js",lineNumber:64,columnNumber:15},globalThis),te(gOe,{},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/Color.js",lineNumber:117,columnNumber:15},globalThis)]},`${s.label}-${o}`,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/Color.js",lineNumber:58,columnNumber:13},globalThis))]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/Color.js",lineNumber:41,columnNumber:7},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/Color.js",lineNumber:39,columnNumber:5},globalThis)},rne=To((r,e)=>({activeHotspotData:null,activeFeatureID:"",actions:{enterHotspotInFeaturesTab(n){$t.getState().sideMenuState!==2&&$t.setState({sideMenuState:2}),r({activeFeatureID:n})},exitHotspot(){r({activeFeatureID:null})}}}));function yOe(r,e){if(r.current.scrollTop===e)return;let t,n,i,a=!1;function s(o){t===void 0&&(t=o);const l=o-t;if(n!==o){const u=l/200;r.current.scrollTop>e?(i=(r.current.scrollTop-e)*Math.min(u,1),r.current.scrollTop-=i,r.current.scrollTop===e&&(a=!0)):r.current.scrollTop<e&&(i=(e-r.current.scrollTop)*Math.min(u,1),r.current.scrollTop+=i,r.current.scrollTop===e&&(a=!0))}l<200&&(n=o,!a&&window.requestAnimationFrame(s))}window.requestAnimationFrame(s)}function bX({carouselTabKey:r,hotspotContentRef:e}){const t=re.useRef(null),n=$t(a=>a.CORE_API),i=a=>{a.target.style.width="100%"};return te(PZ,{children:te("div",{className:"carouselTabParent",ref:t,children:[r.type==="img"&&te("img",{src:n.getResolvedAssetUrl(r.link),alt:r.alt?r.alt:r.type,onLoad:a=>i(a)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/ProductFeaturesUI.js",lineNumber:74,columnNumber:11},this),r.type==="video"&&te(li,{children:[te("p",{className:"carouselVideoPlaceholderText",children:r.alt?r.alt:r.type},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/ProductFeaturesUI.js",lineNumber:82,columnNumber:13},this),te("video",{src:n.getResolvedAssetUrl(r.link),muted:!0,loop:!0,autoPlay:!0,playsInline:!0,controls:!1,onLoad:a=>i(a)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/ProductFeaturesUI.js",lineNumber:85,columnNumber:13},this)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/ProductFeaturesUI.js",lineNumber:81,columnNumber:11},this)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/ProductFeaturesUI.js",lineNumber:72,columnNumber:7},this)},"SplideSlide-"+r.link,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/ProductFeaturesUI.js",lineNumber:71,columnNumber:5},this)}function AOe({tabs:r,tabKey:e,index:t,activeFeatureID:n}){const[i,a]=re.useState([]),s=re.useRef(null),o=re.useRef(null);$t(p=>p.CORE_API);const l=re.useRef(null),u=re.useCallback(p=>{$t.getState().CORE_API.clickHotspot("hotspot3D_"+p,{ignoreUI:!0})},[]);re.useEffect(()=>{let p=[],m=e.hotspotData;for(let A=0;A<m.carousel.length;A++)m.carousel[A].type!==""&&m.carousel[A].link!==""&&(p=[...p,{...m.carousel[A],index:A}]);a(p)},[e]),re.useEffect(()=>{const{current:p}=o;p&&(n===p.id?f(p):h(p))},[n]);const f=re.useCallback(p=>{p.checked=!0,p.nextElementSibling.nextElementSibling.setAttribute("style","max-height: 800px;");let E=p.nextElementSibling.clientHeight*t;yOe(r,E)},[]),h=re.useCallback(p=>{p.nextElementSibling.nextElementSibling.setAttribute("style","max-height: 0px;"),p.checked=!1},[]);return te(li,{children:e.hotspotData&&te("div",{className:"accordionTab",children:[te("input",{type:"checkbox",name:"accordion",id:"rd_"+e.itemData.skuID+"_"+e.hotspotData.hotspotID,defaultChecked:!1,ref:o,onClick:p=>{u(e.itemData.skuID+"_"+e.hotspotData.hotspotID,{ignoreUI:!1})}},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/ProductFeaturesUI.js",lineNumber:169,columnNumber:11},this),te("label",{className:"tab-label",htmlFor:"rd_"+e.itemData.skuID+"_"+e.hotspotData.hotspotID,children:[te("span",{children:e.hotspotData.title},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/ProductFeaturesUI.js",lineNumber:191,columnNumber:13},this),te("img",{className:"accordion-closed",src:kr+"/Icon/Plus.svg"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/ProductFeaturesUI.js",lineNumber:192,columnNumber:13},this),te("img",{className:"accordion-open",src:kr+"/Icon/Minus.svg"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/ProductFeaturesUI.js",lineNumber:196,columnNumber:13},this)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/ProductFeaturesUI.js",lineNumber:185,columnNumber:11},this),te("div",{className:"tab-content",children:te("div",{className:"hotspot-content",ref:l,children:[te($Z,{className:"ignore",modules:{toolbar:!1},theme:"bubble",readOnly:!0,value:e.hotspotData.description},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/ProductFeaturesUI.js",lineNumber:204,columnNumber:15},this),i.length==1&&i[0].type!=""&&i[0].link!=""&&te(bX,{carouselTabKey:i[0],index:0,hotspotContentRef:l},"carouselTabs_"+e.itemData.skuID+"_"+e.hotspotData.hotspotID+"_0",!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/ProductFeaturesUI.js",lineNumber:214,columnNumber:19},this),i.length>1&&te("div",{className:"carousel",children:te(LZ,{options:{perPage:1,preloadPages:3},ref:s,children:i.map((p,m)=>p.type!=""&&p.link!=""&&te(bX,{carouselTabKey:p,index:m,hotspotContentRef:l},"carouselTabs_"+e.itemData.skuID+"_"+e.hotspotData.hotspotID+"_"+p.index,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/ProductFeaturesUI.js",lineNumber:241,columnNumber:27},this))},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/ProductFeaturesUI.js",lineNumber:230,columnNumber:19},this)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/ProductFeaturesUI.js",lineNumber:229,columnNumber:17},this)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/ProductFeaturesUI.js",lineNumber:203,columnNumber:13},this)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/ProductFeaturesUI.js",lineNumber:202,columnNumber:11},this)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/ProductFeaturesUI.js",lineNumber:168,columnNumber:9},this)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/ProductFeaturesUI.js",lineNumber:166,columnNumber:5},this)}const bOe=({visible:r})=>{const e=$t(i=>i.tabSpawnCount),t=re.useRef(null),n=rne(i=>i.activeFeatureID);return te(li,{children:te("div",{className:"col desktop productFeatureUIDic",hidden:!r,ref:t,children:te("div",{className:"tabs",children:[e.length==0&&te("div",{className:"tabEmptyText",children:"*Please add an item to the scene to see the features"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/ProductFeaturesUI.js",lineNumber:282,columnNumber:13},globalThis),e.map((i,a)=>te(AOe,{tabs:t,activeFeatureID:n,tabKey:i,index:a},"tabs_"+i.itemData.skuID+"_"+i.hotspotData.hotspotID,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/ProductFeaturesUI.js",lineNumber:287,columnNumber:13},globalThis))]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/ProductFeaturesUI.js",lineNumber:280,columnNumber:9},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/ProductFeaturesUI.js",lineNumber:275,columnNumber:7},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/ProductFeaturesUI.js",lineNumber:274,columnNumber:5},globalThis)},_Oe=function(r,e){return r.filter(function(t,n){return e!==n})},EOe=function(r,e,t){let n=r.slice();return n[e].quantity=t,n},Bm=To((r,e)=>({cart:[],cartTotalPrice:0,deleteCartItem:t=>{r(n=>({cart:_Oe(n.cart,t)}))},addToCart:t=>{r(n=>({cart:[...n.cart,t]}))},updateQuantity:(t,n)=>{r(i=>({cart:EOe(i.cart,t,n)}))},previewCartModalOpen:!1,togglePreviewCartModal:()=>{const{previewCartModalOpen:t}=e();t===!0?$t.getState().CORE_API.reviewCartHidden():$t.getState().CORE_API.reviewCartShown(),r({previewCartModalOpen:!t})},actions:{setCartTotalPrice:t=>{r(()=>({cartTotalPrice:t}))}}})),ane=({itemObject:r})=>{const e=$t(a=>a.CORE_API),t=$t(a=>a.disableCart),[n,i]=re.useState(e.sceneSettings.currency);return te(li,{children:te("div",{className:r.countUnavailable=="0"||t?"cartItem":"cartItem cartItemOutOfStock",draggable:!1,style:{display:r?"":"none"},children:[te("div",{className:"cartItemImage",children:te("img",{draggable:!1,src:e.getResolvedAssetUrl(r.thumbnails.review?r.thumbnails.review:r.thumbnails.low),alt:r.title},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/CartItem.js",lineNumber:24,columnNumber:11},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/CartItem.js",lineNumber:23,columnNumber:9},globalThis),te("div",{className:"cartItemDetails",children:[te("h4",{children:r.title},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/CartItem.js",lineNumber:35,columnNumber:11},globalThis),te("h5",{children:r.subtitle},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/CartItem.js",lineNumber:36,columnNumber:11},globalThis),te("div",{className:"cartRow",children:[te("span",{className:"itemCount",children:[e.sceneSettings.textSettings.cartQuantityText,":"," ",r.count]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/CartItem.js",lineNumber:38,columnNumber:13},globalThis),te("h3",{className:"itemPrice".concat(t===!0?" hide":""),children:[n,parseFloat(r.price).toFixed(2)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/CartItem.js",lineNumber:42,columnNumber:13},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/CartItem.js",lineNumber:37,columnNumber:11},globalThis),r.actionButton&&te("span",{className:"actionButton",onClick:()=>e.actionButtonClicked(r),children:r.actionButton.text},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/CartItem.js",lineNumber:52,columnNumber:13},globalThis),te("div",{className:"cartRow".concat(t===!0||r.countUnavailable=="0"?" hide":""),children:[te("img",{className:"cartRowImage",src:kr+"/Icon/Info_red.png"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/CartItem.js",lineNumber:66,columnNumber:13},globalThis),te("h3",{className:"itemAvailable",children:[r.countAvailable," IN STOCK"]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/CartItem.js",lineNumber:70,columnNumber:13},globalThis),te("span",{className:"itemCount",children:"- quantities requested not available"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/CartItem.js",lineNumber:74,columnNumber:13},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/CartItem.js",lineNumber:59,columnNumber:11},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/CartItem.js",lineNumber:34,columnNumber:9},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/CartItem.js",lineNumber:14,columnNumber:7},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/CartItem.js",lineNumber:13,columnNumber:5},globalThis)},SOe=({})=>{const r=Bm(o=>o.cart),e=Bm(o=>o.previewCartModalOpen),t=Bm(o=>o.togglePreviewCartModal),n=$t(o=>o.CORE_API),i=$t(o=>o.disableCart),a=$t(o=>o.cartMessage),s=re.useCallback(()=>{n.checkout()},[]);return te(li,{children:te("div",{className:e?"previewCartModal open":"previewCartModal",children:[te("div",{className:"previewCartModalChild",children:[te("button",{className:"closeButton",onClick:()=>{t()},children:te("img",{src:kr+"/Icon/X.svg"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/PreviewCart.js",lineNumber:46,columnNumber:13},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/PreviewCart.js",lineNumber:40,columnNumber:11},globalThis),r.length<=0&&te("h3",{className:"cartEmptyText",children:"Your cart is currently empty"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/PreviewCart.js",lineNumber:49,columnNumber:13},globalThis),r.length>0&&te(li,{children:[te("h2",{className:"cartTitle",children:n.sceneSettings.textSettings.cartHeadingText},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/PreviewCart.js",lineNumber:53,columnNumber:15},globalThis),te("div",{className:"previewCartContentParentDiv",children:te("div",{className:"previewCartContent",children:r.map((o,l)=>te(ane,{itemObject:o,index:l},`Cart Item-${l}`,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/PreviewCart.js",lineNumber:59,columnNumber:21},globalThis))},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/PreviewCart.js",lineNumber:57,columnNumber:17},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/PreviewCart.js",lineNumber:56,columnNumber:15},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/PreviewCart.js",lineNumber:52,columnNumber:13},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/PreviewCart.js",lineNumber:39,columnNumber:9},globalThis),te("div",{className:"checkButtonParentDiv".concat(i===!0?" hide":""),children:[a&&te("div",{className:"cartMessageDiv",children:te("span",{children:a},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/PreviewCart.js",lineNumber:77,columnNumber:15},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/PreviewCart.js",lineNumber:76,columnNumber:13},globalThis),te("button",{className:"checkoutButton",onClick:s,children:te("span",{children:n.sceneSettings.addToCartCTAText},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/PreviewCart.js",lineNumber:81,columnNumber:13},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/PreviewCart.js",lineNumber:80,columnNumber:11},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/PreviewCart.js",lineNumber:70,columnNumber:9},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/PreviewCart.js",lineNumber:34,columnNumber:7},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/PreviewCart.js",lineNumber:33,columnNumber:5},globalThis)},xOe=(r,e)=>{$t.getState().CORE_API.switchGlobalGeometryVariant(r,e)};function TOe(r,e){return te(li,{children:r!==e.length-1?te("div",{className:"itemGridDivider"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/GeometryVariants.js",lineNumber:22,columnNumber:9},this):""},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/GeometryVariants.js",lineNumber:20,columnNumber:5},this)}const wOe=({visible:r})=>{const e=Ya.getState().categoryData.geometryVariants,t=Jo(i=>i.allActiveGeometryVariants),n=$t(i=>i.CORE_API);return te(li,{children:te("div",{className:"container desktop",style:{height:"auto"},hidden:!r,children:e.map((i,a)=>te("div",{className:"subContainer topContainer",children:[te("h4",{className:"subheading",children:i.label},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/GeometryVariants.js",lineNumber:52,columnNumber:15},globalThis),te("div",{className:"sidemenuContent",children:te("div",{className:"color-grid geometry-variants-selection",children:Object.keys(i.variants).map((s,o)=>te("div",{onClick:()=>xOe(i.id,s),className:t[i.id]==s?"colorSelector selected":"colorSelector",children:[te("div",{className:"colorThumbnailContainer",children:te("div",{className:"colorThumbnail",style:{borderRadius:"0%"},children:[te("div",{className:"checkMark",children:te("img",{src:kr+"/Icon/Check.svg"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/GeometryVariants.js",lineNumber:78,columnNumber:31},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/GeometryVariants.js",lineNumber:77,columnNumber:29},globalThis),te("img",{className:"contextColorThumbnail",src:n.getResolvedAssetUrl(i.variants[s].thumbnail)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/GeometryVariants.js",lineNumber:85,columnNumber:29},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/GeometryVariants.js",lineNumber:73,columnNumber:27},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/GeometryVariants.js",lineNumber:72,columnNumber:25},globalThis),te("div",{className:"colorDetails",children:te("p",{className:"truncate colorDetailsLabel",children:Ay(i.variants[s].label)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/GeometryVariants.js",lineNumber:94,columnNumber:27},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/GeometryVariants.js",lineNumber:93,columnNumber:25},globalThis)]},"Color-"+o,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/GeometryVariants.js",lineNumber:58,columnNumber:23},globalThis))},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/GeometryVariants.js",lineNumber:55,columnNumber:17},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/GeometryVariants.js",lineNumber:54,columnNumber:15},globalThis),te(TOe,{},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/GeometryVariants.js",lineNumber:104,columnNumber:15},globalThis)]},`${i.label}-${a}`,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/GeometryVariants.js",lineNumber:48,columnNumber:13},globalThis))},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/GeometryVariants.js",lineNumber:41,columnNumber:7},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/GeometryVariants.js",lineNumber:39,columnNumber:5},globalThis)},COe=(r,e)=>{$t.getState().CORE_API.switchGlobalGeometryVariant(r,e)},MOe=(r,e)=>{$t.getState().CORE_API.switchGlobalVariant(r,e)};function ROe({color:r,index:e,elementId:t,allActiveVariants:n}){return te("div",{onClick:()=>MOe(t,r),className:n[t]==r?"colorSelector selected":"colorSelector",children:[te("div",{className:"colorThumbnailContainer",children:te("div",{className:"colorThumbnail",children:[te("div",{className:"checkMark",children:te("img",{src:kr+"/Icon/Check.svg"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/VariantMobile.js",lineNumber:39,columnNumber:13},this)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/VariantMobile.js",lineNumber:38,columnNumber:11},this),te("img",{className:"contextColorThumbnail",src:$t.getState().CORE_API.getResolvedAssetUrl(Ya.getState().lookData[r]?.thumbnail)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/VariantMobile.js",lineNumber:41,columnNumber:11},this)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/VariantMobile.js",lineNumber:37,columnNumber:9},this)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/VariantMobile.js",lineNumber:36,columnNumber:7},this),te("div",{className:"colorDetails",children:te("p",{className:"truncate-mobile colorDetailsLabel",children:Ay(Ya.getState().lookData[r]?.label)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/VariantMobile.js",lineNumber:52,columnNumber:9},this)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/VariantMobile.js",lineNumber:51,columnNumber:7},this)]},"Color-"+e,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/VariantMobile.js",lineNumber:27,columnNumber:5},this)}function IOe({variant:r,variantId:e,index:t,elementId:n,allActiveGeometryVariants:i}){return te("div",{onClick:()=>COe(n,e),className:i[n]==e?"colorSelector selected":"colorSelector",children:[te("div",{className:"colorThumbnailContainer",children:te("div",{className:"colorThumbnail",children:[te("div",{className:"checkMark",children:te("img",{src:kr+"/Icon/Check.svg"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/VariantMobile.js",lineNumber:80,columnNumber:13},this)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/VariantMobile.js",lineNumber:79,columnNumber:11},this),te("img",{className:"contextColorThumbnail",src:$t.getState().CORE_API.getResolvedAssetUrl(r.thumbnail)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/VariantMobile.js",lineNumber:82,columnNumber:11},this)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/VariantMobile.js",lineNumber:78,columnNumber:9},this)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/VariantMobile.js",lineNumber:77,columnNumber:7},this),te("div",{className:"colorDetails",children:te("p",{className:"truncate-mobile colorDetailsLabel",children:Ay(r.label)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/VariantMobile.js",lineNumber:91,columnNumber:9},this)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/VariantMobile.js",lineNumber:90,columnNumber:7},this)]},"GeometryVariant-"+t,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/VariantMobile.js",lineNumber:68,columnNumber:5},this)}function _X({variantType:r,element:e,allActiveVariants:t,startIndex:n}){return te(li,{children:[r=="color"&&e.looks.map((i,a)=>te(ROe,{color:i,index:a,elementId:e.id,allActiveVariants:t},"MobileGridInternal_"+a,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/VariantMobile.js",lineNumber:105,columnNumber:13},this)),r=="geometry"&&Object.keys(e.variants).map((i,a)=>te(IOe,{variant:e.variants[i],index:a,elementId:e.id,variantId:i,allActiveGeometryVariants:t},"MobileGridVariantInternal_"+a,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/VariantMobile.js",lineNumber:117,columnNumber:13},this))]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/VariantMobile.js",lineNumber:101,columnNumber:5},this)}const NOe=({sortedVariantsTabOrder:r})=>{const e=Ya.getState().categoryData.color,t=Ya.getState().categoryData.geometryVariants,n=Jo(v=>v.allActiveVariants),i=Jo(v=>v.allActiveGeometryVariants),a=$t(v=>v.materialOverrideExists);$t(v=>v.CORE_API);const[s,o]=re.useState(0),[l,u]=re.useState(0);re.useEffect(()=>{let v=0;r.includes("color")===!0&&(v+=e.length),r.includes("geometryVariants")===!0&&(v+=t.length),u(v)},[e,t]);const f=re.useCallback(({index:v})=>te(li,{children:v!==l-1?te("div",{className:"itemGridDivider"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/VariantMobile.js",lineNumber:160,columnNumber:13},globalThis):te("div",{className:"itemGridPlaceholder"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/VariantMobile.js",lineNumber:162,columnNumber:13},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/VariantMobile.js",lineNumber:158,columnNumber:9},globalThis),[e,t,l]),h=re.useCallback(()=>{$t.getState().CORE_API.removeAllVariantOverrides()},[]),p=re.useCallback(v=>{if(A.current.scrollLeft===v)return;let x,S,_,w=!1;function R(N){x===void 0&&(x=N);const P=N-x;if(S!==N){const I=P/200;A.current.scrollLeft>v?(_=(A.current.scrollLeft-v)*Math.min(I,1),A.current.scrollLeft-=_,A.current.scrollLeft===v&&(w=!0)):A.current.scrollLeft<v&&(_=(v-A.current.scrollLeft)*Math.min(I,1),A.current.scrollLeft+=_,A.current.scrollLeft===v&&(w=!0))}P<200&&(S=N,!w&&window.requestAnimationFrame(R))}window.requestAnimationFrame(R)},[]),m=re.useRef([]);re.useEffect(()=>{m.current=m.current.slice(0,l)},[l]);const A=re.useRef(null),E=re.useCallback(({categoryID:v,label:x,index:S,totalLength:_})=>te(li,{children:te("a",{className:s===S?"mobileTab scrolled":"mobileTab",onClick:()=>{for(let w=0;w<_;w++)w===S&&p(m.current[w].offsetLeft)},children:x},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/VariantMobile.js",lineNumber:232,columnNumber:11},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/VariantMobile.js",lineNumber:231,columnNumber:9},globalThis),[s,m]),b=re.useCallback(()=>{let v=-3e3,x=-1;for(let S=0;S<l;S++){let _=m.current[S].getBoundingClientRect().left;_<28&&v<_&&(v=_,x=S)}x!==-1&&o(x)},[m,e,t,l]);return te(li,{children:te("div",{className:"mobileTabContent",children:te("div",{className:"scrollSpyTabs",children:[te("div",{className:"secondMobileTabs",children:r.map((v,x)=>{if(v=="color")return e.map((S,_)=>te(E,{categoryID:S.id,label:S.label,index:x==0?_:r.includes("geometryVariants")?t.length+_:_,totalLength:l},"mobileTabsColors"+S.id,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/VariantMobile.js",lineNumber:274,columnNumber:19},globalThis));if(v=="geometryVariants")return t.map((S,_)=>te(E,{categoryID:S.id,label:S.label,index:x==0?_:r.includes("color")?e.length+_:_,totalLength:l},"mobileTabsVariants"+S.id,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/VariantMobile.js",lineNumber:290,columnNumber:19},globalThis))})},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/VariantMobile.js",lineNumber:270,columnNumber:11},globalThis),te("div",{children:te("div",{className:"mobileGrid mobileGridCenter",ref:A,onScroll:b,children:te("section",{className:"mobileGridSection",children:[a&&te("button",{onClick:h,className:"removeAllColorOverridesButton",disabled:!a,children:[te("div",{className:"iconContainer",children:te("img",{src:kr+"/Icon/TrashSimple.svg",alt:"Remove"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/VariantMobile.js",lineNumber:321,columnNumber:23},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/VariantMobile.js",lineNumber:320,columnNumber:21},globalThis),"Remove all",te("br",{},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/VariantMobile.js",lineNumber:330,columnNumber:21},globalThis),"overrides"]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/VariantMobile.js",lineNumber:315,columnNumber:19},globalThis),r.map((v,x)=>{if(v=="color")return e.map((S,_)=>te("section",{className:"mobileGridCategorySection color-variants-selection",id:`section-${S.categoryID}`,ref:w=>m.current[x==0?_:r.includes("geometryVariants")?t.length+_:_]=w,children:[te(_X,{variantType:"color",element:S,allActiveVariants:n},`mobileGrid-${S.categoryID}`,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/VariantMobile.js",lineNumber:355,columnNumber:27},globalThis),te(f,{index:x==0?_:r.includes("geometryVariants")?t.length+_:_},"divider"+S.categoryID,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/VariantMobile.js",lineNumber:361,columnNumber:27},globalThis)]},`sectionz-${S.categoryID}-${_}`,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/VariantMobile.js",lineNumber:339,columnNumber:25},globalThis));if(v=="geometryVariants")return t.map((S,_)=>te("section",{className:"mobileGridCategorySection geometry-variants-selection",id:`section-${S.id}`,ref:w=>m.current[x==0?_:r.includes("color")?e.length+_:_]=w,children:[te(_X,{variantType:"geometry",element:S,allActiveVariants:i},`mobileGrid-variants-${S.id}`,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/VariantMobile.js",lineNumber:393,columnNumber:27},globalThis),te(f,{index:x==0?_:r.includes("color")?e.length+_:_},"divider-variants-"+S.id,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/VariantMobile.js",lineNumber:399,columnNumber:27},globalThis)]},`sectionz-variants-${S.id}-${_}`,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/VariantMobile.js",lineNumber:379,columnNumber:25},globalThis))})]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/VariantMobile.js",lineNumber:313,columnNumber:15},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/VariantMobile.js",lineNumber:308,columnNumber:13},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/VariantMobile.js",lineNumber:307,columnNumber:11},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/VariantMobile.js",lineNumber:269,columnNumber:9},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/VariantMobile.js",lineNumber:268,columnNumber:7},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/sideMenu/VariantMobile.js",lineNumber:267,columnNumber:5},globalThis)},DOe=({sideMenuOpen:r,sideMenuRef:e,toggleSideMenuOpen:t,configuratorWcRef:n,PUBLIC_DESIGN_ASSETS_ENDPOINT:i,handleSideButtonClick:a,useTabIcon:s,GENERIC_PROJECT_ASSET_DATA_ROOT_URL:o,sideMenuState:l,togglePreviewCartModal:u,getItemCount:f,currency:h,numberWithCommas:p})=>{const m=Ya(_=>_.hotspotsData),A=Ya.getState().categoryData.color,E=Ya.getState().categoryData.geometryVariants,b=$t(_=>_.disableCart),v=$t(_=>_.CORE_API),[x,S]=re.useState([]);return re.useEffect(()=>{const _=v.sceneSettings.variantsTabOrder,w=Object.entries(_);w.sort(([,N],[,P])=>N.priority-P.priority);const R=[];w.forEach(([N,P])=>{P.enabled&&R.push(N)}),S(R)},[v]),re.useEffect(()=>{if(!$t.getState().CORE_API.isMobile)return;const{current:_}=e;!_||n.shadowRoot.getElementById("_leftShell")},[r,e]),te("div",{className:`sideMenu interactable ${r===!0?"":"side-menu-collapsed"}`,ref:e,children:[te("div",{className:r?"mobileExpandButton sideMenuOpen":"mobileExpandButton",children:[te("span",{children:"EXPAND CONFIGURATOR"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/SideMenu.js",lineNumber:88,columnNumber:9},globalThis),te("button",{role:"button",onClick:t,children:te("img",{src:i+"/Icon/CaretDoubleDown.svg"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/SideMenu.js",lineNumber:94,columnNumber:11},globalThis)},"expandSideMenuButton",!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/SideMenu.js",lineNumber:89,columnNumber:9},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/SideMenu.js",lineNumber:81,columnNumber:7},globalThis),te("div",{className:r===!0?"sideMenuTabContainer":"sideMenuTabContainer side-menu-container-hide",children:te(GU,{className:"firstMobileTab",children:[te(HU,{className:"firstMobileTabs",children:[te(oI,{children:te("div",{className:"mobileTab",onClick:()=>{a(0)},children:[s?te("img",{className:"icon",alt:"null",src:o+"/thumbnails/common-ui/BuildTabIcon.svg"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/SideMenu.js",lineNumber:118,columnNumber:19},globalThis):"",v.sceneSettings.textSettings.buildTabHeadingText]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/SideMenu.js",lineNumber:111,columnNumber:15},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/SideMenu.js",lineNumber:110,columnNumber:13},globalThis),(A.length>0||E.length>0)&&te(oI,{children:te("div",{className:"mobileTab",onClick:()=>{a(1)},children:[s?te("img",{className:"icon",alt:"null",src:o+"/thumbnails/common-ui/ColorTabIcon.svg"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/SideMenu.js",lineNumber:141,columnNumber:21},globalThis):"",v.sceneSettings.textSettings.colorTabHeadingText]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/SideMenu.js",lineNumber:134,columnNumber:17},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/SideMenu.js",lineNumber:133,columnNumber:15},globalThis),te("button",{className:`collapse-side-menu-button ${r===!0?"":"set-display-none"}`,role:"button",onClick:t,children:te("img",{src:i+"/Icon/CaretDoubleDown.svg"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/SideMenu.js",lineNumber:165,columnNumber:15},globalThis)},"collapseSideMenuButton",!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/SideMenu.js",lineNumber:157,columnNumber:13},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/SideMenu.js",lineNumber:109,columnNumber:11},globalThis),te(lI,{children:te(AX,{sideMenuState:0},"BuildUI1",!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/SideMenu.js",lineNumber:176,columnNumber:13},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/SideMenu.js",lineNumber:174,columnNumber:11},globalThis),(A.length>0||E.length>0)&&te(lI,{children:te("div",{className:"variantContainer",children:te(NOe,{sortedVariantsTabOrder:x},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/SideMenu.js",lineNumber:182,columnNumber:17},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/SideMenu.js",lineNumber:181,columnNumber:15},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/SideMenu.js",lineNumber:180,columnNumber:13},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/SideMenu.js",lineNumber:108,columnNumber:9},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/SideMenu.js",lineNumber:100,columnNumber:7},globalThis),te("div",{className:"desktopSideMenu",children:[te("div",{className:"sideMenuTabs",children:[te("div",{className:l===0?"activeSideMenuTab rightTopBarButton button":"inactiveSideMenuTab rightTopBarButton button",onClick:()=>{a(0)},children:[s?te("img",{className:"icon",alt:"null",src:o+"BuildTabIcon.png"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/SideMenu.js",lineNumber:204,columnNumber:15},globalThis):"",te("span",{children:v.sceneSettings.textSettings.buildTabHeadingText},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/SideMenu.js",lineNumber:212,columnNumber:13},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/SideMenu.js",lineNumber:193,columnNumber:11},globalThis),(A.length>0||E.length>0)&&te("div",{className:l===1?"activeSideMenuTab rightTopBarButton button":"inactiveSideMenuTab rightTopBarButton button",onClick:()=>{a(1)},children:[s?te("img",{className:"icon",alt:"null",src:o+"/thumbnails/common-ui/ColorTabIcon.svg"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/SideMenu.js",lineNumber:228,columnNumber:17},globalThis):"",te("span",{children:v.sceneSettings.textSettings.colorTabHeadingText},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/SideMenu.js",lineNumber:239,columnNumber:15},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/SideMenu.js",lineNumber:217,columnNumber:13},globalThis),Object.keys(m).length>0&&te("div",{className:l===2?"activeSideMenuTab rightTopBarButton button":"inactiveSideMenuTab rightTopBarButton button",onClick:()=>{a(2)},children:[s?te("img",{className:"icon",alt:"null",src:o+"/thumbnails/common-ui/ProductFeaturesTabIcon.png"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/SideMenu.js",lineNumber:256,columnNumber:17},globalThis):"",te("span",{children:v.sceneSettings.textSettings.featuresTabHeadingText},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/SideMenu.js",lineNumber:267,columnNumber:15},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/SideMenu.js",lineNumber:245,columnNumber:13},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/SideMenu.js",lineNumber:192,columnNumber:9},globalThis),te("div",{className:"sideMenuContent",children:[te(SOe,{},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/SideMenu.js",lineNumber:274,columnNumber:11},globalThis),te(hOe,{visible:l===0},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/SideMenu.js",lineNumber:275,columnNumber:11},globalThis),te(AX,{visible:l===0},"buildUi-desktop",!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/SideMenu.js",lineNumber:277,columnNumber:12},globalThis),te("div",{className:"variantContainer",children:x.map(_=>{if(_=="color"){if(A.length>0)return te(vOe,{visible:l===1},"colourTab-desktop",!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/SideMenu.js",lineNumber:284,columnNumber:21},globalThis)}else if(_=="geometryVariants"&&E.length>0)return te(wOe,{visible:l===1},"geometryVariantsTab-desktop",!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/SideMenu.js",lineNumber:293,columnNumber:21},globalThis)})},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/SideMenu.js",lineNumber:279,columnNumber:11},globalThis),te(bOe,{visible:l===2},"featuresTab-desktop",!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/SideMenu.js",lineNumber:303,columnNumber:13},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/SideMenu.js",lineNumber:273,columnNumber:9},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/SideMenu.js",lineNumber:191,columnNumber:7},globalThis),te("div",{className:"bottomBar right button",onClick:()=>{u()},children:[te("div",{className:"bottomBarChildDiv",children:[te("span",{children:v.sceneSettings.textSettings.reviewButtonText},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/SideMenu.js",lineNumber:318,columnNumber:11},globalThis),te("div",{className:"cartNumber",children:f()},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/SideMenu.js",lineNumber:319,columnNumber:11},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/SideMenu.js",lineNumber:317,columnNumber:9},globalThis),te("div",{className:"reviewButtonParentDiv",children:te("div",{className:"button reviewButton".concat(b===!0?" hide":""),children:te("div",{className:"",children:`${h}${p(Bm.getState().cartTotalPrice)}`},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/SideMenu.js",lineNumber:327,columnNumber:13},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/SideMenu.js",lineNumber:322,columnNumber:11},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/SideMenu.js",lineNumber:321,columnNumber:9},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/SideMenu.js",lineNumber:311,columnNumber:7},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/SideMenu.js",lineNumber:75,columnNumber:5},globalThis)},OOe=({previewCartModalOpen:r,togglePreviewCartModal:e,PUBLIC_DESIGN_ASSETS_ENDPOINT:t,cart:n})=>{const i=$t(l=>l.disableCart),a=$t(l=>l.CORE_API),s=$t(l=>l.cartMessage),o=re.useCallback(()=>{a.checkout()},[]);return te("div",{className:r?"previewCartModal mobile open":"previewCartModal mobile",children:[te("button",{className:"closeButton",onClick:()=>{e()},children:te("img",{src:t+"/Icon/X.svg"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/PreviewCartMobile.js",lineNumber:33,columnNumber:9},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/PreviewCartMobile.js",lineNumber:27,columnNumber:7},globalThis),te("h2",{className:"cartTitle",children:a.sceneSettings.textSettings.cartHeadingText},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/PreviewCartMobile.js",lineNumber:35,columnNumber:7},globalThis),n.length>0?te("div",{className:"previewCartContentParentDiv",children:[te("div",{className:"previewCartContent",children:n.map(function(l,u){return te(ane,{itemObject:l,index:u},`Cart Item - ${u}`,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/PreviewCartMobile.js",lineNumber:43,columnNumber:17},this)})},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/PreviewCartMobile.js",lineNumber:40,columnNumber:11},globalThis),te("div",{className:"previewCartButtonContainer".concat(i===!0?" hide":""),children:[s&&te("div",{className:"cartMessageDiv",children:te("span",{children:s},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/PreviewCartMobile.js",lineNumber:58,columnNumber:17},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/PreviewCartMobile.js",lineNumber:57,columnNumber:15},globalThis),te("button",{className:"checkoutButton",onClick:o,children:[te("span",{children:a.sceneSettings.addToCartCTAText},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/PreviewCartMobile.js",lineNumber:62,columnNumber:15},globalThis),te("img",{src:t+"/Icon/ArrowRight.svg"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/PreviewCartMobile.js",lineNumber:63,columnNumber:15},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/PreviewCartMobile.js",lineNumber:61,columnNumber:13},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/PreviewCartMobile.js",lineNumber:51,columnNumber:11},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/PreviewCartMobile.js",lineNumber:39,columnNumber:9},globalThis):te("h3",{className:"cartEmptyText",children:"Your cart is currently empty"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/PreviewCartMobile.js",lineNumber:70,columnNumber:9},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/PreviewCartMobile.js",lineNumber:20,columnNumber:5},globalThis)},LOe=({selectedItemData:r,colors:e,colorsCategoryName:t})=>{const n=$t(A=>A.CORE_API),[i,a]=re.useState(null),[s,o]=re.useState(0),[l,u]=re.useState(0),[f,h]=re.useState(null),p=re.useRef(null),m=re.useCallback(()=>{n.fireEvent(n.EVENTS.UI.ContextMenu_InfoBtnClicked,r)},[r]);return re.useEffect(()=>{h(null),r&&(h({...r}),r.overrideVariant?a(r.overrideVariant):a(r.currentVariant))},[r]),re.useEffect(()=>{if(!f||!r||!p.current)return;const A=n.getCanvasSize();let E=r.offsetX+p.current.children[0].clientWidth,b=r.offsetY+p.current.children[0].clientHeight,v=A.width-E;v<0?o(r.offsetX+v-10):o(r.offsetX);let x=A.height-b;x<0?u(r.offsetY+x-10):u(r.offsetY)},[f,r,p]),te("div",{ref:p,children:r!==null&&te("div",{className:"contextMenuParent interactable",style:{left:s+"px",top:l+"px"},children:te("div",{className:"contextContentDiv",children:te("div",{className:"contextContent",children:[te("div",{className:"contextContentChildDiv",children:[te("div",{className:"contextNameContent",children:[te("h3",{children:r.itemData.name},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/ContextMenuDesktop.js",lineNumber:84,columnNumber:19},globalThis),te("img",{className:"infoButton",src:kr+"/Icon/Info.svg",onClick:()=>m()},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/ContextMenuDesktop.js",lineNumber:85,columnNumber:19},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/ContextMenuDesktop.js",lineNumber:83,columnNumber:17},globalThis),te("div",{className:"closeContainer",onClick:()=>n.exitSelectedItem(),children:te("button",{role:"button",title:"Close",children:te("img",{src:kr+"/Icon/X.svg"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/ContextMenuDesktop.js",lineNumber:96,columnNumber:21},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/ContextMenuDesktop.js",lineNumber:95,columnNumber:19},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/ContextMenuDesktop.js",lineNumber:91,columnNumber:17},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/ContextMenuDesktop.js",lineNumber:82,columnNumber:15},globalThis),e.length>0&&n.sceneSettings.disableLocalColorOverride===!1&&te("div",{className:"contextColorContent",children:[te("span",{className:"colorSwatchTitle",children:["Select ",t]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/ContextMenuDesktop.js",lineNumber:106,columnNumber:21},globalThis),te("div",{className:"color-grid color-variants-selection",children:e.map((A,E)=>te("div",{onClick:async()=>{await n.overrideSelectedItemMaterial(A.id),a(A.id)},asgaga:A.id,asd:i,className:i==A.id?"colorSelector selected":"colorSelector",children:[te("div",{className:"colorThumbnailContainer",children:te("div",{className:"colorThumbnail",children:[te("div",{className:"checkMark",children:te("img",{src:kr+"/Icon/Check.svg"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/ContextMenuDesktop.js",lineNumber:131,columnNumber:33},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/ContextMenuDesktop.js",lineNumber:130,columnNumber:31},globalThis),te("img",{className:"contextColorThumbnail",src:n.getResolvedAssetUrl(A.thumbnail)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/ContextMenuDesktop.js",lineNumber:138,columnNumber:31},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/ContextMenuDesktop.js",lineNumber:129,columnNumber:29},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/ContextMenuDesktop.js",lineNumber:128,columnNumber:27},globalThis),te("div",{className:"colorDetails",children:te("p",{className:"truncate colorDetailsLabel",children:[Ay(A.label),te("br",{},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/ContextMenuDesktop.js",lineNumber:149,columnNumber:31},globalThis),te("span",{className:"redText",children:A.outOfStock?"OUT OF STOCK":te("br",{},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/ContextMenuDesktop.js",lineNumber:151,columnNumber:70},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/ContextMenuDesktop.js",lineNumber:150,columnNumber:31},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/ContextMenuDesktop.js",lineNumber:147,columnNumber:29},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/ContextMenuDesktop.js",lineNumber:146,columnNumber:27},globalThis)]},"Color-"+E,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/ContextMenuDesktop.js",lineNumber:111,columnNumber:25},globalThis))},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/ContextMenuDesktop.js",lineNumber:109,columnNumber:21},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/ContextMenuDesktop.js",lineNumber:105,columnNumber:19},globalThis),te("div",{className:"contextButtons",children:[n.canSelectedItemDrag()&&te("button",{role:"button",onClick:()=>{n.doesSelectedItemHasAttachedDependency()?$t.getState().setRemoveModalOpen(!0):n.removeSelectedItem()},children:[te("img",{src:kr+"/Icon/TrashSimple.svg",alt:"Remove"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/ContextMenuDesktop.js",lineNumber:174,columnNumber:21},globalThis),te("span",{children:"Remove"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/ContextMenuDesktop.js",lineNumber:180,columnNumber:21},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/ContextMenuDesktop.js",lineNumber:162,columnNumber:19},globalThis),n.canSelectedItemRotate()&&te("button",{role:"button",onClick:()=>n.rotateSelectedItem(),children:[te("img",{src:kr+"/Icon/Rotate.svg"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/ContextMenuDesktop.js",lineNumber:188,columnNumber:21},globalThis),te("span",{children:"Rotate"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/ContextMenuDesktop.js",lineNumber:191,columnNumber:21},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/ContextMenuDesktop.js",lineNumber:184,columnNumber:19},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/ContextMenuDesktop.js",lineNumber:160,columnNumber:15},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/ContextMenuDesktop.js",lineNumber:81,columnNumber:13},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/ContextMenuDesktop.js",lineNumber:80,columnNumber:11},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/ContextMenuDesktop.js",lineNumber:73,columnNumber:9},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/ContextMenuDesktop.js",lineNumber:71,columnNumber:5},globalThis)},POe=({selectedItemData:r,contextMenuDrawerOpen:e,dismissContextMenuDrawer:t,colors:n,colorsCategoryName:i})=>{const[a,s]=re.useState(e),o=re.useRef(null),l=$t(p=>p.CORE_API),[u,f]=re.useState(null);re.useEffect(()=>{o.current.addEventListener("drawerClosed",()=>{t()})},[o]),re.useEffect(()=>(s(e),()=>{}),[e]),re.useEffect(()=>{!r||!r.itemData||(r.overrideVariant?f(r.overrideVariant):f(r.currentVariant))},[r]);function h(){l.doesSelectedItemHasAttachedDependency()?$t.getState().setRemoveModalOpen(!0):(l.removeSelectedItem(),t())}return te("bottom-drawer",{id:"contextDrawer",ref:o,open:`${a}`,"initial-screen-coverage":"60%",children:te("div",{className:"contextMenuDrawer epigraphDrawer",slot:"bottom-drawer-content",children:te("div",{className:"contextMenuParent interactable",children:[te("div",{className:"contextContent",children:r&&r.itemData?te(li,{children:te("div",{className:"contextContentNameDiv",children:te("h3",{children:r.itemData.name},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/ContextMenuMobile.js",lineNumber:69,columnNumber:19},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/ContextMenuMobile.js",lineNumber:68,columnNumber:17},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/ContextMenuMobile.js",lineNumber:67,columnNumber:15},globalThis):""},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/ContextMenuMobile.js",lineNumber:65,columnNumber:11},globalThis),n.length>0&&l.sceneSettings.disableLocalColorOverride===!1&&te(li,{children:[te("p",{className:"colorSwatchTitle",children:["Select ",i]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/ContextMenuMobile.js",lineNumber:79,columnNumber:17},globalThis),te("div",{className:"color-grid color-variants-selection",children:n.map((p,m)=>te("div",{onClick:async()=>{await $t.getState().CORE_API.overrideSelectedItemMaterial(p.id),f(p.id)},className:u==p.id?"colorSelector selected":"colorSelector",children:[te("div",{className:"colorThumbnailContainer",children:[te("div",{className:"colorThumbnail",children:te("img",{className:"colorThumbnailImg",src:l.getResolvedAssetUrl(p.thumbnail)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/ContextMenuMobile.js",lineNumber:98,columnNumber:27},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/ContextMenuMobile.js",lineNumber:97,columnNumber:25},globalThis),te("div",{className:"checkMark",children:te("img",{src:kr+"/Icon/Check.svg"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/ContextMenuMobile.js",lineNumber:104,columnNumber:27},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/ContextMenuMobile.js",lineNumber:103,columnNumber:25},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/ContextMenuMobile.js",lineNumber:96,columnNumber:23},globalThis),te("div",{className:"colorDetails",children:te("p",{className:"truncate colorDetailsLabel",children:[Ay(p.label),te("br",{},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/ContextMenuMobile.js",lineNumber:114,columnNumber:27},globalThis),te("span",{className:"redText",children:p.outOfStock?"OUT OF STOCK":te("br",{},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/ContextMenuMobile.js",lineNumber:116,columnNumber:66},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/ContextMenuMobile.js",lineNumber:115,columnNumber:27},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/ContextMenuMobile.js",lineNumber:112,columnNumber:25},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/ContextMenuMobile.js",lineNumber:111,columnNumber:23},globalThis)]},"Color-"+m,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/ContextMenuMobile.js",lineNumber:82,columnNumber:21},globalThis))},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/ContextMenuMobile.js",lineNumber:80,columnNumber:17},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/ContextMenuMobile.js",lineNumber:78,columnNumber:15},globalThis),te("div",{className:"contextButtons",children:[l.canSelectedItemDrag()&&te("button",{role:"button",onClick:()=>h(),children:[te("img",{src:kr+"/Icon/Trash.svg"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/ContextMenuMobile.js",lineNumber:128,columnNumber:17},globalThis),te("span",{children:"Remove"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/ContextMenuMobile.js",lineNumber:131,columnNumber:17},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/ContextMenuMobile.js",lineNumber:127,columnNumber:15},globalThis),l.canSelectedItemRotate()&&te("button",{role:"button",onClick:()=>l.rotateSelectedItem(),children:[te("img",{src:kr+"/Icon/Rotate.svg"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/ContextMenuMobile.js",lineNumber:139,columnNumber:17},globalThis),te("span",{children:"Rotate"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/ContextMenuMobile.js",lineNumber:142,columnNumber:17},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/ContextMenuMobile.js",lineNumber:135,columnNumber:15},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/ContextMenuMobile.js",lineNumber:125,columnNumber:11},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/ContextMenuMobile.js",lineNumber:64,columnNumber:9},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/ContextMenuMobile.js",lineNumber:60,columnNumber:7},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/ContextMenuMobile.js",lineNumber:54,columnNumber:5},globalThis)},UOe=({selectedItemData:r,contextMenuOpen:e,dismissContextMenuDrawer:t})=>{const n=$t(p=>p.CORE_API),[i,a]=re.useState(!1),[s,o]=re.useState([]),[l,u]=re.useState(""),f=$t(p=>p.inventoryData);re.useEffect(()=>(a(e),()=>{}),[e]),re.useEffect(()=>{if(o([]),r===void 0||!r.itemData||n===null)return;const p=n.getSelectedItemColors(),m=n.getInventoryInfo()[r.itemData.skuID];if(p.map(E=>{E.outOfStock=!1,m[E.id].countAvailable==0&&(E.outOfStock=!0)}),o(p),p.length===0)return;const A=n.categoryData;A.color&&A.color.map(E=>{E.looks.map(b=>{b===p[0].id&&u(E.label)})})},[r]),re.useEffect(()=>{f!=null&&h(f)},[f]);const h=re.useCallback(p=>{const m=n.getSelectedItemData();if(m==null)return;const A=n.getSelectedItemColors(),E=p[m.itemData.skuID];A.map(b=>{b.outOfStock=!1,E[b.id].countAvailable==0&&(b.outOfStock=!0)}),o(A)},[r]);return te(li,{children:n.isMobile&&window.innerWidth<=768?te(POe,{selectedItemData:r,contextMenuDrawerOpen:i,dismissContextMenuDrawer:t,colors:s,colorsCategoryName:l},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/ContextMenu.js",lineNumber:87,columnNumber:9},globalThis):i&&te(LOe,{contextMenuDesktopOpen:i,selectedItemData:r,colors:s,colorsCategoryName:l},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/ContextMenu.js",lineNumber:96,columnNumber:11},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/scripts/components/reactComponents/ContextMenu.js",lineNumber:85,columnNumber:5},globalThis)},BOe=({configuratorWcRef:r,coreRef:e,viewInYourSpaceRef:t,disableUI:n})=>{Ya(Ct=>Ct);const i=$t(Ct=>Ct.setSideMenuState),a=$t(Ct=>Ct.sideMenuState),[s,o]=re.useState(!0),[l,u]=re.useState(!1),[f,h]=re.useState(!1),p=sf(Ct=>Ct.infoModalOpen),m=sf(Ct=>Ct.updateInfoModalOpen),[A,E]=re.useState(!1),[b,v]=re.useState(!1),[x,S]=re.useState("Link not generated!"),[_,w]=re.useState(!1),R=$t(Ct=>Ct.removeModalOpen),N=$t(Ct=>Ct.setRemoveModalOpen),P=$t(Ct=>Ct.moveModalOpen),I=$t(Ct=>Ct.setMoveModalOpen),D=$t(Ct=>Ct.outOfStockModalOpen),B=$t(Ct=>Ct.setOutOfStockModalOpen),k=re.useRef(null),U=re.useRef(null),z=re.useRef(null),[V,j]=re.useState({}),[H,K]=re.useState({}),[J,q]=re.useState(!1),[Q,$]=re.useState(""),[Z,he]=re.useState(""),ce=Ya(Ct=>Ct.productData),oe=Bm(Ct=>Ct.cart),se=Bm(Ct=>Ct.previewCartModalOpen),_e=Bm(Ct=>Ct.togglePreviewCartModal),[we,Ce]=re.useState(!1),[ze,pe]=re.useState(!1),[Pe,Ie]=re.useState(!0),tt=rne(Ct=>Ct),Ye=$t(Ct=>Ct.CORE_API),[_t,De]=re.useState(!1),[Ne,it]=re.useState(!0),[gt,de]=re.useState(Ye.getSceneItemCount()>0),[X,ie]=re.useState(Ye.sceneSettings.showSaveButton),[xe,He]=re.useState(Ye.sceneSettings.showContextMenu),Qe=$t(Ct=>Ct.viewInYourSpaceMenuBtnVisible),[at,At]=re.useState(Ye.sceneSettings.showResetBtn),[Le,be]=re.useState(Ye.sceneSettings.showDimensionBtn),[ke,et]=re.useState(Ye.sceneSettings.showHotspotsBtn),[nt,Ke]=re.useState(Ye.sceneSettings.currency);re.useEffect(()=>(Ie(Ye.areHotspotsVisible()),()=>{}),[a]);const Et=re.useCallback(()=>{Ie(!Ye.areHotspotsVisible()),Ye.areHotspotsVisible()?Ye.hideAllHotspots():Ye.showAllHotspots()},[]),Pt=re.useCallback(()=>{De(!Ye.areDimensionsVisible()),Ye.areDimensionsVisible()?Ye.hideDimensions():Ye.showDimensions()},[]);function Nt(){w(!0)}const ae=re.useCallback(()=>{pe(!0),v(!0),Ye.shareScene().then(Ct=>{S(Ct),pe(!1),Ye.alert({alertMsg:"Configuration saved succesfully!",alertTime:4e3,alertType:"success",alertLabel:"Success"})}).catch(Ct=>{pe(!1),Ye.alert({alertMsg:"Error saving this configuration!",alertTime:5e3,alertType:"error",alertLabel:"Unsaved Changes",persistant:!0})})},[]);re.useEffect(()=>{U.current&&U.current.appendChild(e.current)},[U]),re.useEffect(()=>{z.current&&z.current.appendChild(t.current)},[z]),yr(Ye.EVENTS.SCENE.Hotspot_Enter,Ct=>{if($t.getState().CORE_API.isMobile)iy.info({title:Ye.getActiveHotspot()}),K(Ye.getActiveHotspot().hotspotData),h(!0);else{const{hotspotAbsID:an}=Ct;tt.actions.enterHotspotInFeaturesTab(an)}}),yr(Ye.EVENTS.SCENE.Hotspot_Exit,Ct=>{tt.actions.exitHotspot()}),yr(Ye.EVENTS.SCENE.MaterialOverrides_Exists,Ct=>{$t.setState({materialOverrideExists:Ct})}),yr(Ye.EVENTS.UI.UtilityMenu_Hide,Ct=>{it(!1)}),yr(Ye.EVENTS.UI.UtilityMenu_Show,Ct=>{it(!0)}),yr(Ye.EVENTS.UI.ShareButton_Hide,Ct=>{de(!1)}),yr(Ye.EVENTS.UI.ShareButton_Show,Ct=>{de(!0)}),yr(Ye.EVENTS.UI.ContextMenu_Show,Ct=>{j(Ct?.primary.data),Ce(!0)}),yr(Ye.EVENTS.UI.ContextMenu_Hide,Ct=>{Ce(!1)}),yr(Ye.EVENTS.SCENE.DraggingOnDrop_CollsionDetected,Ct=>{I(!0);let an="";Object.keys(Ct).length==1?an=`The item below will be lost if you place this here:
|
|
8697
8697
|
`:an=`The items below will be lost if you place this here:
|
|
8698
8698
|
`,Object.keys(Ct).map(Jn=>{an+=`
|
|
8699
8699
|
• `+(Ct[Jn].itemData.name?Ct[Jn].itemData.name:Ct[Jn].itemData.skuID)}),$(an)}),yr(Ye.EVENTS.SCENE.Cart_OutOfStock,Ct=>{B(!0);let an="",Jn="",Wn=0;Ct.cartItems.map(Bi=>{Bi.countUnavailable>0&&(Wn++,Jn+=`
|
|
@@ -9159,7 +9159,7 @@ ${i.join(`
|
|
|
9159
9159
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
9160
9160
|
* See the License for the specific language governing permissions and
|
|
9161
9161
|
* limitations under the License.
|
|
9162
|
-
*/const LFe=navigator.xr!=null&&self.XRSession!=null&&navigator.xr.isSessionSupported!=null;LFe&&self.XRSession.prototype.requestHitTestSource!=null;(()=>{const r=navigator.userAgent||navigator.vendor||self.opera;let e=!1;return(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(r)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(r.substr(0,4)))&&(e=!0),e})();const are=/iPad|iPhone|iPod/.test(navigator.userAgent)&&!self.MSStream||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1,PFe=!!(window.webkit&&window.webkit.messageHandlers);(()=>{if(are){if(PFe)return!!/CriOS\/|EdgiOS\/|FxiOS\/|GSA\/|DuckDuckGo\//.test(navigator.userAgent);{const r=document.createElement("a");return!!(r.relList&&r.relList.supports&&r.relList.supports("ar"))}}else return!1})();const UFe="https://configurator.myepigraph.com/";class IR{static instanceSingleton=void 0;#e=!1;#n;#t;#i;#r=!0;#s;#l;#a=!0;#o;#h=!0;#c="";#u="";#f=null;epigraphAnalytics=null;EVENTS={UI:{PreloadScreen_Show:"preload:show",PreloadScreen_Hide:"preload:hide",ContextMenu_InfoBtnClicked:"infoButtonClicked_ContextMenu",ContextMenu_Show:"contextMenu:show",ContextMenu_Hide:"contextMenu:hide",UtilityMenu_Show:"utilityMenu:show",UtilityMenu_Hide:"utilityMenu:hide",ShareButton_Show:"shareButton:show",ShareButton_Hide:"shareButton:hide",ViewInYourSpaceButton_Show:"viewInYourSpace:show",ViewInYourSpaceButton_Hide:"viewInYourSpace:hide",ResetButton_Show:"resetBtn:show",ResetButton_Hide:"resetBtn:hide",DimensionsButton_Show:"dimensionsBtn:show",DimensionsButton_Hide:"dimensionsBtn:hide"},SCENE:{Item_Added:"item:added",Item_Removed:"item:removed",Items_Updated:"items:updated",FittingSkuIds_Updated:"fittingSkuIds:updated",CartItems_Updated:"cartItems:updated",Hotspot_Enter:"hotspot:enter",Hotspot_Exit:"hotspot:exit",SavedConfiguration_Loaded:"loaded-saved-configuration",MaterialOverrides_Exists:"materialOverrideExists",Cart_Checkout:"cart:checkout",Cart_OutOfStock:"cart:outOfStock",Cart_StatusUpdated:"cart:statusUpdated",ReplaceableCategory_Updated:"replaceableCategory:updated",GlobalVariant_Updated:"globalVariant:updated",CategoryData_Updated:"categoryData:updated",GlobalGeometryVariant_Updated:"globalGeometryVariant:updated",Ghost_Loaded:"ghost:loaded",Model_Loaded:"model:loaded",Model_Removed:"model:removed",Scene_Cleared:"scene:cleared",Inventory_Updated:"inventory:updated",DraggingOnDrop_CollsionDetected:"draggingOnDrop:collisionDetected",ActionButton_Clicked:"actionButton:clicked",CartMessage_Update:"cartMessage:updated"},CONFIGURATION:{OnClickItem:"onClickItem",CameraDetails_Update:"cameraDetails:Update"}};constructor(e,t=null){if(IR.instanceSingleton!==void 0)return IR.instanceSingleton;if(e.identifier!=="wc-epigraph-configurator-core")return Vt.error({title:"Invalid identifier on the 'wc-epigraph-configurator-core'. Unable to initialise the ConfiguratorCoreAPI class."}),null;IR.instanceSingleton=this,Object.freeze(this.CORE_EVENTS),this.#i=e,this.#t=t,this.#i.addEventListener(this.EVENTS.SCENE.CartItems_Updated,()=>{this.#o=void 0,this.#a=!0,this.#h=!0}),this.setupAnalyticsEventListeners(),this.#e=!0}set clientAccessKey(e){this.#s=e}set canUpdateInventory(e){this.#r=e}get lastSharedConfigurationID(){return this.#o}set lastSharedConfigurationID(e){this.#o=e}set projectId(e){this.#l=e}get coreWCRef(){return this.#i}getResolvedAssetUrl(e){return qPe(e)}initializeAnalytics(e=void 0){e!==void 0&&(this.epigraphAnalytics=new vFe,this.epigraphAnalytics.addEventPlugin(new gFe(e,!1)))}get isReady(){return this.#e}get preloadProgress(){return this.#n}get categoryData(){return Ln.getState().categoryData}get productData(){return Ln.getState().productData}get lookData(){return Ln.getState().lookData}get sceneSettings(){return lt.getState().sceneSettings}get assetsData(){return Ln.getState().assetsData}get isMobile(){return lt.getState().isMobile}getDeviceState(){return lt.getState().actions.getDeviceState()}get hasSceneChanged(){return this.#a}set hasSceneChanged(e){this.#a=e}enableCart(){lt.getState().actions.enableCart()}disableCart(){lt.getState().actions.disableCart()}fireEvent(e,t){let n=new CustomEvent(e,{bubbles:!0,cancelable:!1,composed:!0});n.data=t,this.coreWCRef?this.coreWCRef.dispatchEvent(n):Vt.warn({title:"core web component not found!"})}setupAnalyticsEventListeners(){this.coreWCRef.addEventListener("coreApi:ready",e=>{let t=Object.assign({},AFe);t.label=`Project ID: ${this.#l}`,this.sendAnalyticsEvent(t)}),this.coreWCRef.addEventListener("coreApi:failed",e=>{let t=Object.assign({},bFe);t.label=`Project ID: ${this.#l}`,this.sendAnalyticsEvent(t)}),this.coreWCRef.addEventListener(this.EVENTS.SCENE.Item_Added,e=>{Vt.info({title:"Add Item",details:e});const t=e.data.itemData.guid,a=rn.getState().attachmentSystem.currentStructure.getNodeByGUID(t).currentVariant,s=`${e.data.itemData.skuID}(${a})`;let o=Object.assign({},RFe);o.label=`Item Added: ${s}`,this.sendAnalyticsEvent(o)}),this.coreWCRef.addEventListener(this.EVENTS.SCENE.Item_Removed,e=>{if(Vt.info({title:"Remove Item"}),e.data.itemData==null)return;const t=e.data.itemData.skuID;let n=Object.assign({},MFe);n.label=`Item Removed: ${t}`,this.sendAnalyticsEvent(n)}),this.coreWCRef.addEventListener(this.EVENTS.SCENE.Hotspot_Enter,e=>{let t=Object.assign({},DFe);t.label=`Hotspot Enter: ${e.data.hotspotAbsID}`,this.sendAnalyticsEvent(t)}),this.coreWCRef.addEventListener(this.EVENTS.SCENE.Hotspot_Exit,e=>{let t=Object.assign({},OFe);t.label=`Hotspot Exit: ${e.data.domID}`,this.sendAnalyticsEvent(t)}),this.coreWCRef.addEventListener(this.EVENTS.SCENE.Cart_Checkout,e=>{let t="Items: ";e.data.cartItems.forEach((i,a,s)=>{t+=`${i.count}@${i.skuID}(${i.currentVariant})`,a!==s.length-1&&(t+="<>")});let n=Object.assign({},SFe);n.label=t,this.sendAnalyticsEvent(n)})}setEmptySceneText(e){const t=lt.getState().sceneSettings;t.emptySceneText=e,lt.setState({sceneSettings:{...t}})}getSpawningRequirementForSkuID(e){return rn.getState().attachmentSystem.currentStructure.getSpawningRequirementForSkuID(e)}getCartItems(){return rn.getState().attachmentSystem.getCartItems()}checkout(e=!1){const t=rn.getState().attachmentSystem;this.#f=this.getSceneStructure();const n=t.getCartItems();return Vt.warn({title:"CONFIGURATOR CHECKED OUT: "}),Vt.table(n),e===!0||n.cartItems.find(i=>i.countUnavailable>0)===void 0?(this.fireEvent(this.EVENTS.SCENE.Cart_Checkout,n),st.alert({alertMsg:"Items from your configuration have been added to your cart.",alertTime:6e3,alertType:"success",alertLabel:"Success"})):this.fireEvent(this.EVENTS.SCENE.Cart_OutOfStock,n),n}async reloadCheckedoutScene(){if(!this.#f){Vt.info({title:"No data found since last checkout"});return}await this.loadSceneFromConfiguration(this.#f)}getCurrentItemsInReplaceableCategory(){return rn.getState().attachmentSystem.currentStructure.getCurrentItemsInReplaceableCategory()}async getSceneAsGlbUrl(){return this.#h===!1?this.#c:(URL.revokeObjectURL(this.#c),this.#c=void 0,this.#c=await lFe(),this.#h=!1,this.#c)}async getSceneAsUsdzUrl(){return this.#h===!1?this.#u:(URL.revokeObjectURL(this.#u),this.#u=void 0,this.#u=await oFe(),this.#h=!1,this.#u)}async generateShareableLink(e=!1){if(!this.#a&&this.#o)Vt.info({title:"Reusing the cached configuration ID that was last saved..."});else{Vt.info({title:"Generating a new configuration ID..."});let a=rn.getState().actions.export();const s=await HPe(a);this.#o=await s.text()}const t=e===!0?UFe:window.location.href;let n=new URL(t);e===!0&&n.searchParams.set("launchInAR",!0),n.searchParams.set("projectId",this.#l),n.searchParams.set("epgsharedconfigid",this.#o),this.#a=!1;let i=Object.assign({},$$);return i.label=`Shared URL: ${n}`,this.sendAnalyticsEvent(i),n.href}closeContextMenu(){Yt.getState().selectedItemData&&Yt.getState().actions.deselectItem()}updatePreloadProgress(e){const t=this.#n;this.#n=e;const n=new CustomEvent("preload:update",{detail:{progress:this.#n}});window.dispatchEvent(n),typeof this.#t=="function"&&this.#t(t,e)}alert({alertMsg:e,alertTime:t,alertType:n,alertLabel:i,persistant:a=!1}){lt.getState().actions.sendAlert({alertMsg:e,alertTime:t,alertType:n,alertLabel:i,persistant:a})}removePersistantAlert(){lt.setState({persistantAlertData:null})}clickHotspot(e){let t=this.coreWCRef.shadowRoot.getElementById(e);t&&t.click()}exitHotspot(){si.getState().actions.exitHotspot(!1)}async spawnGhostsForSkuID(e,t=!1,n){if(Yt.getState().busy)return null;await or.getState().actions.spawnGhostsForSkuID(e,t,n)}removeAllGhosts(){if(Yt.getState().busy)return null;or.getState().actions.clearAllGhosts()}printSceneHierarchy(e=!1){const t=lt.getState().sceneRef;(function n(i){const a=`${i.name} < ${i.type} >`;e===!0?console.groupCollapsed(a):console.group(a),i.children.forEach(n),console.groupEnd()})(t)}getSceneItems(){const e=Yt.getState().itemsSpawned;if(typeof e!="object"){Vt.error({title:"There was an error while fetching the scene item count."});return}return e}getSceneItemCount(){let e;const t=Yt.getState().itemsSpawned;return typeof t!="object"&&Vt.error({title:"There was an error while fetching the scene item count."}),e=Object.keys(t).length,e}async spawnItemBySkuID(e,t=!1){return Yt.getState().busy?null:(t===!0&&await this.spawnGhostsForSkuID(e,!1,1),await Yt.getState().actions.addItemBySkuID(e))}async replaceItemsByGuid(e){let t={...e},n=!1;const i=rn.getState().attachmentSystem.currentStructure;let a=this.getSceneStructure();return Object.keys(e).map(s=>{a.structure.map(o=>{if(o.guid==s){let l=!1;const u=i.getNodeByGUID(s);u&&(l=u.isReplaceableWithSkuId(e[s].skuId)),t[s].success=l,l&&(o.skuID=e[s].skuId,n=!0)}})}),n&&await this.loadSceneFromConfiguration(a),t}async replaceItemsBySkuId(e,t=[]){let n={...e},i=!1;const a=rn.getState().attachmentSystem.currentStructure;let s=this.getSceneStructure();return s.structure.map(o=>{t.includes(o.guid)!==!0&&Object.keys(e).map(l=>{if(o.skuID==l){let u=!1;const f=a.getNodeByGUID(o.guid);f&&(u=f.isReplaceableWithSkuId(e[l].skuId)),n[l].success=u,u&&(o.skuID=e[l].skuId,i=!0)}})}),i&&await this.loadSceneFromConfiguration(s),n}async removeItemByGUID(e,t=!1){const i=rn.getState().attachmentSystem.currentStructure.getNodeByGUID(e);t===!1&&i.canSwapRoot===!0&&i.swapRoot(),await Yt.getState().actions.removeItemByGUID(e)}rotateItemByGUID(e){rn.getState().attachmentSystem.currentStructure.rotateNode(e)}rotateSelectedItem(){const e=Yt.getState().selectedItemData;if(!e){Vt.info("No current item selected to rotate");return}const t=e.itemData.guid;return rn.getState().attachmentSystem.currentStructure.rotateNode(t),e}removeItemBySkuID(e,t=!0){this.removeSelectedItem()}async removeSelectedItem(){const e=Yt.getState().selectedItemData;if(!e){Vt.info({title:"No current item selected to delete"});return}const t=e.itemData.guid;return Yt.getState().actions.deselectItem(),await this.removeItemByGUID(t),Vt.info({title:`Removed Item: ${t}`}),e}refocus(){lt.getState().actions.triggerAutoFocus()}focusOnGhosts(){if(or.getState().ghostParentRef===null){Vt.warn({title:"Ghost Parent Reference not found"});return}or.getState().ghostParentRef.children.length<=0?lt.getState().actions.triggerAutoFocus():lt.getState().actions.triggerAutoFocus(or.getState().ghostParentRef)}exitSelectedItem(){Yt.getState().actions.deselectItem()}getSelectedItemData(){return Yt.getState().selectedItemData}canSelectedItemRotate(){const e=rn.getState().attachmentSystem.currentStructure;let t=this.getSelectedItemData();return t?e.getNodeByGUID(t.itemData.guid).canRotate:!1}canSelectedItemDrag(){const e=rn.getState().attachmentSystem.currentStructure,t=this.getSelectedItemData();return t?e.getNodeByGUID(t.itemData.guid).canDrag:!1}doesGuidItemHaveAnAttachedDependency(e){let t=!0;const i=rn.getState().attachmentSystem.currentStructure.getNodeByGUID(e),a=i.isEndNode;return t=!a,a||i.canSwapRoot&&i.whichNodesAreAttachedToUs().length==1&&(t=!1),t}doesSelectedItemHasAttachedDependency(){const e=this.getSelectedItemData();return e?this.doesGuidItemHaveAnAttachedDependency(e.itemData.guid):!1}isSelectedItemAnEndNode(){const e=rn.getState().attachmentSystem.currentStructure,t=this.getSelectedItemData();return t?e.getNodeByGUID(t.itemData.guid).isEndNode:!1}getCurrentSceneEnvMap(){return Qx.getState().envMapUrl}async switchGlobalGeometryVariant(e,t){if(!e){Vt.WARN({title:"Geometry Category: '"+e+"' not valid!"});return}Yt.getState().selectedItemData&&Yt.getState().actions.deselectItem(),await rn.getState().attachmentSystem.switchGlobalGeometryVariant(e,t),await hc(1);let n=Object.assign({},xFe);n.label=`Variant: ${t} `,this.sendAnalyticsEvent(n)}async switchGlobalVariant(e,t=""){if(!e){Vt.WARN({title:"Look Category: '"+e+"' not valid!"});return}Yt.getState().selectedItemData&&Yt.getState().actions.deselectItem(),Vt.info({title:`Changing Global Variant: Category: ${e} Id: ${t}`}),await rn.getState().attachmentSystem.switchGlobalVariant(e,t),await hc(1);let n=Object.assign({},X$);n.label=`Variant: ${t}`,this.sendAnalyticsEvent(n)}async overrideSelectedItemMaterial(e=""){return Yt.getState().selectedItemData?(await Yt.getState().actions.switchToVariant(Yt.getState().selectedItemData.itemData,e,!0),!0):!1}async overrideItemMaterialByGuid(e,t){const n=Yt.getState().itemsSpawned[e];if(!n)return Vt.warn({title:"Item with guid: "+e+" doesn't exist"}),!1;await Yt.getState().actions.switchToVariant(n.itemData,t,!0);let i=Object.assign({},X$);return i.label=`Variant: ${t}`,this.sendAnalyticsEvent(i),!0}getSelectedItemColors(){let e=[];if(this.getSelectedItemData()==null)return e;let n=this.getSelectedItemData().itemData.looks;if(n){let i=Ln.getState().lookData;n.map(a=>{i.hasOwnProperty(a)&&e.push(i[a])})}return e}getCanvasSize(){return lt.getState().canvasSize}async removeAllVariantOverrides(){Yt.getState().selectedItemData&&Yt.getState().actions.deselectItem(),await rn.getState().attachmentSystem.removeAllVariantOverrides()}switchCursor(e){lt&<.getState().actions.switchCursor(e)}getSceneStructure(){return rn.getState().actions.export()}async loadSceneFromConfiguration(e){await rn.getState().actions.loadStructure(e),this.sendAnalyticsEvent(preconfigLoadEvent)}async loadSceneFromConfigurationID(e){const t=await rn.getState().actions.loadSavedStructureFromConfigID(e);if(!t)return null;rn.setState({defaultConfig:t});let n=Object.assign({},TFe);n.label=`Preconfig ID: ${e}`,await this.loadSceneFromConfiguration(t)}viewInYourSpace(){Vt.info({title:"View in your space called from the Core API"});let e=Object.assign({},CFe);e.label="AR Requested",this.sendAnalyticsEvent(e),this.#i.epigraphViewInYourSpaceRef._onViewInYourSpaceButtonClicked()}async shareScene(){const e=await this.generateShareableLink();let t=Object.assign({},$$);return t.label=`Shared URL: ${e}`,this.sendAnalyticsEvent(t),e}async clearScene(){await rn.getState().attachmentSystem.clear()}async restartScene(){Vt.info({title:"Restarting Scene."}),await rn.getState().attachmentSystem.restart();let e=Object.assign({},wFe);e.label="Scene Restarted",this.sendAnalyticsEvent(e)}areDimensionsVisible(){return lt.getState().showDimensions}getActiveHotspot(){return si.getState().activeHotspotData}reviewCartShown(){let e=Object.assign({},_Fe);e.label="Review Cart shown",this.sendAnalyticsEvent(e)}reviewCartHidden(){let e=Object.assign({},EFe);e.label="Review Cart hidden",this.sendAnalyticsEvent(e)}showDimensions(){lt.setState({showDimensions:!0});let e=Object.assign({},IFe);e.label="Dimensions shown",this.sendAnalyticsEvent(e)}hideDimensions(){lt.setState({showDimensions:!1});let e=Object.assign({},NFe);e.label="Dimensions hidden",this.sendAnalyticsEvent(e)}areHotspotsVisible(){return si.getState().hotspotsVisibility}areHotspotsTemporarilyVisible(){return si.getState().hotspotsTempVisibility}showAllHotspots(e=!1){si.getState().actions.switchHotspotsVisibility(!0,e)}hideAllHotspots(e=!1){si.getState().actions.switchHotspotsVisibility(!1,e)}getFittingSkuIds(){return rn.getState().attachmentSystem.getFittingSKUIDs()}selectItemWithGUID(e){const t=Yt.getState().itemsSpawned,n=rn.getState().attachmentSystem.currentStructure.getNodeByGUID(e);Yt.getState().actions.setSelectedItemData({...t[e],overrideVariant:n.overrideVariant,currentVariant:n.currentVariant,offsetX:0,offsetY:0})}async getCurrentCameraDetails(){return new Promise((e,t)=>{st.coreWCRef.addEventListener(st.EVENTS.CONFIGURATION.CameraDetails_Update,n=>{e(n.data)},{once:!0}),Ar.getState().actions.triggerFetchingCamera()})}moveCamera(e,t,n,i,a){si.setState({isAnyHotspotActive:!0}),Ar.setState({manualControl:!0,sourcePos:e,destPos:t,interpolationFactor:n,duration:i}),a&&Ar.setState({focusPointPosition:a})}setEnvLightMap(e){Qx.setState({envMapUrl:e})}updateInventoryForAllProducts(e){return this.#r===!1?(Vt.warn({title:"Inventory has been already updated once!"}),null):(Hd.getState().actions.updateInventoryForAllProducts(e),this.#r=!1,this.getInventoryInfo())}getInventoryInfo(){return Hd.getState().actions.getInventoryInfo()}updatePricingForAllProducts(e){Ln.getState().actions.updatePricingForAllProducts(e);const n=rn.getState().attachmentSystem.getCartItems();n&&st.fireEvent(st.EVENTS.SCENE.CartItems_Updated,n)}updatePricingForProduct(e,t,n){Ln.getState().actions.updatePricingForProduct(e,t,n);const a=rn.getState().attachmentSystem.getCartItems();a&&st.fireEvent(st.EVENTS.SCENE.CartItems_Updated,a)}getCurrentPricingInfo(){return Ln.getState().actions.getCurrentPricingInfo()}async itemDragStart(e){if(Yt.getState().busy)return null;lt.setState({hoveredGhostIndex:-1}),await this.removeAllGhosts(),lt.setState({itemDraggedSkuID:e}),await this.spawnGhostsForSkuID(e,!1)}async itemDragEnd(){if(Yt.getState().busy)return null;const e=lt.getState().hoveredGhostIndex;e!==-1?await Yt.getState().actions.addItemBySkuID(lt.getState().itemDraggedSkuID,e):await this.removeAllGhosts(),lt.setState({itemDraggedSkuID:null,hoveredGhostIndex:-1})}async forceSpawnItem(e,t){const n=Ln.getState().productData,i=rn.getState().attachmentSystem;if(!i)return;const a=i.currentStructure;if(!a)return;let s=a.getNodeByGUID(t);s?(s._skuID=e,s.generatePlugsForNode(e)):(s=new cR(e,{guid:t,isEndNode:!0,overrideVariant:null,plugs:n[e].plugs}),a.addNode(s),a.connectPlugs({incomingPlug:new gH({name:"haha",acceptedPlugTypes:[],connectsToPlugTypes:[]},s),receiverPlug:a.rootNode.plugs[0]}));const o=await Yt.getState().actions.addItemWithTransform({position:new ye(0,0,0),rotation:new Qi().identity()},e,t);return await hc(1),o}async downloadCurrentViewAsImage(e,t="png"){if(!e){Vt.warn({title:`Couldn't take screenshot for ${e}. Missing imageName parameter`});return}if(!t){Vt.warn({title:`Couldn't take screenshot for ${t}. Missing imageExtension parameter`});return}await hc(1);const n=await this.getCurrentViewAsImageUrl();await hc(1);let i;return n.success===!0&&(Vt.info({title:"Downloading the screenshot"}),i=document.createElement("a"),i.setAttribute("download",`${e}.${t}`),i.setAttribute("href",n.imageData),i.click(),Vt.info({title:"Screenshot download complete"})),i}async getCurrentViewAsImageUrl(){await hc(1);const e=await lt.getState().actions.requestNewScreenshot();return await hc(1),e}setCameraFocusPointPosition(e){Ar.setState({focusPointPosition:e})}triggerFetchingCamera(){Ar.getState().actions.triggerFetchingCamera()}async completeItemDrop(){await lt.getState().actions.completeDropItem()}revertItemDrop(){lt.getState().actions.revertDropItem()}getCameraFocusPointPosition(){return Ar.getState().focusPointPosition}sendAnalyticsPageViewedEvent(){}sendAnalyticsEvent(e){this.epigraphAnalytics!==null&&this.epigraphAnalytics.sendEvent(e)}isIosDevice(){return are}actionButtonClicked(e){this.fireEvent(this.EVENTS.SCENE.ActionButton_Clicked,{data:e.actionButton.data,skuID:e.skuID,count:e.count,price:e.price,countAvailable:e.countAvailable,countUnavailable:e.countUnavailable,currentVariant:e.currentVariant})}setCartMessage(e){this.fireEvent(this.EVENTS.SCENE.CartMessage_Update,{cartMessage:e})}}class BFe extends HTMLElement{#e="wc-epigraph-configurator-core";#n=!1;#t=void 0;#i=void 0;initialConfigId="";clientAccessKey="";gaCode="";builderMode=!1;projectId="";api=null;constructor(){super(),this.attachShadow({mode:"open"}),APe(new IR(this)),this.api=st}get identifier(){return this.#e}static get observedAttributes(){}get epigraphViewInYourSpaceRef(){return this.#t}#r(){this.hasAttribute("configurator-wc-id")&&(this.configuratorWcId=this.getAttribute("configurator-wc-id")),this.hasAttribute("initial-config-id")&&(this.initialConfigId=this.getAttribute("initial-config-id")),this.hasAttribute("client-access-key")&&(this.clientAccessKey=this.getAttribute("client-access-key")),this.hasAttribute("ga-code")&&(this.gaCode=this.getAttribute("ga-code")),this.hasAttribute("builder-mode")&&(this.builderMode=!0),Vt.group("Collected Web Component Attributes"),Vt.table({initialConfigId:this.initialConfigId,clientAccessKey:this.clientAccessKey,builderMode:this.builderMode}),Vt.groupEnd()}static get observedAttributes(){return["view-in-your-space-elem-id"]}attributeChangedCallback(e,t,n){if(this.#i||(this.#i=document.querySelector(`#${this.configuratorWcId}`)),!!this.#i)switch(e){case"view-in-your-space-elem-id":this.#t=this.#i.shadowRoot.querySelector(`#${n}`),Vt.warn({title:"ViewInYourSpace is now accessible from the core: "});break}}async#s(e){return new Promise(function(t,n){let i=new XMLHttpRequest;i.withCredentials=!1,i.open("GET","https://api.seeitinyourspace.com/auth/"+e),i.setRequestHeader("Content-Type","application/json"),i.onreadystatechange=function(){if(this.readyState===4){const a=JSON.parse(this.responseText);Vt.warn({title:a}),t(a)}},i.onerror=function(){n({status:this.status,statusText:i.statusText})},i.send()})}async connectedCallback(){if(this.#n===!0)return;this.#r();const e=await this.#s(this.clientAccessKey);this.validationPassed=e.passed,this.projectId=e.projectID,this.api.projectId=this.projectId,st.initializeAnalytics(this.gaCode);let t=Object.assign({},yFe);if(t.label=`Project ID: ${this.projectId}`,st.sendAnalyticsEvent(t),this.validationPassed==="false"){Vt.error({title:"Request from an invalidated source: "+window.location.href}),st.fireEvent("coreApi:failed");return}Vt.info({title:"VALIDATION SUCCESSFUL!"}),this.#n=!0,this.#i=document.querySelector(`#${this.configuratorWcId}`);let n=new URL(window.location).searchParams;n.has("epgsharedconfigid")&&(this.initialConfigId=n.get("epgsharedconfigid")),VU(this.shadowRoot).render(te(bke,{projectId:this.projectId,clientAccessKey:this.clientAccessKey,initialConfigId:this.initialConfigId,builderMode:this.builderMode,disableCart:this.hasAttribute("disable-cart")},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator-core/src/index.js",lineNumber:206,columnNumber:7},this))}disconnectedCallback(){st.fireEvent("coreApi:shutDown")}}const q6=document.createElement("template");q6.id="fullScreenModalTemplate";q6.innerHTML=`
|
|
9162
|
+
*/const LFe=navigator.xr!=null&&self.XRSession!=null&&navigator.xr.isSessionSupported!=null;LFe&&self.XRSession.prototype.requestHitTestSource!=null;(()=>{const r=navigator.userAgent||navigator.vendor||self.opera;let e=!1;return(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(r)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(r.substr(0,4)))&&(e=!0),e})();const are=/iPad|iPhone|iPod/.test(navigator.userAgent)&&!self.MSStream||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1,PFe=!!(window.webkit&&window.webkit.messageHandlers);(()=>{if(are){if(PFe)return!!/CriOS\/|EdgiOS\/|FxiOS\/|GSA\/|DuckDuckGo\//.test(navigator.userAgent);{const r=document.createElement("a");return!!(r.relList&&r.relList.supports&&r.relList.supports("ar"))}}else return!1})();class IR{static instanceSingleton=void 0;#e=!1;#n;#t;#i;#r=!0;#s;#l;#a=!0;#o;#h=!0;#c="";#u="";#f=null;epigraphAnalytics=null;EVENTS={UI:{PreloadScreen_Show:"preload:show",PreloadScreen_Hide:"preload:hide",ContextMenu_InfoBtnClicked:"infoButtonClicked_ContextMenu",ContextMenu_Show:"contextMenu:show",ContextMenu_Hide:"contextMenu:hide",UtilityMenu_Show:"utilityMenu:show",UtilityMenu_Hide:"utilityMenu:hide",ShareButton_Show:"shareButton:show",ShareButton_Hide:"shareButton:hide",ViewInYourSpaceButton_Show:"viewInYourSpace:show",ViewInYourSpaceButton_Hide:"viewInYourSpace:hide",ResetButton_Show:"resetBtn:show",ResetButton_Hide:"resetBtn:hide",DimensionsButton_Show:"dimensionsBtn:show",DimensionsButton_Hide:"dimensionsBtn:hide"},SCENE:{Item_Added:"item:added",Item_Removed:"item:removed",Items_Updated:"items:updated",FittingSkuIds_Updated:"fittingSkuIds:updated",CartItems_Updated:"cartItems:updated",Hotspot_Enter:"hotspot:enter",Hotspot_Exit:"hotspot:exit",SavedConfiguration_Loaded:"loaded-saved-configuration",MaterialOverrides_Exists:"materialOverrideExists",Cart_Checkout:"cart:checkout",Cart_OutOfStock:"cart:outOfStock",Cart_StatusUpdated:"cart:statusUpdated",ReplaceableCategory_Updated:"replaceableCategory:updated",GlobalVariant_Updated:"globalVariant:updated",CategoryData_Updated:"categoryData:updated",GlobalGeometryVariant_Updated:"globalGeometryVariant:updated",Ghost_Loaded:"ghost:loaded",Model_Loaded:"model:loaded",Model_Removed:"model:removed",Scene_Cleared:"scene:cleared",Inventory_Updated:"inventory:updated",DraggingOnDrop_CollsionDetected:"draggingOnDrop:collisionDetected",ActionButton_Clicked:"actionButton:clicked",CartMessage_Update:"cartMessage:updated"},CONFIGURATION:{OnClickItem:"onClickItem",CameraDetails_Update:"cameraDetails:Update"}};constructor(e,t=null){if(IR.instanceSingleton!==void 0)return IR.instanceSingleton;if(e.identifier!=="wc-epigraph-configurator-core")return Vt.error({title:"Invalid identifier on the 'wc-epigraph-configurator-core'. Unable to initialise the ConfiguratorCoreAPI class."}),null;IR.instanceSingleton=this,Object.freeze(this.CORE_EVENTS),this.#i=e,this.#t=t,this.#i.addEventListener(this.EVENTS.SCENE.CartItems_Updated,()=>{this.#o=void 0,this.#a=!0,this.#h=!0}),this.setupAnalyticsEventListeners(),this.#e=!0}set clientAccessKey(e){this.#s=e}set canUpdateInventory(e){this.#r=e}get lastSharedConfigurationID(){return this.#o}set lastSharedConfigurationID(e){this.#o=e}set projectId(e){this.#l=e}get coreWCRef(){return this.#i}getResolvedAssetUrl(e){return qPe(e)}initializeAnalytics(e=void 0){e!==void 0&&(this.epigraphAnalytics=new vFe,this.epigraphAnalytics.addEventPlugin(new gFe(e,!1)))}get isReady(){return this.#e}get preloadProgress(){return this.#n}get categoryData(){return Ln.getState().categoryData}get productData(){return Ln.getState().productData}get lookData(){return Ln.getState().lookData}get sceneSettings(){return lt.getState().sceneSettings}get assetsData(){return Ln.getState().assetsData}get isMobile(){return lt.getState().isMobile}getDeviceState(){return lt.getState().actions.getDeviceState()}get hasSceneChanged(){return this.#a}set hasSceneChanged(e){this.#a=e}enableCart(){lt.getState().actions.enableCart()}disableCart(){lt.getState().actions.disableCart()}fireEvent(e,t){let n=new CustomEvent(e,{bubbles:!0,cancelable:!1,composed:!0});n.data=t,this.coreWCRef?this.coreWCRef.dispatchEvent(n):Vt.warn({title:"core web component not found!"})}setupAnalyticsEventListeners(){this.coreWCRef.addEventListener("coreApi:ready",e=>{let t=Object.assign({},AFe);t.label=`Project ID: ${this.#l}`,this.sendAnalyticsEvent(t)}),this.coreWCRef.addEventListener("coreApi:failed",e=>{let t=Object.assign({},bFe);t.label=`Project ID: ${this.#l}`,this.sendAnalyticsEvent(t)}),this.coreWCRef.addEventListener(this.EVENTS.SCENE.Item_Added,e=>{Vt.info({title:"Add Item",details:e});const t=e.data.itemData.guid,a=rn.getState().attachmentSystem.currentStructure.getNodeByGUID(t).currentVariant,s=`${e.data.itemData.skuID}(${a})`;let o=Object.assign({},RFe);o.label=`Item Added: ${s}`,this.sendAnalyticsEvent(o)}),this.coreWCRef.addEventListener(this.EVENTS.SCENE.Item_Removed,e=>{if(Vt.info({title:"Remove Item"}),e.data.itemData==null)return;const t=e.data.itemData.skuID;let n=Object.assign({},MFe);n.label=`Item Removed: ${t}`,this.sendAnalyticsEvent(n)}),this.coreWCRef.addEventListener(this.EVENTS.SCENE.Hotspot_Enter,e=>{let t=Object.assign({},DFe);t.label=`Hotspot Enter: ${e.data.hotspotAbsID}`,this.sendAnalyticsEvent(t)}),this.coreWCRef.addEventListener(this.EVENTS.SCENE.Hotspot_Exit,e=>{let t=Object.assign({},OFe);t.label=`Hotspot Exit: ${e.data.domID}`,this.sendAnalyticsEvent(t)}),this.coreWCRef.addEventListener(this.EVENTS.SCENE.Cart_Checkout,e=>{let t="Items: ";e.data.cartItems.forEach((i,a,s)=>{t+=`${i.count}@${i.skuID}(${i.currentVariant})`,a!==s.length-1&&(t+="<>")});let n=Object.assign({},SFe);n.label=t,this.sendAnalyticsEvent(n)})}setEmptySceneText(e){const t=lt.getState().sceneSettings;t.emptySceneText=e,lt.setState({sceneSettings:{...t}})}getSpawningRequirementForSkuID(e){return rn.getState().attachmentSystem.currentStructure.getSpawningRequirementForSkuID(e)}getCartItems(){return rn.getState().attachmentSystem.getCartItems()}checkout(e=!1){const t=rn.getState().attachmentSystem;this.#f=this.getSceneStructure();const n=t.getCartItems();return Vt.warn({title:"CONFIGURATOR CHECKED OUT: "}),Vt.table(n),e===!0||n.cartItems.find(i=>i.countUnavailable>0)===void 0?(this.fireEvent(this.EVENTS.SCENE.Cart_Checkout,n),st.alert({alertMsg:"Items from your configuration have been added to your cart.",alertTime:6e3,alertType:"success",alertLabel:"Success"})):this.fireEvent(this.EVENTS.SCENE.Cart_OutOfStock,n),n}async reloadCheckedoutScene(){if(!this.#f){Vt.info({title:"No data found since last checkout"});return}await this.loadSceneFromConfiguration(this.#f)}getCurrentItemsInReplaceableCategory(){return rn.getState().attachmentSystem.currentStructure.getCurrentItemsInReplaceableCategory()}async getSceneAsGlbUrl(){return this.#h===!1?this.#c:(URL.revokeObjectURL(this.#c),this.#c=void 0,this.#c=await lFe(),this.#h=!1,this.#c)}async getSceneAsUsdzUrl(){return this.#h===!1?this.#u:(URL.revokeObjectURL(this.#u),this.#u=void 0,this.#u=await oFe(),this.#h=!1,this.#u)}async generateShareableLink(e=!1){if(!this.#a&&this.#o)Vt.info({title:"Reusing the cached configuration ID that was last saved..."});else{Vt.info({title:"Generating a new configuration ID..."});let a=rn.getState().actions.export();const s=await HPe(a);this.#o=await s.text()}const t=window.location.href;let n=new URL(t);e===!0&&n.searchParams.set("launchInAR",!0),n.searchParams.set("projectId",this.#l),n.searchParams.set("epgsharedconfigid",this.#o),this.#a=!1;let i=Object.assign({},$$);return i.label=`Shared URL: ${n}`,this.sendAnalyticsEvent(i),n.href}closeContextMenu(){Yt.getState().selectedItemData&&Yt.getState().actions.deselectItem()}updatePreloadProgress(e){const t=this.#n;this.#n=e;const n=new CustomEvent("preload:update",{detail:{progress:this.#n}});window.dispatchEvent(n),typeof this.#t=="function"&&this.#t(t,e)}alert({alertMsg:e,alertTime:t,alertType:n,alertLabel:i,persistant:a=!1}){lt.getState().actions.sendAlert({alertMsg:e,alertTime:t,alertType:n,alertLabel:i,persistant:a})}removePersistantAlert(){lt.setState({persistantAlertData:null})}clickHotspot(e){let t=this.coreWCRef.shadowRoot.getElementById(e);t&&t.click()}exitHotspot(){si.getState().actions.exitHotspot(!1)}async spawnGhostsForSkuID(e,t=!1,n){if(Yt.getState().busy)return null;await or.getState().actions.spawnGhostsForSkuID(e,t,n)}removeAllGhosts(){if(Yt.getState().busy)return null;or.getState().actions.clearAllGhosts()}printSceneHierarchy(e=!1){const t=lt.getState().sceneRef;(function n(i){const a=`${i.name} < ${i.type} >`;e===!0?console.groupCollapsed(a):console.group(a),i.children.forEach(n),console.groupEnd()})(t)}getSceneItems(){const e=Yt.getState().itemsSpawned;if(typeof e!="object"){Vt.error({title:"There was an error while fetching the scene item count."});return}return e}getSceneItemCount(){let e;const t=Yt.getState().itemsSpawned;return typeof t!="object"&&Vt.error({title:"There was an error while fetching the scene item count."}),e=Object.keys(t).length,e}async spawnItemBySkuID(e,t=!1){return Yt.getState().busy?null:(t===!0&&await this.spawnGhostsForSkuID(e,!1,1),await Yt.getState().actions.addItemBySkuID(e))}async replaceItemsByGuid(e){let t={...e},n=!1;const i=rn.getState().attachmentSystem.currentStructure;let a=this.getSceneStructure();return Object.keys(e).map(s=>{a.structure.map(o=>{if(o.guid==s){let l=!1;const u=i.getNodeByGUID(s);u&&(l=u.isReplaceableWithSkuId(e[s].skuId)),t[s].success=l,l&&(o.skuID=e[s].skuId,n=!0)}})}),n&&await this.loadSceneFromConfiguration(a),t}async replaceItemsBySkuId(e,t=[]){let n={...e},i=!1;const a=rn.getState().attachmentSystem.currentStructure;let s=this.getSceneStructure();return s.structure.map(o=>{t.includes(o.guid)!==!0&&Object.keys(e).map(l=>{if(o.skuID==l){let u=!1;const f=a.getNodeByGUID(o.guid);f&&(u=f.isReplaceableWithSkuId(e[l].skuId)),n[l].success=u,u&&(o.skuID=e[l].skuId,i=!0)}})}),i&&await this.loadSceneFromConfiguration(s),n}async removeItemByGUID(e,t=!1){const i=rn.getState().attachmentSystem.currentStructure.getNodeByGUID(e);t===!1&&i.canSwapRoot===!0&&i.swapRoot(),await Yt.getState().actions.removeItemByGUID(e)}rotateItemByGUID(e){rn.getState().attachmentSystem.currentStructure.rotateNode(e)}rotateSelectedItem(){const e=Yt.getState().selectedItemData;if(!e){Vt.info("No current item selected to rotate");return}const t=e.itemData.guid;return rn.getState().attachmentSystem.currentStructure.rotateNode(t),e}removeItemBySkuID(e,t=!0){this.removeSelectedItem()}async removeSelectedItem(){const e=Yt.getState().selectedItemData;if(!e){Vt.info({title:"No current item selected to delete"});return}const t=e.itemData.guid;return Yt.getState().actions.deselectItem(),await this.removeItemByGUID(t),Vt.info({title:`Removed Item: ${t}`}),e}refocus(){lt.getState().actions.triggerAutoFocus()}focusOnGhosts(){if(or.getState().ghostParentRef===null){Vt.warn({title:"Ghost Parent Reference not found"});return}or.getState().ghostParentRef.children.length<=0?lt.getState().actions.triggerAutoFocus():lt.getState().actions.triggerAutoFocus(or.getState().ghostParentRef)}exitSelectedItem(){Yt.getState().actions.deselectItem()}getSelectedItemData(){return Yt.getState().selectedItemData}canSelectedItemRotate(){const e=rn.getState().attachmentSystem.currentStructure;let t=this.getSelectedItemData();return t?e.getNodeByGUID(t.itemData.guid).canRotate:!1}canSelectedItemDrag(){const e=rn.getState().attachmentSystem.currentStructure,t=this.getSelectedItemData();return t?e.getNodeByGUID(t.itemData.guid).canDrag:!1}doesGuidItemHaveAnAttachedDependency(e){let t=!0;const i=rn.getState().attachmentSystem.currentStructure.getNodeByGUID(e),a=i.isEndNode;return t=!a,a||i.canSwapRoot&&i.whichNodesAreAttachedToUs().length==1&&(t=!1),t}doesSelectedItemHasAttachedDependency(){const e=this.getSelectedItemData();return e?this.doesGuidItemHaveAnAttachedDependency(e.itemData.guid):!1}isSelectedItemAnEndNode(){const e=rn.getState().attachmentSystem.currentStructure,t=this.getSelectedItemData();return t?e.getNodeByGUID(t.itemData.guid).isEndNode:!1}getCurrentSceneEnvMap(){return Qx.getState().envMapUrl}async switchGlobalGeometryVariant(e,t){if(!e){Vt.WARN({title:"Geometry Category: '"+e+"' not valid!"});return}Yt.getState().selectedItemData&&Yt.getState().actions.deselectItem(),await rn.getState().attachmentSystem.switchGlobalGeometryVariant(e,t),await hc(1);let n=Object.assign({},xFe);n.label=`Variant: ${t} `,this.sendAnalyticsEvent(n)}async switchGlobalVariant(e,t=""){if(!e){Vt.WARN({title:"Look Category: '"+e+"' not valid!"});return}Yt.getState().selectedItemData&&Yt.getState().actions.deselectItem(),Vt.info({title:`Changing Global Variant: Category: ${e} Id: ${t}`}),await rn.getState().attachmentSystem.switchGlobalVariant(e,t),await hc(1);let n=Object.assign({},X$);n.label=`Variant: ${t}`,this.sendAnalyticsEvent(n)}async overrideSelectedItemMaterial(e=""){return Yt.getState().selectedItemData?(await Yt.getState().actions.switchToVariant(Yt.getState().selectedItemData.itemData,e,!0),!0):!1}async overrideItemMaterialByGuid(e,t){const n=Yt.getState().itemsSpawned[e];if(!n)return Vt.warn({title:"Item with guid: "+e+" doesn't exist"}),!1;await Yt.getState().actions.switchToVariant(n.itemData,t,!0);let i=Object.assign({},X$);return i.label=`Variant: ${t}`,this.sendAnalyticsEvent(i),!0}getSelectedItemColors(){let e=[];if(this.getSelectedItemData()==null)return e;let n=this.getSelectedItemData().itemData.looks;if(n){let i=Ln.getState().lookData;n.map(a=>{i.hasOwnProperty(a)&&e.push(i[a])})}return e}getCanvasSize(){return lt.getState().canvasSize}async removeAllVariantOverrides(){Yt.getState().selectedItemData&&Yt.getState().actions.deselectItem(),await rn.getState().attachmentSystem.removeAllVariantOverrides()}switchCursor(e){lt&<.getState().actions.switchCursor(e)}getSceneStructure(){return rn.getState().actions.export()}async loadSceneFromConfiguration(e){await rn.getState().actions.loadStructure(e),this.sendAnalyticsEvent(preconfigLoadEvent)}async loadSceneFromConfigurationID(e){const t=await rn.getState().actions.loadSavedStructureFromConfigID(e);if(!t)return null;rn.setState({defaultConfig:t});let n=Object.assign({},TFe);n.label=`Preconfig ID: ${e}`,await this.loadSceneFromConfiguration(t)}viewInYourSpace(){Vt.info({title:"View in your space called from the Core API"});let e=Object.assign({},CFe);e.label="AR Requested",this.sendAnalyticsEvent(e),this.#i.epigraphViewInYourSpaceRef._onViewInYourSpaceButtonClicked()}async shareScene(){const e=await this.generateShareableLink();let t=Object.assign({},$$);return t.label=`Shared URL: ${e}`,this.sendAnalyticsEvent(t),e}async clearScene(){await rn.getState().attachmentSystem.clear()}async restartScene(){Vt.info({title:"Restarting Scene."}),await rn.getState().attachmentSystem.restart();let e=Object.assign({},wFe);e.label="Scene Restarted",this.sendAnalyticsEvent(e)}areDimensionsVisible(){return lt.getState().showDimensions}getActiveHotspot(){return si.getState().activeHotspotData}reviewCartShown(){let e=Object.assign({},_Fe);e.label="Review Cart shown",this.sendAnalyticsEvent(e)}reviewCartHidden(){let e=Object.assign({},EFe);e.label="Review Cart hidden",this.sendAnalyticsEvent(e)}showDimensions(){lt.setState({showDimensions:!0});let e=Object.assign({},IFe);e.label="Dimensions shown",this.sendAnalyticsEvent(e)}hideDimensions(){lt.setState({showDimensions:!1});let e=Object.assign({},NFe);e.label="Dimensions hidden",this.sendAnalyticsEvent(e)}areHotspotsVisible(){return si.getState().hotspotsVisibility}areHotspotsTemporarilyVisible(){return si.getState().hotspotsTempVisibility}showAllHotspots(e=!1){si.getState().actions.switchHotspotsVisibility(!0,e)}hideAllHotspots(e=!1){si.getState().actions.switchHotspotsVisibility(!1,e)}getFittingSkuIds(){return rn.getState().attachmentSystem.getFittingSKUIDs()}selectItemWithGUID(e){const t=Yt.getState().itemsSpawned,n=rn.getState().attachmentSystem.currentStructure.getNodeByGUID(e);Yt.getState().actions.setSelectedItemData({...t[e],overrideVariant:n.overrideVariant,currentVariant:n.currentVariant,offsetX:0,offsetY:0})}async getCurrentCameraDetails(){return new Promise((e,t)=>{st.coreWCRef.addEventListener(st.EVENTS.CONFIGURATION.CameraDetails_Update,n=>{e(n.data)},{once:!0}),Ar.getState().actions.triggerFetchingCamera()})}moveCamera(e,t,n,i,a){si.setState({isAnyHotspotActive:!0}),Ar.setState({manualControl:!0,sourcePos:e,destPos:t,interpolationFactor:n,duration:i}),a&&Ar.setState({focusPointPosition:a})}setEnvLightMap(e){Qx.setState({envMapUrl:e})}updateInventoryForAllProducts(e){return this.#r===!1?(Vt.warn({title:"Inventory has been already updated once!"}),null):(Hd.getState().actions.updateInventoryForAllProducts(e),this.#r=!1,this.getInventoryInfo())}getInventoryInfo(){return Hd.getState().actions.getInventoryInfo()}updatePricingForAllProducts(e){Ln.getState().actions.updatePricingForAllProducts(e);const n=rn.getState().attachmentSystem.getCartItems();n&&st.fireEvent(st.EVENTS.SCENE.CartItems_Updated,n)}updatePricingForProduct(e,t,n){Ln.getState().actions.updatePricingForProduct(e,t,n);const a=rn.getState().attachmentSystem.getCartItems();a&&st.fireEvent(st.EVENTS.SCENE.CartItems_Updated,a)}getCurrentPricingInfo(){return Ln.getState().actions.getCurrentPricingInfo()}async itemDragStart(e){if(Yt.getState().busy)return null;lt.setState({hoveredGhostIndex:-1}),await this.removeAllGhosts(),lt.setState({itemDraggedSkuID:e}),await this.spawnGhostsForSkuID(e,!1)}async itemDragEnd(){if(Yt.getState().busy)return null;const e=lt.getState().hoveredGhostIndex;e!==-1?await Yt.getState().actions.addItemBySkuID(lt.getState().itemDraggedSkuID,e):await this.removeAllGhosts(),lt.setState({itemDraggedSkuID:null,hoveredGhostIndex:-1})}async forceSpawnItem(e,t){const n=Ln.getState().productData,i=rn.getState().attachmentSystem;if(!i)return;const a=i.currentStructure;if(!a)return;let s=a.getNodeByGUID(t);s?(s._skuID=e,s.generatePlugsForNode(e)):(s=new cR(e,{guid:t,isEndNode:!0,overrideVariant:null,plugs:n[e].plugs}),a.addNode(s),a.connectPlugs({incomingPlug:new gH({name:"haha",acceptedPlugTypes:[],connectsToPlugTypes:[]},s),receiverPlug:a.rootNode.plugs[0]}));const o=await Yt.getState().actions.addItemWithTransform({position:new ye(0,0,0),rotation:new Qi().identity()},e,t);return await hc(1),o}async downloadCurrentViewAsImage(e,t="png"){if(!e){Vt.warn({title:`Couldn't take screenshot for ${e}. Missing imageName parameter`});return}if(!t){Vt.warn({title:`Couldn't take screenshot for ${t}. Missing imageExtension parameter`});return}await hc(1);const n=await this.getCurrentViewAsImageUrl();await hc(1);let i;return n.success===!0&&(Vt.info({title:"Downloading the screenshot"}),i=document.createElement("a"),i.setAttribute("download",`${e}.${t}`),i.setAttribute("href",n.imageData),i.click(),Vt.info({title:"Screenshot download complete"})),i}async getCurrentViewAsImageUrl(){await hc(1);const e=await lt.getState().actions.requestNewScreenshot();return await hc(1),e}setCameraFocusPointPosition(e){Ar.setState({focusPointPosition:e})}triggerFetchingCamera(){Ar.getState().actions.triggerFetchingCamera()}async completeItemDrop(){await lt.getState().actions.completeDropItem()}revertItemDrop(){lt.getState().actions.revertDropItem()}getCameraFocusPointPosition(){return Ar.getState().focusPointPosition}sendAnalyticsPageViewedEvent(){}sendAnalyticsEvent(e){this.epigraphAnalytics!==null&&this.epigraphAnalytics.sendEvent(e)}isIosDevice(){return are}actionButtonClicked(e){this.fireEvent(this.EVENTS.SCENE.ActionButton_Clicked,{data:e.actionButton.data,skuID:e.skuID,count:e.count,price:e.price,countAvailable:e.countAvailable,countUnavailable:e.countUnavailable,currentVariant:e.currentVariant})}setCartMessage(e){this.fireEvent(this.EVENTS.SCENE.CartMessage_Update,{cartMessage:e})}}class UFe extends HTMLElement{#e="wc-epigraph-configurator-core";#n=!1;#t=void 0;#i=void 0;initialConfigId="";clientAccessKey="";gaCode="";builderMode=!1;projectId="";api=null;constructor(){super(),this.attachShadow({mode:"open"}),APe(new IR(this)),this.api=st}get identifier(){return this.#e}static get observedAttributes(){}get epigraphViewInYourSpaceRef(){return this.#t}#r(){this.hasAttribute("configurator-wc-id")&&(this.configuratorWcId=this.getAttribute("configurator-wc-id")),this.hasAttribute("initial-config-id")&&(this.initialConfigId=this.getAttribute("initial-config-id")),this.hasAttribute("client-access-key")&&(this.clientAccessKey=this.getAttribute("client-access-key")),this.hasAttribute("ga-code")&&(this.gaCode=this.getAttribute("ga-code")),this.hasAttribute("builder-mode")&&(this.builderMode=!0),Vt.group("Collected Web Component Attributes"),Vt.table({initialConfigId:this.initialConfigId,clientAccessKey:this.clientAccessKey,builderMode:this.builderMode}),Vt.groupEnd()}static get observedAttributes(){return["view-in-your-space-elem-id"]}attributeChangedCallback(e,t,n){if(this.#i||(this.#i=document.querySelector(`#${this.configuratorWcId}`)),!!this.#i)switch(e){case"view-in-your-space-elem-id":this.#t=this.#i.shadowRoot.querySelector(`#${n}`),Vt.warn({title:"ViewInYourSpace is now accessible from the core: "});break}}async#s(e){return new Promise(function(t,n){let i=new XMLHttpRequest;i.withCredentials=!1,i.open("GET","https://api.seeitinyourspace.com/auth/"+e),i.setRequestHeader("Content-Type","application/json"),i.onreadystatechange=function(){if(this.readyState===4){const a=JSON.parse(this.responseText);Vt.warn({title:a}),t(a)}},i.onerror=function(){n({status:this.status,statusText:i.statusText})},i.send()})}async connectedCallback(){if(this.#n===!0)return;this.#r();const e=await this.#s(this.clientAccessKey);this.validationPassed=e.passed,this.projectId=e.projectID,this.api.projectId=this.projectId,st.initializeAnalytics(this.gaCode);let t=Object.assign({},yFe);if(t.label=`Project ID: ${this.projectId}`,st.sendAnalyticsEvent(t),this.validationPassed==="false"){Vt.error({title:"Request from an invalidated source: "+window.location.href}),st.fireEvent("coreApi:failed");return}Vt.info({title:"VALIDATION SUCCESSFUL!"}),this.#n=!0,this.#i=document.querySelector(`#${this.configuratorWcId}`);let n=new URL(window.location).searchParams;n.has("epgsharedconfigid")&&(this.initialConfigId=n.get("epgsharedconfigid")),VU(this.shadowRoot).render(te(bke,{projectId:this.projectId,clientAccessKey:this.clientAccessKey,initialConfigId:this.initialConfigId,builderMode:this.builderMode,disableCart:this.hasAttribute("disable-cart")},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator-core/src/index.js",lineNumber:206,columnNumber:7},this))}disconnectedCallback(){st.fireEvent("coreApi:shutDown")}}const q6=document.createElement("template");q6.id="fullScreenModalTemplate";q6.innerHTML=`
|
|
9163
9163
|
<style>
|
|
9164
9164
|
.full-screen-modal-container {
|
|
9165
9165
|
width: 100%;
|
|
@@ -9217,7 +9217,7 @@ ${i.join(`
|
|
|
9217
9217
|
</slot>
|
|
9218
9218
|
</div>
|
|
9219
9219
|
</div>
|
|
9220
|
-
`;class
|
|
9220
|
+
`;class BFe extends HTMLElement{#e=void 0;#n=void 0;constructor(){super(),this.attachShadow({mode:"open"}),this.#t()}#t(){this.shadowRoot.appendChild(q6.content.cloneNode(!0)),this.#e=this.shadowRoot.querySelector("#fullScreenDialogContainer"),this.#n=this.shadowRoot.querySelector(".close-button"),this.#n.addEventListener("click",()=>{this.hide()})}show(){this.#e.classList.add("show")}hide(){this.#e.classList.remove("show")}}window.customElements.get("full-screen-modal")===void 0&&window.customElements.define("full-screen-modal",BFe);const X6=document.createElement("template");X6.id="viewInYourSpaceTemplate";X6.innerHTML=`
|
|
9221
9221
|
<style>
|
|
9222
9222
|
model-viewer
|
|
9223
9223
|
{
|
|
@@ -9777,8 +9777,8 @@ ${i.join(`
|
|
|
9777
9777
|
</div>
|
|
9778
9778
|
</div>
|
|
9779
9779
|
</full-screen-modal>
|
|
9780
|
-
`;class
|
|
9781
|
-
Make sure that the URL provided for the asset to be loaded is correct.`),console.error("==============================================================="),console.error(e),console.error("===============================================================")}_onViewInYourSpaceButtonClicked(e){this.canLaunchAR?this._prepareToLaunchAR():this._launchQRModal()}async wait(e){return new Promise((t,n)=>{setTimeout(()=>{t(!0)},e)})}async _prepareToLaunchAR(e){this._showARModal(),await this.wait(1e3),this.#r.isIosDevice()?(this.#n=await this.#r.getSceneAsUsdzUrl(),this.#e="https://storage.googleapis.com/epigraph-configurator/configurator-lite/assets/common/3d-assets/proxies/null-product-proxy.glb"):this.#e=await this.#r.getSceneAsGlbUrl(),this.syncModelViewerAttributes(),this._enableLaunchARButton()}_enableLaunchARButton(){this._launchARButton.disabled=!1,this._hideModelDownloadingLoader()}_disableLaunchARButton(){this._launchARButton.disabled=!0,this._showModelDownloadingLoader()}_launchAR(){this._modelViewer.activateAR()}_showQRLoader(){this._qrLoader.classList.remove("loader-hide")}_hideQRLoader(){this._qrLoader.classList.add("loader-hide")}async _launchQRModal(){if(this._qrCodeImage.classList.add("img-hide"),this._qrCodeImage.setAttribute("src",""),this._showQRLoader(),this._showQRModal(),this.#i=await this._getShareableLinkAsQR(),!this.#i){console.error("[VIEW-IN-YOUR-SPACE:Error] Cannot launch QR modal with no qrSrc.");return}this._qrCodeImage.setAttribute("src",this.#i),this._qrCodeImage.classList.remove("img-hide"),this._hideQRLoader()}async getQRForURL(e){return new Promise(function(t,n){let i={qrdata:e};i=JSON.stringify(i);const a=new XMLHttpRequest;a.withCredentials=!1,a.open("PUT","https://api.seeitinyourspace.com/qr"),a.setRequestHeader("Content-Type","application/json"),a.onreadystatechange=function(){if(this.readyState===4){let s=this.responseText;try{t(s)}catch(o){n({status:o})}}},a.onerror=function(){n({status:this.status,statusText:a.statusText})},a.send(i)})}async _getShareableLinkAsQR(){return this.#t=await this.#r.generateShareableLink(!0),await this.getQRForURL(this.#t)}}const
|
|
9780
|
+
`;class kFe extends HTMLElement{#e="";#n="";#t="";#i="https://help.spreadsheetconverter.com/wp-content/uploads/2013/07/car-loan-amortization-mobile-qrcode.png";#r=void 0;#s=!1;#l=void 0;#a=void 0;constructor(){super(),this._modelViewerScriptSource="https://cdn.jsdelivr.net/npm/@google/model-viewer@2.x.x/dist/model-viewer.min.js",this._modelViewer=null,this._qrModalContainer=null,this.attachShadow({mode:"open"}),this._setupLaunchArDrawer(),this._setupQRModal(),this._setupViewInYourSpaceButton()}connectedCallback(){this._modelViewer.addEventListener("load",e=>{this._onModelLoadSuccess(e)}),this._modelViewer.addEventListener("error",e=>{this._onModelLoadFailure(e)}),this._viewInYourSpaceButton.addEventListener("click",e=>{this._onViewInYourSpaceButtonClicked(e)})}set coreApi(e){this.#r=e}get coreApi(){return this.#r}static get observedAttributes(){return["asset-src","debug","hide-button","launch-in-ar","core-api"]}get canLaunchAR(){return this._modelViewer.canActivateAR}attributeChangedCallback(e,t,n){switch(e){case"asset-src":this.#e=n;break;case"hide-button":break;case"launch-in-ar":if(!this.hasAttribute("launch-in-ar"))break;break;case"core-api":this.#r=this.getAttribute("core-api");break}this.syncModelViewerAttributes()}disconnectedCallback(){}syncModelViewerAttributes(){this._modelViewer.setAttribute("src",this.#e),this._modelViewer.setAttribute("ios-src",this.#n),this._modelViewer.style.display="none"}_setupViewInYourSpaceButton(){window.customElements.get("model-viewer")===void 0&&this._importModelViewer(),this.shadowRoot.appendChild(X6.content.cloneNode(!0)),this._fetchUsefulElements(),this.syncModelViewerAttributes(),this._modelViewer.addEventListener("ar-status",e=>{e.detail.status==="session-started"?(this._modelViewer.style.display="block",this.#s=!0):(e.detail.status==="not-presenting"||e.detail.status==="failed")&&(this._modelViewer.style.display="none",this.#s=!1)})}_importModelViewer(){this._modelViewerScriptElem=document.createElement("script"),this._modelViewerScriptElem.setAttribute("type","module"),this._modelViewerScriptElem.setAttribute("src",this._modelViewerScriptSource),this._modelViewerScriptElem.setAttribute("id","modelViewerScript"),document.head.appendChild(this._modelViewerScriptElem)}_setupQRModal(){this.shadowRoot.appendChild($6.content.cloneNode(!0)),this._qrModalContainer=this.shadowRoot.getElementById("qrModalContainer"),this._qrCodeImage=this.shadowRoot.querySelector("#qrCodeImage"),this._arLink=this.shadowRoot.querySelector("#arLink"),this._qrLoader=this.shadowRoot.getElementById("qrLoader"),this.shadowRoot.getElementById("doneViewInYourSpaceBtn").addEventListener("click",()=>{this._hideQRModal()}),this.shadowRoot.getElementById("qrModalCloseButton").addEventListener("click",()=>{this._hideQRModal()})}_setupLaunchArDrawer(){this.shadowRoot.appendChild(K6.content.cloneNode(!0)),this.arDrawer=this.shadowRoot.getElementById("arDrawer"),this.#l=this.shadowRoot.getElementById("launchARModalContainer"),this.#a=this.shadowRoot.getElementById("launchARModalDrawer"),this._launchARButton=this.shadowRoot.getElementById("launchARButton"),this._modelDownloadLoader=this.shadowRoot.getElementById("modelDownloadLoader"),this._launchARButton.addEventListener("click",()=>{this.#s!==!0&&this._launchAR()})}_showModelDownloadingLoader(){this._modelDownloadLoader.classList.remove("loader-hide")}_hideModelDownloadingLoader(){this._modelDownloadLoader.classList.add("loader-hide")}_showARModal(){this._disableLaunchARButton(),this.arDrawer.show()}_hideARModal(){this.arDrawer.hide()}_fetchUsefulElements(){this._modelViewer=this.shadowRoot.querySelector("model-viewer"),this._viewInYourSpaceButton=this.shadowRoot.querySelector(".viewInYourSpaceButton")}_showQRModal(){this._qrModalContainer.classList.remove("qrModalHide")}_hideQRModal(){this._qrModalContainer.classList.add("qrModalHide")}_onModelLoadSuccess(){}_onModelLoadFailure(e){console.error(`[VIEW-IN-YOUR-SPACE ERROR]: Asset load Errors!!
|
|
9781
|
+
Make sure that the URL provided for the asset to be loaded is correct.`),console.error("==============================================================="),console.error(e),console.error("===============================================================")}_onViewInYourSpaceButtonClicked(e){this.canLaunchAR?this._prepareToLaunchAR():this._launchQRModal()}async wait(e){return new Promise((t,n)=>{setTimeout(()=>{t(!0)},e)})}async _prepareToLaunchAR(e){this._showARModal(),await this.wait(1e3),this.#r.isIosDevice()?(this.#n=await this.#r.getSceneAsUsdzUrl(),this.#e="https://storage.googleapis.com/epigraph-configurator/configurator-lite/assets/common/3d-assets/proxies/null-product-proxy.glb"):this.#e=await this.#r.getSceneAsGlbUrl(),this.syncModelViewerAttributes(),this._enableLaunchARButton()}_enableLaunchARButton(){this._launchARButton.disabled=!1,this._hideModelDownloadingLoader()}_disableLaunchARButton(){this._launchARButton.disabled=!0,this._showModelDownloadingLoader()}_launchAR(){this._modelViewer.activateAR()}_showQRLoader(){this._qrLoader.classList.remove("loader-hide")}_hideQRLoader(){this._qrLoader.classList.add("loader-hide")}async _launchQRModal(){if(this._qrCodeImage.classList.add("img-hide"),this._qrCodeImage.setAttribute("src",""),this._showQRLoader(),this._showQRModal(),this.#i=await this._getShareableLinkAsQR(),!this.#i){console.error("[VIEW-IN-YOUR-SPACE:Error] Cannot launch QR modal with no qrSrc.");return}this._qrCodeImage.setAttribute("src",this.#i),this._qrCodeImage.classList.remove("img-hide"),this._hideQRLoader()}async getQRForURL(e){return new Promise(function(t,n){let i={qrdata:e};i=JSON.stringify(i);const a=new XMLHttpRequest;a.withCredentials=!1,a.open("PUT","https://api.seeitinyourspace.com/qr"),a.setRequestHeader("Content-Type","application/json"),a.onreadystatechange=function(){if(this.readyState===4){let s=this.responseText;try{t(s)}catch(o){n({status:o})}}},a.onerror=function(){n({status:this.status,statusText:a.statusText})},a.send(i)})}async _getShareableLinkAsQR(){return this.#t=await this.#r.generateShareableLink(!0),await this.getQRForURL(this.#t)}}const FFe={}.VITE_APP_EPIGRAPHLOGGER_SCRIPT_SRC,sre=document.createElement("template");sre.innerHTML=`
|
|
9782
9782
|
<style>
|
|
9783
9783
|
.preload-main-container{
|
|
9784
9784
|
width: 100%;
|
|
@@ -9924,4 +9924,4 @@ ${i.join(`
|
|
|
9924
9924
|
There was a problem while trying to initialise the configurator.
|
|
9925
9925
|
</div>
|
|
9926
9926
|
</div>
|
|
9927
|
-
`;class
|
|
9927
|
+
`;class zFe extends HTMLElement{#e=void 0;clientAccessKey=null;validationPassed=!1;projectID="";configID="default";gaCode="";#n=!1;#t=void 0;api={core:null,ui:null};constructor(){super(),this.api.ui=this,this.attachShadow({mode:"open"}),this.#i(),this.#r()}#i(){this.preloadDiv=document.createElement("div"),this.preloadDiv.id="preloadMainContainer",this.preloadDiv.classList.add("preload-main-container"),this.preloadDiv.classList.add("showPreload"),this.preloadDiv.appendChild(sre.content.cloneNode(!0)),this.preloadDiv.appendChild(ore.content.cloneNode(!0)),this.shadowRoot.appendChild(this.preloadDiv)}#r(){this.hiccupUi=document.createElement("div"),this.hiccupUi.id="hiccupMainContainer",this.hiccupUi.classList.add("hiccup-ui-main-container"),this.hiccupUi.appendChild(lre.content.cloneNode(!0)),this.hiccupUi.appendChild(cre.content.cloneNode(!0)),this.shadowRoot.appendChild(this.hiccupUi)}#s(){window.customElements.define("epigraph-configurator-core",UFe)}#l(){window.customElements.define("view-in-your-space",kFe)}#a(){this._epigraphLoggerScriptElem=document.createElement("script"),this._epigraphLoggerScriptElem.setAttribute("src",FFe),this._epigraphLoggerScriptElem.setAttribute("id","epigraphLoggerScript"),document.head.appendChild(this._epigraphLoggerScriptElem),this._epigraphLoggerScriptElem.addEventListener("load",()=>{})}get configuratorWcId(){return this.#e}#o(){this.hasAttribute("id")?this.#e=this.getAttribute("id"):(this.setAttribute("id","epigraphConfiguratorWc"),this.#e=this.getAttribute("id")),this.hasAttribute("ga-code")&&(this.gaCode=this.getAttribute("ga-code")),this.clientAccessKey=this.getAttribute("client-access-key"),this.initialConfigId=this.getAttribute("initial-config-id"),this.initialConfigId||(this.initialConfigId="default")}async connectedCallback(){if(this.#n===!0){console.warn("Tried to remount configurator. Blocking the process.");return}this.#o(),this.#s(),console.log("Imported core"),this.#l(),console.log("Imported VIYS"),this.style.maxWidth="1440px",this.style.maxHeight="800px",this.style.overflow="hidden",this.style.width="100%",this.style.height="100%",this.style.position="relative",this.style.visibility="visible",this.style.display="flex";const e=document.createElement("div");e.id="configuratorContainer",e.style.width="100%",e.style.height="100%",e.style.userSelect="none",e.style.overflow="hidden",this.shadowRoot.appendChild(e),VU(e).render(te(YOe,{disableUI:this.hasAttribute("disable-ui"),launchInAR:this.hasAttribute("launch-in-ar"),disableCart:this.hasAttribute("disable-cart"),gaCode:this.gaCode,configuratorWcRef:this},"Configurator-App",!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator-dev-env/epigraph-configurator/src/index.js",lineNumber:357,columnNumber:7},this)),this.#n=!0}showPreloadScreen(){this.preloadDiv.classList.remove("no-pointer-events"),this.preloadDiv.classList.add("showPreload")}async hidePreloadScreen(){this.preloadDiv.classList.remove("showPreload"),await dX(1e3),this.preloadDiv.classList.add("no-pointer-events")}showHiccupScreen(){this.hiccupUi.classList.remove("no-pointer-events"),this.hiccupUi.classList.add("show-hiccup")}async hideHiccupScreen(){this.hiccupUi.classList.remove("show-hiccup"),await dX(1e3),this.hiccupUi.classList.add("no-pointer-events")}}window.customElements.define("epigraph-configurator",zFe);
|