@car-cutter/react-webplayer 3.1.0 → 3.1.1

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.
@@ -1,27 +0,0 @@
1
- "use strict";const n=require("react/jsx-runtime"),l=require("react"),xt="cc-webplayer",Lt="cc-webplayer-custom-media",It="cc-webplayer-icon",Tt="composition-loading",St="composition-loaded",Rt="composition-load-error",Nt="item-change",Pt="extend-mode-on",jt="extend-mode-off",gt="hotspots-on",vt="hotspots-off",At="gallery-open",zt="gallery-close",rn="analytics-identify",an="analytics-page",sn="analytics-track",Dn=!1,On=!1,Hn=!1,Fn="quality",Vn=0,Un=1/0,Wn=1,Bn=!1,Yn=!1,Xn="*",Gn="full_screen",Dt="cc-webplayer:",Zn=!1,qn=!1,Kn=!1,ln=1,cn="cc-analytics:",$n="",Qn="",Jn=!1,eo=!1,to=!1;function Ot(){if(typeof crypto<"u"&&typeof crypto.randomUUID=="function")return crypto.randomUUID();if(typeof crypto<"u"&&typeof crypto.getRandomValues=="function"){const t=new Uint8Array(16);crypto.getRandomValues(t),t[6]=t[6]&15|64,t[8]=t[8]&63|128;const a=Array.from(t,c=>c.toString(16).padStart(2,"0")).join("");return`${a.slice(0,8)}-${a.slice(8,12)}-${a.slice(12,16)}-${a.slice(16,20)}-${a.slice(20)}`}return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{const a=Math.random()*16|0;return(t==="x"?a:a&3|8).toString(16)})}function no(t,a){return`https://cdn.car-cutter.com/gallery/${t}/${a}/composition_v3.json`}function oo(t,a){const c=t.split("/"),s=c.pop();return[c.join("/"),a,s].join("/")}function ro(){const t="car-cutter-webplayer-browser-id",a=typeof window<"u"?window.localStorage.getItem(t):null;if(a)return a;const c=Ot();return typeof window<"u"&&window.localStorage.setItem(t,c),c}function ao(){const t="car-cutter-webplayer-session-id",a=typeof window<"u"?window.sessionStorage.getItem(t):null;if(a)return a;const c=Ot();return typeof window<"u"&&window.sessionStorage.setItem(t,c),c}function so(){return Ot()}function io(){return!!customElements.get(xt)&&!!customElements.get(Lt)&&!!customElements.get(It)}async function lo(t){const a=await fetch(t);if(!a.ok)throw new Error(`Failed to fetch composition: ${a.statusText}`);return await a.json()}const _t=new Map,co=t=>{const[a,c]=l.useState({status:"pending",isSuccess:!1});return l.useEffect(()=>{const s=d=>c({status:"success",data:d,isSuccess:!0}),f=_t.get(t);if(f&&!(f instanceof Promise)){s(f);return}c({status:"fetching",isSuccess:!1}),async function(){try{let d;if(f)d=await f;else{const E=lo(t);_t.set(t,E),d=await E,_t.set(t,d)}s(d)}catch(d){c({status:"error",isSuccess:!1,error:d})}}()},[t]),a},un=l.createContext(null),Be=()=>{const t=l.useContext(un);if(!t)throw new Error("useGlobalContext must be used within a GlobalContextProvider");return t},uo=({children:t,...a})=>n.jsx(un.Provider,{value:a,children:t}),dn=l.createContext(null),tt=()=>{const t=l.useContext(dn);if(!t)throw new Error("useCompositionContext must be used within a CompositionContextProvider");return t},fo=({composition:t,children:a})=>{const{aspectRatio:c,categories:s,imageHdWidth:f,imageSubWidths:d}=t,{minMediaWidth:E,maxMediaWidth:e,categoriesFilter:_}=Be(),x=l.useMemo(()=>{if(_==="*")return s;function r(I){return _.split("|").some(O=>new RegExp(`^${O.replace(/\*/g,".*")}$`).test(I))}return s.filter(({id:I})=>r(I))},[s,_]),P=l.useMemo(()=>x.flatMap(({items:r})=>r),[x]),C={aspectRatio:c.replace(":"," / ")},u=l.useMemo(()=>{const r=d.concat(f),I=r.sort((b,w)=>b-w),O=I.filter(b=>b>=E&&b<=e);if(O.length===0){const b=(E+e)/2,w=r.reduce((L,M)=>Math.abs(M-b)<Math.abs(L-b)?M:L,f);return console.warn(`None of available media widths (${I.join("|")}) match the given constraints (${E>0?`${E} ≤ `:""}width${e<1/0?` ≤ ${e}`:""}).`,`Using the closest width instead (${w}).`),[w]}return O},[d,f,E,e]);return n.jsx(dn.Provider,{value:{...t,categories:x,items:P,aspectRatioStyle:C,usedMediaWidths:u},children:a})},fn=500,rt=.75,at=1+rt*2,pn=()=>{const{isFullScreen:t,maxItemsShown:a,integration:c}=Be();return{effectiveMaxItemsShown:c&&t?ln:a}};function Ke(t,a,c){return Math.min(Math.max(t,a),c)}const mt=(t,a,c)=>t+(a-t)*c,qt=(t,a,c,s,f,d=!1)=>{const E=Ke(t,a,c);if(E===(d?c:a))return s;if(E===(d?a:c))return 1;const e=(E-a)/(c-a),x=1+(d?e:1-e)*(s-1),C=1+Math.round((x-1)/f)*f;return Ke(C,1,s)},po=(t,a)=>{if(a.includes(t))return t;let c=a[0],s=Math.abs(t-c);for(let f=1;f<a.length;f++){const d=Math.abs(t-a[f]);d<s&&(s=d,c=a[f])}return c},hn=l.createContext(null),Ht=()=>l.useContext(hn),lt=()=>{const t=Ht();if(!t)throw new Error("useCustomizationContext must be used within a CustomizationContextProvider");return t},Kt="*:size-full",$t="*:object-cover *:size-full",ho=({children:t})=>{const{compositionUrl:a}=Be(),c=l.useCallback(()=>document.querySelector(`${xt}[composition-url="${a}"]`),[a]),s=l.useCallback(I=>{const O=I.querySelectorAll(It),b=new Map;for(const w of O){const L=w.getAttribute("name");if(!L){console.warn("Icon element is missing a name attribute");continue}const M=w.innerHTML,h=M?n.jsx("div",{className:Kt,dangerouslySetInnerHTML:{__html:M}}):void 0;if(!h){console.warn(`Icon "${L}" customization is empty.`);continue}b.set(L,{Icon:h})}return b},[]),[f,d]=l.useState(()=>{const I=c();return I?s(I):new Map});l.useEffect(()=>{const I=c();if(!I)return;const O=new MutationObserver(()=>{d(s(I))});return O.observe(I,{childList:!0,subtree:!0}),()=>O.disconnect()},[s,c]);const E=l.useCallback(I=>f.get(I),[f]),e=l.useCallback((I,O)=>{d(b=>{const{Icon:w,...L}=O;return new Map(b.set(I,{...L,Icon:n.jsx("div",{className:Kt,children:w})}))})},[]),_=l.useCallback(I=>{d(O=>(O.delete(I),new Map(O)))},[]),x=l.useCallback(I=>{const O=I.querySelectorAll(Lt),b=new Array;for(const w of O){const L=w.innerHTML;if(!L){console.warn("Custom media element is empty");continue}const M=Number(w.getAttribute("index"));if(Number.isNaN(M)){console.warn("Custom media element is missing the 'index' attribute");continue}const h=w.getAttribute("thumbnail-src")??void 0,y=JSON.stringify({index:M,thumbnailSrc:h});b.push({id:y,Media:n.jsx("div",{className:$t,dangerouslySetInnerHTML:{__html:L}}),index:M,thumbnailSrc:h})}return b},[]),[P,C]=l.useState(()=>{const I=c();return I?x(I):[]});l.useEffect(()=>{const I=c();if(!I)return;const O=new MutationObserver(()=>{C(x(I))});return O.observe(I,{childList:!0,subtree:!0}),()=>O.disconnect()},[x,c]);const u=l.useCallback(I=>{const{Media:O,...b}=I,w=n.jsx("div",{className:$t,children:O}),L=JSON.stringify(b);return C(M=>[...M,{id:L,Media:w,...b}]),L},[]),r=l.useCallback(I=>{C(O=>O.filter(b=>b.id!==I))},[]);return n.jsx(hn.Provider,{value:{getIconConfig:E,registerIconConfig:e,unregisterIconConfig:_,customMediaList:P,registerCustomMedia:u,unregisterCustomMedia:r},children:t})},mn=l.createContext(null),Ye=()=>{const t=l.useContext(mn);if(!t)throw new Error("useControlsContext must be used within a ControlsContextProvider");return t},mo=({children:t})=>{const{infiniteCarrousel:a,extendBehavior:c,integration:s,emitEvent:f,emitAnalyticsEvent:d,isFullScreen:E,requestFullscreen:e,exitFullscreen:_}=Be(),{customMediaList:x}=lt(),{categories:P,items:C}=tt(),u=l.useMemo(()=>{const X=new Array(...C),ie=x.slice().sort((N,fe)=>N.index<0&&fe.index<0?fe.index-N.index:N.index<0?1:fe.index<0?-1:N.index-fe.index);for(const N of ie){let fe=N.index;fe<0&&(fe=X.length+fe+1),X.splice(fe,0,{type:"custom",...N})}return X},[C,x]),[r,I]=l.useState(u.map(()=>null));l.useEffect(()=>{I(u.map(()=>null))},[u]);const O=l.useCallback((X,ie)=>{I(N=>N.map((fe,we)=>we===X?ie:fe))},[]),[b,w]=l.useState(0),[L,M]=l.useState(null),h=L??b,y=u[h],S=r[h],[J,k]=l.useState(null),$=!!J,U=l.useCallback(()=>k(null),[]),{effectiveMaxItemsShown:F}=pn(),oe=l.useCallback(X=>{const ie=Math.min(b,X),N=Math.max(b,X);r.slice(ie,N+1).filter(we=>we===null).length>2&&k("instant"),M(X)},[b,r]),T=l.useMemo(()=>{let X;if(y.type==="custom"){const ie=u.slice(0,h).reverse().find(N=>N.type!=="custom")??u.slice(h+1).find(N=>N.type!=="custom");if(!ie)throw new Error("No non-custom item found");X=ie}else X=y;for(const ie of P)if(ie.items.includes(X))return ie.id;throw new Error("Current item not found in any category")},[P,y,u,h]),H=l.useMemo(()=>P.find(({id:X})=>X===T)?.title??"Unnamed Category",[P,T]),he=l.useMemo(()=>u.length,[u]),D=l.useCallback(X=>{const ie=P.find(({id:fe})=>fe===X)?.items[0];if(ie===void 0)throw new Error("Failed to find target category");const N=u.findIndex(fe=>fe===ie);oe(N)},[P,u,oe]),j=l.useCallback(()=>{if($||L!==null)return;const X=b-1;if(X>=0)M(X);else if(a){k("first_to_last");const ie=Math.ceil(F),N=u.length+(s&&!a&&F%1!==0?1:0),fe=F>1?Math.max(0,N-ie):u.length-1;M(fe)}d({type:"track",category_id:T,category_name:H,item_type:y.type,item_position:b,action_properties:{action_name:"Item Navigation",action_field:"item_navigation",action_value:"prev"}})},[$,L,b,a,d,T,H,y.type,F,u.length,s]),ee=l.useCallback(()=>{if($||L!==null)return;const X=b+1,ie=Math.ceil(F),N=u.length+(s&&!a&&F%1!==0?1:0),fe=F>1?Math.max(0,N-ie):u.length-1;X<=fe?M(X):a&&(k("last_to_first"),M(0)),d({type:"track",category_id:T,category_name:H,item_type:y.type,item_position:b,action_properties:{action_name:"Item Navigation",action_field:"item_navigation",action_value:"next"}})},[$,L,b,F,u.length,s,a,d,T,H,y.type]);l.useEffect(()=>{f(Nt,{index:h,item:y})},[y,f,h]),l.useEffect(()=>{if($||L!==null)return;const X={type:"page",category_id:T,category_name:H,items_count:he,page_properties:{item_type:y.type,item_position:b}},ie=setTimeout(()=>d(X),0);return()=>clearTimeout(ie)},[T,H,he,y.type,b,d,$,L]);const R=l.useMemo(()=>{if(s&&!E)return u.some(X=>{switch(X.type){case"image":return!!X.hotspots?.length;case"360":return X.images.some(ie=>!!ie.hotspots?.length);default:return!1}});switch(y.type){case"image":return!!y.hotspots?.length;case"360":return S==="running"&&y.images.some(X=>!!X.hotspots?.length);default:return!1}},[y,S,s,u,E]),[Z,te]=l.useState(!0),[A,q]=l.useState({}),Q=l.useMemo(()=>s&&E?A[h]??!0:Z,[s,E,A,h,Z]),ce=l.useCallback(()=>{if(s&&E){const ie=!(A[h]??!0);q(N=>({...N,[h]:ie})),f(ie?gt:vt),d({type:"track",category_id:T,category_name:H,item_type:y.type,item_position:b,action_properties:{action_name:"Hotspots Toggled",action_field:"hotspots_toggle_state",action_value:ie}})}else{const X=!Z;te(X),f(X?gt:vt),d({type:"track",category_id:T,category_name:H,item_type:y.type,item_position:b,action_properties:{action_name:"Hotspots Toggled",action_field:"hotspots_toggle_state",action_value:X}})}},[s,E,A,h,f,d,T,H,y.type,b,Z]),z=l.useMemo(()=>{switch(y.type){case"video":return S!=="running";default:return!0}},[y,S]),[xe,ne]=l.useState(!1),be=l.useCallback(()=>{const X=!xe;ne(X),f(X?At:zt),d({type:"track",category_id:T,category_name:H,item_type:y.type,item_position:b,action_properties:{action_name:"Gallery Toggled",action_field:"gallery_toggle_state",action_value:X}})},[xe,f,d,T,H,y.type,b]),[Pe,Fe]=l.useState(null),He=l.useCallback(()=>Fe(null),[]),p=!!Pe,v=l.useMemo(()=>{switch(y.type){case"image":return!0;case"interior-360":return S==="running";case"360":return S==="running";default:return!1}},[y.type,S]),[W,G]=l.useState(1),B=l.useCallback(X=>{const ie=typeof X=="function"?X(W):X;W!==ie&&(G(ie),d({type:"track",category_id:T,category_name:H,item_type:y.type,item_position:b,action_properties:{action_name:"Zoom Changed",action_field:"zoom_level",action_value:ie}}))},[W,d,T,H,y.type,b]),g=W!==1,ae=W<at,se=W>1,pe=l.useCallback(X=>{B(ie=>Ke(ie+X,1,at))},[B]),re=l.useCallback(()=>B(1),[B]),Le=l.useCallback(()=>pe(rt),[pe]),Ie=l.useCallback(()=>pe(-rt),[pe]),je=l.useCallback(()=>{re(),He()},[re,He]),[Re,Ae]=l.useState(!1),[Ne,ye]=l.useState(),[Te,Ve]=l.useState(!1),Se=l.useCallback(async X=>{je(),Ae(X),f(X?Pt:jt),d({type:"track",category_id:T,category_name:H,item_type:y.type,item_position:b,action_properties:{action_name:"Fake Fullscreen Toggled",action_field:"fake_fullscreen_toggle_state",action_value:X}})},[je,f,d,T,H,y.type,b]),Ce=l.useCallback(()=>{clearTimeout(Ne);const X=setTimeout(()=>{ye(void 0)},fn);ye(X)},[Ne]),De=l.useCallback(async()=>{const X=await e();return X&&d({type:"track",category_id:T,category_name:H,item_type:y.type,item_position:b,action_properties:{action_name:"Fullscreen Toggled",action_field:"fullscreen_toggle_state",action_value:!0}}),X},[e,d,T,H,y.type,b]),ze=l.useCallback(async()=>{const X=await _();return X&&d({type:"track",category_id:T,category_name:H,item_type:y.type,item_position:b,action_properties:{action_name:"Fullscreen Toggled",action_field:"fullscreen_toggle_state",action_value:!1}}),X},[_,d,T,H,y.type,b]),We=l.useCallback(async()=>{if(Ce(),c==="full_screen"){const X=await De();if(Ve(!X),X)return}Se(!0)},[c,Se,De,Ce]),Oe=l.useCallback(async()=>{Ce(),!(c==="full_screen"&&(Ve(!1),await ze()))&&Se(!1)},[c,Se,ze,Ce]),ke=l.useCallback(()=>{Re?Oe():We()},[Oe,We,Re]);return l.useEffect(()=>{c==="full_screen"&&(Te&&Re||E!==Re&&(Ce(),Se(E)))},[c,Se,Re,Te,E,Ce]),n.jsx(mn.Provider,{value:{items:u,setItemInteraction:O,slidable:u.length>1,carrouselItemIndex:b,setCarrouselItemIndex:w,itemIndexCommand:L,setItemIndexCommand:M,masterItemIndex:h,specialCommand:J,isRunningSpecialCommand:$,finishSpecialCommand:U,prevItem:j,nextItem:ee,scrollToItemIndex:oe,displayedCategoryId:T,displayedCategoryName:H,changeCategory:D,enableHotspotsControl:R,showHotspots:Z,currentItemHotspotsVisible:Q,toggleHotspots:ce,showGalleryControls:z,showGallery:xe,toggleGallery:be,shownDetails:Pe,isShowingDetails:p,setShownDetails:Fe,resetShownDetails:He,showZoomControls:v,zoom:W,isZooming:g,setZoom:B,resetZoom:re,canZoomIn:ae,zoomIn:Le,canZoomOut:se,zoomOut:Ie,resetView:je,extendMode:Re,enableExtendMode:We,disableExtendMode:Oe,toggleExtendMode:ke,extendTransition:!!Ne,fakeFullScreen:Te},children:t})},gn=["left","center","right","fullW"],vn=["top","middle","bottom","fullH"],go=[...gn,...vn,"top-left","top-center","top-right","top-fullW","middle-left","middle-center","middle-right","middle-fullW","bottom-left","bottom-center","bottom-right","bottom-fullW","fullH-left","fullH-center","fullH-right","fullW-fullW"];function vo(t){return gn.includes(t)}function xo(t){return vn.includes(t)}function wo(t){return go.includes(t)}function bo(t){if(!wo(t))throw new Error(`Invalid position: ${t}`);return xo(t)?[t,void 0]:vo(t)?[void 0,t]:t.split("-")}function de(...t){return t.filter(a=>!!a).map(a=>a.trim()).join(" ")}function yo(t){switch(t){case"left":return"left-1 small:left-2";case"right":return"right-1 small:right-2";case"center":return"left-1/2 -translate-x-1/2";case"fullW":return"inset-x-1 small:inset-x-2"}}function xn(t){switch(t){case"top":return"top-1 small:top-2";case"bottom":return"bottom-1 small:bottom-2";case"middle":return"top-1/2 -translate-y-1/2";case"fullH":return"inset-y-1 small:inset-y-2"}}function Eo({positionX:t,positionY:a}){const c=new Array;return t&&c.push(yo(t)),a&&c.push(xn(a)),c.join(" ")}function st(t){const[a,c]=bo(t);return Eo({positionX:c,positionY:a})}const Ue=({customizationKey:t,className:a,children:c})=>{const{getIconConfig:s}=lt(),d=s(t)?.Icon;return d?a?n.jsx("div",{className:a,children:d}):d:c},Co=({className:t})=>n.jsx(Ue,{className:t,customizationKey:"UI_CLOSE",children:n.jsx("svg",{className:t,width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:n.jsx("path",{d:"M19 6.41L17.59 5L12 10.59L6.41 5L5 6.41L10.59 12L5 17.59L6.41 19L12 13.41L17.59 19L19 17.59L13.41 12L19 6.41Z",fill:"currentColor"})})}),Mo={fill:{primary:"bg-primary text-primary-foreground hover:opacity-80",neutral:"bg-background text-neutral-foreground hover:opacity-80"},ghost:{primary:"bg-transparent text-foreground hover:bg-primary/25",neutral:"bg-transparent text-background hover:bg-foreground/25"}},_o={button:"h-8 px-2",icon:"size-8 p-2"},Ze=({variant:t="fill",shape:a="button",color:c="primary",className:s,children:f,...d})=>{const E=Mo[t][c],e=_o[a];return n.jsx("button",{className:de("flex items-center justify-center rounded-ui text-sm transition-all disabled:opacity-60",E,e,s),...d,children:f})},kt=t=>n.jsx(Ze,{color:"neutral",shape:"icon",...t,children:n.jsx(Co,{className:"size-full"})}),wt=({text:t,className:a})=>n.jsxs("div",{className:de("flex size-full flex-col items-center justify-center gap-y-4",a),children:[n.jsx("img",{className:"h-20 small:h-28",src:"https://cdn.car-cutter.com/libs/web-player/v3/assets/car_placeholder.png"}),n.jsx("div",{className:"text-2xl font-bold",children:t})]}),ko={primary:"border-primary",foreground:"border-foreground",background:"border-background"},Lo={sm:"size-4 border",md:"size-8 border-2",lg:"size-12 border-4"},wn=({color:t="foreground",size:a="md"})=>{const c=ko[t],s=Lo[a];return n.jsx("div",{className:de("inline-block animate-rotation rounded-full border-b-transparent",s,c)})},$e=l.forwardRef(({src:t,className:a,onLoad:c,imgInPlayerWidthRatio:s=1,onlyThumbnail:f,fadeIn:d,...E},e)=>{const{mediaLoadStrategy:_,playerInViewportWidthRatio:x}=Be(),{imageHdWidth:P,usedMediaWidths:C}=tt(),[u,r]=l.useMemo(()=>{const b=C.map(L=>`${L!==P?oo(t,L):t} ${L}w`);let w;if(f)w=[`${C[0]}px`];else{const L=1/(s*x);switch(_){case"quality":{const M=[...C],h=M.pop();w=M.map(y=>`(max-width: ${L*y}px) ${y}px`),w.push(`${h}px`);break}case"balanced":{w=[];for(let M=0;M<C.length-1;M++){const h=C[M],y=C[M+1],S=Math.round((h+y)/2);w.push(`(max-width: ${L*S}px) ${h}px`)}w.push(`${C[C.length-1]}px`);break}case"speed":{const M=[...C],h=M.shift();w=M.reverse().map(y=>`(min-width: ${L*y}px) ${y}px`),w.push(`${h}px`);break}}}return[b.join(", "),w.join(", ")]},[P,s,_,f,x,t,C]),[I,O]=l.useState();return l.useEffect(()=>{if(I===!0)return;const b=setTimeout(()=>{O(w=>w??!1)},30);return()=>clearTimeout(b)},[I]),n.jsx("img",{ref:e,src:t,srcSet:u,sizes:r,className:de(a,d&&de(I!==void 0&&"transition-opacity duration-200",I===!1&&"opacity-0",I===!0&&"opacity-100")),onLoad:b=>{O(!0),c?.(b)},...E})});$e.displayName="CdnImage";const bn=({className:t})=>n.jsx(Ue,{className:t,customizationKey:"UI_IMAGE",children:n.jsx("svg",{className:t,viewBox:"0 0 12 12",fill:"none",children:n.jsx("path",{d:"M9.5 2.5V9.5H2.5V2.5H9.5ZM9.5 1.5H2.5C1.95 1.5 1.5 1.95 1.5 2.5V9.5C1.5 10.05 1.95 10.5 2.5 10.5H9.5C10.05 10.5 10.5 10.05 10.5 9.5V2.5C10.5 1.95 10.05 1.5 9.5 1.5ZM7.07 5.93L5.57 7.865L4.5 6.57L3 8.5H9L7.07 5.93Z",fill:"currentColor"})})}),yn=({className:t})=>n.jsx(Ue,{className:t,customizationKey:"INTERIOR_UI_360",children:n.jsxs("svg",{className:t,viewBox:"0 0 98 98",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[n.jsx("path",{d:"M30.9343 48C26.8559 48 24.3496 46.2454 23.3411 44.1517C23.1038 43.6651 23 43.1933 23 42.7509C23 41.6008 23.7415 40.8784 24.9725 40.8784C25.8623 40.8784 26.4259 41.2322 26.8708 42.0432C27.6271 43.5324 28.7839 44.4171 31.0085 44.4171C33.2034 44.4171 34.7161 43.149 34.7161 41.3797C34.731 39.3154 33.2034 38.1653 30.6081 38.1653H29.6737C28.5911 38.1653 27.9682 37.5313 27.9682 36.5729C27.9682 35.644 28.5911 34.9952 29.6737 34.9952H30.5488C32.7882 34.9952 34.2416 33.7862 34.2416 32.0463C34.2416 30.336 33.0848 29.2006 30.9195 29.2006C29.1102 29.2006 28.0127 29.9526 27.3157 31.4565C26.8263 32.4592 26.3072 32.8278 25.2987 32.8278C24.053 32.8278 23.4153 32.1053 23.4153 31.0289C23.4153 30.5276 23.5191 30.1 23.7415 29.5987C24.6907 27.5197 27.1229 25.7799 30.9047 25.7799C35.428 25.7799 38.4831 28.0063 38.4831 31.4123C38.4831 34.1106 36.5403 35.8799 34.0191 36.396V36.4845C37.2077 36.7793 39.2691 38.6372 39.2691 41.5713C39.2691 45.4344 35.9026 48 30.9343 48Z",fill:"white"}),n.jsx("path",{d:"M50.5032 48C47.107 48 44.4079 46.4223 42.8358 43.2965C42.0201 41.6451 41.5752 39.5366 41.5752 37.0595C41.5752 30.0116 44.9566 25.7651 50.5181 25.7651C54.0626 25.7651 56.6134 27.2543 57.6219 29.2448C57.8295 29.6577 57.9333 30.0411 57.9333 30.4392C57.9333 31.4271 57.2363 32.1938 56.0647 32.1938C55.1749 32.1938 54.641 31.8104 53.9884 31.0584C53.0096 29.8346 51.9715 29.2891 50.5032 29.2891C47.4481 29.2891 45.8909 32.179 45.8613 36.7204V36.9415H45.9502C46.7808 34.9658 48.8867 33.5208 51.7787 33.5208C55.9164 33.5208 58.749 36.455 58.749 40.4508C58.749 44.8594 55.2787 48 50.5032 48ZM50.4439 44.4613C52.6388 44.4613 54.374 42.7804 54.3888 40.6424C54.3888 38.4013 52.7426 36.8088 50.4884 36.8088C48.2193 36.8088 46.5286 38.3865 46.5286 40.554C46.5286 42.7509 48.249 44.4613 50.4439 44.4613Z",fill:"white"}),n.jsx("path",{d:"M68.9374 48C63.5094 48 60.2022 43.7388 60.2022 36.8531C60.2022 29.9821 63.5391 25.7651 68.9374 25.7651C74.3357 25.7651 77.6577 29.9673 77.6577 36.8383C77.6577 43.7093 74.3654 48 68.9374 48ZM68.9374 44.4318C71.5772 44.4318 73.1048 41.7335 73.1048 36.8531C73.1048 32.0021 71.5624 29.3333 68.9374 29.3333C66.3272 29.3333 64.7552 32.0168 64.7552 36.8531C64.7552 41.7335 66.2975 44.4318 68.9374 44.4318Z",fill:"white"}),n.jsx("path",{d:"M81.6758 28.4244C78.6504 28.4244 76.3665 26.1685 76.3665 23.2048C76.3665 20.2559 78.6504 18 81.6758 18C84.6864 18 87 20.2559 87 23.2048C87 26.1685 84.6864 28.4244 81.6758 28.4244ZM81.6758 25.4755C82.9364 25.4755 83.9152 24.4581 83.9152 23.2048C83.9152 21.9368 82.9216 20.9489 81.6758 20.9489C80.4597 20.9489 79.4364 21.9368 79.4364 23.2048C79.4364 24.4581 80.4449 25.4755 81.6758 25.4755Z",fill:"white"}),n.jsx("path",{d:"M37.3915 79.7285C36.5538 79.7285 36.0601 79.2171 36.0601 78.3442V68.0541C36.0601 67.1724 36.5538 66.661 37.3915 66.661C38.2292 66.661 38.7229 67.1724 38.7229 68.0541V78.3442C38.7229 79.2171 38.2292 79.7285 37.3915 79.7285Z",fill:"white"}),n.jsx("path",{d:"M43.7429 79.7285C42.9405 79.7285 42.4644 79.2436 42.4644 78.3971V67.9924C42.4644 67.1459 42.9582 66.661 43.8047 66.661C44.3513 66.661 44.7217 66.8814 45.1273 67.4369L50.6294 75.1258H50.6999V68.0012C50.6999 67.1459 51.1761 66.661 51.9785 66.661C52.7809 66.661 53.2482 67.1459 53.2482 68.0012V78.4324C53.2482 79.2612 52.7809 79.7285 51.9432 79.7285C51.3701 79.7285 51.0174 79.5257 50.6118 78.9614L45.092 71.2284H45.0126V78.3971C45.0126 79.2436 44.5365 79.7285 43.7429 79.7285Z",fill:"white"}),n.jsx("path",{d:"M61.3719 79.7285C60.5343 79.7285 60.0405 79.2171 60.0405 78.3442V69.0417H57.4129C56.6898 69.0417 56.2049 68.6273 56.2049 67.9395C56.2049 67.2518 56.681 66.8373 57.4129 66.8373H65.3398C66.0629 66.8373 66.539 67.2518 66.539 67.9395C66.539 68.6273 66.054 69.0417 65.3398 69.0417H62.7034V78.3442C62.7034 79.2171 62.2096 79.7285 61.3719 79.7285Z",fill:"white"}),n.jsx("path",{d:"M11.5291 40.7269C5.85358 44.3944 2.5 48.9252 2.5 53.8286C2.5 62.4095 12.77 69.8493 27.7816 73.5179M86.4709 40.7269C92.1464 44.3944 95.5 48.9252 95.5 53.8286C95.5 61.8751 86.4695 68.9181 72.967 72.7891M27.7816 73.5179L23.267 65.1144M27.7816 73.5179L19.6553 77.7552",stroke:"currentColor",strokeWidth:"4.51456",strokeLinecap:"round"})]})}),En=({className:t})=>n.jsx(Ue,{className:t,customizationKey:"UI_PLAY",children:n.jsx("svg",{className:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:n.jsx("polygon",{points:"6 3 20 12 6 21 6 3"})})}),Ft=({className:t})=>n.jsx(Ue,{className:t,customizationKey:"UI_360",children:n.jsxs("svg",{className:t,viewBox:"0 0 98 98",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[n.jsx("path",{d:"M30.9343 48C26.8559 48 24.3496 46.2454 23.3411 44.1517C23.1038 43.6651 23 43.1933 23 42.7509C23 41.6008 23.7415 40.8784 24.9725 40.8784C25.8623 40.8784 26.4259 41.2322 26.8708 42.0432C27.6271 43.5324 28.7839 44.4171 31.0085 44.4171C33.2034 44.4171 34.7161 43.149 34.7161 41.3797C34.731 39.3154 33.2034 38.1653 30.6081 38.1653H29.6737C28.5911 38.1653 27.9682 37.5313 27.9682 36.5729C27.9682 35.644 28.5911 34.9952 29.6737 34.9952H30.5488C32.7882 34.9952 34.2416 33.7862 34.2416 32.0463C34.2416 30.336 33.0848 29.2006 30.9195 29.2006C29.1102 29.2006 28.0127 29.9526 27.3157 31.4565C26.8263 32.4592 26.3072 32.8278 25.2987 32.8278C24.053 32.8278 23.4153 32.1053 23.4153 31.0289C23.4153 30.5276 23.5191 30.1 23.7415 29.5987C24.6907 27.5197 27.1229 25.7799 30.9047 25.7799C35.428 25.7799 38.4831 28.0063 38.4831 31.4123C38.4831 34.1106 36.5403 35.8799 34.0191 36.396V36.4845C37.2077 36.7793 39.2691 38.6372 39.2691 41.5713C39.2691 45.4344 35.9026 48 30.9343 48Z",fill:"white"}),n.jsx("path",{d:"M50.5032 48C47.107 48 44.4079 46.4223 42.8358 43.2965C42.0201 41.6451 41.5752 39.5366 41.5752 37.0595C41.5752 30.0116 44.9566 25.7651 50.5181 25.7651C54.0626 25.7651 56.6134 27.2543 57.6219 29.2448C57.8295 29.6577 57.9333 30.0411 57.9333 30.4392C57.9333 31.4271 57.2363 32.1938 56.0647 32.1938C55.1749 32.1938 54.641 31.8104 53.9884 31.0584C53.0096 29.8346 51.9715 29.2891 50.5032 29.2891C47.4481 29.2891 45.8909 32.179 45.8613 36.7204V36.9415H45.9502C46.7808 34.9658 48.8867 33.5208 51.7787 33.5208C55.9164 33.5208 58.749 36.455 58.749 40.4508C58.749 44.8594 55.2787 48 50.5032 48ZM50.4439 44.4613C52.6388 44.4613 54.374 42.7804 54.3888 40.6424C54.3888 38.4013 52.7426 36.8088 50.4884 36.8088C48.2193 36.8088 46.5286 38.3865 46.5286 40.554C46.5286 42.7509 48.249 44.4613 50.4439 44.4613Z",fill:"white"}),n.jsx("path",{d:"M68.9374 48C63.5094 48 60.2022 43.7388 60.2022 36.8531C60.2022 29.9821 63.5391 25.7651 68.9374 25.7651C74.3357 25.7651 77.6577 29.9673 77.6577 36.8383C77.6577 43.7093 74.3654 48 68.9374 48ZM68.9374 44.4318C71.5772 44.4318 73.1048 41.7335 73.1048 36.8531C73.1048 32.0021 71.5624 29.3333 68.9374 29.3333C66.3272 29.3333 64.7552 32.0168 64.7552 36.8531C64.7552 41.7335 66.2975 44.4318 68.9374 44.4318Z",fill:"white"}),n.jsx("path",{d:"M81.6758 28.4244C78.6504 28.4244 76.3665 26.1685 76.3665 23.2048C76.3665 20.2559 78.6504 18 81.6758 18C84.6864 18 87 20.2559 87 23.2048C87 26.1685 84.6864 28.4244 81.6758 28.4244ZM81.6758 25.4755C82.9364 25.4755 83.9152 24.4581 83.9152 23.2048C83.9152 21.9368 82.9216 20.9489 81.6758 20.9489C80.4597 20.9489 79.4364 21.9368 79.4364 23.2048C79.4364 24.4581 80.4449 25.4755 81.6758 25.4755Z",fill:"white"}),n.jsx("path",{d:"M34.6814 79.561C33.8438 79.561 33.35 79.0496 33.35 78.1678V68.2217C33.35 67.3487 33.8438 66.8373 34.6814 66.8373H40.7302C41.4621 66.8373 41.9382 67.2518 41.9382 67.9395C41.9382 68.6273 41.4533 69.0417 40.7302 69.0417H36.0129V72.1014H40.501C41.1623 72.1014 41.612 72.4894 41.612 73.1242C41.612 73.7591 41.1711 74.147 40.501 74.147H36.0129V77.3566H40.7302C41.4533 77.3566 41.9382 77.771 41.9382 78.4588C41.9382 79.1466 41.4621 79.561 40.7302 79.561H34.6814Z",fill:"white"}),n.jsx("path",{d:"M46.4115 79.7285C45.7061 79.7285 45.1506 79.2171 45.1506 78.5734C45.1506 78.2472 45.2564 77.965 45.5121 77.6123L48.6864 73.1859V73.1154L45.6179 68.9359C45.327 68.5479 45.23 68.2569 45.23 67.9131C45.23 67.19 45.8031 66.661 46.5791 66.661C47.0817 66.661 47.4344 66.8814 47.7782 67.4017L50.5028 71.4224H50.5734L53.3862 67.3135C53.6948 66.855 53.9593 66.661 54.4707 66.661C55.1673 66.661 55.7669 67.1636 55.7669 67.7984C55.7669 68.1423 55.6699 68.4245 55.4142 68.7507L52.1076 73.1683V73.23L55.3172 77.5594C55.5641 77.8768 55.6699 78.1766 55.6699 78.5293C55.6699 79.2259 55.132 79.7285 54.3914 79.7285C53.9064 79.7285 53.5802 79.5345 53.2363 79.0672L50.397 75.1082H50.3265L47.5313 79.076C47.1963 79.561 46.9141 79.7285 46.4115 79.7285Z",fill:"white"}),n.jsx("path",{d:"M63.7055 79.7285C62.8678 79.7285 62.374 79.2171 62.374 78.3442V69.0417H59.7464C59.0234 69.0417 58.5384 68.6273 58.5384 67.9395C58.5384 67.2518 59.0146 66.8373 59.7464 66.8373H67.6734C68.3964 66.8373 68.8725 67.2518 68.8725 67.9395C68.8725 68.6273 68.3876 69.0417 67.6734 69.0417H65.0369V78.3442C65.0369 79.2171 64.5431 79.7285 63.7055 79.7285Z",fill:"white"}),n.jsx("path",{d:"M11.5291 40.7263C5.85358 44.3937 2.5 48.9245 2.5 53.828C2.5 62.4089 12.77 69.8486 27.7816 73.5172M86.4709 40.7263C92.1464 44.3937 95.5 48.9245 95.5 53.828C95.5 61.8744 86.4695 68.9174 72.967 72.7885M27.7816 73.5172L23.267 65.1137M27.7816 73.5172L19.6553 77.7545",stroke:"currentColor",strokeWidth:"4.51456",strokeLinecap:"round"})]})}),Io=({src:t,withCdn:a})=>{const{permanentGallery:c}=Be();if(!t)return null;const s="size-full object-cover";return a?n.jsx($e,{className:s,src:t,onlyThumbnail:!0,fadeIn:!c}):n.jsx("img",{className:s,src:t})},ft=({children:t})=>{const{extendMode:a}=Ye();return n.jsx("div",{className:de("flex aspect-square h-3/4 items-center justify-center rounded-full bg-foreground/50 p-1",a&&"large:h-3/5 large:p-2"),children:t})},To=({item:t})=>{const{aspectRatioStyle:a}=tt(),{type:c}=t;let s,f;switch(c){case"360":s=t.images[0].src,f=!0;break;case"interior-360":s=t.poster,f=!0;break;case"image":s=t.src,f=!0;break;case"video":s=t.poster,f=!0;break;case"custom":s=t.thumbnailSrc,f=!1;break;default:f=!1}const d=n.jsx(Io,{src:s,withCdn:f});let E;switch(c){case"360":E=n.jsx(ft,{children:n.jsx(Ft,{className:"size-full"})});break;case"interior-360":E=n.jsx(ft,{children:n.jsx(yn,{className:"size-full"})});break;case"video":E=n.jsx(ft,{children:n.jsx(En,{className:"size-full p-0.5 text-background"})});break;case"custom":E=s?null:n.jsx(ft,{children:n.jsx(bn,{className:"size-full p-0.5 text-background"})});break}return n.jsxs("div",{className:"relative bg-foreground/30",style:a,children:[d,E&&n.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-foreground/25",children:E})]})},So={primary:"bg-primary/50",neutral:"bg-neutral/50",background:"bg-background/50",foreground:"bg-foreground/50"},Cn=({color:t="neutral",orientation:a="horizontal"})=>{const c=So[t],s=a==="horizontal"?"h-px w-full":"w-px h-full";return n.jsx("div",{className:de(c,s)})},Mn=({className:t="",containerClassName:a=""})=>{const{hideCategoriesNav:c,infiniteCarrousel:s,permanentGallery:f,isFullScreen:d,maxItemsShown:E}=Be(),{categories:e,aspectRatioStyle:_}=tt(),{emitAnalyticsEvent:x}=Be(),{items:P,extendMode:C,extendTransition:u,masterItemIndex:r,prevItem:I,nextItem:O,scrollToItemIndex:b,resetView:w,displayedCategoryId:L,displayedCategoryName:M}=Ye(),h=l.useMemo(()=>P[r].type,[P,r]),y=l.useMemo(()=>{if(c)return[];const j=new Array;let ee=e[0];const R=Z=>e.find(te=>te.items.some(A=>A===Z));for(let Z=0;Z<P.length;Z++){const te=P[Z],A=R(te);A&&A!==ee&&(j.push(Z),ee=A)}return j},[e,c,P]),S=l.useRef(null),J=l.useCallback(()=>{if(!S.current)throw new Error("slider.current is null");return S.current},[]),k=l.useRef(!1),$=l.useRef(null),[U,F]=l.useState(!1),oe=l.useCallback((j,ee)=>{const R=J(),Z=R.clientWidth,te=R.scrollWidth/P.length,A=(j+1/2)*te-Z/2,q=R.scrollWidth-R.clientWidth;R.scrollTo({left:Ke(A,0,q),behavior:ee})},[P.length,J]);l.useEffect(()=>{const j=S.current;if(!j)return;const ee=te=>{te.preventDefault(),k.current=!0,$.current={x:te.pageX-j.offsetLeft,scrollLeft:j.scrollLeft}},R=te=>{if(!k.current)return;if($.current===null)throw new Error("[onMouseMove] scrollStart is null");const q=te.pageX-j.offsetLeft-$.current.x;if(!U&&Math.abs(q)<5)return;const Q=$.current.scrollLeft-q;F(!0),requestAnimationFrame(()=>{j.scrollLeft=Q})},Z=()=>{k.current&&(k.current=!1,requestAnimationFrame(()=>{F(!1)}))};return j.addEventListener("mousedown",ee),document.addEventListener("mousemove",R),document.addEventListener("mouseleave",Z),document.addEventListener("mouseup",Z),document.addEventListener("contextmenu",Z),()=>{j.removeEventListener("mousedown",ee),document.removeEventListener("mousemove",R),document.removeEventListener("mouseleave",Z),document.removeEventListener("mouseup",Z),document.removeEventListener("contextmenu",Z)}},[U]);const T=l.useRef(r);l.useEffect(()=>{S.current&&(oe(r,"smooth"),T.current=r)},[r,oe]),l.useEffect(()=>{S.current&&oe(T.current,"instant")},[oe,d,C,u]);const H=l.useCallback(j=>{x({type:"track",category_id:L,category_name:M,item_type:h,item_position:r,action_properties:{action_name:"Gallery Item Clicked",action_field:"gallery_item_clicked",action_value:j}})},[x,L,M,h,r]),he=l.useCallback(j=>{if(!U){if(H(j),s&&j===P.length-1&&r===0)I();else if(s&&j===0&&r===P.length-1)O();else if(!d&&E!==1&&j===P.length-1){const ee=Math.ceil(E),R=P.length+1,Z=Math.max(0,R-ee);b(Z)}else b(j);w()}},[U,H,s,P.length,r,w,I,O,d,E,b]),D=l.useCallback((j,ee)=>E!==1?"after:opacity-0 hover:after:opacity-70":j===ee?"after:opacity-100":"after:opacity-0 hover:after:opacity-70",[E]);return n.jsx("div",{ref:S,className:de("relative w-full overflow-x-auto no-scrollbar",U?"cursor-grab":"cursor-grabbing",t),children:n.jsx("div",{className:de("flex h-10 w-fit gap-1 small:h-12 small:gap-2",C&&"large:h-20 large:gap-4",a),children:P.map((j,ee)=>n.jsxs(l.Fragment,{children:[y.includes(ee)&&n.jsx("div",{className:"my-2",children:n.jsx(Cn,{color:f&&!d?"neutral":"background",orientation:"vertical"})}),n.jsx("div",{className:de("relative h-full overflow-hidden rounded-gallery transition-radius",!U&&"cursor-pointer","after:absolute after:inset-0 after:rounded-gallery after:border-2 after:border-primary after:transition-all",D(ee,r)),style:_,onClick:()=>he(ee),children:n.jsx(To,{item:j})})]},ee))})})},_n=t=>1-Math.pow(1-t,2),Ro=({Media:t,itemIndex:a})=>{const{setItemInteraction:c}=Ye();return l.useEffect(()=>{c(a,"ready")},[a,c]),t},Qt=(t,a)=>Math.sqrt((t.clientX-a.clientX)**2+(t.clientY-a.clientY)**2),No=({onlyPreload:t,...a})=>{const{zoom:c,isZooming:s,setZoom:f}=Ye(),d=l.useRef(null),E=l.useRef(null),e=l.useCallback(M=>{if(!E.current)throw new Error(`[${M??"getTransformElementOrThrow"}] transformElementRef.current is null`);return E.current},[]),_=l.useRef(!1),x=l.useRef(null),P=l.useRef(new Map),C=l.useRef({x:0,y:0,scale:1}),u=l.useRef(null),r=l.useCallback(M=>{const h=e("setTransformStyle"),{x:y,y:S,scale:J}={...C.current,...M},k=Ke(J,1,at),$=h.clientWidth,U=h.clientHeight,F=$*k,oe=U*k,T=Ke(y,-(F-$),0),H=Ke(S,-(oe-U),0);C.current={x:T,y:H,scale:k},h.style.transform=`translate(${T}px, ${H}px) scale(${k})`},[e]),I=l.useCallback((M,h)=>{const{x:y,y:S,scale:J}=C.current,{x:k,y:$,scale:U}={...C.current,...M};u.current&&(cancelAnimationFrame(u.current),u.current=null);const F=()=>{r({x:k,y:$,scale:U}),f(U)},oe=Math.abs(k-y)<1&&Math.abs($-S)<1&&Math.abs(U-J)<.005;if(!h||oe){F();return}const T=new Date().getTime(),H=()=>{const he=()=>{const j=new Date().getTime()-T;if(j>=h){F(),u.current=null;return}const ee=Math.min(j/h,1),R=_n(ee),Z=mt(y,k,R),te=mt(S,$,R),A=mt(J,U,R);r({x:Z,y:te,scale:A}),H()};u.current=requestAnimationFrame(he)};H()},[r,f]),O=l.useCallback((M,h)=>{let{x:y,y:S}=C.current;M.x&&(y+=M.x),M.y&&(S+=M.y),I({x:y,y:S},h)},[I]),b=l.useCallback((M,h,y)=>{const S=C.current.scale,J=Ke(M,1,at),k=J/S,{x:$,y:U}=C.current,{x:F,y:oe}=h,T=-$+F,H=-U+oe,he=T*k,D=H*k,j=he-F,ee=D-oe,R=-j,Z=-ee;I({x:R,y:Z,scale:J},y)},[I]),w=l.useCallback(M=>{const h=e("shiftZoomFromButton"),y=h.clientWidth,S=h.clientHeight;b(M,{x:y/2,y:S/2},200)},[e,b]),L=l.useCallback((M,h,y)=>{const{scale:S}=C.current;b(S+M,h,y)},[b]);return l.useEffect(()=>{t||E.current&&w(c)},[t,w,c]),l.useEffect(()=>{if(t||!s)return;const M=E.current;if(!M)return;const h=J=>{J.preventDefault(),J.stopPropagation(),_.current=!0,x.current={x:J.clientX,y:J.clientY}},y=J=>{if(!_.current)return;if(!x.current)throw new Error("mouseStartXY.current is null");J.stopPropagation();const k=J.clientX-x.current.x,$=J.clientY-x.current.y;O({x:k,y:$}),x.current={x:J.clientX,y:J.clientY}},S=()=>{_.current=!1};return M.addEventListener("mousedown",h),document.addEventListener("mousemove",y),document.addEventListener("mouseleave",S),document.addEventListener("mouseup",S),document.addEventListener("contextmenu",S),()=>{M.removeEventListener("mousedown",h),document.removeEventListener("mousemove",y),document.removeEventListener("mouseleave",S),document.removeEventListener("mouseup",S),document.removeEventListener("contextmenu",S)}},[s,O,t]),l.useEffect(()=>{if(t)return;const M=d.current;if(!M)return;const h=y=>{const{ctrlKey:S,clientX:J,clientY:k,deltaX:$,deltaY:U}=y;if(S){if(!s&&U>=0)return;const{left:F,top:oe}=M.getBoundingClientRect(),T=J-F,H=k-oe;L(-.01*U,{x:T,y:H})}else{if(!s)return;O({x:-2*$,y:-2*U})}y.preventDefault()};return M.addEventListener("wheel",h),()=>{M.removeEventListener("wheel",h)}},[s,O,L,t]),l.useEffect(()=>{const M=d.current,h=E.current;if(!M||!h)return;const y=P.current,S=$=>{for(let U=0;U<$.changedTouches.length;U++){const F=$.changedTouches[U];y.set(F.identifier,F)}},J=$=>{for(let U=0;U<$.changedTouches.length;U++){const F=$.changedTouches[U];y.delete(F.identifier)}},k=$=>{const U=$.touches.length;if(U===1){if(!s)return;$.preventDefault();const F=$.touches[0],oe=y.get(F.identifier);if(!oe)throw new Error("touchStart is null");const T=F.clientX-oe.clientX,H=F.clientY-oe.clientY;O({x:T,y:H}),y.set(F.identifier,F)}else if(U===2){$.preventDefault();const[F,oe]=$.touches,T=y.get(F.identifier),H=y.get(oe.identifier);if(!T||!H)throw new Error("initialTouch1 or initialTouch2 is null");const he=Qt(T,H),j=Qt(F,oe)/he,{left:ee,top:R}=M.getBoundingClientRect();L(j-1,{x:(F.clientX+oe.clientX)/2-ee,y:(F.clientY+oe.clientY)/2-R}),y.set(F.identifier,F),y.set(oe.identifier,oe)}};return h.addEventListener("touchstart",S),h.addEventListener("touchmove",k),h.addEventListener("touchend",J),h.addEventListener("touchcancel",J),()=>{h.removeEventListener("touchstart",S),h.removeEventListener("touchmove",k),h.removeEventListener("touchend",J),h.removeEventListener("touchcancel",J)}},[s,O,L]),n.jsx("div",{ref:d,className:`relative size-full overflow-hidden ${s?"z-zoomed-image cursor-move":""}`,children:n.jsx("div",{ref:E,className:"origin-top-left",children:n.jsx($e,{...a,imgInPlayerWidthRatio:t?1:c})})})},Po=({className:t})=>n.jsx(Ue,{className:t,customizationKey:"UI_WARNING",children:n.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[n.jsx("circle",{cx:"12",cy:"12",r:"10"}),n.jsx("line",{x1:"12",x2:"12",y1:"8",y2:"12"}),n.jsx("line",{x1:"12",x2:"12.01",y1:"16",y2:"16"})]})}),jo=({hotspot:t,item:a,analyticsValue:c})=>{const{title:s,icon:f,description:d,position:E,detail:e,type:_}=t,{emitAnalyticsEvent:x}=Be(),{extendMode:P,setShownDetails:C,displayedCategoryId:u,displayedCategoryName:r}=Ye(),I=l.useCallback(H=>{const he=H==="click"?"Hotspot Clicked":"Hotspot Hovered",D=H==="click"?"hotspot_clicked":"hotspot_hovered";x({type:"track",category_id:u,category_name:r,item_type:a.item_type,item_position:a.item_position,action_properties:{action_name:he,action_field:D,action_value:c}})},[x,u,r,a,c]),O=l.useCallback(()=>{I("click")},[I]),b=l.useCallback(()=>{I("hover")},[I]),{getIconConfig:w}=lt(),L=f?w(f):void 0,M=!!e,h=e?.type==="image",y=!!s||!!d,S=h?_==="damage"?n.jsx(Po,{className:"size-4"}):n.jsx(bn,{className:"size-4"}):n.jsx("div",{className:"size-1"}),J=()=>{O(),h&&C({src:e.src,title:s,text:d})},[k,$]=l.useState(!1),U=l.useCallback(()=>{k||($(!0),b())},[k,$,b]),F=l.useCallback(()=>{k&&$(!1)},[k,$]),T=l.useCallback(()=>_==="damage"?"var(--hotspot-damage-color)":"var(--hotspot-feature-color)",[_])();return n.jsxs("div",{className:de("group absolute z-hotspot -translate-x-1/2 -translate-y-1/2 hover:z-hotspot-hover",M?"cursor-pointer":"cursor-help"),style:{top:`${100*t.position.y}%`,left:`${100*t.position.x}%`},onClick:J,onMouseEnter:U,onMouseLeave:F,children:[n.jsxs("div",{className:"relative flex items-center justify-center rounded-full border-2 border-background bg-primary text-primary-foreground",style:{backgroundColor:T},children:[n.jsx("div",{className:"pointer-events-none absolute -z-20 size-8 animate-hotspot-ping rounded-full border-2 border-background bg-primary",style:{backgroundColor:T}}),n.jsx("div",{className:"p-1",children:L?.Icon?n.jsx("div",{className:"size-4",children:L.Icon}):S})]}),!h&&y&&n.jsx("div",{className:de("absolute -z-10 w-max max-w-40 text-pretty rounded-ui bg-background p-2 small:max-w-48",P&&"large:max-w-56",E.y<.55?"-top-1":"-bottom-1",E.x<.55?"-left-1 pl-6 small:pl-8":"-right-1 pr-4 small:pr-6","pointer-events-none opacity-0 transition-opacity duration-200 group-hover:pointer-events-auto group-hover:opacity-100"),children:n.jsxs("div",{className:"space-y-1 text-pretty",children:[s&&n.jsx("div",{className:"text-sm font-semibold small:text-base small:font-bold",children:s}),d&&n.jsx("div",{className:"text-xs text-foreground/65 small:text-sm",children:d})]})})]})},Ao=({hotspot:t,item:a})=>{const{detail:c,title:s,description:f,position:d}=t,E=l.useMemo(()=>s||f?{...s?{title:s}:{},...f?{description:f}:{}}:void 0,[s,f]),e=l.useMemo(()=>E||d?{...E?{text:E}:{},...d?{position:d}:{}}:void 0,[E,d]),_=l.useMemo(()=>({...e?{hotspot:e}:{},...c?{detail:c}:{}}),[e,c]),x=n.jsx(jo,{hotspot:t,item:a,analyticsValue:_});switch(c?.type){case"link":case"pdf":return n.jsx("a",{href:c.src,target:"_blank",rel:"noreferrer",children:x});default:return x}},kn=({hotspots:t,itemIndex:a,className:c,onLoad:s,...f})=>{const{isShowingDetails:d,currentItemHotspotsVisible:E,setItemInteraction:e}=Ye();return n.jsx("div",{className:de("relative size-full overflow-hidden",c),children:n.jsxs("div",{className:de("size-full duration-details",d?"scale-105":"scale-100"),children:[n.jsx(No,{className:"size-full object-cover",onLoad:_=>{a!==void 0&&a>=0&&e(a,"ready"),s?.(_)},...f}),E&&t?.map((_,x)=>n.jsx(Ao,{hotspot:_,item:{item_type:"image",item_position:a}},x))]})})};window.libpannellum=function(t,a,c){function s(P){var C=a.createElement("canvas");C.style.width=C.style.height="100%",P.appendChild(C);var u,r,I,O,b,w,L,M,h,y,S,J,k,$,U,F;this.init=function(p,v,W,G,B,g,ae,se){if(v===c&&(v="equirectangular"),v!="equirectangular"&&v!="cubemap"&&v!="multires")throw console.log("Error: invalid image type specified!"),{type:"config error"};if(y=v,h=p,S=W,F=se||{},u){if(I&&(r.detachShader(u,I),r.deleteShader(I)),O&&(r.detachShader(u,O),r.deleteShader(O)),r.bindBuffer(r.ARRAY_BUFFER,null),r.bindBuffer(r.ELEMENT_ARRAY_BUFFER,null),u.texture&&r.deleteTexture(u.texture),u.nodeCache)for(var pe=0;pe<u.nodeCache.length;pe++)r.deleteTexture(u.nodeCache[pe].texture);r.deleteProgram(u),u=c}M=c;var re,Le=!1,Ie;if(y=="cubemap")for(re=0;re<6;re++)h[re].width>0?(Ie===c&&(Ie=h[re].width),Ie!=h[re].width&&console.log("Cube faces have inconsistent widths: "+Ie+" vs. "+h[re].width)):Le=!0;function je(ie){if(Le){var N=ie*ie*4,fe=new Uint8ClampedArray(N),we=se.backgroundColor?se.backgroundColor:[0,0,0];we[0]*=255,we[1]*=255,we[2]*=255;for(var ge=0;ge<N;ge++)fe[ge++]=we[0],fe[ge++]=we[1],fe[ge++]=we[2];var Me=new ImageData(fe,ie,ie);for(re=0;re<6;re++)h[re].width==0&&(h[re]=Me)}}if(y=="cubemap"&&Ie&Ie-1&&(navigator.userAgent.toLowerCase().match(/(iphone|ipod|ipad).* os 8_/)||navigator.userAgent.toLowerCase().match(/(iphone|ipod|ipad).* os 9_/)||navigator.userAgent.toLowerCase().match(/(iphone|ipod|ipad).* os 10_/)||navigator.userAgent.match(/Trident.*rv[ :]*11\./))||(r||(r=C.getContext("experimental-webgl",{alpha:!1,depth:!1})),r&&r.getError()==1286&&He()),!r&&(y=="multires"&&h.hasOwnProperty("fallbackPath")||y=="cubemap")&&("WebkitAppearance"in a.documentElement.style||navigator.userAgent.match(/Trident.*rv[ :]*11\./)||navigator.appVersion.indexOf("MSIE 10")!==-1)){w&&P.removeChild(w),w=a.createElement("div"),w.className="pnlm-world";var Re;h.basePath?Re=h.basePath+h.fallbackPath:Re=h.fallbackPath;var Ae=["f","r","b","l","u","d"],Ne=0,ye=function(){var N=a.createElement("canvas");N.className="pnlm-face pnlm-"+Ae[this.side]+"face",w.appendChild(N);var fe=N.getContext("2d");N.style.width=this.width+4+"px",N.style.height=this.height+4+"px",N.width=this.width+4,N.height=this.height+4,fe.drawImage(this,2,2);var we=fe.getImageData(0,0,N.width,N.height),ge=we.data,Me,le;for(Me=2;Me<N.width-2;Me++)for(le=0;le<4;le++)ge[(Me+N.width)*4+le]=ge[(Me+N.width*2)*4+le],ge[(Me+N.width*(N.height-2))*4+le]=ge[(Me+N.width*(N.height-3))*4+le];for(Me=2;Me<N.height-2;Me++)for(le=0;le<4;le++)ge[(Me*N.width+1)*4+le]=ge[(Me*N.width+2)*4+le],ge[((Me+1)*N.width-2)*4+le]=ge[((Me+1)*N.width-3)*4+le];for(le=0;le<4;le++)ge[(N.width+1)*4+le]=ge[(N.width*2+2)*4+le],ge[(N.width*2-2)*4+le]=ge[(N.width*3-3)*4+le],ge[(N.width*(N.height-2)+1)*4+le]=ge[(N.width*(N.height-3)+2)*4+le],ge[(N.width*(N.height-1)-2)*4+le]=ge[(N.width*(N.height-2)-3)*4+le];for(Me=1;Me<N.width-1;Me++)for(le=0;le<4;le++)ge[Me*4+le]=ge[(Me+N.width)*4+le],ge[(Me+N.width*(N.height-1))*4+le]=ge[(Me+N.width*(N.height-2))*4+le];for(Me=1;Me<N.height-1;Me++)for(le=0;le<4;le++)ge[Me*N.width*4+le]=ge[(Me*N.width+1)*4+le],ge[((Me+1)*N.width-1)*4+le]=ge[((Me+1)*N.width-2)*4+le];for(le=0;le<4;le++)ge[le]=ge[(N.width+1)*4+le],ge[(N.width-1)*4+le]=ge[(N.width*2-2)*4+le],ge[N.width*(N.height-1)*4+le]=ge[(N.width*(N.height-2)+1)*4+le],ge[(N.width*N.height-1)*4+le]=ge[(N.width*(N.height-1)-2)*4+le];fe.putImageData(we,0,0),Te.call(this)},Te=function(){this.width>0?(b===c&&(b=this.width),b!=this.width&&console.log("Fallback faces have inconsistent widths: "+b+" vs. "+this.width)):Le=!0,Ne++,Ne==6&&(b=this.width,P.appendChild(w),ae())};for(Le=!1,re=0;re<6;re++){var Ve=new Image;Ve.crossOrigin=F.crossOrigin?F.crossOrigin:"anonymous",Ve.side=re,Ve.onload=ye,Ve.onerror=Te,y=="multires"?Ve.src=encodeURI(Re.replace("%s",Ae[re])+"."+h.extension):Ve.src=encodeURI(h[re].src)}je(b);return}else if(!r)throw console.log("Error: no WebGL support detected!"),{type:"no webgl"};y=="cubemap"&&je(Ie),h.basePath?h.fullpath=h.basePath+h.path:h.fullpath=h.path,h.invTileResolution=1/h.tileResolution;var Se=j();for(L=[],re=0;re<6;re++)L[re]=Se.slice(re*12,re*12+12),Se=j();var Ce=0,De=0;if(y=="equirectangular"?(Ce=Math.max(h.width,h.height),De=r.getParameter(r.MAX_TEXTURE_SIZE)):y=="cubemap"&&(Ce=Ie,De=r.getParameter(r.MAX_CUBE_MAP_TEXTURE_SIZE)),Ce>De)throw console.log("Error: The image is too big; it's "+Ce+"px wide, but this device's maximum supported size is "+De+"px."),{type:"webgl size error",width:Ce,maxWidth:De};se!==c&&(se.horizonPitch!==c||se.horizonRoll!==c)&&(M=[se.horizonPitch==c?0:se.horizonPitch,se.horizonRoll==c?0:se.horizonRoll]);var ze=r.TEXTURE_2D;r.viewport(0,0,r.drawingBufferWidth,r.drawingBufferHeight),I=r.createShader(r.VERTEX_SHADER);var We=f;y=="multires"&&(We=d),r.shaderSource(I,We),r.compileShader(I),O=r.createShader(r.FRAGMENT_SHADER);var Oe=_;y=="cubemap"?(ze=r.TEXTURE_CUBE_MAP,Oe=e):y=="multires"&&(Oe=x),r.shaderSource(O,Oe),r.compileShader(O),u=r.createProgram(),r.attachShader(u,I),r.attachShader(u,O),r.linkProgram(u),r.getShaderParameter(I,r.COMPILE_STATUS)||console.log(r.getShaderInfoLog(I)),r.getShaderParameter(O,r.COMPILE_STATUS)||console.log(r.getShaderInfoLog(O)),r.getProgramParameter(u,r.LINK_STATUS)||console.log(r.getProgramInfoLog(u)),r.useProgram(u),u.drawInProgress=!1;var ke=se.backgroundColor?se.backgroundColor:[0,0,0];r.clearColor(ke[0],ke[1],ke[2],1),r.clear(r.COLOR_BUFFER_BIT),u.texCoordLocation=r.getAttribLocation(u,"a_texCoord"),r.enableVertexAttribArray(u.texCoordLocation),y!="multires"?(J||(J=r.createBuffer()),r.bindBuffer(r.ARRAY_BUFFER,J),r.bufferData(r.ARRAY_BUFFER,new Float32Array([-1,1,1,1,1,-1,-1,1,1,-1,-1,-1]),r.STATIC_DRAW),r.vertexAttribPointer(u.texCoordLocation,2,r.FLOAT,!1,0,0),u.aspectRatio=r.getUniformLocation(u,"u_aspectRatio"),r.uniform1f(u.aspectRatio,r.drawingBufferWidth/r.drawingBufferHeight),u.psi=r.getUniformLocation(u,"u_psi"),u.theta=r.getUniformLocation(u,"u_theta"),u.f=r.getUniformLocation(u,"u_f"),u.h=r.getUniformLocation(u,"u_h"),u.v=r.getUniformLocation(u,"u_v"),u.vo=r.getUniformLocation(u,"u_vo"),u.rot=r.getUniformLocation(u,"u_rot"),r.uniform1f(u.h,G/(Math.PI*2)),r.uniform1f(u.v,B/Math.PI),r.uniform1f(u.vo,g/Math.PI*2),y=="equirectangular"&&(u.backgroundColor=r.getUniformLocation(u,"u_backgroundColor"),r.uniform4fv(u.backgroundColor,ke.concat([1]))),u.texture=r.createTexture(),r.bindTexture(ze,u.texture),y=="cubemap"?(r.texImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X,0,r.RGB,r.RGB,r.UNSIGNED_BYTE,h[1]),r.texImage2D(r.TEXTURE_CUBE_MAP_NEGATIVE_X,0,r.RGB,r.RGB,r.UNSIGNED_BYTE,h[3]),r.texImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_Y,0,r.RGB,r.RGB,r.UNSIGNED_BYTE,h[4]),r.texImage2D(r.TEXTURE_CUBE_MAP_NEGATIVE_Y,0,r.RGB,r.RGB,r.UNSIGNED_BYTE,h[5]),r.texImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_Z,0,r.RGB,r.RGB,r.UNSIGNED_BYTE,h[0]),r.texImage2D(r.TEXTURE_CUBE_MAP_NEGATIVE_Z,0,r.RGB,r.RGB,r.UNSIGNED_BYTE,h[2])):r.texImage2D(ze,0,r.RGB,r.RGB,r.UNSIGNED_BYTE,h),r.texParameteri(ze,r.TEXTURE_WRAP_S,r.CLAMP_TO_EDGE),r.texParameteri(ze,r.TEXTURE_WRAP_T,r.CLAMP_TO_EDGE),r.texParameteri(ze,r.TEXTURE_MIN_FILTER,r.LINEAR),r.texParameteri(ze,r.TEXTURE_MAG_FILTER,r.LINEAR)):(u.vertPosLocation=r.getAttribLocation(u,"a_vertCoord"),r.enableVertexAttribArray(u.vertPosLocation),k||(k=r.createBuffer()),$||($=r.createBuffer()),U||(U=r.createBuffer()),r.bindBuffer(r.ARRAY_BUFFER,$),r.bufferData(r.ARRAY_BUFFER,new Float32Array([0,0,1,0,1,1,0,1]),r.STATIC_DRAW),r.bindBuffer(r.ELEMENT_ARRAY_BUFFER,U),r.bufferData(r.ELEMENT_ARRAY_BUFFER,new Uint16Array([0,1,2,0,2,3]),r.STATIC_DRAW),u.perspUniform=r.getUniformLocation(u,"u_perspMatrix"),u.cubeUniform=r.getUniformLocation(u,"u_cubeMatrix"),u.level=-1,u.currentNodes=[],u.nodeCache=[],u.nodeCacheTimestamp=0);var X=r.getError();if(X!==0)throw console.log("Error: Something went wrong with WebGL!",X),{type:"webgl error"};ae()},this.destroy=function(){if(P!==c&&(C!==c&&P.contains(C)&&P.removeChild(C),w!==c&&P.contains(w)&&P.removeChild(w)),r){var p=r.getExtension("WEBGL_lose_context");p&&p.loseContext()}},this.resize=function(){var p=t.devicePixelRatio||1;C.width=C.clientWidth*p,C.height=C.clientHeight*p,r&&(r.getError()==1286&&He(),r.viewport(0,0,r.drawingBufferWidth,r.drawingBufferHeight),y!="multires"&&r.uniform1f(u.aspectRatio,C.clientWidth/C.clientHeight))},this.resize(),this.setPose=function(p,v){M=[p,v]},this.render=function(p,v,W,G){var B,g,ae,se=0;if(G===c&&(G={}),G.roll&&(se=G.roll),M!==c){var pe=M[0],re=M[1],Le=p,Ie=v,je=Math.cos(re)*Math.sin(p)*Math.sin(pe)+Math.cos(p)*(Math.cos(pe)*Math.cos(v)+Math.sin(re)*Math.sin(pe)*Math.sin(v)),Re=-Math.sin(p)*Math.sin(re)+Math.cos(p)*Math.cos(re)*Math.sin(v),Ae=Math.cos(re)*Math.cos(pe)*Math.sin(p)+Math.cos(p)*(-Math.cos(v)*Math.sin(pe)+Math.cos(pe)*Math.sin(re)*Math.sin(v));p=Math.asin(Math.max(Math.min(Ae,1),-1)),v=Math.atan2(Re,je);var Ne=[Math.cos(Le)*(Math.sin(re)*Math.sin(pe)*Math.cos(Ie)-Math.cos(pe)*Math.sin(Ie)),Math.cos(Le)*Math.cos(re)*Math.cos(Ie),Math.cos(Le)*(Math.cos(pe)*Math.sin(re)*Math.cos(Ie)+Math.sin(Ie)*Math.sin(pe))],ye=[-Math.cos(p)*Math.sin(v),Math.cos(p)*Math.cos(v)],Te=Math.acos(Math.max(Math.min((Ne[0]*ye[0]+Ne[1]*ye[1])/(Math.sqrt(Ne[0]*Ne[0]+Ne[1]*Ne[1]+Ne[2]*Ne[2])*Math.sqrt(ye[0]*ye[0]+ye[1]*ye[1])),1),-1));Ne[2]<0&&(Te=2*Math.PI-Te),se+=Te}if(!r&&(y=="multires"||y=="cubemap")){ae=b/2;var Ve={f:"translate3d(-"+(ae+2)+"px, -"+(ae+2)+"px, -"+ae+"px)",b:"translate3d("+(ae+2)+"px, -"+(ae+2)+"px, "+ae+"px) rotateX(180deg) rotateZ(180deg)",u:"translate3d(-"+(ae+2)+"px, -"+ae+"px, "+(ae+2)+"px) rotateX(270deg)",d:"translate3d(-"+(ae+2)+"px, "+ae+"px, -"+(ae+2)+"px) rotateX(90deg)",l:"translate3d(-"+ae+"px, -"+(ae+2)+"px, "+(ae+2)+"px) rotateX(180deg) rotateY(90deg) rotateZ(180deg)",r:"translate3d("+ae+"px, -"+(ae+2)+"px, -"+(ae+2)+"px) rotateY(270deg)"};B=1/Math.tan(W/2);var Se=B*C.clientWidth/2+"px",Ce="perspective("+Se+") translateZ("+Se+") rotateX("+p+"rad) rotateY("+v+"rad) ",De=Object.keys(Ve);for(g=0;g<6;g++){var ze=w.querySelector(".pnlm-"+De[g]+"face");ze&&(ze.style.webkitTransform=Ce+Ve[De[g]],ze.style.transform=Ce+Ve[De[g]])}return}if(y!="multires"){var We=2*Math.atan(Math.tan(W*.5)/(r.drawingBufferWidth/r.drawingBufferHeight));B=1/Math.tan(We*.5),r.uniform1f(u.psi,v),r.uniform1f(u.theta,p),r.uniform1f(u.rot,se),r.uniform1f(u.f,B),S===!0&&y=="equirectangular"&&(r.bindTexture(r.TEXTURE_2D,u.texture),r.texImage2D(r.TEXTURE_2D,0,r.RGB,r.RGB,r.UNSIGNED_BYTE,h)),r.drawArrays(r.TRIANGLES,0,6)}else{var Oe=A(W,r.drawingBufferWidth/r.drawingBufferHeight,.1,100);xe(W);var ke=ee();ke=R(ke,-se,"z"),ke=R(ke,-p,"x"),ke=R(ke,v,"y"),ke=Z(ke),r.uniformMatrix4fv(u.perspUniform,!1,new Float32Array(te(Oe))),r.uniformMatrix4fv(u.cubeUniform,!1,new Float32Array(te(ke)));var X=ne(Oe,ke);if(u.nodeCache.sort(oe),u.nodeCache.length>200&&u.nodeCache.length>u.currentNodes.length+50)for(var ie=u.nodeCache.splice(200,u.nodeCache.length-200),g=0;g<ie.length;g++)r.deleteTexture(ie[g].texture);u.currentNodes=[];var N=["f","b","u","d","l","r"];for(ae=0;ae<6;ae++){var fe=new he(L[ae],N[ae],1,0,0,h.fullpath);D(X,fe,p,v)}for(u.currentNodes.sort(T),g=Q.length-1;g>=0;g--)u.currentNodes.indexOf(Q[g].node)===-1&&(Q[g].node.textureLoad=!1,Q.splice(g,1));if(Q.length===0)for(g=0;g<u.currentNodes.length;g++){var we=u.currentNodes[g];if(!we.texture&&!we.textureLoad){we.textureLoad=!0,setTimeout(z,0,we);break}}H()}if(G.returnImage!==c)return C.toDataURL("image/png")},this.isLoading=function(){if(r&&y=="multires"){for(var p=0;p<u.currentNodes.length;p++)if(!u.currentNodes[p].textureLoaded)return!0}return!1},this.getCanvas=function(){return C};function oe(p,v){return p.level==1&&v.level!=1?-1:v.level==1&&p.level!=1?1:v.timestamp-p.timestamp}function T(p,v){return p.level!=v.level?p.level-v.level:p.diff-v.diff}function H(){if(!u.drawInProgress){u.drawInProgress=!0,r.clear(r.COLOR_BUFFER_BIT);for(var p=0;p<u.currentNodes.length;p++)u.currentNodes[p].textureLoaded>1&&(r.bindBuffer(r.ARRAY_BUFFER,k),r.bufferData(r.ARRAY_BUFFER,new Float32Array(u.currentNodes[p].vertices),r.STATIC_DRAW),r.vertexAttribPointer(u.vertPosLocation,3,r.FLOAT,!1,0,0),r.bindBuffer(r.ARRAY_BUFFER,$),r.vertexAttribPointer(u.texCoordLocation,2,r.FLOAT,!1,0,0),r.bindTexture(r.TEXTURE_2D,u.currentNodes[p].texture),r.drawElements(r.TRIANGLES,6,r.UNSIGNED_SHORT,0));u.drawInProgress=!1}}function he(p,v,W,G,B,g){this.vertices=p,this.side=v,this.level=W,this.x=G,this.y=B,this.path=g.replace("%s",v).replace("%l",W).replace("%x",G).replace("%y",B)}function D(p,v,W,G,B){if(Fe(p,v.vertices)){var g=v.vertices,ae=g[0]+g[3]+g[6]+g[9],se=g[1]+g[4]+g[7]+g[10],pe=g[2]+g[5]+g[8]+g[11],re=Math.sqrt(ae*ae+se*se+pe*pe),Le=Math.asin(pe/re),Ie=Math.atan2(se,ae),je=Ie-G;je+=je>Math.PI?-2*Math.PI:je<-Math.PI?2*Math.PI:0,je=Math.abs(je),v.diff=Math.acos(Math.sin(W)*Math.sin(Le)+Math.cos(W)*Math.cos(Le)*Math.cos(je));for(var Re=!1,Ae=0;Ae<u.nodeCache.length;Ae++)if(u.nodeCache[Ae].path==v.path){Re=!0,u.nodeCache[Ae].timestamp=u.nodeCacheTimestamp++,u.nodeCache[Ae].diff=v.diff,u.currentNodes.push(u.nodeCache[Ae]);break}if(Re||(v.timestamp=u.nodeCacheTimestamp++,u.currentNodes.push(v),u.nodeCache.push(v)),v.level<u.level){var Ne=h.cubeResolution*Math.pow(2,v.level-h.maxLevel),ye=Math.ceil(Ne*h.invTileResolution)-1,Te=Ne%h.tileResolution*2,Ve=Ne*2%h.tileResolution;Ve===0&&(Ve=h.tileResolution),Te===0&&(Te=h.tileResolution*2);var Se=.5;(v.x==ye||v.y==ye)&&(Se=1-h.tileResolution/(h.tileResolution+Ve));var Ce=1-Se,De=[],ze,We,Oe=Se,ke=Se,X=Se,ie=Ce,N=Ce,fe=Ce;Ve<h.tileResolution&&(v.x==ye&&v.y!=ye?(ke=.5,N=.5,(v.side=="d"||v.side=="u")&&(X=.5,fe=.5)):v.x!=ye&&v.y==ye&&(Oe=.5,ie=.5,(v.side=="l"||v.side=="r")&&(X=.5,fe=.5))),Te<=h.tileResolution&&(v.x==ye&&(Oe=0,ie=1,(v.side=="l"||v.side=="r")&&(X=0,fe=1)),v.y==ye&&(ke=0,N=1,(v.side=="d"||v.side=="u")&&(X=0,fe=1))),ze=[g[0],g[1],g[2],g[0]*Oe+g[3]*ie,g[1]*Se+g[4]*Ce,g[2]*X+g[5]*fe,g[0]*Oe+g[6]*ie,g[1]*ke+g[7]*N,g[2]*X+g[8]*fe,g[0]*Se+g[9]*Ce,g[1]*ke+g[10]*N,g[2]*X+g[11]*fe],We=new he(ze,v.side,v.level+1,v.x*2,v.y*2,h.fullpath),De.push(We),v.x==ye&&Te<=h.tileResolution||(ze=[g[0]*Oe+g[3]*ie,g[1]*Se+g[4]*Ce,g[2]*X+g[5]*fe,g[3],g[4],g[5],g[3]*Se+g[6]*Ce,g[4]*ke+g[7]*N,g[5]*X+g[8]*fe,g[0]*Oe+g[6]*ie,g[1]*ke+g[7]*N,g[2]*X+g[8]*fe],We=new he(ze,v.side,v.level+1,v.x*2+1,v.y*2,h.fullpath),De.push(We)),!(v.x==ye&&Te<=h.tileResolution)&&!(v.y==ye&&Te<=h.tileResolution)&&(ze=[g[0]*Oe+g[6]*ie,g[1]*ke+g[7]*N,g[2]*X+g[8]*fe,g[3]*Se+g[6]*Ce,g[4]*ke+g[7]*N,g[5]*X+g[8]*fe,g[6],g[7],g[8],g[9]*Oe+g[6]*ie,g[10]*Se+g[7]*Ce,g[11]*X+g[8]*fe],We=new he(ze,v.side,v.level+1,v.x*2+1,v.y*2+1,h.fullpath),De.push(We)),v.y==ye&&Te<=h.tileResolution||(ze=[g[0]*Se+g[9]*Ce,g[1]*ke+g[10]*N,g[2]*X+g[11]*fe,g[0]*Oe+g[6]*ie,g[1]*ke+g[7]*N,g[2]*X+g[8]*fe,g[9]*Oe+g[6]*ie,g[10]*Se+g[7]*Ce,g[11]*X+g[8]*fe,g[9],g[10],g[11]],We=new he(ze,v.side,v.level+1,v.x*2,v.y*2+1,h.fullpath),De.push(We));for(var we=0;we<De.length;we++)D(p,De[we],W,G)}}}function j(){return[-1,1,-1,1,1,-1,1,-1,-1,-1,-1,-1,1,1,1,-1,1,1,-1,-1,1,1,-1,1,-1,1,1,1,1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1,1,-1,1,-1,-1,1,-1,1,1,-1,1,-1,-1,-1,-1,-1,-1,1,1,1,-1,1,1,1,1,-1,1,1,-1,-1]}function ee(){return[1,0,0,0,1,0,0,0,1]}function R(p,v,W){var G=Math.sin(v),B=Math.cos(v);if(W=="x")return[p[0],B*p[1]+G*p[2],B*p[2]-G*p[1],p[3],B*p[4]+G*p[5],B*p[5]-G*p[4],p[6],B*p[7]+G*p[8],B*p[8]-G*p[7]];if(W=="y")return[B*p[0]-G*p[2],p[1],B*p[2]+G*p[0],B*p[3]-G*p[5],p[4],B*p[5]+G*p[3],B*p[6]-G*p[8],p[7],B*p[8]+G*p[6]];if(W=="z")return[B*p[0]+G*p[1],B*p[1]-G*p[0],p[2],B*p[3]+G*p[4],B*p[4]-G*p[3],p[5],B*p[6]+G*p[7],B*p[7]-G*p[6],p[8]]}function Z(p){return[p[0],p[1],p[2],0,p[3],p[4],p[5],0,p[6],p[7],p[8],0,0,0,0,1]}function te(p){return[p[0],p[4],p[8],p[12],p[1],p[5],p[9],p[13],p[2],p[6],p[10],p[14],p[3],p[7],p[11],p[15]]}function A(p,v,W,G){var B=2*Math.atan(Math.tan(p/2)*r.drawingBufferHeight/r.drawingBufferWidth),g=1/Math.tan(B/2);return[g/v,0,0,0,0,g,0,0,0,0,(G+W)/(W-G),2*G*W/(W-G),0,0,-1,0]}function q(p,v){r.bindTexture(r.TEXTURE_2D,v),r.texImage2D(r.TEXTURE_2D,0,r.RGB,r.RGB,r.UNSIGNED_BYTE,p),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MAG_FILTER,r.LINEAR),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MIN_FILTER,r.LINEAR),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_S,r.CLAMP_TO_EDGE),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_T,r.CLAMP_TO_EDGE),r.bindTexture(r.TEXTURE_2D,null)}var Q=[],ce=function(){var p=4,v={},W;function G(){var se=this;this.texture=this.callback=null,this.image=new Image,this.image.crossOrigin=W||"anonymous";var pe=function(){se.image.width>0&&se.image.height>0?(q(se.image,se.texture),se.callback(se.texture,!0)):se.callback(se.texture,!1),g(se)};this.image.addEventListener("load",pe),this.image.addEventListener("error",pe)}G.prototype.loadTexture=function(se,pe,re){this.texture=pe,this.callback=re,this.image.src=se};function B(se,pe,re,Le){this.node=se,this.src=pe,this.texture=re,this.callback=Le}function g(se){if(Q.length){var pe=Q.shift();se.loadTexture(pe.src,pe.texture,pe.callback)}else v[p++]=se}for(var ae=0;ae<p;ae++)v[ae]=new G;return function(se,pe,re,Le){W=Le;var Ie=r.createTexture();return p?v[--p].loadTexture(pe,Ie,re):Q.push(new B(se,pe,Ie,re)),Ie}}();function z(p){ce(p,encodeURI(p.path+"."+h.extension),function(v,W){p.texture=v,p.textureLoaded=W?2:1},F.crossOrigin)}function xe(p){for(var v=1;v<h.maxLevel&&r.drawingBufferWidth>h.tileResolution*Math.pow(2,v-1)*Math.tan(p/2)*.707;)v++;u.level=v}function ne(p,v){return[p[0]*v[0],p[0]*v[1],p[0]*v[2],0,p[5]*v[4],p[5]*v[5],p[5]*v[6],0,p[10]*v[8],p[10]*v[9],p[10]*v[10],p[11],-v[8],-v[9],-v[10],0]}function be(p,v){return[p[0]*v[0]+p[1]*v[1]+p[2]*v[2],p[4]*v[0]+p[5]*v[1]+p[6]*v[2],p[11]+p[8]*v[0]+p[9]*v[1]+p[10]*v[2],1/(p[12]*v[0]+p[13]*v[1]+p[14]*v[2])]}function Pe(p,v){var W=be(p,v),G=W[0]*W[3],B=W[1]*W[3],g=W[2]*W[3],ae=[0,0,0];return G<-1&&(ae[0]=-1),G>1&&(ae[0]=1),B<-1&&(ae[1]=-1),B>1&&(ae[1]=1),(g<-1||g>1)&&(ae[2]=1),ae}function Fe(p,v){var W=Pe(p,v.slice(0,3)),G=Pe(p,v.slice(3,6)),B=Pe(p,v.slice(6,9)),g=Pe(p,v.slice(9,12)),ae=W[0]+G[0]+B[0]+g[0];if(ae==-4||ae==4)return!1;var se=W[1]+G[1]+B[1]+g[1];if(se==-4||se==4)return!1;var pe=W[2]+G[2]+B[2]+g[2];return pe!=4}function He(){console.log("Reducing canvas size due to error 1286!"),C.width=Math.round(C.width/2),C.height=Math.round(C.height/2)}}var f=["attribute vec2 a_texCoord;","varying vec2 v_texCoord;","void main() {","gl_Position = vec4(a_texCoord, 0.0, 1.0);","v_texCoord = a_texCoord;","}"].join(""),d=["attribute vec3 a_vertCoord;","attribute vec2 a_texCoord;","uniform mat4 u_cubeMatrix;","uniform mat4 u_perspMatrix;","varying mediump vec2 v_texCoord;","void main(void) {","gl_Position = u_perspMatrix * u_cubeMatrix * vec4(a_vertCoord, 1.0);","v_texCoord = a_texCoord;","}"].join(""),E=["precision mediump float;","uniform float u_aspectRatio;","uniform float u_psi;","uniform float u_theta;","uniform float u_f;","uniform float u_h;","uniform float u_v;","uniform float u_vo;","uniform float u_rot;","const float PI = 3.14159265358979323846264;","uniform sampler2D u_image;","uniform samplerCube u_imageCube;","varying vec2 v_texCoord;","uniform vec4 u_backgroundColor;","void main() {","float x = v_texCoord.x * u_aspectRatio;","float y = v_texCoord.y;","float sinrot = sin(u_rot);","float cosrot = cos(u_rot);","float rot_x = x * cosrot - y * sinrot;","float rot_y = x * sinrot + y * cosrot;","float sintheta = sin(u_theta);","float costheta = cos(u_theta);","float a = u_f * costheta - rot_y * sintheta;","float root = sqrt(rot_x * rot_x + a * a);","float lambda = atan(rot_x / root, a / root) + u_psi;","float phi = atan((rot_y * costheta + u_f * sintheta) / root);"].join(`
2
- `),e=E+["float cosphi = cos(phi);","gl_FragColor = textureCube(u_imageCube, vec3(cosphi*sin(lambda), sin(phi), cosphi*cos(lambda)));","}"].join(`
3
- `),_=E+["lambda = mod(lambda + PI, PI * 2.0) - PI;","vec2 coord = vec2(lambda / PI, phi / (PI / 2.0));","if(coord.x < -u_h || coord.x > u_h || coord.y < -u_v + u_vo || coord.y > u_v + u_vo)","gl_FragColor = u_backgroundColor;","else","gl_FragColor = texture2D(u_image, vec2((coord.x + u_h) / (u_h * 2.0), (-coord.y + u_v + u_vo) / (u_v * 2.0)));","}"].join(`
4
- `),x=["varying mediump vec2 v_texCoord;","uniform sampler2D u_sampler;","void main(void) {","gl_FragColor = texture2D(u_sampler, v_texCoord);","}"].join("");return{renderer:function(C,u,r,I){return new s(C)}}}(window,document);window.pannellum=function(t,a,c){function s(f,d){var E=this,e,_,x,P=!1,C=Date.now(),u=0,r=0,I=-1,O=0,b=0,w=new Array(10),L=!1,M,h=!1,y=!1,S,J,k={yaw:0,pitch:0,hfov:0},$=!1,U=!1,F=0,oe,T=0,H,he,D={},j={},ee=[],R=!1,Z=!1,te={hfov:100,minHfov:50,maxHfov:120,pitch:0,minPitch:c,maxPitch:c,yaw:0,minYaw:-180,maxYaw:180,roll:0,haov:360,vaov:180,vOffset:0,autoRotate:!1,autoRotateInactivityDelay:-1,autoRotateStopDelay:c,type:"equirectangular",northOffset:0,showFullscreenCtrl:!0,dynamic:!1,doubleClickZoom:!0,keyboardZoom:!0,mouseZoom:!0,showZoomCtrl:!0,autoLoad:!1,showControls:!0,orientationOnByDefault:!1,hotSpotDebug:!1,backgroundColor:[0,0,0],avoidShowingBackground:!1,animationTimingFunction:N,draggable:!0,disableKeyboardCtrl:!1,crossOrigin:"anonymous",touchPanSpeedCoeffFactor:1,capturedKeyNumbers:[16,17,27,37,38,39,40,61,65,68,83,87,107,109,173,187,189]};te.strings={loadButtonLabel:"Click to<br>Load<br>Panorama",loadingLabel:"Loading...",bylineLabel:"by %s",noPanoramaError:"No panorama image was specified.",fileAccessError:"The file %s could not be accessed.",malformedURLError:"There is something wrong with the panorama URL.",iOS8WebGLError:"Due to iOS 8's broken WebGL implementation, only progressive encoded JPEGs work for your device (this panorama uses standard encoding).",genericWebGLError:"Your browser does not have the necessary WebGL support to display this panorama.",textureSizeError:"This panorama is too big for your device! It's %spx wide, but your device only supports images up to %spx wide. Try another device. (If you're the author, try scaling down the image.)",unknownError:"Unknown error. Check developer console."},f=typeof f=="string"?a.getElementById(f):f,f.classList.add("pnlm-container"),f.tabIndex=0;var A=a.createElement("div");A.className="pnlm-ui",f.appendChild(A);var q=a.createElement("div");q.className="pnlm-render-container",f.appendChild(q);var Q=a.createElement("div");Q.className="pnlm-dragfix",A.appendChild(Q);var ce=a.createElement("span");ce.className="pnlm-about-msg",ce.innerHTML='<a href="https://pannellum.org/" target="_blank">Pannellum</a>',A.appendChild(ce),Q.addEventListener("contextmenu",ae);var z={},xe=a.createElement("div");xe.className="pnlm-sprite pnlm-hot-spot-debug-indicator",A.appendChild(xe),z.container=a.createElement("div"),z.container.className="pnlm-panorama-info",z.title=a.createElement("div"),z.title.className="pnlm-title-box",z.container.appendChild(z.title),z.author=a.createElement("div"),z.author.className="pnlm-author-box",z.container.appendChild(z.author),A.appendChild(z.container),z.load={},z.load.box=a.createElement("div"),z.load.box.className="pnlm-load-box",z.load.boxp=a.createElement("p"),z.load.box.appendChild(z.load.boxp),z.load.lbox=a.createElement("div"),z.load.lbox.className="pnlm-lbox",z.load.lbox.innerHTML='<div class="pnlm-loading"></div>',z.load.box.appendChild(z.load.lbox),z.load.lbar=a.createElement("div"),z.load.lbar.className="pnlm-lbar",z.load.lbarFill=a.createElement("div"),z.load.lbarFill.className="pnlm-lbar-fill",z.load.lbar.appendChild(z.load.lbarFill),z.load.box.appendChild(z.load.lbar),z.load.msg=a.createElement("p"),z.load.msg.className="pnlm-lmsg",z.load.box.appendChild(z.load.msg),A.appendChild(z.load.box),z.errorMsg=a.createElement("div"),z.errorMsg.className="pnlm-error-msg pnlm-info-box",A.appendChild(z.errorMsg);var ne={};ne.container=a.createElement("div"),ne.container.className="pnlm-controls-container",A.appendChild(ne.container),ne.load=a.createElement("div"),ne.load.className="pnlm-load-button",ne.load.addEventListener("click",function(){yt(),Gt()}),A.appendChild(ne.load),ne.zoom=a.createElement("div"),ne.zoom.className="pnlm-zoom-controls pnlm-controls",ne.zoomIn=a.createElement("div"),ne.zoomIn.className="pnlm-zoom-in pnlm-sprite pnlm-control",ne.zoomIn.addEventListener("click",jn),ne.zoom.appendChild(ne.zoomIn),ne.zoomOut=a.createElement("div"),ne.zoomOut.className="pnlm-zoom-out pnlm-sprite pnlm-control",ne.zoomOut.addEventListener("click",An),ne.zoom.appendChild(ne.zoomOut),ne.container.appendChild(ne.zoom),ne.fullscreen=a.createElement("div"),ne.fullscreen.addEventListener("click",Et),ne.fullscreen.className="pnlm-fullscreen-toggle-button pnlm-sprite pnlm-fullscreen-toggle-button-inactive pnlm-controls pnlm-control",(a.fullscreenEnabled||a.mozFullScreenEnabled||a.webkitFullscreenEnabled||a.msFullscreenEnabled)&&ne.container.appendChild(ne.fullscreen),ne.orientation=a.createElement("div"),ne.orientation.addEventListener("click",function(o){U?it():dt()}),ne.orientation.addEventListener("mousedown",function(o){o.stopPropagation()}),ne.orientation.addEventListener("touchstart",function(o){o.stopPropagation()}),ne.orientation.addEventListener("pointerdown",function(o){o.stopPropagation()}),ne.orientation.className="pnlm-orientation-button pnlm-orientation-button-inactive pnlm-sprite pnlm-controls pnlm-control";var be,Pe=!1;function Fe(o){t.removeEventListener("deviceorientation",Fe),o&&o.alpha!==null&&o.beta!==null&&o.gamma!==null?(ne.container.appendChild(ne.orientation),be=!0,Pe&&dt()):be=!1}t.DeviceOrientationEvent?t.addEventListener("deviceorientation",Fe):be=!1;var He=a.createElement("div");He.className="pnlm-compass pnlm-controls pnlm-control",A.appendChild(He),d.firstScene?ct(d.firstScene):d.default&&d.default.firstScene?ct(d.default.firstScene):ct(null),yt(!0);function p(){var o=a.createElement("div");if(o.innerHTML="<!--[if lte IE 9]><i></i><![endif]-->",o.getElementsByTagName("i").length==1){B();return}H=e.hfov,he=e.pitch;var i,m;if(e.type=="cubemap"){for(S=[],i=0;i<6;i++)S.push(new Image),S[i].crossOrigin=e.crossOrigin;z.load.lbox.style.display="block",z.load.lbar.style.display="none"}else if(e.type=="multires"){var V=JSON.parse(JSON.stringify(e.multiRes));e.basePath&&e.multiRes.basePath&&!/^(?:[a-z]+:)?\/\//i.test(e.multiRes.basePath)?V.basePath=e.basePath+e.multiRes.basePath:e.multiRes.basePath?V.basePath=e.multiRes.basePath:e.basePath&&(V.basePath=e.basePath),S=V}else if(e.dynamic===!0)S=e.panorama;else{if(e.panorama===c){B(e.strings.noPanoramaError);return}S=new Image}if(e.type=="cubemap"){var K=6,Y=function(){K--,K===0&&W()},me=function(_e){var Ee=a.createElement("a");Ee.href=_e.target.src,Ee.textContent=Ee.href,B(e.strings.fileAccessError.replace("%s",Ee.outerHTML))};for(i=0;i<S.length;i++)m=e.cubeMap[i],m=="null"?(console.log("Will use background instead of missing cubemap face "+i),Y()):(e.basePath&&!v(m)&&(m=e.basePath+m),S[i].onload=Y,S[i].onerror=me,S[i].src=ot(m))}else if(e.type=="multires")W();else if(m="",e.basePath&&(m=e.basePath),e.dynamic!==!0){m=v(e.panorama)?e.panorama:m+e.panorama,S.onload=function(){t.URL.revokeObjectURL(this.src),W()};var ue=new XMLHttpRequest;ue.onloadend=function(){if(ue.status!=200){var ve=a.createElement("a");ve.href=m,ve.textContent=ve.href,B(e.strings.fileAccessError.replace("%s",ve.outerHTML))}var _e=this.response;G(_e),z.load.msg.innerHTML=""},ue.onprogress=function(ve){if(ve.lengthComputable){var _e=ve.loaded/ve.total*100;z.load.lbarFill.style.width=_e+"%";var Ee,Ge,Xe;ve.total>1e6?(Ee="MB",Ge=(ve.loaded/1e6).toFixed(2),Xe=(ve.total/1e6).toFixed(2)):ve.total>1e3?(Ee="kB",Ge=(ve.loaded/1e3).toFixed(1),Xe=(ve.total/1e3).toFixed(1)):(Ee="B",Ge=ve.loaded,Xe=ve.total),z.load.msg.innerHTML=Ge+" / "+Xe+" "+Ee}else z.load.lbox.style.display="block",z.load.lbar.style.display="none"};try{ue.open("GET",m,!0)}catch{B(e.strings.malformedURLError)}ue.responseType="blob",ue.setRequestHeader("Accept","image/*,*/*;q=0.9"),ue.withCredentials=e.crossOrigin==="use-credentials",ue.send()}e.draggable&&A.classList.add("pnlm-grab"),A.classList.remove("pnlm-grabbing")}function v(o){return new RegExp("^(?:[a-z]+:)?//","i").test(o)||o[0]=="/"||o.slice(0,5)=="blob:"}function W(){_||(_=new libpannellum.renderer(q)),y||(y=!0,Q.addEventListener("mousedown",pe,!1),a.addEventListener("mousemove",Ie,!1),a.addEventListener("mouseup",je,!1),e.mouseZoom&&(A.addEventListener("mousewheel",De,!1),A.addEventListener("DOMMouseScroll",De,!1)),e.doubleClickZoom&&Q.addEventListener("dblclick",re,!1),A.addEventListener("mozfullscreenchange",Qe,!1),A.addEventListener("webkitfullscreenchange",Qe,!1),A.addEventListener("msfullscreenchange",Qe,!1),A.addEventListener("fullscreenchange",Qe,!1),t.addEventListener("resize",fe,!1),t.addEventListener("orientationchange",fe,!1),e.disableKeyboardCtrl||(f.addEventListener("keydown",ze,!1),f.addEventListener("keyup",Oe,!1),f.addEventListener("blur",We,!1)),a.addEventListener("mouseleave",je,!1),a.documentElement.style.pointerAction===""&&a.documentElement.style.touchAction===""?(Q.addEventListener("pointerdown",Ve,!1),Q.addEventListener("pointermove",Se,!1),Q.addEventListener("pointerup",Ce,!1),Q.addEventListener("pointerleave",Ce,!1)):(Q.addEventListener("touchstart",Re,!1),Q.addEventListener("touchmove",Ae,!1),Q.addEventListener("touchend",Ne,!1)),t.navigator.pointerEnabled&&(f.style.touchAction="none")),Sn(),qe(e.hfov),setTimeout(function(){},500)}function G(o){var i=new FileReader;i.addEventListener("loadend",function(){var m=i.result;if(navigator.userAgent.toLowerCase().match(/(iphone|ipod|ipad).* os 8_/)){var V=m.indexOf("ÿÂ");(V<0||V>65536)&&B(e.strings.iOS8WebGLError)}var K=m.indexOf("<x:xmpmeta");if(K>-1&&e.ignoreGPanoXMP!==!0){var Y=m.substring(K,m.indexOf("</x:xmpmeta>")+12),me=function(_e){var Ee;return Y.indexOf(_e+'="')>=0?(Ee=Y.substring(Y.indexOf(_e+'="')+_e.length+2),Ee=Ee.substring(0,Ee.indexOf('"'))):Y.indexOf(_e+">")>=0&&(Ee=Y.substring(Y.indexOf(_e+">")+_e.length+1),Ee=Ee.substring(0,Ee.indexOf("<"))),Ee!==c?Number(Ee):null},ue={fullWidth:me("GPano:FullPanoWidthPixels"),croppedWidth:me("GPano:CroppedAreaImageWidthPixels"),fullHeight:me("GPano:FullPanoHeightPixels"),croppedHeight:me("GPano:CroppedAreaImageHeightPixels"),topPixels:me("GPano:CroppedAreaTopPixels"),heading:me("GPano:PoseHeadingDegrees"),horizonPitch:me("GPano:PosePitchDegrees"),horizonRoll:me("GPano:PoseRollDegrees")};ue.fullWidth!==null&&ue.croppedWidth!==null&&ue.fullHeight!==null&&ue.croppedHeight!==null&&ue.topPixels!==null&&(ee.indexOf("haov")<0&&(e.haov=ue.croppedWidth/ue.fullWidth*360),ee.indexOf("vaov")<0&&(e.vaov=ue.croppedHeight/ue.fullHeight*180),ee.indexOf("vOffset")<0&&(e.vOffset=((ue.topPixels+ue.croppedHeight/2)/ue.fullHeight-.5)*-180),ue.heading!==null&&ee.indexOf("northOffset")<0&&(e.northOffset=ue.heading,e.compass!==!1&&(e.compass=!0)),ue.horizonPitch!==null&&ue.horizonRoll!==null&&(ee.indexOf("horizonPitch")<0&&(e.horizonPitch=ue.horizonPitch),ee.indexOf("horizonRoll")<0&&(e.horizonRoll=ue.horizonRoll)))}S.src=t.URL.createObjectURL(o)}),i.readAsBinaryString!==c?i.readAsBinaryString(o):i.readAsText(o)}function B(o){o===c&&(o=e.strings.genericWebGLError),z.errorMsg.innerHTML="<p>"+o+"</p>",ne.load.style.display="none",z.load.box.style.display="none",z.errorMsg.style.display="table",h=!0,q.style.display="none",Je("error",o)}function g(){h&&(z.load.box.style.display="none",z.errorMsg.style.display="none",h=!1,Je("errorcleared"))}function ae(o){var i=se(o);ce.style.left=i.x+"px",ce.style.top=i.y+"px",clearTimeout(ae.t1),clearTimeout(ae.t2),ce.style.display="block",ce.style.opacity=1,ae.t1=setTimeout(function(){ce.style.opacity=0},2e3),ae.t2=setTimeout(function(){ce.style.display="none"},2500),o.preventDefault()}function se(o){var i=f.getBoundingClientRect(),m={};return m.x=o.clientX-i.left,m.y=o.clientY-i.top,m}function pe(o){if(o.preventDefault(),f.focus(),!(!M||!e.draggable)){var i=se(o);if(e.hotSpotDebug){var m=Le(o);console.log("Pitch: "+m[0]+", Yaw: "+m[1]+", Center Pitch: "+e.pitch+", Center Yaw: "+e.yaw+", HFOV: "+e.hfov)}ut(),it(),e.roll=0,k.hfov=0,P=!0,C=Date.now(),u=i.x,r=i.y,O=e.yaw,b=e.pitch,A.classList.add("pnlm-grabbing"),A.classList.remove("pnlm-grab"),Je("mousedown",o),we()}}function re(o){if(e.minHfov===e.hfov)E.setHfov(H,1e3);else{var i=Le(o);E.lookAt(i[0],i[1],e.minHfov,1e3)}}function Le(o){var i=se(o),m=_.getCanvas(),V=m.clientWidth,K=m.clientHeight,Y=i.x/V*2-1,me=(1-i.y/K*2)*K/V,ue=1/Math.tan(e.hfov*Math.PI/360),ve=Math.sin(e.pitch*Math.PI/180),_e=Math.cos(e.pitch*Math.PI/180),Ee=ue*_e-me*ve,Ge=Math.sqrt(Y*Y+Ee*Ee),Xe=Math.atan((me*_e+ue*ve)/Ge)*180/Math.PI,et=Math.atan2(Y/Ge,Ee/Ge)*180/Math.PI+e.yaw;return et<-180&&(et+=360),et>180&&(et-=360),[Xe,et]}function Ie(o){if(P&&M){C=Date.now();var i=_.getCanvas(),m=i.clientWidth,V=i.clientHeight,K=se(o),Y=(Math.atan(u/m*2-1)-Math.atan(K.x/m*2-1))*180/Math.PI*e.hfov/90+O;k.yaw=(Y-e.yaw)%360*.2,e.yaw=Y;var me=2*Math.atan(Math.tan(e.hfov/360*Math.PI)*V/m)*180/Math.PI,ue=(Math.atan(K.y/V*2-1)-Math.atan(r/V*2-1))*180/Math.PI*me/90+b;k.pitch=(ue-e.pitch)*.2,e.pitch=ue}}function je(o){P&&(P=!1,Date.now()-C>15&&(k.pitch=k.yaw=0),A.classList.add("pnlm-grab"),A.classList.remove("pnlm-grabbing"),C=Date.now(),Je("mouseup",o))}function Re(o){if(!(!M||!e.draggable)){ut(),it(),e.roll=0,k.hfov=0;var i=se(o.targetTouches[0]);if(u=i.x,r=i.y,o.targetTouches.length==2){var m=se(o.targetTouches[1]);u+=(m.x-i.x)*.5,r+=(m.y-i.y)*.5,I=Math.sqrt((i.x-m.x)*(i.x-m.x)+(i.y-m.y)*(i.y-m.y))}P=!0,C=Date.now(),O=e.yaw,b=e.pitch,Je("touchstart",o),we()}}function Ae(o){if(e.draggable&&(o.preventDefault(),M&&(C=Date.now()),P&&M)){var i=se(o.targetTouches[0]),m=i.x,V=i.y;if(o.targetTouches.length==2&&I!=-1){var K=se(o.targetTouches[1]);m+=(K.x-i.x)*.5,V+=(K.y-i.y)*.5;var Y=Math.sqrt((i.x-K.x)*(i.x-K.x)+(i.y-K.y)*(i.y-K.y));qe(e.hfov+(I-Y)*.1),I=Y}var me=e.hfov/360*e.touchPanSpeedCoeffFactor,ue=(u-m)*me+O;k.yaw=(ue-e.yaw)%360*.2,e.yaw=ue;var ve=(V-r)*me+b;k.pitch=(ve-e.pitch)*.2,e.pitch=ve}}function Ne(){P=!1,Date.now()-C>150&&(k.pitch=k.yaw=0),I=-1,C=Date.now(),Je("touchend",event)}var ye=[],Te=[];function Ve(o){o.pointerType=="touch"&&(ye.push(o.pointerId),Te.push({clientX:o.clientX,clientY:o.clientY}),o.targetTouches=Te,Re(o),o.preventDefault())}function Se(o){if(o.pointerType=="touch"){for(var i=0;i<ye.length;i++)if(o.pointerId==ye[i]){Te[i].clientX=o.clientX,Te[i].clientY=o.clientY,o.targetTouches=Te,Ae(o),o.preventDefault();return}}}function Ce(o){if(o.pointerType=="touch"){for(var i=!1,m=0;m<ye.length;m++)o.pointerId==ye[m]&&(ye[m]=c),ye[m]&&(i=!0);i||(ye=[],Te=[],Ne()),o.preventDefault()}}function De(o){!M||e.mouseZoom=="fullscreenonly"&&!L||(o.preventDefault(),ut(),C=Date.now(),o.wheelDeltaY?(qe(e.hfov-o.wheelDeltaY*.05),k.hfov=o.wheelDelta<0?1:-1):o.wheelDelta?(qe(e.hfov-o.wheelDelta*.05),k.hfov=o.wheelDelta<0?1:-1):o.detail&&(qe(e.hfov+o.detail*1.5),k.hfov=o.detail>0?1:-1),we())}function ze(o){ut(),C=Date.now(),it(),e.roll=0;var i=o.which||o.keycode;e.capturedKeyNumbers.indexOf(i)<0||(o.preventDefault(),i==27?L&&Et():ke(i,!0))}function We(){for(var o=0;o<10;o++)w[o]=!1}function Oe(o){var i=o.which||o.keycode;e.capturedKeyNumbers.indexOf(i)<0||(o.preventDefault(),ke(i,!1))}function ke(o,i){var m=!1;switch(o){case 109:case 189:case 17:case 173:w[0]!=i&&(m=!0),w[0]=i;break;case 107:case 187:case 16:case 61:w[1]!=i&&(m=!0),w[1]=i;break;case 38:w[2]!=i&&(m=!0),w[2]=i;break;case 87:w[6]!=i&&(m=!0),w[6]=i;break;case 40:w[3]!=i&&(m=!0),w[3]=i;break;case 83:w[7]!=i&&(m=!0),w[7]=i;break;case 37:w[4]!=i&&(m=!0),w[4]=i;break;case 65:w[8]!=i&&(m=!0),w[8]=i;break;case 39:w[5]!=i&&(m=!0),w[5]=i;break;case 68:w[9]!=i&&(m=!0),w[9]=i}m&&i&&(typeof performance<"u"&&performance.now()?J=performance.now():J=Date.now(),we())}function X(){if(M){var o=!1,i=e.pitch,m=e.yaw,V=e.hfov,K;typeof performance<"u"&&performance.now()?K=performance.now():K=Date.now(),J===c&&(J=K);var Y=(K-J)*e.hfov/1700;if(Y=Math.min(Y,1),w[0]&&e.keyboardZoom===!0&&(qe(e.hfov+(k.hfov*.8+.5)*Y),o=!0),w[1]&&e.keyboardZoom===!0&&(qe(e.hfov+(k.hfov*.8-.2)*Y),o=!0),(w[2]||w[6])&&(e.pitch+=(k.pitch*.8+.2)*Y,o=!0),(w[3]||w[7])&&(e.pitch+=(k.pitch*.8-.2)*Y,o=!0),(w[4]||w[8])&&(e.yaw+=(k.yaw*.8-.2)*Y,o=!0),(w[5]||w[9])&&(e.yaw+=(k.yaw*.8+.2)*Y,o=!0),o&&(C=Date.now()),e.autoRotate){if(K-J>.001){var me=(K-J)/1e3,ue=(k.yaw/me*Y-e.autoRotate*.2)*me;ue=(-e.autoRotate>0?1:-1)*Math.min(Math.abs(e.autoRotate*me),Math.abs(ue)),e.yaw+=ue}e.autoRotateStopDelay&&(e.autoRotateStopDelay-=K-J,e.autoRotateStopDelay<=0&&(e.autoRotateStopDelay=!1,T=e.autoRotate,e.autoRotate=0))}if(D.pitch&&(ie("pitch"),i=e.pitch),D.yaw&&(ie("yaw"),m=e.yaw),D.hfov&&(ie("hfov"),V=e.hfov),Y>0&&!e.autoRotate){var ve=.85;!w[4]&&!w[5]&&!w[8]&&!w[9]&&!D.yaw&&(e.yaw+=k.yaw*Y*ve),!w[2]&&!w[3]&&!w[6]&&!w[7]&&!D.pitch&&(e.pitch+=k.pitch*Y*ve),!w[0]&&!w[1]&&!D.hfov&&qe(e.hfov+k.hfov*Y*ve)}if(J=K,Y>0){k.yaw=k.yaw*.8+(e.yaw-m)/Y*.2,k.pitch=k.pitch*.8+(e.pitch-i)/Y*.2,k.hfov=k.hfov*.8+(e.hfov-V)/Y*.2;var _e=e.autoRotate?Math.abs(e.autoRotate):5;k.yaw=Math.min(_e,Math.max(k.yaw,-_e)),k.pitch=Math.min(_e,Math.max(k.pitch,-_e)),k.hfov=Math.min(_e,Math.max(k.hfov,-_e))}w[0]&&w[1]&&(k.hfov=0),(w[2]||w[6])&&(w[3]||w[7])&&(k.pitch=0),(w[4]||w[8])&&(w[5]||w[9])&&(k.yaw=0)}}function ie(o){var i=D[o],m=Math.min(1,Math.max((Date.now()-i.startTime)/1e3/(i.duration/1e3),0)),V=i.startPosition+e.animationTimingFunction(m)*(i.endPosition-i.startPosition);if(i.endPosition>i.startPosition&&V>=i.endPosition||i.endPosition<i.startPosition&&V<=i.endPosition||i.endPosition===i.startPosition){V=i.endPosition,k[o]=0;var K=D[o].callback,Y=D[o].callbackArgs;delete D[o],typeof K=="function"&&K(Y)}e[o]=V}function N(o){return o<.5?2*o*o:-1+(4-2*o)*o}function fe(){Qe()}function we(){$||($=!0,ge())}function ge(){if(Me(),oe&&clearTimeout(oe),P||U===!0)requestAnimationFrame(ge);else if(w[0]||w[1]||w[2]||w[3]||w[4]||w[5]||w[6]||w[7]||w[8]||w[9]||e.autoRotate||D.pitch||D.yaw||D.hfov||Math.abs(k.yaw)>.01||Math.abs(k.pitch)>.01||Math.abs(k.hfov)>.01)X(),e.autoRotateInactivityDelay>=0&&T&&Date.now()-C>e.autoRotateInactivityDelay&&!e.autoRotate&&(e.autoRotate=T,E.lookAt(he,c,H,3e3)),requestAnimationFrame(ge);else if(_&&(_.isLoading()||e.dynamic===!0&&R))requestAnimationFrame(ge);else{$=!1,J=c;var o=e.autoRotateInactivityDelay-(Date.now()-C);o>0?oe=setTimeout(function(){e.autoRotate=T,E.lookAt(he,c,H,3e3),we()},o):e.autoRotateInactivityDelay>=0&&T&&(e.autoRotate=T,E.lookAt(he,c,H,3e3),we())}}function Me(){var o;if(M){e.yaw>180?e.yaw-=360:e.yaw<-180&&(e.yaw+=360),o=e.yaw;var i=0;if(e.avoidShowingBackground){var ve=_.getCanvas(),m=e.hfov/2,V=Math.atan2(Math.tan(m/180*Math.PI),ve.width/ve.height)*180/Math.PI,K=e.vaov>e.haov;K?V*(1-Math.min(Math.cos((e.pitch-m)/180*Math.PI),Math.cos((e.pitch+m)/180*Math.PI))):i=m*(1-Math.min(Math.cos((e.pitch-V)/180*Math.PI),Math.cos((e.pitch+V)/180*Math.PI)))}var Y=e.maxYaw-e.minYaw,me=-180,ue=180;Y<360&&(me=e.minYaw+e.hfov/2+i,ue=e.maxYaw-e.hfov/2-i,Y<e.hfov&&(me=ue=(me+ue)/2),e.yaw=Math.max(me,Math.min(ue,e.yaw))),e.autoRotate!==!1&&o!=e.yaw&&J!==c&&(e.autoRotate*=-1);var ve=_.getCanvas(),_e=2*Math.atan(Math.tan(e.hfov/180*Math.PI*.5)/(ve.width/ve.height))/Math.PI*180,Ee=e.minPitch+_e/2,Ge=e.maxPitch-_e/2,Xe=e.maxPitch-e.minPitch;Xe<_e&&(Ee=Ge=(Ee+Ge)/2),isNaN(Ee)&&(Ee=-90),isNaN(Ge)&&(Ge=90),e.pitch=Math.max(Ee,Math.min(Ge,e.pitch)),_.render(e.pitch*Math.PI/180,e.yaw*Math.PI/180,e.hfov*Math.PI/180,{roll:e.roll*Math.PI/180}),Yt(),e.compass&&(He.style.transform="rotate("+(-e.yaw-e.northOffset)+"deg)",He.style.webkitTransform="rotate("+(-e.yaw-e.northOffset)+"deg)"),e.onRender&&e.onRender()}}function le(o,i,m,V){this.w=o,this.x=i,this.y=m,this.z=V}le.prototype.multiply=function(o){return new le(this.w*o.w-this.x*o.x-this.y*o.y-this.z*o.z,this.x*o.w+this.w*o.x+this.y*o.z-this.z*o.y,this.y*o.w+this.w*o.y+this.z*o.x-this.x*o.z,this.z*o.w+this.w*o.z+this.x*o.y-this.y*o.x)},le.prototype.toEulerAngles=function(){var o=Math.atan2(2*(this.w*this.x+this.y*this.z),1-2*(this.x*this.x+this.y*this.y)),i=Math.asin(2*(this.w*this.y-this.z*this.x)),m=Math.atan2(2*(this.w*this.z+this.x*this.y),1-2*(this.y*this.y+this.z*this.z));return[o,i,m]};function In(o,i,m){var V=[i?i*Math.PI/180/2:0,m?m*Math.PI/180/2:0,o?o*Math.PI/180/2:0],K=[Math.cos(V[0]),Math.cos(V[1]),Math.cos(V[2])],Y=[Math.sin(V[0]),Math.sin(V[1]),Math.sin(V[2])];return new le(K[0]*K[1]*K[2]-Y[0]*Y[1]*Y[2],Y[0]*K[1]*K[2]-K[0]*Y[1]*Y[2],K[0]*Y[1]*K[2]+Y[0]*K[1]*Y[2],K[0]*K[1]*Y[2]+Y[0]*Y[1]*K[2])}function Tn(o,i,m){var V=In(o,i,m);V=V.multiply(new le(Math.sqrt(.5),-Math.sqrt(.5),0,0));var K=t.orientation?-t.orientation*Math.PI/180/2:0;return V.multiply(new le(Math.cos(K),0,-Math.sin(K),0))}function Ut(o){var i=Tn(o.alpha,o.beta,o.gamma).toEulerAngles();typeof U=="number"&&U<10?U+=1:U===10?(F=i[2]/Math.PI*180+e.yaw,U=!0,requestAnimationFrame(ge)):(e.pitch=i[0]/Math.PI*180,e.roll=-i[1]/Math.PI*180,e.yaw=-i[2]/Math.PI*180+F)}function Sn(){try{var o={};e.horizonPitch!==c&&(o.horizonPitch=e.horizonPitch*Math.PI/180),e.horizonRoll!==c&&(o.horizonRoll=e.horizonRoll*Math.PI/180),e.backgroundColor!==c&&(o.backgroundColor=e.backgroundColor),_.init(S,e.type,e.dynamic,e.haov*Math.PI/180,e.vaov*Math.PI/180,e.vOffset*Math.PI/180,Rn,o),e.dynamic!==!0&&(S=c)}catch(i){if(i.type=="webgl error"||i.type=="no webgl")B();else if(i.type=="webgl size error")B(e.strings.textureSizeError.replace("%s",i.width).replace("%s",i.maxWidth));else throw B(e.strings.unknownError),i}}function Rn(){if(e.sceneFadeDuration&&_.fadeImg!==c){_.fadeImg.style.opacity=0;var o=_.fadeImg;delete _.fadeImg,setTimeout(function(){q.removeChild(o),Je("scenechangefadedone")},e.sceneFadeDuration)}e.compass?He.style.display="inline":He.style.display="none",Nn(),z.load.box.style.display="none",x!==c&&(q.removeChild(x),x=c),M=!0,Je("load"),we()}function Wt(o){o.pitch=Number(o.pitch)||0,o.yaw=Number(o.yaw)||0;var i=a.createElement("div");i.className="pnlm-hotspot-base",o.cssClass?i.className+=" "+o.cssClass:i.className+=" pnlm-hotspot pnlm-sprite pnlm-"+nt(o.type);var m=a.createElement("span");o.text&&(m.innerHTML=nt(o.text));var V;if(o.video){var K=a.createElement("video"),Y=o.video;e.basePath&&!v(Y)&&(Y=e.basePath+Y),K.src=ot(Y),K.controls=!0,K.style.width=o.width+"px",q.appendChild(i),m.appendChild(K)}else if(o.image){var Y=o.image;e.basePath&&!v(Y)&&(Y=e.basePath+Y),V=a.createElement("a"),V.href=ot(o.URL?o.URL:Y),V.target="_blank",m.appendChild(V);var me=a.createElement("img");me.src=ot(Y),me.style.width=o.width+"px",me.style.paddingTop="5px",q.appendChild(i),V.appendChild(me),m.style.maxWidth="initial"}else o.URL?(V=a.createElement("a"),V.href=ot(o.URL),V.target="_blank",q.appendChild(V),i.className+=" pnlm-pointer",m.className+=" pnlm-pointer",V.appendChild(i)):(o.sceneId&&(i.onclick=i.ontouchend=function(){return i.clicked||(i.clicked=!0,Ct(o.sceneId,o.targetPitch,o.targetYaw,o.targetHfov)),!1},i.className+=" pnlm-pointer",m.className+=" pnlm-pointer"),q.appendChild(i));o.createTooltipFunc?o.createTooltipFunc(i,o.createTooltipArgs):(o.text||o.video||o.image)&&(i.classList.add("pnlm-tooltip"),i.appendChild(m),m.style.width=m.scrollWidth-20+"px",m.style.marginLeft=-(m.scrollWidth-i.offsetWidth)/2+"px",m.style.marginTop=-m.scrollHeight-12+"px"),o.clickHandlerFunc&&(i.addEventListener("click",function(ue){o.clickHandlerFunc(ue,o.clickHandlerArgs)},"false"),i.className+=" pnlm-pointer",m.className+=" pnlm-pointer"),o.div=i}function Nn(){Z||(e.hotSpots?(e.hotSpots=e.hotSpots.sort(function(o,i){return o.pitch<i.pitch}),e.hotSpots.forEach(Wt)):e.hotSpots=[],Z=!0,Yt())}function Pn(){var o=e.hotSpots;if(Z=!1,delete e.hotSpots,o)for(var i=0;i<o.length;i++){for(var m=o[i].div;m.parentNode!=q;)m=m.parentNode;q.removeChild(m),delete o[i].div}}function Bt(o){var i=Math.sin(o.pitch*Math.PI/180),m=Math.cos(o.pitch*Math.PI/180),V=Math.sin(e.pitch*Math.PI/180),K=Math.cos(e.pitch*Math.PI/180),Y=Math.cos((-o.yaw+e.yaw)*Math.PI/180),me=i*V+m*Y*K;if(o.yaw<=90&&o.yaw>-90&&me<=0||(o.yaw>90||o.yaw<=-90)&&me<=0)o.div.style.visibility="hidden";else{var ue=Math.sin((-o.yaw+e.yaw)*Math.PI/180),ve=Math.tan(e.hfov*Math.PI/360);o.div.style.visibility="visible";var _e=_.getCanvas(),Ee=_e.clientWidth,Ge=_e.clientHeight,Xe=[-Ee/ve*ue*m/me/2,-Ee/ve*(i*K-m*Y*V)/me/2],et=Math.sin(e.roll*Math.PI/180),Zt=Math.cos(e.roll*Math.PI/180);Xe=[Xe[0]*Zt-Xe[1]*et,Xe[0]*et+Xe[1]*Zt],Xe[0]+=(Ee-o.div.offsetWidth)/2,Xe[1]+=(Ge-o.div.offsetHeight)/2;var Mt="translate("+Xe[0]+"px, "+Xe[1]+"px) translateZ(9999px) rotate("+e.roll+"deg)";o.div.style.webkitTransform=Mt,o.div.style.MozTransform=Mt,o.div.style.transform=Mt}}function Yt(){e.hotSpots.forEach(Bt)}function ct(o){e={};var i,m,V=["haov","vaov","vOffset","northOffset","horizonPitch","horizonRoll"];ee=[];for(i in te)te.hasOwnProperty(i)&&(e[i]=te[i]);for(i in d.default)if(d.default.hasOwnProperty(i))if(i=="strings")for(m in d.default.strings)d.default.strings.hasOwnProperty(m)&&(e.strings[m]=nt(d.default.strings[m]));else e[i]=d.default[i],V.indexOf(i)>=0&&ee.push(i);if(o!==null&&o!==""&&d.scenes&&d.scenes[o]){var K=d.scenes[o];for(i in K)if(K.hasOwnProperty(i))if(i=="strings")for(m in K.strings)K.strings.hasOwnProperty(m)&&(e.strings[m]=nt(K.strings[m]));else e[i]=K[i],V.indexOf(i)>=0&&ee.push(i);e.scene=o}for(i in d)if(d.hasOwnProperty(i))if(i=="strings")for(m in d.strings)d.strings.hasOwnProperty(m)&&(e.strings[m]=nt(d.strings[m]));else e[i]=d[i],V.indexOf(i)>=0&&ee.push(i)}function yt(o){if(o=o||!1,o&&"preview"in e){var i=e.preview;e.basePath&&!v(i)&&(i=e.basePath+i),x=a.createElement("div"),x.className="pnlm-preview-img",x.style.backgroundImage="url('"+zn(i)+"')",q.appendChild(x)}var m=e.title,V=e.author;o&&("previewTitle"in e&&(e.title=e.previewTitle),"previewAuthor"in e&&(e.author=e.previewAuthor)),e.hasOwnProperty("title")||(z.title.innerHTML=""),e.hasOwnProperty("author")||(z.author.innerHTML=""),!e.hasOwnProperty("title")&&!e.hasOwnProperty("author")&&(z.container.style.display="none"),ne.load.innerHTML="<p>"+e.strings.loadButtonLabel+"</p>",z.load.boxp.innerHTML=e.strings.loadingLabel;for(var K in e)if(e.hasOwnProperty(K))switch(K){case"title":z.title.innerHTML=nt(e[K]),z.container.style.display="inline";break;case"author":z.author.innerHTML=e.strings.bylineLabel.replace("%s",nt(e[K])),z.container.style.display="inline";break;case"fallback":var Y=a.createElement("a");Y.href=ot(e[K]),Y.target="_blank",Y.textContent="Click here to view this panorama in an alternative viewer.";var me=a.createElement("p");me.textContent="Your browser does not support WebGL.",me.appendChild(a.createElement("br")),me.appendChild(Y),z.errorMsg.innerHTML="",z.errorMsg.appendChild(me);break;case"hfov":qe(Number(e[K]));break;case"autoLoad":e[K]===!0&&_===c&&(z.load.box.style.display="inline",ne.load.style.display="none",p());break;case"showZoomCtrl":e[K]&&e.showControls!=!1?ne.zoom.style.display="block":ne.zoom.style.display="none";break;case"showFullscreenCtrl":e[K]&&e.showControls!=!1&&("fullscreen"in a||"mozFullScreen"in a||"webkitIsFullScreen"in a||"msFullscreenElement"in a)?ne.fullscreen.style.display="block":ne.fullscreen.style.display="none";break;case"hotSpotDebug":e[K]?xe.style.display="block":xe.style.display="none";break;case"showControls":e[K]||(ne.orientation.style.display="none",ne.zoom.style.display="none",ne.fullscreen.style.display="none");break;case"orientationOnByDefault":e[K]&&(be===c?Pe=!0:be===!0&&dt());break}o&&(m?e.title=m:delete e.title,V?e.author=V:delete e.author)}function Et(){if(M&&!h)if(L)a.exitFullscreen?a.exitFullscreen():a.mozCancelFullScreen?a.mozCancelFullScreen():a.webkitCancelFullScreen?a.webkitCancelFullScreen():a.msExitFullscreen&&a.msExitFullscreen();else try{f.requestFullscreen?f.requestFullscreen():f.mozRequestFullScreen?f.mozRequestFullScreen():f.msRequestFullscreen?f.msRequestFullscreen():f.webkitRequestFullScreen()}catch{}}function Qe(){var o=t.innerWidth==screen.width&&t.innerHeight==screen.height;a.fullscreen||a.mozFullScreen||a.webkitIsFullScreen||a.msFullscreenElement||o?(ne.fullscreen.classList.add("pnlm-fullscreen-toggle-button-active"),L=!0):(ne.fullscreen.classList.remove("pnlm-fullscreen-toggle-button-active"),L=!1),_.resize(),qe(e.hfov),we()}function jn(){M&&(qe(e.hfov-5),we())}function An(){M&&(qe(e.hfov+5),we())}function Xt(o){var i=e.minHfov;if(e.type=="multires"&&_&&(i=Math.min(i,_.getCanvas().width/(e.multiRes.cubeResolution/90*.9))),i>e.maxHfov)return console.log("HFOV bounds do not make sense (minHfov > maxHfov)."),e.hfov;var m=e.hfov;if(o<i?m=i:o>e.maxHfov?m=e.maxHfov:m=o,e.avoidShowingBackground&&_){var V=_.getCanvas();m=Math.min(m,Math.atan(Math.tan((e.maxPitch-e.minPitch)/360*Math.PI)/V.height*V.width)*360/Math.PI)}return m}function qe(o){e.hfov=Xt(o)}function ut(){D={},T=e.autoRotate?e.autoRotate:T,e.autoRotate=!1}function Gt(){g(),M=!1,ne.load.style.display="none",z.load.box.style.display="inline",p()}function Ct(o,i,m,V,K){M=!1,D={};var Y,me,ue,ve;if(e.sceneFadeDuration&&!K){var _e=_.render(e.pitch*Math.PI/180,e.yaw*Math.PI/180,e.hfov*Math.PI/180,{returnImage:!0});if(_e!==c){Y=new Image,Y.className="pnlm-fade-img",Y.style.transition="opacity "+e.sceneFadeDuration/1e3+"s",Y.style.width="100%",Y.style.height="100%",Y.onload=function(){Ct(o,i,m,V,!0)},Y.src=_e,q.appendChild(Y),_.fadeImg=Y;return}}i==="same"?me=e.pitch:me=i,m==="same"?ue=e.yaw:m==="sameAzimuth"?ue=e.yaw+(e.northOffset||0)-(d.scenes[o].northOffset||0):ue=m,V==="same"?ve=e.hfov:ve=V,Pn(),ct(o),k.yaw=k.pitch=k.hfov=0,yt(),me!==c&&(e.pitch=me),ue!==c&&(e.yaw=ue),ve!==c&&(e.hfov=ve),Je("scenechange",o),Gt()}function it(){t.removeEventListener("deviceorientation",Ut),ne.orientation.classList.remove("pnlm-orientation-button-active"),U=!1}function dt(){U=1,t.addEventListener("deviceorientation",Ut),ne.orientation.classList.add("pnlm-orientation-button-active")}function nt(o){return d.escapeHTML?String(o).split(/&/g).join("&amp;").split('"').join("&quot;").split("'").join("&#39;").split("<").join("&lt;").split(">").join("&gt;").split("/").join("&#x2f;").split(`
5
- `).join("<br>"):String(o).split(`
6
- `).join("<br>")}function ot(o){return o.trim().toLowerCase().indexOf("javascript:")===0?"about:blank":o}function zn(o){return ot(o).replace(/"/g,"%22").replace(/'/g,"%27")}this.isLoaded=function(){return!!M},this.getPitch=function(){return e.pitch},this.setPitch=function(o,i,m,V){return i=i==c?1e3:Number(i),i?D.pitch={startTime:Date.now(),startPosition:e.pitch,endPosition:o,duration:i,callback:m,callbackArgs:V}:e.pitch=o,we(),this},this.getPitchBounds=function(){return[e.minPitch,e.maxPitch]},this.setPitchBounds=function(o){return e.minPitch=Math.max(-90,Math.min(o[0],90)),e.maxPitch=Math.max(-90,Math.min(o[1],90)),this},this.getYaw=function(){return e.yaw},this.setYaw=function(o,i,m,V){return i=i==c?1e3:Number(i),o=(o+180)%360-180,i?(e.yaw-o>180?o+=360:o-e.yaw>180&&(o-=360),D.yaw={startTime:Date.now(),startPosition:e.yaw,endPosition:o,duration:i,callback:m,callbackArgs:V}):e.yaw=o,we(),this},this.getYawBounds=function(){return[e.minYaw,e.maxYaw]},this.setYawBounds=function(o){return e.minYaw=Math.max(-180,Math.min(o[0],180)),e.maxYaw=Math.max(-180,Math.min(o[1],180)),this},this.getHfov=function(){return e.hfov},this.setHfov=function(o,i,m,V){return i=i==c?1e3:Number(i),i?D.hfov={startTime:Date.now(),startPosition:e.hfov,endPosition:Xt(o),duration:i,callback:m,callbackArgs:V}:qe(o),we(),this},this.getHfovBounds=function(){return[e.minHfov,e.maxHfov]},this.setHfovBounds=function(o){return e.minHfov=Math.max(0,o[0]),e.maxHfov=Math.max(0,o[1]),this},this.lookAt=function(o,i,m,V,K,Y){return V=V==c?1e3:Number(V),o!==c&&(this.setPitch(o,V,K,Y),K=c),i!==c&&(this.setYaw(i,V,K,Y),K=c),m!==c&&this.setHfov(m,V,K,Y),this},this.getNorthOffset=function(){return e.northOffset},this.setNorthOffset=function(o){return e.northOffset=Math.min(360,Math.max(0,o)),we(),this},this.getHorizonRoll=function(){return e.horizonRoll},this.setHorizonRoll=function(o){return e.horizonRoll=Math.min(90,Math.max(-90,o)),_.setPose(e.horizonPitch*Math.PI/180,e.horizonRoll*Math.PI/180),we(),this},this.getHorizonPitch=function(){return e.horizonPitch},this.setHorizonPitch=function(o){return e.horizonPitch=Math.min(90,Math.max(-90,o)),_.setPose(e.horizonPitch*Math.PI/180,e.horizonRoll*Math.PI/180),we(),this},this.startAutoRotate=function(o){return o=o||T||1,e.autoRotate=o,E.lookAt(he,c,H,3e3),we(),this},this.stopAutoRotate=function(){return T=e.autoRotate?e.autoRotate:T,e.autoRotate=!1,e.autoRotateInactivityDelay=-1,this},this.getRenderer=function(){return _},this.setUpdate=function(o){return R=o===!0,_===c?W():we(),this},this.mouseEventToCoords=function(o){return Le(o)},this.loadScene=function(o,i,m,V){return M!==!1&&Ct(o,i,m,V),this},this.getScene=function(){return e.scene},this.addScene=function(o,i){return d.scenes[o]=i,this},this.removeScene=function(o){return e.scene===o||!d.scenes.hasOwnProperty(o)?!1:(delete d.scenes[o],!0)},this.toggleFullscreen=function(){return Et(),this},this.getConfig=function(){return e},this.getContainer=function(){return f},this.addHotSpot=function(o,i){if(i===c&&e.scene===c)e.hotSpots.push(o);else{var m=i!==c?i:e.scene;if(d.scenes.hasOwnProperty(m))d.scenes[m].hasOwnProperty("hotSpots")||(d.scenes[m].hotSpots=[],m==e.scene&&(e.hotSpots=d.scenes[m].hotSpots)),d.scenes[m].hotSpots.push(o);else throw"Invalid scene ID!"}return(i===c||e.scene==i)&&(Wt(o),M&&Bt(o)),this},this.removeHotSpot=function(o,i){if(i===c||e.scene==i){if(!e.hotSpots)return!1;for(var m=0;m<e.hotSpots.length;m++)if(e.hotSpots[m].hasOwnProperty("id")&&e.hotSpots[m].id===o){for(var V=e.hotSpots[m].div;V.parentNode!=q;)V=V.parentNode;return q.removeChild(V),delete e.hotSpots[m].div,e.hotSpots.splice(m,1),!0}}else if(d.scenes.hasOwnProperty(i)){if(!d.scenes[i].hasOwnProperty("hotSpots"))return!1;for(var m=0;m<d.scenes[i].hotSpots.length;m++)if(d.scenes[i].hotSpots[m].hasOwnProperty("id")&&d.scenes[i].hotSpots[m].id===o)return d.scenes[i].hotSpots.splice(m,1),!0}else return!1},this.resize=function(){_&&fe()},this.isLoaded=function(){return M},this.isOrientationSupported=function(){return be||!1},this.stopOrientation=function(){it()},this.startOrientation=function(){be&&dt()},this.isOrientationActive=function(){return!!U},this.on=function(o,i){return j[o]=j[o]||[],j[o].push(i),this},this.off=function(o,i){if(!o)return j={},this;if(i){var m=j[o].indexOf(i);m>=0&&j[o].splice(m,1),j[o].length==0&&delete j[o]}else delete j[o];return this};function Je(o){if(o in j)for(var i=j[o].length;i>0;i--)j[o][j[o].length-i].apply(null,[].slice.call(arguments,1))}this.destroy=function(){_&&_.destroy(),y&&(Q.removeEventListener("mousedown",pe,!1),Q.removeEventListener("dblclick",re,!1),a.removeEventListener("mousemove",Ie,!1),a.removeEventListener("mouseup",je,!1),f.removeEventListener("mousewheel",De,!1),f.removeEventListener("DOMMouseScroll",De,!1),f.removeEventListener("mozfullscreenchange",Qe,!1),f.removeEventListener("webkitfullscreenchange",Qe,!1),f.removeEventListener("msfullscreenchange",Qe,!1),f.removeEventListener("fullscreenchange",Qe,!1),t.removeEventListener("resize",fe,!1),t.removeEventListener("orientationchange",fe,!1),f.removeEventListener("keydown",ze,!1),f.removeEventListener("keyup",Oe,!1),f.removeEventListener("blur",We,!1),a.removeEventListener("mouseleave",je,!1),Q.removeEventListener("touchstart",Re,!1),Q.removeEventListener("touchmove",Ae,!1),Q.removeEventListener("touchend",Ne,!1),Q.removeEventListener("pointerdown",Ve,!1),Q.removeEventListener("pointermove",Se,!1),Q.removeEventListener("pointerup",Ce,!1),Q.removeEventListener("pointerleave",Ce,!1)),f.innerHTML="",f.classList.remove("pnlm-container"),A.classList.remove("pnlm-grab"),A.classList.remove("pnlm-grabbing")}}return{viewer:function(d,E){return new s(d,E)}}}(window,document);window.requestAnimationFrame||(window.requestAnimationFrame=function(){return window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(t,a){window.setTimeout(t,1e3/60)}}());var Jt,en;function zo(t,a){if(!(t instanceof a))throw new TypeError("Cannot call a class as a function")}function Do(t,a){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a&&(typeof a=="object"||typeof a=="function")?a:t}function Oo(t,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof a);t.prototype=Object.create(a&&a.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),a&&(Object.setPrototypeOf?Object.setPrototypeOf(t,a):t.__proto__=a)}var bt=(en=Jt=function(t){Oo(a,t);function a(c){zo(this,a);var s=Do(this,t.call(this,c));return s.renderImage=function(f){var d=s.props.children,E=[].concat(d),e=[];Array.isArray(E)&&E.map(function(x){switch(x.props.type){case"info":return e.push({id:Math.random().toString(36).substr(2,9),type:x.props.type,pitch:x.props.pitch?x.props.pitch:10,yaw:x.props.yaw?x.props.yaw:10,text:x.props.text?x.props.text:"",URL:x.props.URL?x.props.URL:""});case"custom":return e.push({id:Math.random().toString(36).substr(2,9),pitch:x.props.pitch?x.props.pitch:10,yaw:x.props.yaw?x.props.yaw:10,cssClass:x.props.cssClass?x.props.cssClass:"tooltipcss",createTooltipFunc:x.props.tooltip?x.props.tooltip:s.hotspotTooltip,createTooltipArgs:x.props.tooltipArg?x.props.tooltipArg:{},clickHandlerFunc:x.props.handleClick?x.props.handleClick:s.handleClickHotspot,clickHandlerArgs:x.props.handleClickArg?x.props.handleClickArg:{name:"test"}});default:return[]}});var _={type:"equirectangular",panorama:s.props.image,haov:s.props.haov,vaov:s.props.vaov,vOffset:s.props.vOffset,yaw:s.props.yaw,pitch:s.props.pitch,hfov:s.props.hfov,minHfov:s.props.minHfov,maxHfov:s.props.maxHfov,minPitch:s.props.minPitch,maxPitch:s.props.maxPitch,minYaw:s.props.minYaw,maxYaw:s.props.maxYaw,autoRotate:s.props.autoRotate,compass:s.props.compass,preview:s.props.preview,previewTitle:s.props.previewTitle,previewAuthor:s.props.previewAuthor,author:s.props.author,title:s.props.title,autoLoad:s.props.autoLoad,orientationOnByDefault:s.props.orientationOnByDefault,showZoomCtrl:s.props.showZoomCtrl,keyboardZoom:s.props.keyboardZoom,mouseZoom:s.props.mouseZoom,draggable:s.props.draggable,disableKeyboardCtrl:s.props.disableKeyboardCtrl,showFullscreenCtrl:s.props.showFullscreenCtrl,showControls:s.props.showControls,hotSpotDebug:s.props.hotspotDebug,hotSpots:e,onRender:s.props.onRender};Object.keys(_).forEach(function(x){return _[x]===""&&delete _[x]}),f==="update"&&s.panorama.destroy(),s.panorama=pannellum.viewer(s.props.id?s.props.id:s.state.id,_),s.panorama.on("load",s.props.onLoad),s.panorama.on("scenechange",s.props.onScenechange),s.panorama.on("scenechangefadedone",s.props.onScenechangefadedone),s.panorama.on("error",s.props.onError),s.panorama.on("errorcleared",s.props.onErrorcleared),s.panorama.on("mousedown",s.props.onMousedown),s.panorama.on("mouseup",s.props.onMouseup),s.panorama.on("touchstart",s.props.onTouchstart),s.panorama.on("touchend",s.props.onTouchend)},s.componentDidMount=function(){s.renderImage("mount")},s.handleClickHotspot=function(f,d){console.log("hotspot clicked",d.name)},s.hotspotTooltip=function(f,d){f.setAttribute("id","textInfo");var E=document.createElement("div");E.classList.add("hotspot");var e=document.createElement("div");e.classList.add("out");var _=document.createElement("div");_.classList.add("in");var x=document.createElement("div");x.classList.add("image"),f.appendChild(E),E.appendChild(_),E.appendChild(e)},s.getViewer=function(){return s.panorama},s.forceRender=function(){s.renderImage("update")},s.state={id:Math.random().toString(36).substr(2,9)},s}return a.prototype.componentDidUpdate=function(s,f,d){(s.image!==this.props.image||s.width!==this.props.width||s.height!==this.props.height||s.compass!==this.props.compass||s.title!==this.props.title||s.author!==this.props.author||s.preview!==this.props.preview||s.previewTitle!==this.props.previewTitle||s.previewAuthor!==this.props.previewAuthor||s.showZoomCtrl!==this.props.showZoomCtrl||s.showFullscreenCtrl!==this.props.showFullscreenCtrl||s.showControls!==this.props.showControls||s.children.length!==this.props.children.length)&&this.renderImage("update"),(s.maxYaw!==this.props.maxYaw||s.minYaw!==this.props.minYaw||s.maxPitch!==this.props.maxPitch||s.minPitch!==this.props.minPitch||s.maxHfov!==this.props.maxHfov||s.minHfov!==this.props.minHfov)&&(this.panorama.setYawBounds([this.props.minYaw,this.props.maxYaw]),this.panorama.setPitchBounds([this.props.minPitch,this.props.maxPitch]),this.panorama.setHfovBounds([this.props.minHfov,this.props.maxHfov])),s.yaw!==this.props.yaw&&this.panorama.setYaw(this.props.yaw),s.pitch!==this.props.pitch&&this.panorama.setPitch(this.props.pitch),s.hfov!==this.props.hfov&&this.panorama.setHfov(this.props.hfov)},a.prototype.render=function(){var s=this,f=this.props,d=f.width,E=f.height,e={width:d,height:E};return l.createElement("div",{id:this.props.id?this.props.id:this.state.id,style:e,ref:function(x){return s.imageNode=x}})},a}(l.PureComponent),Jt.defaultProps={children:[],width:"100%",height:"400px",image:"",haov:360,vaov:180,vOffset:0,yaw:0,pitch:0,hfov:100,minHfov:50,maxHfov:150,minPitch:-90,maxPitch:90,minYaw:-180,maxYaw:180,autoRotate:0,compass:!1,preview:"",previewTitle:"",previewAuthor:"",title:"",author:"",autoLoad:!1,orientationOnByDefault:!1,showZoomCtrl:!0,keyboardZoom:!0,mouseZoom:!0,draggable:!0,disableKeyboardCtrl:!1,showFullscreenCtrl:!0,showControls:!0,onLoad:function(){},onScenechange:function(){},onScenechangefadedone:function(){},onError:function(){},onErrorcleared:function(){},onMousedown:function(){},onMouseup:function(){},onTouchstart:function(){},onTouchend:function(){},hotspotDebug:!1,onRender:null},en);bt.propTypes={};bt.Hotspot=function(){};bt.Hotspot=function(){};const tn=100,pt=100,ht=50,Ho=0,Fo=0,Vo=t=>{const[a,c]=l.useState(0),[s,f]=l.useState(!1);return l.useEffect(()=>{const d=XMLHttpRequest.prototype.open,E=XMLHttpRequest.prototype.send;let e=!1;return XMLHttpRequest.prototype.open=function(_,x,P=!0,C,u){return x.toString().includes(t)&&(e=!0,f(!0)),d.call(this,_,x,P,C||null,u||null)},XMLHttpRequest.prototype.send=function(_){return e&&(this.addEventListener("progress",x=>{if(x.lengthComputable){const P=Math.round(x.loaded/x.total*100);c(P)}}),this.addEventListener("loadend",()=>{e=!1,c(100),f(!1)})),E.call(this,_)},()=>{XMLHttpRequest.prototype.open=d,XMLHttpRequest.prototype.send=E}},[t]),[a,s]};function Uo(t,a=50,c=200){let s=null,f=0;return(...d)=>{const E=Date.now();s&&(clearTimeout(s),s=null),E-f>=a&&(t(...d),f=E),s=setTimeout(()=>{t(...d)},c)}}const Wo=({className:t})=>n.jsx(Ue,{className:t,customizationKey:"UI_INTERIOR_360_PLAY",children:n.jsx("svg",{className:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:n.jsx("polygon",{points:"6 3 20 12 6 21 6 3"})})}),Bo=({itemIndex:t,isPannellumLoaded:a,isLoading:c,progress:s,autoloadInterior360:f,loadScene:d})=>{const{emitAnalyticsEvent:E}=Be(),{displayedCategoryId:e,displayedCategoryName:_}=Ye(),x=l.useCallback(C=>{E({type:"track",category_id:e,category_name:_,item_type:"interior-360",item_position:t,action_properties:{action_name:"Interior 360 Play",action_field:"interior_360_play",action_value:C}})},[E,e,_,t]),P=l.useCallback(()=>{d(),x("click")},[d,x]);return l.useEffect(()=>{f&&(d(),x("auto"))},[f,d,x]),a?null:n.jsx("div",{className:"pointer-events-auto absolute inset-0 flex flex-col items-center justify-center gap-y-4",children:n.jsxs("div",{className:"pointer-events-auto absolute inset-0 flex flex-col items-center justify-center gap-y-4 bg-foreground/35",children:[n.jsx(yn,{className:"size-20"}),n.jsx(Ze,{color:"neutral",shape:"icon",onClick:P,children:n.jsx(Wo,{className:"size-full"})}),n.jsx("div",{className:de("relative h-1 w-3/5 overflow-hidden rounded-full bg-background",!c&&"invisible"),children:n.jsx("div",{className:"h-full bg-primary transition-[width]",style:{width:`${s}%`}})})]})})},Yo=t=>{const{itemIndex:a,src:c,poster:s,onLoaded:f,onError:d}=t,{autoLoadInterior360:E}=Be(),{isShowingDetails:e,setItemInteraction:_,zoom:x,isZooming:P,setZoom:C}=Ye(),[u,r]=Vo(c),I=l.useRef(null),O=l.useRef(null),[b,w]=l.useState(!1),L=l.useCallback(()=>{a!==void 0&&_(a,"ready"),f?.(),w(!0)},[a,_,f]),M=l.useCallback(y=>{y instanceof MouseEvent&&y.button!==0||(y.preventDefault(),y.stopPropagation(),y.stopImmediatePropagation())},[]),h=l.useCallback(()=>{const y=I.current?.getViewer();y&&y.loadScene()},[]);return l.useEffect(()=>{if(I.current&&b&&O.current){const y=I.current.getViewer(),S=O.current;if(y){const J=T=>{T.preventDefault();const H=qt(y.getHfov(),ht,pt,at,rt),D=(T.deltaY<0?"zoom-in":"zoom-out")==="zoom-in"?Math.min(H+rt,at):Math.max(H-rt,1);C(D)},k=Uo(J,100,150),$=T=>{T.preventDefault();const H=qt(y.getHfov(),ht,pt,at,rt,!0);C(H)};S.addEventListener("wheel",k),S.addEventListener("dblclick",$);const U=Math.abs(1-Math.abs(x)),F=pt-ht,oe=tn-U*F;return y.setHfov(oe),()=>{S.removeEventListener("wheel",J),S.removeEventListener("dblclick",$)}}}},[x,b,P,C]),n.jsx(n.Fragment,{children:n.jsx("div",{className:de("relative aspect-[4/3] w-full overflow-hidden bg-transparent"),children:n.jsxs("div",{className:de("size-full",e?"scale-105":"scale-100"),children:[n.jsxs("div",{ref:O,children:[n.jsx("style",{children:`
7
- .pnlm-load-button {
8
- display: none !important;
9
- }
10
- .pnlm-load-box {
11
- display: none !important;
12
- }
13
- .pnlm-container {
14
- background-image: none !important;
15
- }
16
- .pnlm-about-msg {
17
- width: 0;
18
- height: 0;
19
- padding: 0;
20
- visibility: hidden;
21
- }
22
-
23
- .pnlm-about-msg a {
24
- display: none;
25
- visibility: hidden;
26
- }
27
- `}),O.current&&n.jsx(bt,{ref:I,id:O.current,panorama:c,preview:s,width:"0",height:"0",image:c,pitch:Ho,yaw:Fo,hfov:tn,maxHfov:pt,minHfov:ht,compass:!1,showControls:!1,keyboardZoom:!1,onLoad:L,onError:d,onMousedown:M,onTouchstart:M,onTouchend:M,onMouseup:M,autoLoad:!1})]}),n.jsx(Bo,{isPannellumLoaded:b,isLoading:r,progress:u,autoloadInterior360:E,loadScene:h,itemIndex:a})]})})})},Xo=t=>{const{itemIndex:a}=t,{setItemInteraction:c}=Ye(),[s,f]=l.useState();return l.useEffect(()=>{s===null||s==="error"||c(a,s==="spin"?"running":"ready")},[a,c,s]),s==="error"?n.jsx(wt,{className:"text-background",text:"Interior Spin could not be loaded"}):n.jsx(Yo,{...t,onLoaded:()=>f("spin"),onError:()=>f("error")})},Ln=({className:t})=>n.jsx(Ue,{className:t,customizationKey:"UI_360_PLAY",children:n.jsx("svg",{className:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:n.jsx("polygon",{points:"6 3 20 12 6 21 6 3"})})}),Go=750,Zo=1250,qo=360,Ko=480,$o=({images:t,onlyPreload:a})=>{const{demoSpin:c,reverse360:s}=Be(),{isShowingDetails:f,isZooming:d}=Ye(),E=d||f,e=l.useRef(null),_=l.useRef(null),x=l.useRef(0),P=l.useRef(null),C=l.useRef(null),u=l.useRef(null),r=l.useRef(null),I=l.useRef(0),O=16,b=l.useRef({timestamps:new Float64Array(10),values:new Float64Array(10),index:0,count:0}),w=l.useRef(c),L=l.useRef(null),M=l.useCallback(()=>{L.current&&(clearTimeout(L.current),L.current=null)},[]),h=l.useRef(null),y=()=>{h.current&&(cancelAnimationFrame(h.current),h.current=null)},[S,J]=l.useState(0);l.useEffect(()=>{x.current=S},[S]);const k=t.length,$=l.useCallback(T=>{if(x.current===T)return;const he=P.current;he&&(he.src=t[T].src),x.current=T},[t]),U=l.useCallback(()=>{const T=(x.current+1)%k;$(T)},[k,$]),F=l.useCallback(()=>{const T=(x.current-1+k)%k;$(T)},[k,$]),oe=l.useCallback(()=>{J(x.current)},[]);return l.useEffect(()=>{if(E){M();return}const T=e.current,H=_.current;if(!T||!H)return;w.current&&(w.current=!1,L.current=setTimeout(()=>{const W=Date.now(),G=()=>{const B=()=>{const ae=(Date.now()-W)/Zo,pe=Math.round((Le=>Le*(2-Le))(ae)*k),re=Ke(pe%k,0,k-1);J(re),!(pe>=k)&&G()};h.current=requestAnimationFrame(B)};G()},Go));const he=qo/k;let D=null;const j=b.current,ee=()=>{j.index=0,j.count=0},R=(W,G)=>{const B=j.index;j.timestamps[B]=W,j.values[B]=G,j.index=(B+1)%10,j.count<10&&j.count++},Z=()=>{const W=(()=>{const pe=Date.now(),{timestamps:re,values:Le,index:Ie,count:je}=j;if(je<2)return 0;let Re=-1,Ae=-1;for(let ye=0;ye<je;ye++){const Te=(Ie-1-ye+10)%10;pe-re[Te]<50&&(Ae===-1&&(Ae=Te),Re=Te)}if(Re===-1||Ae===-1||Re===Ae)return 0;const Ne=re[Ae]-re[Re];return Ne<=0?0:(Le[Ae]-Le[Re])/(Ne/1e3)})(),G=Date.now();let B=0,g=G,ae=G;const se=()=>{const pe=()=>{const re=Date.now(),Le=(re-G)/1e3,Ie=Math.pow(.05,Le),je=W*Ie,Re=(re-g)/1e3;if(B+=je*Re,Math.abs(je)<5*he&&Math.abs(B)<he){h.current=null,oe();return}const Ae=re-ae;Math.abs(B)>=he&&Ae>=O&&(B>0!==s?U():F(),B=0,ae=re),g=re,se()};h.current=requestAnimationFrame(pe)};se()},te=()=>{M(),y()},A=W=>{if(W.button!==0)return;W.preventDefault(),W.stopPropagation(),te();const G=W.clientX;D=G,ee(),R(Date.now(),G)},q=W=>{if(D===null)return;W.stopPropagation();const{clientX:G}=W;R(Date.now(),G);const B=G-D;Math.abs(B)<he||(B>0!==s?U():F(),D=G)},Q=()=>{D!==null&&(D=null,Z())};T.addEventListener("mousedown",A),document.addEventListener("mousemove",q),document.addEventListener("mouseleave",Q),document.addEventListener("mouseup",Q),document.addEventListener("contextmenu",Q);const ce=Ko/k,z=()=>H.getBoundingClientRect().width,xe=()=>H.scrollWidth/2-z()/2,ne=()=>{const W=xe();H.scrollLeft=W};ne();const be=()=>{const W=H.scrollLeft-xe();Math.abs(W)<ce||(W<0!==s?U():F(),ne())};H.addEventListener("scroll",be);let Pe=null;const Fe=()=>{C.current=null;const W=performance.now();if(W-I.current<O){C.current=requestAnimationFrame(Fe);return}I.current=W;const G=u.current,B=r.current;if(G===null||B===null)return;const g=G-B;Math.abs(g)<he||(g>0!==s?U():F(),r.current=G,D=G)},He=W=>{if(Pe!==null||W.changedTouches.length!==1)return;te(),C.current!==null&&(cancelAnimationFrame(C.current),C.current=null);const G=W.changedTouches[0];Pe=G.identifier;const B=G.clientX;D=B,r.current=B,u.current=B,ee(),R(Date.now(),B)},p=W=>{if(D===null)return;let G=null;for(let g=0;g<W.changedTouches.length;g++)if(W.changedTouches[g].identifier===Pe){G=W.changedTouches[g];break}if(!G)return;W.preventDefault();const B=G.clientX;R(Date.now(),B),u.current=B,C.current===null&&(C.current=requestAnimationFrame(Fe))},v=W=>{if(D===null)return;let G=!1;for(let B=0;B<W.changedTouches.length;B++)if(W.changedTouches[B].identifier===Pe){G=!0;break}G&&(C.current!==null&&(cancelAnimationFrame(C.current),C.current=null),Pe=null,D=null,r.current=null,u.current=null,Z())};return H.addEventListener("touchstart",He,{passive:!1}),H.addEventListener("touchmove",p,{passive:!1}),H.addEventListener("touchend",v),H.addEventListener("touchcancel",v),()=>{y(),C.current!==null&&(cancelAnimationFrame(C.current),C.current=null),T.removeEventListener("mousedown",A),document.removeEventListener("mousemove",q),document.removeEventListener("mouseleave",Q),document.removeEventListener("mouseup",Q),document.removeEventListener("contextmenu",Q),H.removeEventListener("scroll",be),H.removeEventListener("touchstart",He),H.removeEventListener("touchmove",p),H.removeEventListener("touchend",v),H.removeEventListener("touchcancel",v)}},[M,U,F,oe,E,s,k]),n.jsx("div",{ref:e,className:"cursor-ew-resize",children:n.jsxs("div",{ref:_,className:" overflow-x-scroll",children:[n.jsx("div",{className:"sticky left-0 top-0",children:n.jsx("img",{ref:P,src:t[S].src,className:"pointer-events-none size-full object-cover",alt:""})}),n.jsx("div",{className:"pointer-events-none -mt-px h-px w-[calc(100%+1024px)]"})]})})},Qo=({itemIndex:t,images:a,onPlaceholderImageLoaded:c,onSpinImagesLoaded:s,onError:f})=>{const{autoLoad360:d,emitAnalyticsEvent:E}=Be(),{displayedCategoryId:e,displayedCategoryName:_}=Ye(),x=l.useMemo(()=>a.map(({src:b})=>b),[a]),[P,C]=l.useState(null),u=P?[...P.values()].filter(b=>b).length/a.length*100:null,r=l.useCallback(b=>{u===null&&(C(new Map(x.map(w=>[w,!1]))),E({type:"track",category_id:e,category_name:_,item_type:"next360",item_position:t,action_properties:{action_name:"Next 360 Play",action_field:"next360_play",action_value:b}}))},[u,x,E,e,_,t]),I=l.useCallback(()=>{r("click")},[r]),O=l.useCallback(b=>{C(w=>{const L=new Map(w);return L.set(b,!0),L})},[]);return l.useEffect(()=>{d&&r("auto")},[d,r]),l.useEffect(()=>{u===100&&s()},[u,s]),n.jsxs("div",{className:"relative aspect-[4/3] w-full",children:[u!==null&&u!==100&&n.jsx("div",{className:"hidden",children:x.map(b=>n.jsx($e,{src:b,onLoad:()=>O(b),onError:f},b))}),n.jsx($e,{className:"size-full",src:x[0],onLoad:c}),n.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center gap-y-4 bg-foreground/35",children:[n.jsx(Ft,{className:"size-20"}),n.jsx(Ze,{color:"neutral",shape:"icon",onClick:I,children:n.jsx(Ln,{className:"size-full"})}),n.jsx("div",{className:de("relative h-1 w-3/5 overflow-hidden rounded-full bg-background",u===null&&"invisible"),children:n.jsx("div",{className:"h-full bg-primary transition-[width]",style:{width:`${u??0}%`}})})]})]})},Jo=t=>{const{itemIndex:a}=t,{setItemInteraction:c}=Ye(),[s,f]=l.useState(null);return l.useEffect(()=>{s===null||s==="error"||c(a,s==="spin"?"running":"ready")},[a,c,s]),s==="error"?n.jsx(wt,{className:"text-background",text:"Spin could not be loaded"}):s!=="spin"?n.jsx(Qo,{...t,onPlaceholderImageLoaded:()=>f(d=>d===null?"placeholder":d),onSpinImagesLoaded:()=>f("spin"),onError:()=>f("error")}):n.jsx($o,{...t})},er=750,tr=1250,nr=360,or=480,rr=({images:t,onlyPreload:a})=>{const{demoSpin:c,reverse360:s}=Be(),{isShowingDetails:f,isZooming:d}=Ye(),E=d||f,e=l.useRef(null),_=l.useRef(null),x=l.useRef(c),P=l.useRef(null),C=l.useCallback(()=>{P.current&&(clearTimeout(P.current),P.current=null)},[]),u=l.useRef(null),r=()=>{u.current&&(cancelAnimationFrame(u.current),u.current=null)},[I,O]=l.useState(0),b=t.length,w=l.useCallback(()=>{O(M=>(M-1+b)%b)},[b]),L=l.useCallback(()=>{O(M=>(M+1)%b)},[b]);return l.useEffect(()=>{if(E){C();return}const M=e.current,h=_.current;if(!M||!h)return;x.current&&(x.current=!1,P.current=setTimeout(()=>{const q=Date.now(),Q=()=>{const ce=()=>{const xe=(Date.now()-q)/tr,be=Math.round((Fe=>Fe*(2-Fe))(xe)*b),Pe=Ke(be%b,0,b-1);O(Pe),!(be>=b)&&Q()};u.current=requestAnimationFrame(ce)};Q()},er));const y=nr/b;let S=null,J=[];const k=q=>{J.push(q),J.length>20&&J.shift()},$=()=>{const q=(()=>{const ne=Date.now(),be=J.filter(He=>ne-He.timestamp<50);if(be.length<2)return 0;const Pe=be[0],Fe=be[be.length-1];return(Fe.value-Pe.value)/(.001*Math.max(Fe.timestamp-Pe.timestamp,1))})(),Q=Date.now();let ce=0,z=Q;const xe=()=>{const ne=()=>{const be=Date.now(),Pe=(be-Q)/1e3,Fe=Math.pow(.05,Pe),He=q*Fe,p=(be-z)/1e3;if(ce+=He*p,Math.abs(He)<5*y&&Math.abs(ce)<y){u.current=null;return}Math.abs(ce)>=y&&(ce>0!==s?L():w(),ce=0),z=be,xe()};u.current=requestAnimationFrame(ne)};xe()},U=()=>{C(),r()},F=q=>{if(q.button!==0)return;q.preventDefault(),q.stopPropagation(),U();const Q=q.clientX;S=Q,J=[{timestamp:Date.now(),value:Q}]},oe=q=>{if(S===null)return;q.stopPropagation();const{clientX:Q}=q;k({timestamp:Date.now(),value:Q});const ce=Q-S;Math.abs(ce)<y||(ce>0!==s?L():w(),S=Q)},T=()=>{S!==null&&(S=null,$())};M.addEventListener("mousedown",F),document.addEventListener("mousemove",oe),document.addEventListener("mouseleave",T),document.addEventListener("mouseup",T),document.addEventListener("contextmenu",T);const H=or/b,he=()=>h.getBoundingClientRect().width,D=()=>h.scrollWidth/2-he()/2,j=()=>{const q=D();h.scrollLeft=q};j();const ee=()=>{const q=h.scrollLeft-D();Math.abs(q)<H||(q<0!==s?L():w(),j())};h.addEventListener("scroll",ee);let R=null;const Z=q=>{if(R!==null||q.changedTouches.length!==1)return;U();const{identifier:Q,clientX:ce}=q.changedTouches[0];R=Q,S=ce,J=[{timestamp:Date.now(),value:ce}]},te=q=>{if(!S)return;const Q=Array.from(q.changedTouches).find(({identifier:xe})=>xe===R);if(!Q)return;q.preventDefault();const{clientX:ce}=Q;k({timestamp:Date.now(),value:ce});const z=ce-S;Math.abs(z)<y||(z>0!==s?L():w(),S=ce)},A=q=>{!S||!Array.from(q.changedTouches).some(({identifier:ce})=>ce===R)||(R=null,S=null,$())};return h.addEventListener("touchstart",Z),h.addEventListener("touchmove",te),h.addEventListener("touchend",A),h.addEventListener("touchcancel",A),()=>{M.removeEventListener("mousedown",F),document.removeEventListener("mousemove",oe),document.removeEventListener("mouseleave",T),document.removeEventListener("mouseup",T),document.removeEventListener("contextmenu",T),h.removeEventListener("scroll",ee),h.removeEventListener("touchstart",Z),h.removeEventListener("touchmove",te),h.removeEventListener("touchend",A),h.removeEventListener("touchcancel",A)}},[C,L,w,E,s,b]),n.jsx("div",{ref:e,className:"cursor-ew-resize",children:n.jsxs("div",{ref:_,className:"overflow-x-scroll",children:[n.jsxs("div",{className:"sticky left-0 top-0",children:[t.map(M=>n.jsx($e,{src:M.src,className:"pointer-events-none !absolute left-0 top-0 -z-10"},M.src)),n.jsx(kn,{...t[I],onlyPreload:a,itemIndex:-1})]}),n.jsx("div",{className:"pointer-events-none -mt-px h-px w-[calc(100%+1024px)]"})]})})},ar=({itemIndex:t,images:a,onPlaceholderImageLoaded:c,onSpinImagesLoaded:s,onError:f})=>{const{autoLoad360:d,emitAnalyticsEvent:E}=Be(),{displayedCategoryId:e,displayedCategoryName:_}=Ye(),x=l.useMemo(()=>a.map(({src:b})=>b),[a]),[P,C]=l.useState(null),u=P?[...P.values()].filter(b=>b).length/a.length*100:null,r=l.useCallback(b=>{u===null&&(C(new Map(x.map(w=>[w,!1]))),E({type:"track",category_id:e,category_name:_,item_type:"exterior-360",item_position:t,action_properties:{action_name:"Exterior 360 Play",action_field:"exterior_360_play",action_value:b}}))},[u,x,E,e,_,t]),I=l.useCallback(()=>{r("click")},[r]),O=l.useCallback(b=>{C(w=>{const L=new Map(w);return L.set(b,!0),L})},[]);return l.useEffect(()=>{d&&r("auto")},[d,r]),l.useEffect(()=>{u===100&&s()},[u,s]),n.jsxs("div",{className:"relative aspect-[4/3] w-full",children:[u!==null&&u!==100&&n.jsx("div",{className:"hidden",children:x.map(b=>n.jsx($e,{src:b,onLoad:()=>O(b),onError:f},b))}),n.jsx($e,{className:"size-full",src:x[0],onLoad:c}),n.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center gap-y-4 bg-foreground/35",children:[n.jsx(Ft,{className:"size-20"}),n.jsx(Ze,{color:"neutral",shape:"icon",onClick:I,children:n.jsx(Ln,{className:"size-full"})}),n.jsx("div",{className:de("relative h-1 w-3/5 overflow-hidden rounded-full bg-background",u===null&&"invisible"),children:n.jsx("div",{className:"h-full bg-primary transition-[width]",style:{width:`${u??0}%`}})})]})]})},sr=t=>{const{itemIndex:a}=t,{setItemInteraction:c}=Ye(),[s,f]=l.useState();return l.useEffect(()=>{s===null||s==="error"||c(a,s==="spin"?"running":"ready")},[a,c,s]),s==="error"?n.jsx(wt,{className:"text-background",text:"Spin could not be loaded"}):s!=="spin"?n.jsx(ar,{...t,onPlaceholderImageLoaded:()=>f(d=>d===null?"placeholder":d),onSpinImagesLoaded:()=>f("spin"),onError:()=>f("error")}):n.jsx(rr,{...t})},ir=t=>n.jsx(Ze,{color:"neutral",shape:"icon",...t,children:n.jsx(En,{className:"size-full"})}),lr=({className:t})=>n.jsx(Ue,{className:t,customizationKey:"UI_PAUSE",children:n.jsx("svg",{className:t,width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:n.jsx("path",{d:"M4 12.6667H6.66667V3.33333H4V12.6667ZM9.33333 3.33333V12.6667H12V3.33333H9.33333Z",fill:"currentColor"})})}),cr=({className:t})=>n.jsx(Ue,{className:t,customizationKey:"UI_VOLUME",children:n.jsx("svg",{className:t,width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:n.jsx("path",{d:"M2 6V10H4.66667L8 13.3333V2.66667L4.66667 6H2ZM11 8C11 6.82 10.32 5.80667 9.33333 5.31334V10.68C10.32 10.1933 11 9.18 11 8ZM9.33333 2.15334V3.52667C11.26 4.1 12.6667 5.88667 12.6667 8C12.6667 10.1133 11.26 11.9 9.33333 12.4733V13.8467C12.0067 13.24 14 10.8533 14 8C14 5.14667 12.0067 2.76 9.33333 2.15334Z",fill:"currentColor"})})}),ur=({className:t})=>n.jsx(Ue,{className:t,customizationKey:"UI_VOLUME_OFF",children:n.jsx("svg",{className:t,width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:n.jsx("path",{d:"M11 8C11 6.82 10.32 5.80667 9.33333 5.31333V6.78667L10.9667 8.42C10.9867 8.28667 11 8.14667 11 8ZM12.6667 8C12.6667 8.62667 12.5333 9.21333 12.3067 9.76L13.3133 10.7667C13.7533 9.94 14 9 14 8C14 5.14667 12.0067 2.76 9.33333 2.15333V3.52667C11.26 4.1 12.6667 5.88667 12.6667 8ZM2.84667 2L2 2.84667L5.15333 6H2V10H4.66667L8 13.3333V8.84667L10.8333 11.68C10.3867 12.0267 9.88667 12.3 9.33333 12.4667V13.84C10.2533 13.6333 11.0867 13.2067 11.7933 12.6333L13.1533 14L14 13.1533L2.84667 2ZM8 2.66667L6.60667 4.06L8 5.45333V2.66667Z",fill:"currentColor"})})}),nn=({progress:t})=>n.jsx("div",{className:"h-1 w-full overflow-hidden rounded-ui-sm bg-background/25",children:n.jsx("div",{className:"size-full rounded-ui-sm bg-background transition-transform",style:{transform:`translateX(-${100*(1-t)}%)`}})}),dr=3e3,fr=({src:t,poster:a,itemIndex:c})=>{const{carrouselItemIndex:s,setItemInteraction:f}=Ye(),d=l.useRef(null),E=l.useRef(null),e=l.useCallback(()=>{if(!E.current)throw new Error("videoRef.current is null");return E.current},[]);l.useEffect(()=>{f(c,"ready")},[c,f]);const _=l.useCallback(()=>{e().play()},[e]),x=l.useCallback(()=>{e().pause()},[e]);l.useEffect(()=>{s===c||x()},[s,c,x]);const[P,C]=l.useState(!1),[u,r]=l.useState(!0),I=()=>{C(!0),f(c,"running")},O=()=>{C(!1),f(c,"ready")},b=()=>{r(!1)},w=()=>{r(!0)},[L,M]=l.useState(null),h=D=>{const j=e(),ee=D.currentTarget.getBoundingClientRect(),Z=(D.clientX-ee.left)/ee.width,te=Math.min(1,Math.max(0,Z));j.volume=te,j.muted=!1},y=D=>{const j=e();j.muted=D};l.useEffect(()=>{const D=E.current;if(!D)return;const j=()=>{M({volume:D.volume,isMuted:D.muted})};return j(),D.addEventListener("volumechange",j),()=>{D.removeEventListener("volumechange",j)}},[]);const[S,J]=l.useState(null),k=S?S.currentTime/S.duration:0;l.useEffect(()=>{const D=E.current;if(!D)return;const j=()=>{const ee=D.currentTime,R=D.duration;isNaN(ee)||isNaN(R)||J({currentTime:ee,duration:R})};return j(),D.addEventListener("timeupdate",j),()=>{D.removeEventListener("timeupdate",j)}},[]);const $=D=>{const j=e(),ee=D.currentTarget.getBoundingClientRect(),Z=(D.clientX-ee.left)/ee.width,te=j.duration*Z;j.currentTime=te},U=D=>{const j=Math.floor(D%3600/60),ee=Math.floor(D%60);return`${j}:${ee.toString().padStart(2,"0")}`},[F,oe]=l.useState(!1),T=l.useRef(void 0),H=l.useCallback(()=>clearTimeout(T.current),[]),he=l.useCallback(()=>{H(),T.current=setTimeout(()=>{oe(!1)},dr)},[H]);return l.useEffect(()=>{const D=d.current,j=E.current;if(!D||!j)return;const ee=()=>{he(),oe(!0)},R=()=>{H(),oe(!1)};let Z=!1;const te=()=>{Z=!0},A=()=>{Z&&(Z=!1,x())},q=()=>{Z=!1,ee()},Q=ce=>{ce.preventDefault(),ce.touches.length===1&&(he(),oe(xe=>!xe))};return D.addEventListener("mousedown",te),D.addEventListener("mouseup",A),D.addEventListener("mouseenter",ee),D.addEventListener("mousemove",q),D.addEventListener("mouseleave",R),j.addEventListener("touchstart",Q,{passive:!0}),()=>{D.removeEventListener("mousedown",te),D.removeEventListener("mouseup",A),D.removeEventListener("mouseenter",ee),D.removeEventListener("mousemove",ee),D.removeEventListener("mouseleave",R),j.removeEventListener("touchstart",Q)}},[H,x,he]),n.jsxs("div",{ref:d,className:"relative aspect-[4/3] w-full",children:[n.jsx("video",{ref:E,className:"size-full",src:t,poster:a,disablePictureInPicture:!0,playsInline:!0,onPlay:I,onPause:O,onEnded:O,onCanPlay:b,onWaiting:w}),P?n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:de("absolute inset-x-0 bottom-0 cursor-auto space-y-2 bg-gradient-to-t from-foreground to-transparent p-4 pr-12 pt-8 transition-opacity duration-300",F?"pointer-events-auto opacity-100":"pointer-events-none opacity-0"),onMouseDownCapture:D=>D.stopPropagation(),children:[n.jsxs("div",{className:"flex items-center justify-between text-background",children:[n.jsxs("div",{className:"flex items-center gap-x-4",children:[n.jsx(Ze,{shape:"icon",variant:"ghost",color:"neutral",onClick:x,children:n.jsx(lr,{className:"size-full"})}),S&&n.jsxs("span",{className:"text-sm",children:[U(S.currentTime)," /"," ",U(S.duration)]})]}),L&&n.jsxs("div",{className:"group/volume flex items-center gap-x-4 rounded-ui-md p-2 transition-colors hover:bg-foreground/25",children:[n.jsx("div",{className:`w-12 cursor-pointer py-1 opacity-0 transition-opacity ${L.isMuted?"group-hover/volume:opacity-50":"group-hover/volume:opacity-100"}`,onClick:h,children:n.jsx(nn,{progress:L.volume})}),n.jsx("div",{className:"size-5 cursor-pointer",onClick:()=>y(!L.isMuted),children:L.isMuted?n.jsx(ur,{className:"size-full"}):n.jsx(cr,{className:"size-full"})})]})]}),n.jsx("div",{className:"cursor-pointer py-1",onClick:$,children:n.jsx(nn,{progress:k})})]}),u&&n.jsx("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center bg-foreground/25",children:n.jsx(wn,{size:"lg",color:"background"})})]}):n.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-foreground/25",children:n.jsx(ir,{onClick:_})})]})},pr=({index:t,item:a,isShown:c})=>{const{type:s}=a;let f;switch(s){case"image":f=n.jsx(kn,{itemIndex:t,onlyPreload:!c,...a});break;case"video":f=n.jsx(fr,{itemIndex:t,...a});break;case"360":f=n.jsx(sr,{itemIndex:t,onlyPreload:!c,...a});break;case"next360":f=n.jsx(Jo,{itemIndex:t,onlyPreload:!c,...a});break;case"interior-360":f=n.jsx(Xo,{itemIndex:t,onlyPreload:!c,...a});break;case"custom":f=n.jsx(Ro,{itemIndex:t,...a})}return f=n.jsx("div",{className:"grid grid-cols-[repeat(var(--max-items),1fr)]",children:f}),f},hr=t=>{l.useEffect(()=>{const a=c=>{c.key==="Escape"&&t()};return addEventListener("keydown",a),()=>{removeEventListener("keydown",a)}},[t])};function mr(t){return t.target===t.currentTarget}const gr=({className:t,children:a,isVisible:c,url:s,title:f,description:d,clickHandler:E,extendMode:e,variant:_,aspectRatioStyle:x,maxItemsShown:P=1})=>{const{isFullScreen:C,integration:u}=Be(),r=()=>_||(!u||C?"centered":"aside"),I=()=>!!(f||d),O=r(),b=w=>{if(!x)return{};switch(w){case"centered":return{...x,maxHeight:I()?"50%":"100%"};case"aside":return{...x,minHeight:0,flex:"1 1 auto"};case"fullwidth":return{...x,height:"85%"};default:return x}};return O==="centered"?n.jsx("div",{className:de(t,"absolute inset-0 z-overlay flex justify-end overflow-hidden bg-foreground/60 transition-opacity duration-details",c?"opacity-100":"pointer-events-none opacity-0"),onClick:E,children:n.jsxs("div",{className:de("flex h-full flex-col bg-background transition-transform duration-details",c?"translate-x-0":"translate-x-full",I()?"max-w-[60%]":"w-full"),children:[a,c&&n.jsxs(n.Fragment,{children:[n.jsx($e,{className:de(I()?"max-h-[50%]":"h-full","w-full bg-foreground/65 object-contain"),src:s||"",style:b("centered"),imgInPlayerWidthRatio:.6}),I()&&n.jsxs("div",{className:de("flex-1 space-y-1 overflow-y-auto px-2 py-1 small:p-3",e&&"large:p-4"),children:[f&&n.jsx("span",{className:de("text-sm font-semibold small:text-base small:font-bold",e&&"large:text-lg"),children:f}),d&&n.jsx("p",{className:de("text-xs text-foreground/65 small:text-sm",e&&"large:text-base"),children:d})]})]})]})}):O==="aside"?n.jsx("div",{className:de(t,"absolute inset-0 z-overlay flex items-center justify-center overflow-hidden bg-foreground/60 transition-opacity duration-details",c?"opacity-100":"pointer-events-none opacity-0"),onClick:E,children:n.jsxs("div",{className:de("relative flex h-full flex-col bg-background transition-transform duration-details",c?"translate-y-0":"translate-y-full"),style:{width:u?`${100/(C?1:P)}%`:`${100/P}%`},children:[a,c&&n.jsxs(n.Fragment,{children:[n.jsx($e,{className:"min-h-0 w-full flex-1 bg-foreground/65 object-contain",src:s||"",style:b("aside"),imgInPlayerWidthRatio:.6}),n.jsxs("div",{className:"min-h-[15%] shrink-0 space-y-1 p-2 small:p-3",children:[f&&n.jsx("span",{className:de("block text-xs font-semibold leading-tight small:text-base small:font-bold",e&&"large:text-lg"),children:f}),d&&n.jsx("p",{className:de("text-[10px] leading-tight text-foreground/65 small:text-sm",e&&"large:text-base"),children:d})]})]})]})}):n.jsx("div",{className:de(t,"absolute inset-0 z-overlay flex items-center justify-center overflow-hidden bg-foreground/60 transition-opacity duration-details",c?"opacity-100":"pointer-events-none opacity-0"),onClick:E,children:n.jsxs("div",{className:de("relative flex aspect-[4/3] flex-col bg-background transition-transform duration-details",c?"translate-y-0":"translate-y-full"),style:{width:u?`${100/(C?1:P)}%`:`${100/P}%`},children:[a,c&&s&&n.jsxs(n.Fragment,{children:[n.jsx($e,{className:"h-[85%] w-full bg-foreground/65 object-contain",src:s,style:b("fullwidth"),imgInPlayerWidthRatio:.6}),n.jsxs("div",{className:"h-[15%] space-y-1 overflow-y-auto px-2 py-1 small:p-3",children:[f&&n.jsx("span",{className:de("text-sm font-semibold small:text-base small:font-bold",e&&"large:text-lg"),children:f}),d&&n.jsx("p",{className:de("text-xs text-foreground/65 small:text-sm",e&&"large:text-base"),children:d})]})]})]})})},vr=({currentIndex:t,maxIndex:a})=>n.jsxs("div",{className:"space-x-0.5 rounded-ui bg-foreground/40 px-1.5 py-0.5 text-xs text-background/75 transition-radius small:space-x-1 small:px-2 small:py-1 small:text-sm",children:[n.jsx("span",{children:t+1}),n.jsx("span",{children:"/"}),n.jsx("span",{children:a+1})]}),on=({className:t})=>n.jsx(Ue,{className:t,customizationKey:"UI_ARROW_RIGHT",children:n.jsx("svg",{className:t,viewBox:"0 0 16 16",fill:"none",children:n.jsx("path",{d:"M4.07666 13.4868L5.25666 14.6668L11.9233 8.00016L5.25666 1.3335L4.07666 2.5135L9.56333 8.00016L4.07666 13.4868Z",fill:"currentColor"})})}),xr=({className:t})=>n.jsx(Ue,{className:t,customizationKey:"UI_EXTEND",children:n.jsx("svg",{className:t,viewBox:"0 0 16 16",fill:"none",children:n.jsx("path",{d:"M4.66683 9.3335H3.3335V12.6668H6.66683V11.3335H4.66683V9.3335ZM3.3335 6.66683H4.66683V4.66683H6.66683V3.3335H3.3335V6.66683ZM11.3335 11.3335H9.3335V12.6668H12.6668V9.3335H11.3335V11.3335ZM9.3335 3.3335V4.66683H11.3335V6.66683H12.6668V3.3335H9.3335Z",fill:"currentColor"})})}),wr=({className:t})=>n.jsx(Ue,{className:t,customizationKey:"UI_GALLERY",children:n.jsx("svg",{className:t,viewBox:"0 0 16 16",fill:"none",children:n.jsx("path",{d:"M13.3334 2.66683V10.6668H5.33337V2.66683H13.3334ZM13.3334 1.3335H5.33337C4.60004 1.3335 4.00004 1.9335 4.00004 2.66683V10.6668C4.00004 11.4002 4.60004 12.0002 5.33337 12.0002H13.3334C14.0667 12.0002 14.6667 11.4002 14.6667 10.6668V2.66683C14.6667 1.9335 14.0667 1.3335 13.3334 1.3335ZM7.66671 7.78016L8.79337 9.28683L10.4467 7.22016L12.6667 10.0002H6.00004L7.66671 7.78016ZM1.33337 4.00016V13.3335C1.33337 14.0668 1.93337 14.6668 2.66671 14.6668H12V13.3335H2.66671V4.00016H1.33337Z",fill:"currentColor"})})}),br=({className:t})=>n.jsx(Ue,{className:t,customizationKey:"UI_HOTSPOTS",children:n.jsxs("svg",{className:t,width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[n.jsx("g",{clipPath:"url(#clip0_418_982)",children:n.jsx("path",{d:"M6 4C4.895 4 4 4.895 4 6C4 7.105 4.895 8 6 8C7.105 8 8 7.105 8 6C8 4.895 7.105 4 6 4ZM10.47 5.5C10.24 3.415 8.585 1.76 6.5 1.53V0.5H5.5V1.53C3.415 1.76 1.76 3.415 1.53 5.5H0.5V6.5H1.53C1.76 8.585 3.415 10.24 5.5 10.47V11.5H6.5V10.47C8.585 10.24 10.24 8.585 10.47 6.5H11.5V5.5H10.47ZM6 9.5C4.065 9.5 2.5 7.935 2.5 6C2.5 4.065 4.065 2.5 6 2.5C7.935 2.5 9.5 4.065 9.5 6C9.5 7.935 7.935 9.5 6 9.5Z",fill:"currentColor"})}),n.jsx("defs",{children:n.jsx("clipPath",{id:"clip0_418_982",children:n.jsx("rect",{width:"12",height:"12",fill:"white"})})})]})}),yr=({className:t})=>n.jsx(Ue,{className:t,customizationKey:"UI_MINUS",children:n.jsx("svg",{className:t,width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:n.jsx("path",{d:"M12.6666 8.66634H3.33325V7.33301H12.6666V8.66634Z",fill:"currentColor"})})}),Er=({className:t})=>n.jsx(Ue,{className:t,customizationKey:"UI_PLUS",children:n.jsx("svg",{className:t,width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:n.jsx("path",{d:"M12.6666 8.66634H8.66659V12.6663H7.33325V8.66634H3.33325V7.33301H7.33325V3.33301H8.66659V7.33301H12.6666V8.66634Z",fill:"currentColor"})})}),Cr=({className:t})=>n.jsx(Ue,{className:t,customizationKey:"UI_REDUCE",children:n.jsx("svg",{className:t,viewBox:"0 0 16 16",fill:"none",children:n.jsx("path",{d:"M3.33325 10.6668H5.33325V12.6668H6.66659V9.3335H3.33325V10.6668ZM5.33325 5.3335H3.33325V6.66683H6.66659V3.3335H5.33325V5.3335ZM9.33325 12.6668H10.6666V10.6668H12.6666V9.3335H9.33325V12.6668ZM10.6666 5.3335V3.3335H9.33325V6.66683H12.6666V5.3335H10.6666Z",fill:"currentColor"})})}),Mr=({enabled:t,onToggle:a,label:c,className:s,children:f})=>n.jsxs("label",{className:de("flex cursor-pointer items-center justify-center gap-x-2",s),children:[n.jsx("input",{type:"checkbox",className:"sr-only",checked:t,onChange:a}),c&&n.jsx("div",{className:"text-xs text-background",children:c}),n.jsx("div",{className:de("flex h-5 w-8 items-center justify-center rounded-full transition-colors",t?"bg-primary":"bg-background/60"),children:n.jsx("div",{className:de("flex size-4 items-center justify-center rounded-full p-0.5 transition",t?"translate-x-1.5 bg-primary-foreground text-primary":"-translate-x-1.5 bg-background text-foreground"),children:f})})]}),_r=({className:t})=>n.jsx(Ue,{className:t,customizationKey:"UI_BURGER",children:n.jsx("svg",{className:t,width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:n.jsx("path",{d:"M2 12H14V10.6667H2V12ZM2 8.66667H14V7.33333H2V8.66667ZM2 4V5.33333H14V4H2Z",fill:"currentColor"})})}),kr=({sharedClassName:t})=>{const{categories:a}=tt(),{displayedCategoryId:c,changeCategory:s}=Ye(),[f,d]=l.useState(!1),E=()=>{d(!f)},e=()=>{d(!1)};return n.jsxs(n.Fragment,{children:[f&&n.jsx("div",{className:de(t,"inset-0 small:hidden"),onClick:e}),n.jsxs("div",{className:de(t,st("top-left"),"flex gap-x-2 small:hidden"),children:[n.jsx(Ze,{shape:"icon",color:f?"primary":"neutral",onClick:E,children:n.jsx(_r,{})}),f&&n.jsx("div",{className:"rounded-ui-md bg-background transition-radius",children:n.jsx("ul",{className:"space-y-0.5 p-1",children:a.map(({id:_,title:x})=>n.jsx("li",{className:de("cursor-pointer rounded-ui px-2 py-1 text-sm font-bold transition-all hover:bg-primary/30",_===c&&"bg-primary/50"),onClick:()=>{s(_),d(!1)},children:x},_))})})]}),n.jsx("div",{className:de(t,xn("top"),"w-full overflow-x-auto max-small:hidden"),children:n.jsx("div",{className:"mx-auto flex w-fit gap-x-1 rounded-ui-md bg-background p-1 shadow",children:a.map(({id:_,title:x})=>n.jsx(Ze,{variant:_===c?"fill":"ghost",onClick:()=>s(_),children:x},_))})})]})},Lr=()=>{const{hideCategoriesNav:t,infiniteCarrousel:a,permanentGallery:c,extendBehavior:s,maxItemsShown:f,isFullScreen:d,integration:E}=Be(),{aspectRatioStyle:e,categories:{length:_}}=tt(),{items:{length:x},slidable:P,carrouselItemIndex:C,masterItemIndex:u,prevItem:r,nextItem:I,showGalleryControls:O,enableHotspotsControl:b,currentItemHotspotsVisible:w,toggleHotspots:L,showGallery:M,toggleGallery:h,extendMode:y,toggleExtendMode:S,shownDetails:J,isShowingDetails:k,resetShownDetails:$,showZoomControls:U,isZooming:F,canZoomIn:oe,zoomIn:T,canZoomOut:H,zoomOut:he,resetView:D}=Ye(),j=l.useCallback(te=>{mr(te)&&$()},[$]);hr($);const ee="absolute z-overlay",R=()=>{if(f===1)return C;const A=Math.floor(f)-1;return C+A},Z=()=>{if(!E)return u;const A=Math.floor(f)-1;return u+A};return n.jsxs(n.Fragment,{children:[!t&&_>1&&n.jsx(kr,{sharedClassName:de(ee,"transition-opacity",F?"!pointer-events-none opacity-0":"opacity-100")}),P&&!F&&n.jsx("div",{className:de(ee,st("top-right")),children:n.jsx(vr,{currentIndex:!E||d?C:R(),maxIndex:x-1})}),P&&n.jsxs(n.Fragment,{children:[n.jsx(Ze,{shape:"icon",color:"neutral",className:de(ee,st("middle-left"),F?"!pointer-events-none opacity-0":"opacity-100"),onClick:r,disabled:!a&&u<=0,children:n.jsx(Ue,{customizationKey:"CONTROLS_PREV",children:n.jsx(on,{className:"size-full -scale-x-100"})})}),n.jsx(Ze,{shape:"icon",color:"neutral",className:de(ee,st("middle-right"),F?"!pointer-events-none opacity-0":"opacity-100"),onClick:I,disabled:!a&&Z()>=x-1,children:n.jsx(Ue,{customizationKey:"CONTROLS_NEXT",children:n.jsx(on,{className:"size-full"})})})]}),n.jsxs("div",{className:de(ee,st("bottom-fullW"),"pointer-events-none grid grid-cols-[auto,1fr,auto] items-end *:pointer-events-auto small:gap-x-2"),children:[!c&&P&&n.jsxs(n.Fragment,{children:[n.jsx(Ze,{className:O&&!F?"opacity-100":"!pointer-events-none opacity-0",variant:"fill",color:M?"primary":"neutral",shape:"icon",onClick:h,children:n.jsx(wr,{className:"size-full"})}),M&&n.jsx(Mn,{className:de("transition-opacity",O&&!F?"opacity-100":"!pointer-events-none opacity-0","[mask-image:linear-gradient(to_left,transparent_0px,black_4px,black_calc(100%-4px),transparent_100%)]"),containerClassName:"mx-1"})]}),n.jsxs("div",{className:"col-start-3 flex flex-col items-end gap-y-1 small:gap-y-2",children:[b&&n.jsx(Mr,{className:de("transition-opacity",F?"!pointer-events-none opacity-0":"opacity-100"),enabled:w,onToggle:L,children:n.jsx(br,{className:"size-full"})}),U&&(!E||d)&&n.jsxs("div",{className:"max-small:hidden",children:[n.jsx(Ze,{className:"rounded-b-none",color:"neutral",shape:"icon",disabled:!oe,onClick:T,children:n.jsx(Er,{className:"size-full"})}),n.jsx(Cn,{color:"background"}),n.jsx(Ze,{className:"rounded-t-none",color:"neutral",shape:"icon",disabled:!H,onClick:he,children:n.jsx(yr,{className:"size-full"})})]}),s!=="none"&&n.jsx(Ze,{variant:"fill",color:y?"primary":"neutral",shape:"icon",onClick:S,children:y?n.jsx(Cr,{className:"size-full"}):n.jsx(xr,{className:"size-full"})})]})]}),n.jsx(gr,{isVisible:k,className:ee,url:J?.src,title:J?.title,description:J?.text,clickHandler:j,extendMode:y,maxItemsShown:f,aspectRatioStyle:e,children:n.jsx(kt,{className:"absolute right-2 top-2 z-10",onClick:$})}),F&&n.jsx(kt,{className:de(ee,st("top-right")),onClick:D})]})},Ir=({className:t=""})=>{const{infiniteCarrousel:a,preloadRange:c,isFullScreen:s,maxItemsShown:f,integration:d}=Be(),{aspectRatioStyle:E}=tt(),{items:e,slidable:_,carrouselItemIndex:x,setCarrouselItemIndex:P,itemIndexCommand:C,setItemIndexCommand:u,specialCommand:r,isRunningSpecialCommand:I,finishSpecialCommand:O,extendMode:b,extendTransition:w}=Ye(),{effectiveMaxItemsShown:L}=pn(),M=l.useRef(null),h=l.useCallback(R=>{if(!M.current)throw new Error(`[${R??"sliderOrThrow"}] slider.current is null`);return M.current},[]),y=l.useRef(!1),S=l.useRef(null),J=l.useRef(null),k=l.useRef(null),$=l.useCallback(()=>{k.current&&cancelAnimationFrame(k.current)},[]),U=l.useCallback(()=>{const R=h("computeClosestSnapIndex"),Z=Array.from(R.children),te=R.scrollLeft;let A=0,q=1/0;if(Z.forEach((Q,ce)=>{const z=Q.offsetLeft,xe=Math.abs(z-te);xe<q&&(q=xe,A=ce)}),L>1){const Q=Math.ceil(L),ce=e.length+(d&&!a&&L%1!==0?1:0),z=Math.max(0,ce-Q);if(A=Math.min(A,z),d&&!a&&L%1!==0){const xe=e.length-1;A=Math.min(A,xe)}}return A},[h,L,e.length,a,d]),F=l.useCallback(R=>{const Z=h("setStyleCursor");Z.style.cursor=R},[h]),oe=l.useCallback(R=>{const Z=h("setStyleSnapState");R==="mandatory"?Z.style.scrollSnapType="x mandatory":Z.style.scrollSnapType="none"},[h]),T=l.useCallback((R,Z,te)=>{$();const A=h("scrollToIndex"),q=Array.from(A.children),Q=A.scrollLeft;let ce=q[R].offsetLeft;const z=A.clientWidth,xe=A.scrollWidth-z;if(L>1){const v=Math.ceil(L),W=e.length+(d&&!a&&L%1!==0?1:0);R>=W-v&&(ce=Math.min(ce,xe))}const ne=v=>{A.scrollTo({left:v,behavior:"instant"})},be=()=>{ne(ce),oe("mandatory"),te?.()},Pe=Math.abs(Q-ce);if(Pe<1||Z==="instant"){be();return}const Fe=Ke(Pe/2.5,300,1e3),He=new Date().getTime();oe("none");const p=()=>{const v=()=>{const G=new Date().getTime()-He;if(G>=Fe){be();return}const B=Math.min(G/Fe,1),g=_n(B),ae=mt(Q,ce,g);ne(ae),p()};k.current=requestAnimationFrame(v)};p()},[$,h,L,oe,e.length,d,a]),[H,he]=l.useState(),D=!!H;l.useEffect(()=>{const R=()=>{clearTimeout(H);const Z=setTimeout(()=>{he(void 0)},fn);he(Z)};return addEventListener("resize",R),document.addEventListener("fullscreenchange",R),()=>{removeEventListener("resize",R),document.removeEventListener("fullscreenchange",R)}},[H]),l.useEffect(()=>{if(r)return;const R=U();Number.isNaN(R)||R!==x&&T(x,"instant")},[x,U,T,r,e,H,s,b,w]),l.useEffect(()=>{if(!_||I){F("auto");return}const R=M.current;if(!R)return;F("grab"),oe("mandatory");const Z=q=>{q.button===0&&(q.preventDefault(),q.stopPropagation(),$(),y.current=!0,S.current=q.pageX-R.offsetLeft,J.current=R.scrollLeft,F("grabbing"))},te=q=>{if(!y.current)return;if(S.current===null)throw new Error("[onMouseMove] startX is null");oe("none");const ce=q.pageX-R.offsetLeft-S.current;requestAnimationFrame(()=>{if(J.current===null)throw new Error("[onMouseMove] scrollLeft is null");let z=J.current-ce;if(!a){const xe=R.scrollWidth-R.clientWidth;z>xe&&(z=xe)}R.scrollLeft=z})},A=()=>{if(!y.current)return;y.current=!1,F("grab");const q=U();T(q,"smooth")};return R.addEventListener("mousedown",Z),document.addEventListener("mousemove",te),document.addEventListener("mouseleave",A),document.addEventListener("mouseup",A),document.addEventListener("contextmenu",A),()=>{R.removeEventListener("mousedown",Z),document.removeEventListener("mousemove",te),document.removeEventListener("mouseleave",A),document.removeEventListener("mouseup",A),document.removeEventListener("contextmenu",A)}},[$,U,a,I,T,F,oe,_]),l.useEffect(()=>{if(w||D)return;const R=M.current;if(!R)return;const Z=()=>{const te=U();Number.isNaN(te)||(P(te),te===C&&u(null))};return R.addEventListener("scroll",Z),()=>{R.removeEventListener("scroll",Z)}},[U,w,D,C,f,P,u]),l.useEffect(()=>{if(C===null)return;const R=()=>{setTimeout(()=>{u(null),O()},75)};switch(r){case"first_to_last":{const Z=Math.ceil(L),te=e.length+(d&&!a&&L%1!==0?1:0),A=L>1?Math.max(0,te-Z):e.length-1;T(A,"instant",R);break}case"last_to_first":T(0,"instant",R);break;case"instant":T(C,"instant",R);break;default:T(C,"smooth");break}},[r,O,C,e.length,T,u,L,a,d]);const j=l.useMemo(()=>!d||s?E:{aspectRatio:"auto"},[d,s,E]),ee=l.useMemo(()=>({...E,minWidth:`${100/L}%`,width:`${100/L}%`,flexShrink:0}),[E,L]);return n.jsxs("div",{className:de("relative overflow-hidden rounded-carrousel transition-radius",t),style:j,children:[n.jsxs("div",{ref:M,className:`flex size-full ${_?"overflow-x-auto no-scrollbar *:snap-start *:snap-always":"justify-center"}`,children:[e.map((R,Z)=>{const te=Z===x,A=Z===0,q=Z===e.length-1,Q=(()=>{const be=Math.ceil(L);if(r==="first_to_last"&&A)return{transform:`translateX(${100*e.length/be}%)`};if(r==="last_to_first"&&q)return{transform:`translateX(-${100*e.length/be}%)`}})(),ce=Math.ceil(L),z=Math.max(c,ce);let xe=Math.abs(Z-x)<=z;xe||=Z===C,xe||=Z>=x&&Z<x+ce,a&&(xe||=x<z&&e.length-Z<=z-x,xe||=x>=e.length-z&&Z<=z-(e.length-x));const ne=(()=>{let be;switch(R.type){case"360":be=R.images[0].src;break;case"interior-360":be=R.poster??"interior-360";break;case"image":be=R.src;break;case"video":be=R.poster??"video";break;case"custom":be="custom";break;default:be="unknown"}return`${Z}_${be}`})();return n.jsx("div",{className:de("h-full bg-foreground/35",x===Z&&"z-1"),style:{...ee,...Q},children:xe&&n.jsx(pr,{index:Z,item:R,isShown:te})},ne)}),d&&!a&&!s&&f%1!==0&&n.jsx("div",{className:"h-full",style:ee},"empty-slide")]}),n.jsx(Lr,{})]})},Tr=()=>{const{permanentGallery:t,integration:a}=Be(),{aspectRatioStyle:c}=tt(),{isShowingDetails:s,resetShownDetails:f,extendMode:d,disableExtendMode:E,isZooming:e,resetZoom:_,fakeFullScreen:x}=Ye(),P=l.useRef(null),C=l.useRef(null),u=l.useRef(null);return l.useEffect(()=>{if(!d)return;const r=P.current,I=C.current,O=u.current;if(!r||!I||!O)return;let b=!1;const w=h=>[r,I,O].includes(h.target),L=h=>{b=w(h)},M=h=>{b&&(w(h)&&E(),b=!1)};return r.addEventListener("mousedown",L),r.addEventListener("mouseup",M),()=>{r.removeEventListener("mousedown",L),r.removeEventListener("mouseup",M)}},[E,d]),l.useEffect(()=>{const r=I=>{I.key==="Escape"&&(e?_():s?f():E())};return addEventListener("keydown",r),()=>{removeEventListener("keydown",r)}},[E,s,e,f,_]),n.jsxs("div",{ref:P,className:de("relative",d&&"flex size-full items-center justify-center",x&&"fixed inset-0 z-overlay bg-foreground/75"),children:[n.jsxs("div",{ref:C,className:d?"flex size-full flex-col justify-center gap-y-2 small:gap-y-4":"space-y-2",children:[n.jsx("div",{ref:u,className:de(d&&"mx-auto flex min-h-0 w-full max-w-[1600px] justify-center"),style:a?{}:c,children:n.jsx(Ir,{className:de(d&&"h-full min-w-0")})}),t&&n.jsx(Mn,{className:de(d&&"my-2 shrink-0 small:my-4")})]}),d&&n.jsx(kt,{className:"absolute right-2 top-2 small:right-4 small:top-4",onClick:E})]})},Sr=()=>{const{emitEvent:t,compositionUrl:a}=Be(),{data:c,status:s,isSuccess:f,error:d}=co(a);return l.useEffect(()=>{d?t(Rt,d):s==="fetching"?t(Tt,a):f&&t(St,c)},[c,a,t,d,f,s]),d?n.jsx(wt,{className:"aspect-square text-foreground/70",text:"Player could not be loaded"}):f?n.jsx(fo,{composition:c,children:n.jsx(mo,{children:n.jsx(Tr,{})})}):n.jsxs("div",{className:"flex aspect-square size-full flex-col items-center justify-center gap-y-4",children:[n.jsx("div",{className:"animate-pulse text-xl",children:"Loading Player"}),n.jsx(wn,{color:"foreground"})]})},Rr={hideCategoriesNav:!0,infiniteCarrousel:!1,permanentGallery:!1},Nr=[1,1.5,2,2.5],Pr=()=>l.useMemo(()=>ro(),[]),jr=()=>l.useMemo(()=>ao(),[]),Ar=()=>l.useMemo(()=>so(),[]),zr=({compositionUrl:t,integration:a=Kn,maxItemsShown:c=ln,hideCategoriesNav:s=Dn,infiniteCarrousel:f=On,permanentGallery:d=Hn,mediaLoadStrategy:E=Fn,minMediaWidth:e=Vn,maxMediaWidth:_=Un,preloadRange:x=Wn,autoLoad360:P=Bn,autoLoadInterior360:C=Yn,categoriesFilter:u=Xn,extendBehavior:r=Gn,eventPrefix:I=Dt,demoSpin:O=Zn,reverse360:b=qn,analyticsEventPrefix:w=cn,analyticsUrl:L=$n,analyticsBearer:M=Qn,analyticsSimpleRequestsOnly:h=Jn,analyticsDryRun:y=eo,analyticsDebug:S=to,children:J})=>{c=po(c,Nr);const k=l.useRef(null),[$,U]=l.useState(.5),[F,oe]=l.useState(!1),T=l.useCallback((te,A)=>{const q=I+te,Q=new CustomEvent(q,{detail:A});document.dispatchEvent(Q)},[I]),H=Pr(),he=jr(),D=Ar(),j=l.useCallback(async te=>{try{const q={...{type:te.type,timestamp:new Date().toISOString(),instance_id:D},...te};if(y){console.log("[DRY RUN] AnalyticsEvent:",q);return}const Q=w+te.type,ce=new CustomEvent(Q,{detail:q});if(document.dispatchEvent(ce),L){const z="POST",xe=new Headers;h||(xe.append("Content-Type","application/json"),xe.append("Cache-Control","no-cache"),M&&xe.append("Authorization",`Bearer ${M}`));const ne=JSON.stringify(q);await fetch(L,{method:z,headers:xe,body:ne})}}catch(A){if(!S)return;console.error("Error while sending analytics event:",A)}},[w,L,M,h,y,S,D]),[ee]=l.useState({type:"identify",browser_id:H,session_id:he,referrer:document.referrer,origin:window.location.origin,page_url:window.location.href,user_agent:navigator.userAgent,wp_properties:{composition_url:t,integration:a,max_items_shown:c,hide_categories_nav:s,infinite_carrousel:f,permanent_gallery:d,media_load_strategy:E,min_media_width:e,max_media_width:_,preload_range:x,auto_load_360:P,auto_load_interior_360:C,categories_filter:u,extend_behavior:r,event_prefix:I,demo_spin:O,reverse_360:b}});l.useEffect(()=>{const te=setTimeout(()=>j(ee),0);return()=>clearTimeout(te)},[j,ee]),l.useEffect(()=>{if(F){U(1);return}if(!k.current)return;const te=k.current,A=()=>{const q=window.innerWidth,Q=te.clientWidth;U(Q/q)};return A(),addEventListener("resize",A),()=>{removeEventListener("resize",A)}},[F]),l.useEffect(()=>{if(r!=="full_screen")return;const te=k.current;if(!te)throw new Error("Wrapper not found");const A=()=>{const{fullscreenElement:q}=document;oe(q===te||q?.localName===xt)};return document.addEventListener("fullscreenchange",A),()=>{document.removeEventListener("fullscreenchange",A)}},[r]);const R=l.useCallback(async()=>{const te=k.current;if(!te)throw new Error("Wrapper not found");try{return await te.requestFullscreen(),!0}catch{return!1}},[]),Z=l.useCallback(async()=>{try{return await document.exitFullscreen(),!0}catch{return!1}},[]);return n.jsx(uo,{compositionUrl:t,integration:a,hideCategoriesNav:s,infiniteCarrousel:f,permanentGallery:d,maxItemsShown:c,mediaLoadStrategy:E,minMediaWidth:e,maxMediaWidth:_,preloadRange:x,categoriesFilter:u,autoLoad360:P,autoLoadInterior360:C,extendBehavior:r,demoSpin:O,reverse360:b,emitEvent:T,emitAnalyticsEvent:j,playerInViewportWidthRatio:$,isFullScreen:F,requestFullscreen:R,exitFullscreen:Z,...a?Rr:{},children:n.jsxs(ho,{children:[n.jsx("div",{ref:k,className:"select-none text-foreground",style:{"--background":"var(--cc-webplayer-background, 0 0% 100%)","--foreground":"var(--cc-webplayer-foreground, 240 10% 3.9%)","--primary":"var(--cc-webplayer-primary, 216 100% 52%)","--primary-foreground":"var(--cc-webplayer-primary-foreground, var(--background))","--primary-light":"var(--cc-webplayer-primary-light, var(--primary))","--neutral":"var(--cc-webplayer-neutral, 0 0% 39%)","--neutral-foreground":"var(--cc-webplayer-neutral-foreground, var(--foreground))","--radius-ui":"var(--cc-webplayer-radius-ui, 16px)","--radius-carrousel":"var(--cc-webplayer-radius-carrousel, 0)","--radius-gallery":"var(--cc-webplayer-radius-gallery, 0)","--hotspot-damage-color":"hsl(var(--cc-webplayer-hotspot-damage-color, 37 89% 52%))","--hotspot-feature-color":"hsl(var(--cc-webplayer-hotspot-feature-color, var(--primary)))"},children:n.jsx(Sr,{})}),J]})})},Dr=({children:t,index:a,thumbnailSrc:c})=>{const{registerCustomMedia:s,unregisterCustomMedia:f}=lt();return l.useEffect(()=>{if(!t)return;const d=s({Media:t,index:a,thumbnailSrc:c});return()=>{f(d)}},[t,f,a,s,c]),null},Or=t=>Ht()?n.jsx(Dr,{...t}):n.jsx("slot",{}),Hr=({name:t,children:a})=>{const{registerIconConfig:c,unregisterIconConfig:s}=lt();return l.useEffect(()=>{if(a)return c(t,{Icon:a}),()=>{s(t)}},[a,t,c,s]),null},Fr=t=>Ht()?n.jsx(Hr,{...t}):n.jsx("slot",{}),Vr=`*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:currentColor}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.\\!container{width:100%!important}.container{width:100%}@media (min-width: 1280px){.\\!container{max-width:1280px!important}.container{max-width:1280px}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.\\!pointer-events-none{pointer-events:none!important}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.visible{visibility:visible}.invisible{visibility:hidden}.fixed{position:fixed}.\\!absolute{position:absolute!important}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{inset:0}.inset-x-0{left:0;right:0}.inset-x-1{left:4px;right:4px}.inset-y-1{top:4px;bottom:4px}.-bottom-1{bottom:-4px}.-left-1{left:-4px}.-right-1{right:-4px}.-top-1{top:-4px}.bottom-0{bottom:0}.bottom-1{bottom:4px}.left-0{left:0}.left-1{left:4px}.left-1\\/2{left:50%}.right-1{right:4px}.right-2{right:8px}.top-0{top:0}.top-1{top:4px}.top-1\\/2{top:50%}.top-2{top:8px}.-z-10{z-index:-10}.-z-20{z-index:-20}.z-1{z-index:1}.z-10,.z-hotspot{z-index:10}.z-overlay{z-index:30}.z-zoomed-image{z-index:20}.col-start-3{grid-column-start:3}.mx-1{margin-left:4px;margin-right:4px}.mx-auto{margin-left:auto;margin-right:auto}.my-2{margin-top:8px;margin-bottom:8px}.-ml-px{margin-left:-1px}.-mt-px{margin-top:-1px}.block{display:block}.inline-block{display:inline-block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.aspect-\\[4\\/3\\]{aspect-ratio:4/3}.aspect-square{aspect-ratio:1 / 1}.size-1{width:4px;height:4px}.size-12{width:48px;height:48px}.size-20{width:80px;height:80px}.size-4{width:16px;height:16px}.size-5{width:20px;height:20px}.size-8{width:32px;height:32px}.size-full{width:100%;height:100%}.h-1{height:4px}.h-10{height:40px}.h-20{height:80px}.h-3\\/4{height:75%}.h-5{height:20px}.h-8{height:32px}.h-\\[15\\%\\]{height:15%}.h-\\[85\\%\\]{height:85%}.h-full{height:100%}.h-px{height:1px}.max-h-\\[50\\%\\]{max-height:50%}.min-h-0{min-height:0}.min-h-\\[15\\%\\]{min-height:15%}.w-12{width:48px}.w-3\\/5{width:60%}.w-8{width:32px}.w-\\[calc\\(100\\%\\+1024px\\)\\]{width:calc(100% + 1024px)}.w-\\[calc\\(100\\%\\+2px\\)\\]{width:calc(100% + 2px)}.w-fit{width:-moz-fit-content;width:fit-content}.w-full{width:100%}.w-max{width:-moz-max-content;width:max-content}.w-px{width:1px}.min-w-0{min-width:0}.max-w-40{max-width:160px}.max-w-\\[1600px\\]{max-width:1600px}.max-w-\\[60\\%\\]{max-width:60%}.flex-1{flex:1 1 0%}.shrink-0{flex-shrink:0}.origin-top-left{transform-origin:top left}.-translate-x-1\\.5{--tw-translate-x: -6px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-x-1\\/2{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-0{--tw-translate-x: 0;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-1\\.5{--tw-translate-x: 6px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-full{--tw-translate-x: 100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-0{--tw-translate-y: 0;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-full{--tw-translate-y: 100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-100{--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-105{--tw-scale-x: 1.05;--tw-scale-y: 1.05;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-scale-x-100{--tw-scale-x: -1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes hotspot-ping{0%{transform:scale(0)}25%{opacity:1}75%,to{transform:scale(1.5);opacity:0}}.animate-hotspot-ping{animation:hotspot-ping 3s cubic-bezier(0,0,.2,1) infinite}@keyframes pulse{50%{opacity:1}0%,to{opacity:0}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes rotation{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.animate-rotation{animation:rotation 1s linear infinite}.cursor-auto{cursor:auto}.cursor-ew-resize{cursor:ew-resize}.cursor-grab{cursor:grab}.cursor-grabbing{cursor:grabbing}.cursor-help{cursor:help}.cursor-move{cursor:move}.cursor-pointer{cursor:pointer}.resize{resize:both}.grid-cols-\\[auto\\,1fr\\,auto\\]{grid-template-columns:auto 1fr auto}.grid-cols-\\[repeat\\(var\\(--max-items\\)\\,1fr\\)\\]{grid-template-columns:repeat(var(--max-items),1fr)}.flex-col{flex-direction:column}.items-end{align-items:flex-end}.items-center{align-items:center}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:4px}.gap-x-1{-moz-column-gap:4px;column-gap:4px}.gap-x-2{-moz-column-gap:8px;column-gap:8px}.gap-x-4{-moz-column-gap:16px;column-gap:16px}.gap-y-1{row-gap:4px}.gap-y-2{row-gap:8px}.gap-y-4{row-gap:16px}.space-x-0\\.5>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(2px * var(--tw-space-x-reverse));margin-left:calc(2px * calc(1 - var(--tw-space-x-reverse)))}.space-y-0\\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(2px * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(2px * var(--tw-space-y-reverse))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(4px * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(4px * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(8px * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(8px * var(--tw-space-y-reverse))}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.overflow-x-scroll{overflow-x:scroll}.text-pretty{text-wrap:pretty}.rounded-carrousel{border-radius:var(--radius-carrousel)}.rounded-full{border-radius:9999px}.rounded-gallery{border-radius:var(--radius-gallery)}.rounded-ui{border-radius:var(--radius-ui)}.rounded-ui-md{border-radius:calc(var(--radius-ui) + 2px)}.rounded-ui-sm{border-radius:calc(var(--radius-ui) - 2px)}.rounded-b-none{border-bottom-right-radius:0;border-bottom-left-radius:0}.rounded-t-none{border-top-left-radius:0;border-top-right-radius:0}.border{border-width:1px}.border-2{border-width:2px}.border-4{border-width:4px}.border-background{border-color:hsl(var(--background))}.border-foreground{border-color:hsl(var(--foreground))}.border-primary{border-color:hsl(var(--primary))}.border-b-transparent{border-bottom-color:transparent}.bg-background{background-color:hsl(var(--background))}.bg-background\\/25{background-color:hsl(var(--background) / .25)}.bg-background\\/50{background-color:hsl(var(--background) / .5)}.bg-background\\/60{background-color:hsl(var(--background) / .6)}.bg-foreground\\/25{background-color:hsl(var(--foreground) / .25)}.bg-foreground\\/30{background-color:hsl(var(--foreground) / .3)}.bg-foreground\\/35{background-color:hsl(var(--foreground) / .35)}.bg-foreground\\/40{background-color:hsl(var(--foreground) / .4)}.bg-foreground\\/50{background-color:hsl(var(--foreground) / .5)}.bg-foreground\\/60{background-color:hsl(var(--foreground) / .6)}.bg-foreground\\/65{background-color:hsl(var(--foreground) / .65)}.bg-foreground\\/75{background-color:hsl(var(--foreground) / .75)}.bg-neutral\\/50{background-color:hsl(var(--neutral) / .5)}.bg-primary{background-color:hsl(var(--primary))}.bg-primary-foreground{background-color:hsl(var(--primary-foreground))}.bg-primary\\/50{background-color:hsl(var(--primary) / .5)}.bg-transparent{background-color:transparent}.bg-gradient-to-t{background-image:linear-gradient(to top,var(--tw-gradient-stops))}.from-foreground{--tw-gradient-from: hsl(var(--foreground)) var(--tw-gradient-from-position);--tw-gradient-to: hsl(var(--foreground) / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.to-transparent{--tw-gradient-to: transparent var(--tw-gradient-to-position)}.object-contain{-o-object-fit:contain;object-fit:contain}.object-cover{-o-object-fit:cover;object-fit:cover}.p-0\\.5{padding:2px}.p-1{padding:4px}.p-2{padding:8px}.p-4{padding:16px}.px-1\\.5{padding-left:6px;padding-right:6px}.px-2{padding-left:8px;padding-right:8px}.py-0\\.5{padding-top:2px;padding-bottom:2px}.py-1{padding-top:4px;padding-bottom:4px}.pl-6{padding-left:24px}.pr-12{padding-right:48px}.pr-4{padding-right:16px}.pt-8{padding-top:32px}.text-2xl{font-size:24px;line-height:32px}.text-\\[10px\\]{font-size:10px}.text-sm{font-size:14px;line-height:20px}.text-xl{font-size:20px;line-height:28px}.text-xs{font-size:12px;line-height:16px}.font-bold{font-weight:700}.font-semibold{font-weight:600}.leading-tight{line-height:1.25}.text-background{color:hsl(var(--background))}.text-background\\/75{color:hsl(var(--background) / .75)}.text-foreground{color:hsl(var(--foreground))}.text-foreground\\/65{color:hsl(var(--foreground) / .65)}.text-foreground\\/70{color:hsl(var(--foreground) / .7)}.text-neutral-foreground{color:hsl(var(--neutral-foreground))}.text-primary{color:hsl(var(--primary))}.text-primary-foreground{color:hsl(var(--primary-foreground))}.opacity-0{opacity:0}.opacity-100{opacity:1}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.ring{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.invert{--tw-invert: invert(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-\\[width\\]{transition-property:width;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-radius{transition-property:border-radius;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}.duration-details{transition-duration:.35s}.no-scrollbar{scrollbar-width:none;-ms-overflow-style:none}.no-scrollbar::-webkit-scrollbar{display:none}.\\[mask-image\\:linear-gradient\\(to_left\\,transparent_0px\\,black_4px\\,black_calc\\(100\\%-4px\\)\\,transparent_100\\%\\)\\]{-webkit-mask-image:linear-gradient(to left,transparent 0px,black 4px,black calc(100% - 4px),transparent 100%);mask-image:linear-gradient(to left,transparent 0px,black 4px,black calc(100% - 4px),transparent 100%)}.\\*\\:pointer-events-auto>*{pointer-events:auto}.\\*\\:size-full>*{width:100%;height:100%}.\\*\\:snap-start>*{scroll-snap-align:start}.\\*\\:snap-always>*{scroll-snap-stop:always}.\\*\\:object-cover>*{-o-object-fit:cover;object-fit:cover}.after\\:absolute:after{content:var(--tw-content);position:absolute}.after\\:inset-0:after{content:var(--tw-content);inset:0}.after\\:rounded-gallery:after{content:var(--tw-content);border-radius:var(--radius-gallery)}.after\\:border-2:after{content:var(--tw-content);border-width:2px}.after\\:border-primary:after{content:var(--tw-content);border-color:hsl(var(--primary))}.after\\:opacity-0:after{content:var(--tw-content);opacity:0}.after\\:opacity-100:after{content:var(--tw-content);opacity:1}.after\\:transition-all:after{content:var(--tw-content);transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.hover\\:z-hotspot-hover:hover{z-index:11}.hover\\:bg-foreground\\/25:hover{background-color:hsl(var(--foreground) / .25)}.hover\\:bg-primary\\/25:hover{background-color:hsl(var(--primary) / .25)}.hover\\:bg-primary\\/30:hover{background-color:hsl(var(--primary) / .3)}.hover\\:opacity-80:hover{opacity:.8}.hover\\:after\\:opacity-70:hover:after{content:var(--tw-content);opacity:.7}.disabled\\:opacity-60:disabled{opacity:.6}.group:hover .group-hover\\:pointer-events-auto{pointer-events:auto}.group\\/volume:hover .group-hover\\/volume\\:opacity-100{opacity:1}.group\\/volume:hover .group-hover\\/volume\\:opacity-50{opacity:.5}.group:hover .group-hover\\:opacity-100{opacity:1}@media ((orientation: portrait) and (max-width: 767px)) or ((orientation: landscape) and (max-width: 1023px)){.max-small\\:hidden{display:none}}@media ((orientation: portrait) and (min-width: 768px)) or ((orientation: landscape) and (min-width: 1024px)){.small\\:inset-x-2{left:8px;right:8px}.small\\:inset-y-2{top:8px;bottom:8px}.small\\:bottom-2{bottom:8px}.small\\:left-2{left:8px}.small\\:right-2{right:8px}.small\\:right-4{right:16px}.small\\:top-2{top:8px}.small\\:top-4{top:16px}.small\\:my-4{margin-top:16px;margin-bottom:16px}.small\\:hidden{display:none}.small\\:h-12{height:48px}.small\\:h-28{height:112px}.small\\:max-w-48{max-width:192px}.small\\:gap-2{gap:8px}.small\\:gap-x-2{-moz-column-gap:8px;column-gap:8px}.small\\:gap-y-2{row-gap:8px}.small\\:gap-y-4{row-gap:16px}.small\\:space-x-1>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(4px * var(--tw-space-x-reverse));margin-left:calc(4px * calc(1 - var(--tw-space-x-reverse)))}.small\\:p-3{padding:12px}.small\\:px-2{padding-left:8px;padding-right:8px}.small\\:py-1{padding-top:4px;padding-bottom:4px}.small\\:pl-8{padding-left:32px}.small\\:pr-6{padding-right:24px}.small\\:text-base{font-size:16px;line-height:24px}.small\\:text-sm{font-size:14px;line-height:20px}.small\\:font-bold{font-weight:700}}@media (min-width: 1280px){.large\\:h-20{height:80px}.large\\:h-3\\/5{height:60%}.large\\:max-w-56{max-width:224px}.large\\:gap-4{gap:16px}.large\\:p-2{padding:8px}.large\\:p-4{padding:16px}.large\\:text-base{font-size:16px;line-height:24px}.large\\:text-lg{font-size:18px;line-height:28px}}.pnlm-container{margin:0;padding:0;overflow:hidden;position:relative;cursor:default;width:100%;height:100%;font-family:Helvetica,Nimbus Sans L,Liberation Sans,Arial,sans-serif;background:#f4f4f4 url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='67'%20height='100'%20viewBox='0%200%2067%20100'%3e%3cpath%20stroke='%23ccc'%20fill='none'%20d='M33.5,50,0,63,33.5,75,67,63,33.5,50m-33.5-50,67,25m-0.5,0,0,75m-66.5-75,67-25m-33.5,75,0,25m0-100,0,50'/%3e%3c/svg%3e") repeat;-webkit-user-select:none;-moz-user-select:none;-o-user-select:none;user-select:none;outline:0;line-height:1.4;contain:content;touch-action:none}.pnlm-container *{box-sizing:content-box}.pnlm-ui{position:absolute;width:100%;height:100%;z-index:1}.pnlm-grab{cursor:grab;cursor:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20height='26'%20width='26'%3e%3cpath%20stroke='%23000'%20stroke-width='1px'%20fill='%23fff'%20d='m15.3%2020.5s6.38-6.73%204.64-8.24-3.47%201.01-3.47%201.01%203.61-5.72%201.41-6.49c-2.2-0.769-3.33%204.36-3.33%204.36s0.873-5.76-1.06-5.76-1.58%205.39-1.58%205.39-0.574-4.59-2.18-4.12c-1.61%200.468-0.572%205.51-0.572%205.51s-1.58-4.89-2.93-3.79c-1.35%201.11%200.258%205.25%200.572%206.62%200.836%202.43%202.03%202.94%202.17%205.55'/%3e%3c/svg%3e") 12 8,default}.pnlm-grabbing{cursor:grabbing;cursor:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20height='26'%20width='26'%3e%3cpath%20stroke='%23000'%20stroke-width='1px'%20fill='%23fff'%20d='m15.3%2020.5s5.07-5.29%203.77-6.74c-1.31-1.45-2.53%200.14-2.53%200.14s2.74-3.29%200.535-4.06c-2.2-0.769-2.52%201.3-2.52%201.3s0.81-2.13-1.12-2.13-1.52%201.77-1.52%201.77-0.261-1.59-1.87-1.12c-1.61%200.468-0.874%202.17-0.874%202.17s-0.651-1.55-2-0.445c-1.35%201.11-0.68%202.25-0.365%203.62%200.836%202.43%202.03%202.94%202.17%205.55'/%3e%3c/svg%3e") 12 8,default}.pnlm-sprite{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='26'%20height='208'%3e%3ccircle%20fill-opacity='.78'%20cy='117'%20cx='13'%20r='11'%20fill='%23fff'/%3e%3ccircle%20fill-opacity='.78'%20cy='143'%20cx='13'%20r='11'%20fill='%23fff'/%3e%3ccircle%20cy='169'%20cx='13'%20r='7'%20fill='none'%20stroke='%23000'%20stroke-width='2'/%3e%3ccircle%20cy='195'%20cx='13'%20r='7'%20fill='none'%20stroke='%23000'%20stroke-width='2'/%3e%3ccircle%20cx='13'%20cy='195'%20r='2.5'/%3e%3cpath%20d='m5%2083v6h2v-4h4v-2zm10%200v2h4v4h2v-6zm-5%205v6h6v-6zm-5%205v6h6v-2h-4v-4zm14%200v4h-4v2h6v-6z'/%3e%3cpath%20d='m13%20110a7%207%200%200%200%20-7%207%207%207%200%200%200%207%207%207%207%200%200%200%207%20-7%207%207%200%200%200%20-7%20-7zm-1%203h2v2h-2zm0%203h2v5h-2z'/%3e%3cpath%20d='m5%2057v6h2v-4h4v-2zm10%200v2h4v4h2v-6zm-10%2010v6h6v-2h-4v-4zm14%200v4h-4v2h6v-6z'/%3e%3cpath%20d='m17%2038v2h-8v-2z'/%3e%3cpath%20d='m12%209v3h-3v2h3v3h2v-3h3v-2h-3v-3z'/%3e%3cpath%20d='m13%20136-6.125%206.125h4.375v7.875h3.5v-7.875h4.375z'/%3e%3cpath%20d='m10.428%20173.33v-5.77l5-2.89v5.77zm1-1.73%203-1.73-3.001-1.74z'/%3e%3c/svg%3e")}.pnlm-container:fullscreen{height:100%!important;width:100%!important;position:static!important}.pnlm-render-container{cursor:inherit;position:absolute;height:100%;width:100%}.pnlm-controls{margin-top:4px;background-color:#fff;border:1px solid #999;border-color:#0006;border-radius:3px;cursor:pointer;z-index:2;transform:translateZ(9999px)}.pnlm-control:hover{background-color:#f8f8f8}.pnlm-controls-container{position:absolute;top:0;left:4px;z-index:1}.pnlm-zoom-controls{width:26px;height:52px}.pnlm-zoom-in{width:100%;height:50%;position:absolute;top:0;border-radius:3px 3px 0 0}.pnlm-zoom-out{width:100%;height:50%;position:absolute;bottom:0;background-position:0 -26px;border-top:1px solid #ddd;border-top-color:#0000001a;border-radius:0 0 3px 3px}.pnlm-fullscreen-toggle-button,.pnlm-orientation-button,.pnlm-hot-spot-debug-indicator{width:26px;height:26px}.pnlm-hot-spot-debug-indicator{position:absolute;top:50%;left:50%;width:26px;height:26px;margin:-13px 0 0 -13px;background-color:#ffffff80;border-radius:13px;display:none}.pnlm-orientation-button-inactive{background-position:0 -156px}.pnlm-orientation-button-active{background-position:0 -182px}.pnlm-fullscreen-toggle-button-inactive{background-position:0 -52px}.pnlm-fullscreen-toggle-button-active{background-position:0 -78px}.pnlm-panorama-info{position:absolute;bottom:4px;background-color:#000000b3;border-radius:0 3px 3px 0;padding-right:10px;color:#fff;text-align:left;display:none;z-index:2;transform:translateZ(9999px)}.pnlm-title-box{position:relative;font-size:20px;display:table;padding-left:5px;margin-bottom:3px}.pnlm-author-box{position:relative;font-size:12px;display:table;padding-left:5px}.pnlm-load-box{position:absolute;top:50%;left:50%;width:200px;height:150px;margin:-75px 0 0 -100px;background-color:#000000b3;border-radius:3px;text-align:center;font-size:20px;display:none;color:#fff}.pnlm-load-box p{margin:20px 0}.pnlm-lbox{position:absolute;top:50%;left:50%;width:20px;height:20px;margin:-10px 0 0 -10px;display:none}.pnlm-loading{animation-duration:1.5s;-webkit-animation-duration:1.5s;animation-name:pnlm-mv;-webkit-animation-name:pnlm-mv;animation-iteration-count:infinite;-webkit-animation-iteration-count:infinite;animation-timing-function:linear;-webkit-animation-timing-function:linear;height:10px;width:10px;background-color:#fff;position:relative}@keyframes pnlm-mv{0%{left:0;top:0}25%{left:10px;top:0}50%{left:10px;top:10px}75%{left:0;top:10px}to{left:0;top:0}}.pnlm-load-button{position:absolute;top:50%;left:50%;width:200px;height:100px;margin:-50px 0 0 -100px;background-color:#000000b3;border-radius:3px;text-align:center;font-size:20px;display:table;color:#fff;cursor:pointer}.pnlm-load-button:hover{background-color:#000c}.pnlm-load-button p{display:table-cell;vertical-align:middle}.pnlm-info-box{font-size:15px;position:absolute;top:50%;left:50%;width:200px;height:150px;margin:-75px 0 0 -100px;background-color:#000;border-radius:3px;display:table;text-align:center;color:#fff;table-layout:fixed}.pnlm-info-box a{color:#fff;word-wrap:break-word;overflow-wrap:break-word}.pnlm-info-box p{display:table-cell;vertical-align:middle;padding:0 5px}.pnlm-error-msg{display:none}.pnlm-about-msg{font-size:11px;line-height:11px;color:#fff;padding:5px 8px;background:#000000b3;border-radius:3px;position:absolute;top:50px;left:50px;display:none;opacity:0;transition:opacity .3s ease-in-out;z-index:1}.pnlm-about-msg a:link,.pnlm-about-msg a:visited{color:#fff}.pnlm-about-msg a:hover,.pnlm-about-msg a:active{color:#eee}.pnlm-hotspot-base{position:absolute;visibility:hidden;cursor:default;vertical-align:middle;top:0;z-index:1}.pnlm-hotspot{height:26px;width:26px;border-radius:13px}.pnlm-hotspot:hover{background-color:#fff3}.pnlm-hotspot.pnlm-info{background-position:0 -104px}.pnlm-hotspot.pnlm-scene{background-position:0 -130px}div.pnlm-tooltip span{visibility:hidden;position:absolute;border-radius:3px;background-color:#000000b3;color:#fff;text-align:center;max-width:200px;padding:5px 10px;margin-left:-220px;cursor:default}div.pnlm-tooltip:hover span{visibility:visible}div.pnlm-tooltip:hover span:after{content:"";position:absolute;width:0;height:0;border-width:10px;border-style:solid;border-color:rgba(0,0,0,.7) transparent transparent transparent;bottom:-20px;left:-10px;margin:0 50%}.pnlm-compass{position:absolute;width:50px;height:50px;right:4px;bottom:4px;border-radius:25px;background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20height='50'%20width='50'%3e%3cpath%20d='m24.5078%206-3.2578%2018h7.5l-3.25781-18h-0.984376zm-3.2578%2020%203.2578%2018h0.9844l3.2578-18h-7.5zm1.19531%200.9941h5.10938l-2.5547%2014.1075-2.5547-14.1075z'/%3e%3c/svg%3e");cursor:default;display:none}.pnlm-world{position:absolute;left:50%;top:50%}.pnlm-face{position:absolute;transform-origin:0 0 0}.pnlm-dragfix,.pnlm-preview-img{position:absolute;height:100%;width:100%}.pnlm-preview-img{background-size:cover;background-position:center}.pnlm-lbar{width:150px;margin:0 auto;border:#fff 1px solid;height:6px}.pnlm-lbar-fill{background:#fff;height:100%;width:0}.pnlm-lmsg{font-size:12px}.pnlm-fade-img{position:absolute;top:0;left:0}.pnlm-pointer{cursor:pointer}#textInfo .tooltip-content{font-size:1.6em;position:absolute;left:-70px;bottom:80px;width:200px;pointer-events:none;background-color:#333;color:#fff;line-height:1.2em;padding:.8em;opacity:0;transform-origin:50% calc(100% + 6em);transform:rotate3d(0,0,1,15deg);transition:opacity .5s,transform .5s;transition-timing-function:ease,cubic-bezier(.17,.67,.4,1.39)}#textInfo:hover{z-index:3}#textInfo:hover .tooltip-content{opacity:1;pointer-events:all;transform:translateZ(0) rotate3d(0,0,0,0)}#textInfo .hotspot{cursor:pointer;box-sizing:border-box}#textInfo .hotspot .out:before{speak:none;font-size:48px;line-height:90px;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;display:block;-webkit-font-smoothing:antialiased}#textInfo .hotspot .out{width:60px;height:60px;border-radius:50%;border:5px solid rgba(255,255,255,.8);transition:transform ease-out .1s,border .2s;box-sizing:border-box}#textInfo .hotspot .in{width:40px;height:40px;position:absolute;top:10px;left:10px;background-color:#fffc;border-radius:50%;transition:transform ease-out .1s,background .2s}#textInfo .hotspot .out:after{top:0;left:0;padding:0;z-index:-1;box-shadow:0 0 0 2px #ffffff1a;opacity:0;pointer-events:none;position:absolute;width:100%;height:100%;border-radius:50%;content:"";box-sizing:content-box;transform:scale(.9)}#textInfo .hotspot:hover .out{border:5px solid rgba(255,255,255,1);transform:scale(.9);color:#fff}#textInfo .hotspot:hover .in{background-color:#fff;transform:scale(.8)}#textInfo .hotspot:hover .out:after{animation:sonarEffect 1.2s ease-out}@keyframes sonarEffect{0%{opacity:.5}20%{opacity:.8;box-shadow:0 0 0 2px #ffffff1a,0 0 10px 10px #25aae1cc,0 0 0 10px #ffffff80}to{box-shadow:0 0 0 2px #ffffff1a,0 0 10px 10px #25aae1cc,0 0 0 10px #ffffff80;transform:scale(1.5);opacity:0}}`;function Ur(t){return t.replace(/([a-z0-9])([A-Z])/g,(a,c,s)=>`${c}-${s.toLowerCase()}`)}function Vt(t){return Object.entries(t).reduce((a,[c,s])=>{if(s!==void 0){const f=Ur(c);a[f]=s.toString()}return a},{})}const Wr=t=>n.jsxs(n.Fragment,{children:[n.jsx("style",{children:Vr}),n.jsx(zr,{...t})]}),Br=t=>Vt(t),Yr=t=>Vt(t),Xr=t=>Vt(t),Gr=({onCompositionLoading:t,onCompositionLoaded:a,onCompositionLoadError:c,onItemChange:s,onExtendModeOn:f,onExtendModeOff:d,onHotspotsOn:E,onHotspotsOff:e,onGalleryOpen:_,onGalleryClose:x,onAnalyticsIdentify:P,onAnalyticsPage:C,onAnalyticsTrack:u,className:r,style:I={},children:O,...b})=>{const w=l.useMemo(()=>{const L=Br(b);return r&&Object.assign(L,{class:r}),L},[r,b]);return l.useEffect(()=>{const L=b.eventPrefix??Dt,M=b.analyticsEventPrefix??cn,h=U=>`${L}${U}`,y=U=>`${M}${U}`,S={[Tt]:t,[St]:a,[Rt]:c,[Nt]:s,[Pt]:f,[jt]:d,[gt]:E,[vt]:e,[At]:_,[zt]:x},J={[rn]:P,[an]:C,[sn]:u},k=new Map,$=new Map;return Object.entries(S).forEach(([U,F])=>{if(!F)return;const oe=h(U),T=H=>F(H.detail);k.set(oe,T),document.addEventListener(oe,T)}),Object.entries(J).forEach(([U,F])=>{if(!F)return;const oe=y(U),T=H=>F(H.detail);$.set(oe,T),document.addEventListener(oe,T)}),()=>{k.forEach((U,F)=>{document.removeEventListener(F,U)}),$.forEach((U,F)=>{document.removeEventListener(F,U)})}},[b.eventPrefix,t,a,c,s,f,d,E,e,_,x,b.analyticsEventPrefix,P,C,u]),n.jsx("cc-webplayer",{style:{display:"block",...I},...w,children:O})},Zr=({children:t,...a})=>{const c=Yr(a);return n.jsx("cc-webplayer-custom-media",{...c,children:t})},qr=({children:t,...a})=>{const c=Xr(a);return n.jsx("cc-webplayer-icon",{...c,children:t})};exports.ANALYTICS_EVENT_IDENTIFY=rn;exports.ANALYTICS_EVENT_PAGE=an;exports.ANALYTICS_EVENT_TRACK=sn;exports.DEFAULT_EVENT_PREFIX=Dt;exports.EVENT_COMPOSITION_LOADED=St;exports.EVENT_COMPOSITION_LOADING=Tt;exports.EVENT_COMPOSITION_LOAD_ERROR=Rt;exports.EVENT_EXTEND_MODE_OFF=jt;exports.EVENT_EXTEND_MODE_ON=Pt;exports.EVENT_GALLERY_CLOSE=zt;exports.EVENT_GALLERY_OPEN=At;exports.EVENT_HOTSPOTS_OFF=vt;exports.EVENT_HOTSPOTS_ON=gt;exports.EVENT_ITEM_CHANGE=Nt;exports.WEB_PLAYER_CUSTOM_MEDIA_WC_TAG=Lt;exports.WEB_PLAYER_ICON_WC_TAG=It;exports.WEB_PLAYER_WC_TAG=xt;exports.WebPlayer=Gr;exports.WebPlayerCustomMedia=Or;exports.WebPlayerCustomMedia$1=Zr;exports.WebPlayerIcon=Fr;exports.WebPlayerIcon$1=qr;exports.WebPlayerWithInjectedStyles=Wr;exports.checkCustomElementsDefinition=io;exports.generateCompositionUrl=no;