New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@r2u/viewer

Package Overview
Dependencies
Maintainers
2
Versions
57
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@r2u/viewer - npm Package Compare versions

Comparing version 1.5.2 to 1.5.3

dist/three/utils/interpolateAngle.d.ts

18

dist/index.js
/*! For license information please see index.js.LICENSE.txt */
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("react"));else if("function"==typeof define&&define.amd)define(["react"],t);else{var r="object"==typeof exports?t(require("react")):t(e.react);for(var o in r)("object"==typeof exports?exports:e)[o]=r[o]}}(self,(e=>(()=>{var t,r,o={58:(e,t,r)=>{"use strict";var o=r(594),n={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function l(e){return o.isMemo(e)?a:s[e.$$typeof]||n}s[o.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[o.Memo]=a;var c=Object.defineProperty,u=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,f=Object.getOwnPropertyDescriptor,g=Object.getPrototypeOf,p=Object.prototype;e.exports=function e(t,r,o){if("string"!=typeof r){if(p){var n=g(r);n&&n!==p&&e(t,n,o)}var a=u(r);d&&(a=a.concat(d(r)));for(var s=l(t),m=l(r),h=0;h<a.length;++h){var y=a[h];if(!(i[y]||o&&o[y]||m&&m[y]||s&&s[y])){var M=f(r,y);try{c(t,y,M)}catch(e){}}}}return t}},516:e=>{"use strict";var t=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;function n(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},r=0;r<10;r++)t["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var o={};return"abcdefghijklmnopqrst".split("").forEach((function(e){o[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},o)).join("")}catch(e){return!1}}()?Object.assign:function(e,i){for(var a,s,l=n(e),c=1;c<arguments.length;c++){for(var u in a=Object(arguments[c]))r.call(a,u)&&(l[u]=a[u]);if(t){s=t(a);for(var d=0;d<s.length;d++)o.call(a,s[d])&&(l[s[d]]=a[s[d]])}}return l}},697:(e,t)=>{"use strict";var r="function"==typeof Symbol&&Symbol.for,o=r?Symbol.for("react.element"):60103,n=r?Symbol.for("react.portal"):60106,i=r?Symbol.for("react.fragment"):60107,a=r?Symbol.for("react.strict_mode"):60108,s=r?Symbol.for("react.profiler"):60114,l=r?Symbol.for("react.provider"):60109,c=r?Symbol.for("react.context"):60110,u=r?Symbol.for("react.async_mode"):60111,d=r?Symbol.for("react.concurrent_mode"):60111,f=r?Symbol.for("react.forward_ref"):60112,g=r?Symbol.for("react.suspense"):60113,p=r?Symbol.for("react.suspense_list"):60120,m=r?Symbol.for("react.memo"):60115,h=r?Symbol.for("react.lazy"):60116,y=r?Symbol.for("react.block"):60121,M=r?Symbol.for("react.fundamental"):60117,v=r?Symbol.for("react.responder"):60118,b=r?Symbol.for("react.scope"):60119;function j(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case o:switch(e=e.type){case u:case d:case i:case s:case a:case g:return e;default:switch(e=e&&e.$$typeof){case c:case f:case h:case m:case l:return e;default:return t}}case n:return t}}}function w(e){return j(e)===d}t.AsyncMode=u,t.ConcurrentMode=d,t.ContextConsumer=c,t.ContextProvider=l,t.Element=o,t.ForwardRef=f,t.Fragment=i,t.Lazy=h,t.Memo=m,t.Portal=n,t.Profiler=s,t.StrictMode=a,t.Suspense=g,t.isAsyncMode=function(e){return w(e)||j(e)===u},t.isConcurrentMode=w,t.isContextConsumer=function(e){return j(e)===c},t.isContextProvider=function(e){return j(e)===l},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===o},t.isForwardRef=function(e){return j(e)===f},t.isFragment=function(e){return j(e)===i},t.isLazy=function(e){return j(e)===h},t.isMemo=function(e){return j(e)===m},t.isPortal=function(e){return j(e)===n},t.isProfiler=function(e){return j(e)===s},t.isStrictMode=function(e){return j(e)===a},t.isSuspense=function(e){return j(e)===g},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===i||e===d||e===s||e===a||e===g||e===p||"object"==typeof e&&null!==e&&(e.$$typeof===h||e.$$typeof===m||e.$$typeof===l||e.$$typeof===c||e.$$typeof===f||e.$$typeof===M||e.$$typeof===v||e.$$typeof===b||e.$$typeof===y)},t.typeOf=j},594:(e,t,r)=>{"use strict";e.exports=r(697)},94:(e,t,r)=>{"use strict";r(516);var o=r(156),n=60103;if("function"==typeof Symbol&&Symbol.for){var i=Symbol.for;n=i("react.element"),i("react.fragment")}var a=o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s=Object.prototype.hasOwnProperty,l={key:!0,ref:!0,__self:!0,__source:!0};function c(e,t,r){var o,i={},c=null,u=null;for(o in void 0!==r&&(c=""+r),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(u=t.ref),t)s.call(t,o)&&!l.hasOwnProperty(o)&&(i[o]=t[o]);if(e&&e.defaultProps)for(o in t=e.defaultProps)void 0===i[o]&&(i[o]=t[o]);return{$$typeof:n,type:e,key:c,ref:u,props:i,_owner:a.current}}t.jsx=c,t.jsxs=c},512:(e,t,r)=>{"use strict";e.exports=r(94)},7:e=>{e.exports=function(e,t,r,o){var n=r?r.call(o,e,t):void 0;if(void 0!==n)return!!n;if(e===t)return!0;if("object"!=typeof e||!e||"object"!=typeof t||!t)return!1;var i=Object.keys(e),a=Object.keys(t);if(i.length!==a.length)return!1;for(var s=Object.prototype.hasOwnProperty.bind(t),l=0;l<i.length;l++){var c=i[l];if(!s(c))return!1;var u=e[c],d=t[c];if(!1===(n=r?r.call(o,u,d,c):void 0)||void 0===n&&u!==d)return!1}return!0}},156:t=>{"use strict";t.exports=e}},n={};function i(e){var t=n[e];if(void 0!==t)return t.exports;var r=n[e]={exports:{}};return o[e](r,r.exports,i),r.exports}i.m=o,i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(var r in t)i.o(t,r)&&!i.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},i.f={},i.e=e=>Promise.all(Object.keys(i.f).reduce(((t,r)=>(i.f[r](e,t),t)),[])),i.u=e=>167===e?"vendors.f67ae33fc1a23991db96.bundle.js":628===e?"threeExperience.bundle.js":27===e?"vendors.46242851acce02152166.bundle.js":322===e?"dracoCompress.bundle.js":void 0,i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),t={},r="@r2u/viewer:",i.l=(e,o,n,a)=>{if(t[e])t[e].push(o);else{var s,l;if(void 0!==n)for(var c=document.getElementsByTagName("script"),u=0;u<c.length;u++){var d=c[u];if(d.getAttribute("src")==e||d.getAttribute("data-webpack")==r+n){s=d;break}}s||(l=!0,(s=document.createElement("script")).charset="utf-8",s.timeout=120,i.nc&&s.setAttribute("nonce",i.nc),s.setAttribute("data-webpack",r+n),s.src=e),t[e]=[o];var f=(r,o)=>{s.onerror=s.onload=null,clearTimeout(g);var n=t[e];if(delete t[e],s.parentNode&&s.parentNode.removeChild(s),n&&n.forEach((e=>e(o))),r)return r(o)},g=setTimeout(f.bind(null,void 0,{type:"timeout",target:s}),12e4);s.onerror=f.bind(null,s.onerror),s.onload=f.bind(null,s.onload),l&&document.head.appendChild(s)}},i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.p="https://unpkg.com/@r2u/viewer@1.5.2/dist/",(()=>{var e={179:0};i.f.j=(t,r)=>{var o=i.o(e,t)?e[t]:void 0;if(0!==o)if(o)r.push(o[2]);else{var n=new Promise(((r,n)=>o=e[t]=[r,n]));r.push(o[2]=n);var a=i.p+i.u(t),s=new Error;i.l(a,(r=>{if(i.o(e,t)&&(0!==(o=e[t])&&(e[t]=void 0),o)){var n=r&&("load"===r.type?"missing":r.type),a=r&&r.target&&r.target.src;s.message="Loading chunk "+t+" failed.\n("+n+": "+a+")",s.name="ChunkLoadError",s.type=n,s.request=a,o[1](s)}}),"chunk-"+t,t)}};var t=(t,r)=>{var o,n,[a,s,l]=r,c=0;if(a.some((t=>0!==e[t]))){for(o in s)i.o(s,o)&&(i.m[o]=s[o]);l&&l(i)}for(t&&t(r);c<a.length;c++)n=a[c],i.o(e,n)&&e[n]&&e[n][0](),e[n]=0},r=self.webpackChunk_r2u_viewer=self.webpackChunk_r2u_viewer||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))})();var a={};return(()=>{"use strict";i.r(a),i.d(a,{default:()=>it});var e=i(512),t=i(156),r=i.n(t);const o="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNzAiIGhlaWdodD0iNjkiIHZpZXdCb3g9IjAgMCA3MCA2OSIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgY2xpcC1wYXRoPSJ1cmwoI2NsaXAwXzE4Ml85NDcpIj4KPGcgZmlsdGVyPSJ1cmwoI2ZpbHRlcjBfZF8xODJfOTQ3KSI+CjxwYXRoIGQ9Ik01NC4wNDU5IDQwLjgzNjNMNDEuMTQyNSAzNC42MzJDNDAuNjU5NCAzNC40Mzk4IDQwLjE0NzggMzQuMzMgMzkuNjA3OCAzNC4zM0MzOC40MTQ4IDM0LjMzIDM3LjQ0NzcgMzMuMzYyOSAzNy40NDc3IDMyLjE3VjE3Ljg1ODNDMzcuNDQ3NyAxNS41Nzk3IDM1LjU0MzUgMTMuNzQwNCAzMy4xODQ1IDEzLjc0MDRDMzAuODI1NSAxMy43NDA0IDI4LjkyMTMgMTUuNTc5NyAyOC45MjEzIDE3Ljg1ODNWMzcuNTU3OEMyOC45MjEzIDQyLjYxNDggMjQuMjg3OCA0Ni40MDMxIDE5LjMzMTYgNDUuMzk4MkwxOS4xNzI3IDQ1LjM2NkMxOC45NDUzIDQ1LjMzODYgMTguNzQ2NCA0NS4yODM3IDE4LjQ5MDYgNDUuMjgzN0MxNy42MDk1IDQ1LjI4MzcgMTYuODEzNyA0NS42NDA2IDE2LjI0NTMgNDYuMTg5NkMxNS4wMTU3IDQ3LjM5MjMgMTUuMDIxOSA0OS4zNzI5IDE2LjI1OTEgNTAuNTY3OUwyOC4wNDAyIDYxLjk0NzVDMjguODA3NiA2Mi42ODg4IDI5Ljg4NzYgNjMuMTU1NSAzMS4wNTI5IDYzLjE1NTVINTAuMzUxMUM1Mi40ODI3IDYzLjE1NTUgNTQuMTMxMiA2MS42NDU2IDU0LjQ0MzggNTkuNjQxNUw1Ni41NzU0IDQ1LjE3MzlDNTYuNjAzOCA0NC45ODE3IDU2LjYzMjMgNDQuNzg5NSA1Ni42MzIzIDQ0LjYyNDhDNTYuNjMyMyA0Mi45MjI3IDU1LjU1MjIgNDEuNDQwMyA1NC4wNDU5IDQwLjgzNjNaIiBmaWxsPSJ3aGl0ZSIvPgo8cGF0aCBkPSJNMjAuNzYxOCAxOS44MjYzQzIxLjM5MTUgMjQuMTk1NCAyNi4xMDUyIDIyLjQxMjYgMjYuMTA1MiAxNy45OTgyQzI2LjEwNTIgMTQuMTY2OCAyOS4xNzA1IDExLjA1NzMgMzIuOTQ3NSAxMS4wNTczQzM2LjcyNDQgMTEuMDU3MyAzOS43ODk3IDE0LjE2NjggMzkuNzg5NyAxNy45OTgyQzM5Ljc4OTcgMjIuNDEyNiA0NC41MDM0IDI0LjE5NTQgNDUuMTMzMSAxOS44MjYzQzQ1LjIxOTEgMTkuMjI5OCA0NS4yNjM2IDE4LjYxOTQgNDUuMjYzNiAxNy45OTgyQzQ1LjI2MzYgMTEuMDg1IDM5Ljc2MjQgNS41MDQ1MiAzMi45NDc1IDUuNTA0NTJDMjYuMTMyNSA1LjUwNDUyIDIwLjYzMTMgMTEuMDg1IDIwLjYzMTMgMTcuOTk4MkMyMC42MzEzIDE4LjYxOTQgMjAuNjc1OCAxOS4yMjk4IDIwLjc2MTggMTkuODI2M1oiIGZpbGw9IiNEREREREQiLz4KPC9nPgo8L2c+CjxkZWZzPgo8ZmlsdGVyIGlkPSJmaWx0ZXIwX2RfMTgyXzk0NyIgeD0iMTIuMzI3MSIgeT0iMi41MDQ1MiIgd2lkdGg9IjUxLjMwNTIiIGhlaWdodD0iNjcuNjUxIiBmaWx0ZXJVbml0cz0idXNlclNwYWNlT25Vc2UiIGNvbG9yLWludGVycG9sYXRpb24tZmlsdGVycz0ic1JHQiI+CjxmZUZsb29kIGZsb29kLW9wYWNpdHk9IjAiIHJlc3VsdD0iQmFja2dyb3VuZEltYWdlRml4Ii8+CjxmZUNvbG9yTWF0cml4IGluPSJTb3VyY2VBbHBoYSIgdHlwZT0ibWF0cml4IiB2YWx1ZXM9IjAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDEyNyAwIiByZXN1bHQ9ImhhcmRBbHBoYSIvPgo8ZmVPZmZzZXQgZHg9IjIiIGR5PSIyIi8+CjxmZUdhdXNzaWFuQmx1ciBzdGREZXZpYXRpb249IjIuNSIvPgo8ZmVDb2xvck1hdHJpeCB0eXBlPSJtYXRyaXgiIHZhbHVlcz0iMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMC4yNSAwIi8+CjxmZUJsZW5kIG1vZGU9Im5vcm1hbCIgaW4yPSJCYWNrZ3JvdW5kSW1hZ2VGaXgiIHJlc3VsdD0iZWZmZWN0MV9kcm9wU2hhZG93XzE4Ml85NDciLz4KPGZlQmxlbmQgbW9kZT0ibm9ybWFsIiBpbj0iU291cmNlR3JhcGhpYyIgaW4yPSJlZmZlY3QxX2Ryb3BTaGFkb3dfMTgyXzk0NyIgcmVzdWx0PSJzaGFwZSIvPgo8L2ZpbHRlcj4KPGNsaXBQYXRoIGlkPSJjbGlwMF8xODJfOTQ3Ij4KPHJlY3Qgd2lkdGg9IjcwIiBoZWlnaHQ9IjY4LjgwNjgiIGZpbGw9IndoaXRlIi8+CjwvY2xpcFBhdGg+CjwvZGVmcz4KPC9zdmc+Cg==";var n=i(594),s=i(7),l=i.n(s);const c=function(e){function t(e,o,l,c,f){for(var g,p,m,h,b,w=0,I=0,A=0,N=0,x=0,z=0,E=m=g=0,Y=0,P=0,R=0,Z=0,B=l.length,U=B-1,Q="",_="",H="",F="";Y<B;){if(p=l.charCodeAt(Y),Y===U&&0!==I+N+A+w&&(0!==I&&(p=47===I?10:47),N=A=w=0,B++,U++),0===I+N+A+w){if(Y===U&&(0<P&&(Q=Q.replace(d,"")),0<Q.trim().length)){switch(p){case 32:case 9:case 59:case 13:case 10:break;default:Q+=l.charAt(Y)}p=59}switch(p){case 123:for(g=(Q=Q.trim()).charCodeAt(0),m=1,Z=++Y;Y<B;){switch(p=l.charCodeAt(Y)){case 123:m++;break;case 125:m--;break;case 47:switch(p=l.charCodeAt(Y+1)){case 42:case 47:e:{for(E=Y+1;E<U;++E)switch(l.charCodeAt(E)){case 47:if(42===p&&42===l.charCodeAt(E-1)&&Y+2!==E){Y=E+1;break e}break;case 10:if(47===p){Y=E+1;break e}}Y=E}}break;case 91:p++;case 40:p++;case 34:case 39:for(;Y++<U&&l.charCodeAt(Y)!==p;);}if(0===m)break;Y++}if(m=l.substring(Z,Y),0===g&&(g=(Q=Q.replace(u,"").trim()).charCodeAt(0)),64===g){switch(0<P&&(Q=Q.replace(d,"")),p=Q.charCodeAt(1)){case 100:case 109:case 115:case 45:P=o;break;default:P=O}if(Z=(m=t(o,P,m,p,f+1)).length,0<T&&(b=s(3,m,P=r(O,Q,R),o,k,D,Z,p,f,c),Q=P.join(""),void 0!==b&&0===(Z=(m=b.trim()).length)&&(p=0,m="")),0<Z)switch(p){case 115:Q=Q.replace(j,a);case 100:case 109:case 45:m=Q+"{"+m+"}";break;case 107:m=(Q=Q.replace(y,"$1 $2"))+"{"+m+"}",m=1===C||2===C&&i("@"+m,3)?"@-webkit-"+m+"@"+m:"@"+m;break;default:m=Q+m,112===c&&(_+=m,m="")}else m=""}else m=t(o,r(o,Q,R),m,c,f+1);H+=m,m=R=P=E=g=0,Q="",p=l.charCodeAt(++Y);break;case 125:case 59:if(1<(Z=(Q=(0<P?Q.replace(d,""):Q).trim()).length))switch(0===E&&(g=Q.charCodeAt(0),45===g||96<g&&123>g)&&(Z=(Q=Q.replace(" ",":")).length),0<T&&void 0!==(b=s(1,Q,o,e,k,D,_.length,c,f,c))&&0===(Z=(Q=b.trim()).length)&&(Q="\0\0"),g=Q.charCodeAt(0),p=Q.charCodeAt(1),g){case 0:break;case 64:if(105===p||99===p){F+=Q+l.charAt(Y);break}default:58!==Q.charCodeAt(Z-1)&&(_+=n(Q,g,p,Q.charCodeAt(2)))}R=P=E=g=0,Q="",p=l.charCodeAt(++Y)}}switch(p){case 13:case 10:47===I?I=0:0===1+g&&107!==c&&0<Q.length&&(P=1,Q+="\0"),0<T*L&&s(0,Q,o,e,k,D,_.length,c,f,c),D=1,k++;break;case 59:case 125:if(0===I+N+A+w){D++;break}default:switch(D++,h=l.charAt(Y),p){case 9:case 32:if(0===N+w+I)switch(x){case 44:case 58:case 9:case 32:h="";break;default:32!==p&&(h=" ")}break;case 0:h="\\0";break;case 12:h="\\f";break;case 11:h="\\v";break;case 38:0===N+I+w&&(P=R=1,h="\f"+h);break;case 108:if(0===N+I+w+S&&0<E)switch(Y-E){case 2:112===x&&58===l.charCodeAt(Y-3)&&(S=x);case 8:111===z&&(S=z)}break;case 58:0===N+I+w&&(E=Y);break;case 44:0===I+A+N+w&&(P=1,h+="\r");break;case 34:case 39:0===I&&(N=N===p?0:0===N?p:N);break;case 91:0===N+I+A&&w++;break;case 93:0===N+I+A&&w--;break;case 41:0===N+I+w&&A--;break;case 40:0===N+I+w&&(0===g&&(2*x+3*z==533||(g=1)),A++);break;case 64:0===I+A+N+w+E+m&&(m=1);break;case 42:case 47:if(!(0<N+w+A))switch(I){case 0:switch(2*p+3*l.charCodeAt(Y+1)){case 235:I=47;break;case 220:Z=Y,I=42}break;case 42:47===p&&42===x&&Z+2!==Y&&(33===l.charCodeAt(Z+2)&&(_+=l.substring(Z,Y+1)),h="",I=0)}}0===I&&(Q+=h)}z=x,x=p,Y++}if(0<(Z=_.length)){if(P=o,0<T&&void 0!==(b=s(2,_,P,e,k,D,Z,c,f,c))&&0===(_=b).length)return F+_+H;if(_=P.join(",")+"{"+_+"}",0!=C*S){switch(2!==C||i(_,2)||(S=0),S){case 111:_=_.replace(v,":-moz-$1")+_;break;case 112:_=_.replace(M,"::-webkit-input-$1")+_.replace(M,"::-moz-$1")+_.replace(M,":-ms-input-$1")+_}S=0}}return F+_+H}function r(e,t,r){var n=t.trim().split(m);t=n;var i=n.length,a=e.length;switch(a){case 0:case 1:var s=0;for(e=0===a?"":e[0]+" ";s<i;++s)t[s]=o(e,t[s],r).trim();break;default:var l=s=0;for(t=[];s<i;++s)for(var c=0;c<a;++c)t[l++]=o(e[c]+" ",n[s],r).trim()}return t}function o(e,t,r){var o=t.charCodeAt(0);switch(33>o&&(o=(t=t.trim()).charCodeAt(0)),o){case 38:return t.replace(h,"$1"+e.trim());case 58:return e.trim()+t.replace(h,"$1"+e.trim());default:if(0<1*r&&0<t.indexOf("\f"))return t.replace(h,(58===e.charCodeAt(0)?"":"$1")+e.trim())}return e+t}function n(e,t,r,o){var a=e+";",s=2*t+3*r+4*o;if(944===s){e=a.indexOf(":",9)+1;var l=a.substring(e,a.length-1).trim();return l=a.substring(0,e).trim()+l+";",1===C||2===C&&i(l,1)?"-webkit-"+l+l:l}if(0===C||2===C&&!i(a,1))return a;switch(s){case 1015:return 97===a.charCodeAt(10)?"-webkit-"+a+a:a;case 951:return 116===a.charCodeAt(3)?"-webkit-"+a+a:a;case 963:return 110===a.charCodeAt(5)?"-webkit-"+a+a:a;case 1009:if(100!==a.charCodeAt(4))break;case 969:case 942:return"-webkit-"+a+a;case 978:return"-webkit-"+a+"-moz-"+a+a;case 1019:case 983:return"-webkit-"+a+"-moz-"+a+"-ms-"+a+a;case 883:if(45===a.charCodeAt(8))return"-webkit-"+a+a;if(0<a.indexOf("image-set(",11))return a.replace(x,"$1-webkit-$2")+a;break;case 932:if(45===a.charCodeAt(4))switch(a.charCodeAt(5)){case 103:return"-webkit-box-"+a.replace("-grow","")+"-webkit-"+a+"-ms-"+a.replace("grow","positive")+a;case 115:return"-webkit-"+a+"-ms-"+a.replace("shrink","negative")+a;case 98:return"-webkit-"+a+"-ms-"+a.replace("basis","preferred-size")+a}return"-webkit-"+a+"-ms-"+a+a;case 964:return"-webkit-"+a+"-ms-flex-"+a+a;case 1023:if(99!==a.charCodeAt(8))break;return"-webkit-box-pack"+(l=a.substring(a.indexOf(":",15)).replace("flex-","").replace("space-between","justify"))+"-webkit-"+a+"-ms-flex-pack"+l+a;case 1005:return g.test(a)?a.replace(f,":-webkit-")+a.replace(f,":-moz-")+a:a;case 1e3:switch(t=(l=a.substring(13).trim()).indexOf("-")+1,l.charCodeAt(0)+l.charCodeAt(t)){case 226:l=a.replace(b,"tb");break;case 232:l=a.replace(b,"tb-rl");break;case 220:l=a.replace(b,"lr");break;default:return a}return"-webkit-"+a+"-ms-"+l+a;case 1017:if(-1===a.indexOf("sticky",9))break;case 975:switch(t=(a=e).length-10,s=(l=(33===a.charCodeAt(t)?a.substring(0,t):a).substring(e.indexOf(":",7)+1).trim()).charCodeAt(0)+(0|l.charCodeAt(7))){case 203:if(111>l.charCodeAt(8))break;case 115:a=a.replace(l,"-webkit-"+l)+";"+a;break;case 207:case 102:a=a.replace(l,"-webkit-"+(102<s?"inline-":"")+"box")+";"+a.replace(l,"-webkit-"+l)+";"+a.replace(l,"-ms-"+l+"box")+";"+a}return a+";";case 938:if(45===a.charCodeAt(5))switch(a.charCodeAt(6)){case 105:return l=a.replace("-items",""),"-webkit-"+a+"-webkit-box-"+l+"-ms-flex-"+l+a;case 115:return"-webkit-"+a+"-ms-flex-item-"+a.replace(I,"")+a;default:return"-webkit-"+a+"-ms-flex-line-pack"+a.replace("align-content","").replace(I,"")+a}break;case 973:case 989:if(45!==a.charCodeAt(3)||122===a.charCodeAt(4))break;case 931:case 953:if(!0===N.test(e))return 115===(l=e.substring(e.indexOf(":")+1)).charCodeAt(0)?n(e.replace("stretch","fill-available"),t,r,o).replace(":fill-available",":stretch"):a.replace(l,"-webkit-"+l)+a.replace(l,"-moz-"+l.replace("fill-",""))+a;break;case 962:if(a="-webkit-"+a+(102===a.charCodeAt(5)?"-ms-"+a:"")+a,211===r+o&&105===a.charCodeAt(13)&&0<a.indexOf("transform",10))return a.substring(0,a.indexOf(";",27)+1).replace(p,"$1-webkit-$2")+a}return a}function i(e,t){var r=e.indexOf(1===t?":":"{"),o=e.substring(0,3!==t?r:10);return r=e.substring(r+1,e.length-1),E(2!==t?o:o.replace(A,"$1"),r,t)}function a(e,t){var r=n(t,t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2));return r!==t+";"?r.replace(w," or ($1)").substring(4):"("+t+")"}function s(e,t,r,o,n,i,a,s,l,u){for(var d,f=0,g=t;f<T;++f)switch(d=z[f].call(c,e,g,r,o,n,i,a,s,l,u)){case void 0:case!1:case!0:case null:break;default:g=d}if(g!==t)return g}function l(e){return void 0!==(e=e.prefix)&&(E=null,e?"function"!=typeof e?C=1:(C=2,E=e):C=0),l}function c(e,r){var o=e;if(33>o.charCodeAt(0)&&(o=o.trim()),o=[o],0<T){var n=s(-1,r,o,o,k,D,0,0,0,0);void 0!==n&&"string"==typeof n&&(r=n)}var i=t(O,o,r,0,0);return 0<T&&void 0!==(n=s(-2,i,o,o,k,D,i.length,0,0,0))&&(i=n),S=0,D=k=1,i}var u=/^\0+/g,d=/[\0\r\f]/g,f=/: */g,g=/zoo|gra/,p=/([,: ])(transform)/g,m=/,\r+?/g,h=/([\t\r\n ])*\f?&/g,y=/@(k\w+)\s*(\S*)\s*/,M=/::(place)/g,v=/:(read-only)/g,b=/[svh]\w+-[tblr]{2}/,j=/\(\s*(.*)\s*\)/g,w=/([\s\S]*?);/g,I=/-self|flex-/g,A=/[^]*?(:[rp][el]a[\w-]+)[^]*/,N=/stretch|:\s*\w+\-(?:conte|avail)/,x=/([^-])(image-set\()/,D=1,k=1,S=0,C=1,O=[],z=[],T=0,E=null,L=0;return c.use=function e(t){switch(t){case void 0:case null:T=z.length=0;break;default:if("function"==typeof t)z[T++]=t;else if("object"==typeof t)for(var r=0,o=t.length;r<o;++r)e(t[r]);else L=0|!!t}return e},c.set=l,void 0!==e&&l(e),c},u={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};var d=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|inert|itemProp|itemScope|itemType|itemID|itemRef|on|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/;const f=(g={},function(e){return void 0===g[e]&&(g[e]=(t=e,d.test(t)||111===t.charCodeAt(0)&&110===t.charCodeAt(1)&&t.charCodeAt(2)<91)),g[e];var t});var g,p=i(58),m=i.n(p);function h(){return(h=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e}).apply(this,arguments)}var y=function(e,t){for(var r=[e[0]],o=0,n=t.length;o<n;o+=1)r.push(t[o],e[o+1]);return r},M=function(e){return null!==e&&"object"==typeof e&&"[object Object]"===(e.toString?e.toString():Object.prototype.toString.call(e))&&!(0,n.typeOf)(e)},v=Object.freeze([]),b=Object.freeze({});function j(e){return"function"==typeof e}function w(e){return e.displayName||e.name||"Component"}function I(e){return e&&"string"==typeof e.styledComponentId}var A="undefined"!=typeof process&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||"data-styled",N="undefined"!=typeof window&&"HTMLElement"in window,x=Boolean("boolean"==typeof SC_DISABLE_SPEEDY?SC_DISABLE_SPEEDY:"undefined"!=typeof process&&void 0!==process.env.REACT_APP_SC_DISABLE_SPEEDY&&""!==process.env.REACT_APP_SC_DISABLE_SPEEDY?"false"!==process.env.REACT_APP_SC_DISABLE_SPEEDY&&process.env.REACT_APP_SC_DISABLE_SPEEDY:"undefined"!=typeof process&&void 0!==process.env.SC_DISABLE_SPEEDY&&""!==process.env.SC_DISABLE_SPEEDY&&"false"!==process.env.SC_DISABLE_SPEEDY&&process.env.SC_DISABLE_SPEEDY);function D(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),o=1;o<t;o++)r[o-1]=arguments[o];throw new Error("An error occurred. See https://git.io/JUIaE#"+e+" for more information."+(r.length>0?" Args: "+r.join(", "):""))}var k=function(){function e(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e}var t=e.prototype;return t.indexOfGroup=function(e){for(var t=0,r=0;r<e;r++)t+=this.groupSizes[r];return t},t.insertRules=function(e,t){if(e>=this.groupSizes.length){for(var r=this.groupSizes,o=r.length,n=o;e>=n;)(n<<=1)<0&&D(16,""+e);this.groupSizes=new Uint32Array(n),this.groupSizes.set(r),this.length=n;for(var i=o;i<n;i++)this.groupSizes[i]=0}for(var a=this.indexOfGroup(e+1),s=0,l=t.length;s<l;s++)this.tag.insertRule(a,t[s])&&(this.groupSizes[e]++,a++)},t.clearGroup=function(e){if(e<this.length){var t=this.groupSizes[e],r=this.indexOfGroup(e),o=r+t;this.groupSizes[e]=0;for(var n=r;n<o;n++)this.tag.deleteRule(r)}},t.getGroup=function(e){var t="";if(e>=this.length||0===this.groupSizes[e])return t;for(var r=this.groupSizes[e],o=this.indexOfGroup(e),n=o+r,i=o;i<n;i++)t+=this.tag.getRule(i)+"/*!sc*/\n";return t},e}(),S=new Map,C=new Map,O=1,z=function(e){if(S.has(e))return S.get(e);for(;C.has(O);)O++;var t=O++;return S.set(e,t),C.set(t,e),t},T=function(e){return C.get(e)},E=function(e,t){t>=O&&(O=t+1),S.set(e,t),C.set(t,e)},L="style["+A+'][data-styled-version="5.3.3"]',Y=new RegExp("^"+A+'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)'),P=function(e,t,r){for(var o,n=r.split(","),i=0,a=n.length;i<a;i++)(o=n[i])&&e.registerName(t,o)},R=function(e,t){for(var r=(t.textContent||"").split("/*!sc*/\n"),o=[],n=0,i=r.length;n<i;n++){var a=r[n].trim();if(a){var s=a.match(Y);if(s){var l=0|parseInt(s[1],10),c=s[2];0!==l&&(E(c,l),P(e,c,s[3]),e.getTag().insertRules(l,o)),o.length=0}else o.push(a)}}},Z=function(){return"undefined"!=typeof window&&void 0!==window.__webpack_nonce__?window.__webpack_nonce__:null},B=function(e){var t=document.head,r=e||t,o=document.createElement("style"),n=function(e){for(var t=e.childNodes,r=t.length;r>=0;r--){var o=t[r];if(o&&1===o.nodeType&&o.hasAttribute(A))return o}}(r),i=void 0!==n?n.nextSibling:null;o.setAttribute(A,"active"),o.setAttribute("data-styled-version","5.3.3");var a=Z();return a&&o.setAttribute("nonce",a),r.insertBefore(o,i),o},U=function(){function e(e){var t=this.element=B(e);t.appendChild(document.createTextNode("")),this.sheet=function(e){if(e.sheet)return e.sheet;for(var t=document.styleSheets,r=0,o=t.length;r<o;r++){var n=t[r];if(n.ownerNode===e)return n}D(17)}(t),this.length=0}var t=e.prototype;return t.insertRule=function(e,t){try{return this.sheet.insertRule(t,e),this.length++,!0}catch(e){return!1}},t.deleteRule=function(e){this.sheet.deleteRule(e),this.length--},t.getRule=function(e){var t=this.sheet.cssRules[e];return void 0!==t&&"string"==typeof t.cssText?t.cssText:""},e}(),Q=function(){function e(e){var t=this.element=B(e);this.nodes=t.childNodes,this.length=0}var t=e.prototype;return t.insertRule=function(e,t){if(e<=this.length&&e>=0){var r=document.createTextNode(t),o=this.nodes[e];return this.element.insertBefore(r,o||null),this.length++,!0}return!1},t.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--},t.getRule=function(e){return e<this.length?this.nodes[e].textContent:""},e}(),_=function(){function e(e){this.rules=[],this.length=0}var t=e.prototype;return t.insertRule=function(e,t){return e<=this.length&&(this.rules.splice(e,0,t),this.length++,!0)},t.deleteRule=function(e){this.rules.splice(e,1),this.length--},t.getRule=function(e){return e<this.length?this.rules[e]:""},e}(),H=N,F={isServer:!N,useCSSOMInjection:!x},G=function(){function e(e,t,r){void 0===e&&(e=b),void 0===t&&(t={}),this.options=h({},F,{},e),this.gs=t,this.names=new Map(r),this.server=!!e.isServer,!this.server&&N&&H&&(H=!1,function(e){for(var t=document.querySelectorAll(L),r=0,o=t.length;r<o;r++){var n=t[r];n&&"active"!==n.getAttribute(A)&&(R(e,n),n.parentNode&&n.parentNode.removeChild(n))}}(this))}e.registerId=function(e){return z(e)};var t=e.prototype;return t.reconstructWithOptions=function(t,r){return void 0===r&&(r=!0),new e(h({},this.options,{},t),this.gs,r&&this.names||void 0)},t.allocateGSInstance=function(e){return this.gs[e]=(this.gs[e]||0)+1},t.getTag=function(){return this.tag||(this.tag=(r=(t=this.options).isServer,o=t.useCSSOMInjection,n=t.target,e=r?new _(n):o?new U(n):new Q(n),new k(e)));var e,t,r,o,n},t.hasNameForId=function(e,t){return this.names.has(e)&&this.names.get(e).has(t)},t.registerName=function(e,t){if(z(e),this.names.has(e))this.names.get(e).add(t);else{var r=new Set;r.add(t),this.names.set(e,r)}},t.insertRules=function(e,t,r){this.registerName(e,t),this.getTag().insertRules(z(e),r)},t.clearNames=function(e){this.names.has(e)&&this.names.get(e).clear()},t.clearRules=function(e){this.getTag().clearGroup(z(e)),this.clearNames(e)},t.clearTag=function(){this.tag=void 0},t.toString=function(){return function(e){for(var t=e.getTag(),r=t.length,o="",n=0;n<r;n++){var i=T(n);if(void 0!==i){var a=e.names.get(i),s=t.getGroup(n);if(a&&s&&a.size){var l=A+".g"+n+'[id="'+i+'"]',c="";void 0!==a&&a.forEach((function(e){e.length>0&&(c+=e+",")})),o+=""+s+l+'{content:"'+c+'"}/*!sc*/\n'}}}return o}(this)},e}(),$=/(a)(d)/gi,W=function(e){return String.fromCharCode(e+(e>25?39:97))};function X(e){var t,r="";for(t=Math.abs(e);t>52;t=t/52|0)r=W(t%52)+r;return(W(t%52)+r).replace($,"$1-$2")}var V=function(e,t){for(var r=t.length;r;)e=33*e^t.charCodeAt(--r);return e},J=function(e){return V(5381,e)};function q(e){for(var t=0;t<e.length;t+=1){var r=e[t];if(j(r)&&!I(r))return!1}return!0}var K=J("5.3.3"),ee=function(){function e(e,t,r){this.rules=e,this.staticRulesId="",this.isStatic=(void 0===r||r.isStatic)&&q(e),this.componentId=t,this.baseHash=V(K,t),this.baseStyle=r,G.registerId(t)}return e.prototype.generateAndInjectStyles=function(e,t,r){var o=this.componentId,n=[];if(this.baseStyle&&n.push(this.baseStyle.generateAndInjectStyles(e,t,r)),this.isStatic&&!r.hash)if(this.staticRulesId&&t.hasNameForId(o,this.staticRulesId))n.push(this.staticRulesId);else{var i=ye(this.rules,e,t,r).join(""),a=X(V(this.baseHash,i)>>>0);if(!t.hasNameForId(o,a)){var s=r(i,"."+a,void 0,o);t.insertRules(o,a,s)}n.push(a),this.staticRulesId=a}else{for(var l=this.rules.length,c=V(this.baseHash,r.hash),u="",d=0;d<l;d++){var f=this.rules[d];if("string"==typeof f)u+=f;else if(f){var g=ye(f,e,t,r),p=Array.isArray(g)?g.join(""):g;c=V(c,p+d),u+=p}}if(u){var m=X(c>>>0);if(!t.hasNameForId(o,m)){var h=r(u,"."+m,void 0,o);t.insertRules(o,m,h)}n.push(m)}}return n.join(" ")},e}(),te=/^\s*\/\/.*$/gm,re=[":","[",".","#"];function oe(e){var t,r,o,n,i=void 0===e?b:e,a=i.options,s=void 0===a?b:a,l=i.plugins,u=void 0===l?v:l,d=new c(s),f=[],g=function(e){function t(t){if(t)try{e(t+"}")}catch(e){}}return function(r,o,n,i,a,s,l,c,u,d){switch(r){case 1:if(0===u&&64===o.charCodeAt(0))return e(o+";"),"";break;case 2:if(0===c)return o+"/*|*/";break;case 3:switch(c){case 102:case 112:return e(n[0]+o),"";default:return o+(0===d?"/*|*/":"")}case-2:o.split("/*|*/}").forEach(t)}}}((function(e){f.push(e)})),p=function(e,o,i){return 0===o&&-1!==re.indexOf(i[r.length])||i.match(n)?e:"."+t};function m(e,i,a,s){void 0===s&&(s="&");var l=e.replace(te,""),c=i&&a?a+" "+i+" { "+l+" }":l;return t=s,r=i,o=new RegExp("\\"+r+"\\b","g"),n=new RegExp("(\\"+r+"\\b){2,}"),d(a||!i?"":i,c)}return d.use([].concat(u,[function(e,t,n){2===e&&n.length&&n[0].lastIndexOf(r)>0&&(n[0]=n[0].replace(o,p))},g,function(e){if(-2===e){var t=f;return f=[],t}}])),m.hash=u.length?u.reduce((function(e,t){return t.name||D(15),V(e,t.name)}),5381).toString():"",m}var ne=r().createContext(),ie=(ne.Consumer,r().createContext()),ae=(ie.Consumer,new G),se=oe();function le(){return(0,t.useContext)(ne)||ae}function ce(e){var o=(0,t.useState)(e.stylisPlugins),n=o[0],i=o[1],a=le(),s=(0,t.useMemo)((function(){var t=a;return e.sheet?t=e.sheet:e.target&&(t=t.reconstructWithOptions({target:e.target},!1)),e.disableCSSOMInjection&&(t=t.reconstructWithOptions({useCSSOMInjection:!1})),t}),[e.disableCSSOMInjection,e.sheet,e.target]),c=(0,t.useMemo)((function(){return oe({options:{prefix:!e.disableVendorPrefixes},plugins:n})}),[e.disableVendorPrefixes,n]);return(0,t.useEffect)((function(){l()(n,e.stylisPlugins)||i(e.stylisPlugins)}),[e.stylisPlugins]),r().createElement(ne.Provider,{value:s},r().createElement(ie.Provider,{value:c},e.children))}var ue=function(){function e(e,t){var r=this;this.inject=function(e,t){void 0===t&&(t=se);var o=r.name+t.hash;e.hasNameForId(r.id,o)||e.insertRules(r.id,o,t(r.rules,o,"@keyframes"))},this.toString=function(){return D(12,String(r.name))},this.name=e,this.id="sc-keyframes-"+e,this.rules=t}return e.prototype.getName=function(e){return void 0===e&&(e=se),this.name+e.hash},e}(),de=/([A-Z])/,fe=/([A-Z])/g,ge=/^ms-/,pe=function(e){return"-"+e.toLowerCase()};function me(e){return de.test(e)?e.replace(fe,pe).replace(ge,"-ms-"):e}var he=function(e){return null==e||!1===e||""===e};function ye(e,t,r,o){if(Array.isArray(e)){for(var n,i=[],a=0,s=e.length;a<s;a+=1)""!==(n=ye(e[a],t,r,o))&&(Array.isArray(n)?i.push.apply(i,n):i.push(n));return i}return he(e)?"":I(e)?"."+e.styledComponentId:j(e)?"function"!=typeof(l=e)||l.prototype&&l.prototype.isReactComponent||!t?e:ye(e(t),t,r,o):e instanceof ue?r?(e.inject(r,o),e.getName(o)):e:M(e)?function e(t,r){var o,n,i=[];for(var a in t)t.hasOwnProperty(a)&&!he(t[a])&&(Array.isArray(t[a])&&t[a].isCss||j(t[a])?i.push(me(a)+":",t[a],";"):M(t[a])?i.push.apply(i,e(t[a],a)):i.push(me(a)+": "+(o=a,(null==(n=t[a])||"boolean"==typeof n||""===n?"":"number"!=typeof n||0===n||o in u?String(n).trim():n+"px")+";")));return r?[r+" {"].concat(i,["}"]):i}(e):e.toString();var l}var Me=function(e){return Array.isArray(e)&&(e.isCss=!0),e};function ve(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),o=1;o<t;o++)r[o-1]=arguments[o];return j(e)||M(e)?Me(ye(y(v,[e].concat(r)))):0===r.length&&1===e.length&&"string"==typeof e[0]?e:Me(ye(y(e,r)))}new Set;var be=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,je=/(^-|-$)/g;function we(e){return e.replace(be,"-").replace(je,"")}function Ie(e){return"string"==typeof e&&!0}var Ae=function(e){return"function"==typeof e||"object"==typeof e&&null!==e&&!Array.isArray(e)},Ne=function(e){return"__proto__"!==e&&"constructor"!==e&&"prototype"!==e};function xe(e,t,r){var o=e[r];Ae(t)&&Ae(o)?De(o,t):e[r]=t}function De(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),o=1;o<t;o++)r[o-1]=arguments[o];for(var n=0,i=r;n<i.length;n++){var a=i[n];if(Ae(a))for(var s in a)Ne(s)&&xe(e,a[s],s)}return e}var ke=r().createContext();ke.Consumer;var Se={};function Ce(e,o,n){var i=I(e),a=!Ie(e),s=o.attrs,l=void 0===s?v:s,c=o.componentId,u=void 0===c?function(e,t){var r="string"!=typeof e?"sc":we(e);Se[r]=(Se[r]||0)+1;var o=r+"-"+function(e){return X(J(e)>>>0)}("5.3.3"+r+Se[r]);return t?t+"-"+o:o}(o.displayName,o.parentComponentId):c,d=o.displayName,g=void 0===d?function(e){return Ie(e)?"styled."+e:"Styled("+w(e)+")"}(e):d,p=o.displayName&&o.componentId?we(o.displayName)+"-"+o.componentId:o.componentId||u,y=i&&e.attrs?Array.prototype.concat(e.attrs,l).filter(Boolean):l,M=o.shouldForwardProp;i&&e.shouldForwardProp&&(M=o.shouldForwardProp?function(t,r,n){return e.shouldForwardProp(t,r,n)&&o.shouldForwardProp(t,r,n)}:e.shouldForwardProp);var A,N=new ee(n,p,i?e.componentStyle:void 0),x=N.isStatic&&0===l.length,D=function(e,r){return function(e,r,o,n){var i=e.attrs,a=e.componentStyle,s=e.defaultProps,l=e.foldedComponentIds,c=e.shouldForwardProp,u=e.styledComponentId,d=e.target,g=function(e,t,r){void 0===e&&(e=b);var o=h({},t,{theme:e}),n={};return r.forEach((function(e){var t,r,i,a=e;for(t in j(a)&&(a=a(o)),a)o[t]=n[t]="className"===t?(r=n[t],i=a[t],r&&i?r+" "+i:r||i):a[t]})),[o,n]}(function(e,t,r){return void 0===r&&(r=b),e.theme!==r.theme&&e.theme||t||r.theme}(r,(0,t.useContext)(ke),s)||b,r,i),p=g[0],m=g[1],y=function(e,r,o,n){var i=le(),a=(0,t.useContext)(ie)||se;return r?e.generateAndInjectStyles(b,i,a):e.generateAndInjectStyles(o,i,a)}(a,n,p),M=o,v=m.$as||r.$as||m.as||r.as||d,w=Ie(v),I=m!==r?h({},r,{},m):r,A={};for(var N in I)"$"!==N[0]&&"as"!==N&&("forwardedAs"===N?A.as=I[N]:(c?c(N,f,v):!w||f(N))&&(A[N]=I[N]));return r.style&&m.style!==r.style&&(A.style=h({},r.style,{},m.style)),A.className=Array.prototype.concat(l,u,y!==u?y:null,r.className,m.className).filter(Boolean).join(" "),A.ref=M,(0,t.createElement)(v,A)}(A,e,r,x)};return D.displayName=g,(A=r().forwardRef(D)).attrs=y,A.componentStyle=N,A.displayName=g,A.shouldForwardProp=M,A.foldedComponentIds=i?Array.prototype.concat(e.foldedComponentIds,e.styledComponentId):v,A.styledComponentId=p,A.target=i?e.target:e,A.withComponent=function(e){var t=o.componentId,r=function(e,t){if(null==e)return{};var r,o,n={},i=Object.keys(e);for(o=0;o<i.length;o++)r=i[o],t.indexOf(r)>=0||(n[r]=e[r]);return n}(o,["componentId"]),i=t&&t+"-"+(Ie(e)?e:we(w(e)));return Ce(e,h({},r,{attrs:y,componentId:i}),n)},Object.defineProperty(A,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(t){this._foldedDefaultProps=i?De({},e.defaultProps,t):t}}),A.toString=function(){return"."+A.styledComponentId},a&&m()(A,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0,withComponent:!0}),A}var Oe,ze=function(e){return function e(t,r,o){if(void 0===o&&(o=b),!(0,n.isValidElementType)(r))return D(1,String(r));var i=function(){return t(r,o,ve.apply(void 0,arguments))};return i.withConfig=function(n){return e(t,r,h({},o,{},n))},i.attrs=function(n){return e(t,r,h({},o,{attrs:Array.prototype.concat(o.attrs,n).filter(Boolean)}))},i}(Ce,e)};["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","textPath","tspan"].forEach((function(e){ze[e]=ze(e)})),Oe=function(e,t){this.rules=e,this.componentId=t,this.isStatic=q(e),G.registerId(this.componentId+1)}.prototype,Oe.createStyles=function(e,t,r,o){var n=o(ye(this.rules,t,r,o).join(""),""),i=this.componentId+e;r.insertRules(i,i,n)},Oe.removeStyles=function(e,t){t.clearRules(this.componentId+e)},Oe.renderStyles=function(e,t,r,o){e>2&&G.registerId(this.componentId+e),this.removeStyles(e,r),this.createStyles(e,t,r,o)},function(){var e=function(){var e=this;this._emitSheetCSS=function(){var t=e.instance.toString();if(!t)return"";var r=Z();return"<style "+[r&&'nonce="'+r+'"',A+'="true"','data-styled-version="5.3.3"'].filter(Boolean).join(" ")+">"+t+"</style>"},this.getStyleTags=function(){return e.sealed?D(2):e._emitSheetCSS()},this.getStyleElement=function(){var t;if(e.sealed)return D(2);var o=((t={})[A]="",t["data-styled-version"]="5.3.3",t.dangerouslySetInnerHTML={__html:e.instance.toString()},t),n=Z();return n&&(o.nonce=n),[r().createElement("style",h({},o,{key:"sc-0-0"}))]},this.seal=function(){e.sealed=!0},this.instance=new G({isServer:!0}),this.sealed=!1}.prototype;e.collectStyles=function(e){return this.sealed?D(2):r().createElement(ce,{sheet:this.instance},e)},e.interleaveWithNodeStream=function(e){return D(3)}}();const Te=ze,Ee=Te.div`
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("react"));else if("function"==typeof define&&define.amd)define(["react"],t);else{var r="object"==typeof exports?t(require("react")):t(e.react);for(var o in r)("object"==typeof exports?exports:e)[o]=r[o]}}(self,(e=>(()=>{var t,r,o={58:(e,t,r)=>{"use strict";var o=r(594),n={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function l(e){return o.isMemo(e)?a:s[e.$$typeof]||n}s[o.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[o.Memo]=a;var c=Object.defineProperty,u=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,f=Object.getOwnPropertyDescriptor,g=Object.getPrototypeOf,p=Object.prototype;e.exports=function e(t,r,o){if("string"!=typeof r){if(p){var n=g(r);n&&n!==p&&e(t,n,o)}var a=u(r);d&&(a=a.concat(d(r)));for(var s=l(t),m=l(r),h=0;h<a.length;++h){var y=a[h];if(!(i[y]||o&&o[y]||m&&m[y]||s&&s[y])){var M=f(r,y);try{c(t,y,M)}catch(e){}}}}return t}},516:e=>{"use strict";var t=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;function n(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},r=0;r<10;r++)t["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var o={};return"abcdefghijklmnopqrst".split("").forEach((function(e){o[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},o)).join("")}catch(e){return!1}}()?Object.assign:function(e,i){for(var a,s,l=n(e),c=1;c<arguments.length;c++){for(var u in a=Object(arguments[c]))r.call(a,u)&&(l[u]=a[u]);if(t){s=t(a);for(var d=0;d<s.length;d++)o.call(a,s[d])&&(l[s[d]]=a[s[d]])}}return l}},697:(e,t)=>{"use strict";var r="function"==typeof Symbol&&Symbol.for,o=r?Symbol.for("react.element"):60103,n=r?Symbol.for("react.portal"):60106,i=r?Symbol.for("react.fragment"):60107,a=r?Symbol.for("react.strict_mode"):60108,s=r?Symbol.for("react.profiler"):60114,l=r?Symbol.for("react.provider"):60109,c=r?Symbol.for("react.context"):60110,u=r?Symbol.for("react.async_mode"):60111,d=r?Symbol.for("react.concurrent_mode"):60111,f=r?Symbol.for("react.forward_ref"):60112,g=r?Symbol.for("react.suspense"):60113,p=r?Symbol.for("react.suspense_list"):60120,m=r?Symbol.for("react.memo"):60115,h=r?Symbol.for("react.lazy"):60116,y=r?Symbol.for("react.block"):60121,M=r?Symbol.for("react.fundamental"):60117,v=r?Symbol.for("react.responder"):60118,b=r?Symbol.for("react.scope"):60119;function j(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case o:switch(e=e.type){case u:case d:case i:case s:case a:case g:return e;default:switch(e=e&&e.$$typeof){case c:case f:case h:case m:case l:return e;default:return t}}case n:return t}}}function w(e){return j(e)===d}t.AsyncMode=u,t.ConcurrentMode=d,t.ContextConsumer=c,t.ContextProvider=l,t.Element=o,t.ForwardRef=f,t.Fragment=i,t.Lazy=h,t.Memo=m,t.Portal=n,t.Profiler=s,t.StrictMode=a,t.Suspense=g,t.isAsyncMode=function(e){return w(e)||j(e)===u},t.isConcurrentMode=w,t.isContextConsumer=function(e){return j(e)===c},t.isContextProvider=function(e){return j(e)===l},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===o},t.isForwardRef=function(e){return j(e)===f},t.isFragment=function(e){return j(e)===i},t.isLazy=function(e){return j(e)===h},t.isMemo=function(e){return j(e)===m},t.isPortal=function(e){return j(e)===n},t.isProfiler=function(e){return j(e)===s},t.isStrictMode=function(e){return j(e)===a},t.isSuspense=function(e){return j(e)===g},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===i||e===d||e===s||e===a||e===g||e===p||"object"==typeof e&&null!==e&&(e.$$typeof===h||e.$$typeof===m||e.$$typeof===l||e.$$typeof===c||e.$$typeof===f||e.$$typeof===M||e.$$typeof===v||e.$$typeof===b||e.$$typeof===y)},t.typeOf=j},594:(e,t,r)=>{"use strict";e.exports=r(697)},94:(e,t,r)=>{"use strict";r(516);var o=r(156),n=60103;if("function"==typeof Symbol&&Symbol.for){var i=Symbol.for;n=i("react.element"),i("react.fragment")}var a=o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s=Object.prototype.hasOwnProperty,l={key:!0,ref:!0,__self:!0,__source:!0};function c(e,t,r){var o,i={},c=null,u=null;for(o in void 0!==r&&(c=""+r),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(u=t.ref),t)s.call(t,o)&&!l.hasOwnProperty(o)&&(i[o]=t[o]);if(e&&e.defaultProps)for(o in t=e.defaultProps)void 0===i[o]&&(i[o]=t[o]);return{$$typeof:n,type:e,key:c,ref:u,props:i,_owner:a.current}}t.jsx=c,t.jsxs=c},512:(e,t,r)=>{"use strict";e.exports=r(94)},7:e=>{e.exports=function(e,t,r,o){var n=r?r.call(o,e,t):void 0;if(void 0!==n)return!!n;if(e===t)return!0;if("object"!=typeof e||!e||"object"!=typeof t||!t)return!1;var i=Object.keys(e),a=Object.keys(t);if(i.length!==a.length)return!1;for(var s=Object.prototype.hasOwnProperty.bind(t),l=0;l<i.length;l++){var c=i[l];if(!s(c))return!1;var u=e[c],d=t[c];if(!1===(n=r?r.call(o,u,d,c):void 0)||void 0===n&&u!==d)return!1}return!0}},156:t=>{"use strict";t.exports=e}},n={};function i(e){var t=n[e];if(void 0!==t)return t.exports;var r=n[e]={exports:{}};return o[e](r,r.exports,i),r.exports}i.m=o,i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(var r in t)i.o(t,r)&&!i.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},i.f={},i.e=e=>Promise.all(Object.keys(i.f).reduce(((t,r)=>(i.f[r](e,t),t)),[])),i.u=e=>167===e?"vendors.f67ae33fc1a23991db96.bundle.js":628===e?"threeExperience.bundle.js":27===e?"vendors.46242851acce02152166.bundle.js":322===e?"dracoCompress.bundle.js":void 0,i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),t={},r="@r2u/viewer:",i.l=(e,o,n,a)=>{if(t[e])t[e].push(o);else{var s,l;if(void 0!==n)for(var c=document.getElementsByTagName("script"),u=0;u<c.length;u++){var d=c[u];if(d.getAttribute("src")==e||d.getAttribute("data-webpack")==r+n){s=d;break}}s||(l=!0,(s=document.createElement("script")).charset="utf-8",s.timeout=120,i.nc&&s.setAttribute("nonce",i.nc),s.setAttribute("data-webpack",r+n),s.src=e),t[e]=[o];var f=(r,o)=>{s.onerror=s.onload=null,clearTimeout(g);var n=t[e];if(delete t[e],s.parentNode&&s.parentNode.removeChild(s),n&&n.forEach((e=>e(o))),r)return r(o)},g=setTimeout(f.bind(null,void 0,{type:"timeout",target:s}),12e4);s.onerror=f.bind(null,s.onerror),s.onload=f.bind(null,s.onload),l&&document.head.appendChild(s)}},i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.p="https://unpkg.com/@r2u/viewer@1.5.3/dist/",(()=>{var e={179:0};i.f.j=(t,r)=>{var o=i.o(e,t)?e[t]:void 0;if(0!==o)if(o)r.push(o[2]);else{var n=new Promise(((r,n)=>o=e[t]=[r,n]));r.push(o[2]=n);var a=i.p+i.u(t),s=new Error;i.l(a,(r=>{if(i.o(e,t)&&(0!==(o=e[t])&&(e[t]=void 0),o)){var n=r&&("load"===r.type?"missing":r.type),a=r&&r.target&&r.target.src;s.message="Loading chunk "+t+" failed.\n("+n+": "+a+")",s.name="ChunkLoadError",s.type=n,s.request=a,o[1](s)}}),"chunk-"+t,t)}};var t=(t,r)=>{var o,n,[a,s,l]=r,c=0;if(a.some((t=>0!==e[t]))){for(o in s)i.o(s,o)&&(i.m[o]=s[o]);l&&l(i)}for(t&&t(r);c<a.length;c++)n=a[c],i.o(e,n)&&e[n]&&e[n][0](),e[n]=0},r=self.webpackChunk_r2u_viewer=self.webpackChunk_r2u_viewer||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))})();var a={};return(()=>{"use strict";i.r(a),i.d(a,{default:()=>at});var e=i(512),t=i(156),r=i.n(t);const o="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNzAiIGhlaWdodD0iNjkiIHZpZXdCb3g9IjAgMCA3MCA2OSIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgY2xpcC1wYXRoPSJ1cmwoI2NsaXAwXzE4Ml85NDcpIj4KPGcgZmlsdGVyPSJ1cmwoI2ZpbHRlcjBfZF8xODJfOTQ3KSI+CjxwYXRoIGQ9Ik01NC4wNDU5IDQwLjgzNjNMNDEuMTQyNSAzNC42MzJDNDAuNjU5NCAzNC40Mzk4IDQwLjE0NzggMzQuMzMgMzkuNjA3OCAzNC4zM0MzOC40MTQ4IDM0LjMzIDM3LjQ0NzcgMzMuMzYyOSAzNy40NDc3IDMyLjE3VjE3Ljg1ODNDMzcuNDQ3NyAxNS41Nzk3IDM1LjU0MzUgMTMuNzQwNCAzMy4xODQ1IDEzLjc0MDRDMzAuODI1NSAxMy43NDA0IDI4LjkyMTMgMTUuNTc5NyAyOC45MjEzIDE3Ljg1ODNWMzcuNTU3OEMyOC45MjEzIDQyLjYxNDggMjQuMjg3OCA0Ni40MDMxIDE5LjMzMTYgNDUuMzk4MkwxOS4xNzI3IDQ1LjM2NkMxOC45NDUzIDQ1LjMzODYgMTguNzQ2NCA0NS4yODM3IDE4LjQ5MDYgNDUuMjgzN0MxNy42MDk1IDQ1LjI4MzcgMTYuODEzNyA0NS42NDA2IDE2LjI0NTMgNDYuMTg5NkMxNS4wMTU3IDQ3LjM5MjMgMTUuMDIxOSA0OS4zNzI5IDE2LjI1OTEgNTAuNTY3OUwyOC4wNDAyIDYxLjk0NzVDMjguODA3NiA2Mi42ODg4IDI5Ljg4NzYgNjMuMTU1NSAzMS4wNTI5IDYzLjE1NTVINTAuMzUxMUM1Mi40ODI3IDYzLjE1NTUgNTQuMTMxMiA2MS42NDU2IDU0LjQ0MzggNTkuNjQxNUw1Ni41NzU0IDQ1LjE3MzlDNTYuNjAzOCA0NC45ODE3IDU2LjYzMjMgNDQuNzg5NSA1Ni42MzIzIDQ0LjYyNDhDNTYuNjMyMyA0Mi45MjI3IDU1LjU1MjIgNDEuNDQwMyA1NC4wNDU5IDQwLjgzNjNaIiBmaWxsPSJ3aGl0ZSIvPgo8cGF0aCBkPSJNMjAuNzYxOCAxOS44MjYzQzIxLjM5MTUgMjQuMTk1NCAyNi4xMDUyIDIyLjQxMjYgMjYuMTA1MiAxNy45OTgyQzI2LjEwNTIgMTQuMTY2OCAyOS4xNzA1IDExLjA1NzMgMzIuOTQ3NSAxMS4wNTczQzM2LjcyNDQgMTEuMDU3MyAzOS43ODk3IDE0LjE2NjggMzkuNzg5NyAxNy45OTgyQzM5Ljc4OTcgMjIuNDEyNiA0NC41MDM0IDI0LjE5NTQgNDUuMTMzMSAxOS44MjYzQzQ1LjIxOTEgMTkuMjI5OCA0NS4yNjM2IDE4LjYxOTQgNDUuMjYzNiAxNy45OTgyQzQ1LjI2MzYgMTEuMDg1IDM5Ljc2MjQgNS41MDQ1MiAzMi45NDc1IDUuNTA0NTJDMjYuMTMyNSA1LjUwNDUyIDIwLjYzMTMgMTEuMDg1IDIwLjYzMTMgMTcuOTk4MkMyMC42MzEzIDE4LjYxOTQgMjAuNjc1OCAxOS4yMjk4IDIwLjc2MTggMTkuODI2M1oiIGZpbGw9IiNEREREREQiLz4KPC9nPgo8L2c+CjxkZWZzPgo8ZmlsdGVyIGlkPSJmaWx0ZXIwX2RfMTgyXzk0NyIgeD0iMTIuMzI3MSIgeT0iMi41MDQ1MiIgd2lkdGg9IjUxLjMwNTIiIGhlaWdodD0iNjcuNjUxIiBmaWx0ZXJVbml0cz0idXNlclNwYWNlT25Vc2UiIGNvbG9yLWludGVycG9sYXRpb24tZmlsdGVycz0ic1JHQiI+CjxmZUZsb29kIGZsb29kLW9wYWNpdHk9IjAiIHJlc3VsdD0iQmFja2dyb3VuZEltYWdlRml4Ii8+CjxmZUNvbG9yTWF0cml4IGluPSJTb3VyY2VBbHBoYSIgdHlwZT0ibWF0cml4IiB2YWx1ZXM9IjAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDEyNyAwIiByZXN1bHQ9ImhhcmRBbHBoYSIvPgo8ZmVPZmZzZXQgZHg9IjIiIGR5PSIyIi8+CjxmZUdhdXNzaWFuQmx1ciBzdGREZXZpYXRpb249IjIuNSIvPgo8ZmVDb2xvck1hdHJpeCB0eXBlPSJtYXRyaXgiIHZhbHVlcz0iMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMC4yNSAwIi8+CjxmZUJsZW5kIG1vZGU9Im5vcm1hbCIgaW4yPSJCYWNrZ3JvdW5kSW1hZ2VGaXgiIHJlc3VsdD0iZWZmZWN0MV9kcm9wU2hhZG93XzE4Ml85NDciLz4KPGZlQmxlbmQgbW9kZT0ibm9ybWFsIiBpbj0iU291cmNlR3JhcGhpYyIgaW4yPSJlZmZlY3QxX2Ryb3BTaGFkb3dfMTgyXzk0NyIgcmVzdWx0PSJzaGFwZSIvPgo8L2ZpbHRlcj4KPGNsaXBQYXRoIGlkPSJjbGlwMF8xODJfOTQ3Ij4KPHJlY3Qgd2lkdGg9IjcwIiBoZWlnaHQ9IjY4LjgwNjgiIGZpbGw9IndoaXRlIi8+CjwvY2xpcFBhdGg+CjwvZGVmcz4KPC9zdmc+Cg==";var n=i(594),s=i(7),l=i.n(s);const c=function(e){function t(e,o,l,c,f){for(var g,p,m,h,b,w=0,I=0,A=0,N=0,x=0,z=0,E=m=g=0,Y=0,P=0,R=0,Z=0,B=l.length,U=B-1,Q="",_="",H="",F="";Y<B;){if(p=l.charCodeAt(Y),Y===U&&0!==I+N+A+w&&(0!==I&&(p=47===I?10:47),N=A=w=0,B++,U++),0===I+N+A+w){if(Y===U&&(0<P&&(Q=Q.replace(d,"")),0<Q.trim().length)){switch(p){case 32:case 9:case 59:case 13:case 10:break;default:Q+=l.charAt(Y)}p=59}switch(p){case 123:for(g=(Q=Q.trim()).charCodeAt(0),m=1,Z=++Y;Y<B;){switch(p=l.charCodeAt(Y)){case 123:m++;break;case 125:m--;break;case 47:switch(p=l.charCodeAt(Y+1)){case 42:case 47:e:{for(E=Y+1;E<U;++E)switch(l.charCodeAt(E)){case 47:if(42===p&&42===l.charCodeAt(E-1)&&Y+2!==E){Y=E+1;break e}break;case 10:if(47===p){Y=E+1;break e}}Y=E}}break;case 91:p++;case 40:p++;case 34:case 39:for(;Y++<U&&l.charCodeAt(Y)!==p;);}if(0===m)break;Y++}if(m=l.substring(Z,Y),0===g&&(g=(Q=Q.replace(u,"").trim()).charCodeAt(0)),64===g){switch(0<P&&(Q=Q.replace(d,"")),p=Q.charCodeAt(1)){case 100:case 109:case 115:case 45:P=o;break;default:P=O}if(Z=(m=t(o,P,m,p,f+1)).length,0<T&&(b=s(3,m,P=r(O,Q,R),o,k,D,Z,p,f,c),Q=P.join(""),void 0!==b&&0===(Z=(m=b.trim()).length)&&(p=0,m="")),0<Z)switch(p){case 115:Q=Q.replace(j,a);case 100:case 109:case 45:m=Q+"{"+m+"}";break;case 107:m=(Q=Q.replace(y,"$1 $2"))+"{"+m+"}",m=1===C||2===C&&i("@"+m,3)?"@-webkit-"+m+"@"+m:"@"+m;break;default:m=Q+m,112===c&&(_+=m,m="")}else m=""}else m=t(o,r(o,Q,R),m,c,f+1);H+=m,m=R=P=E=g=0,Q="",p=l.charCodeAt(++Y);break;case 125:case 59:if(1<(Z=(Q=(0<P?Q.replace(d,""):Q).trim()).length))switch(0===E&&(g=Q.charCodeAt(0),45===g||96<g&&123>g)&&(Z=(Q=Q.replace(" ",":")).length),0<T&&void 0!==(b=s(1,Q,o,e,k,D,_.length,c,f,c))&&0===(Z=(Q=b.trim()).length)&&(Q="\0\0"),g=Q.charCodeAt(0),p=Q.charCodeAt(1),g){case 0:break;case 64:if(105===p||99===p){F+=Q+l.charAt(Y);break}default:58!==Q.charCodeAt(Z-1)&&(_+=n(Q,g,p,Q.charCodeAt(2)))}R=P=E=g=0,Q="",p=l.charCodeAt(++Y)}}switch(p){case 13:case 10:47===I?I=0:0===1+g&&107!==c&&0<Q.length&&(P=1,Q+="\0"),0<T*L&&s(0,Q,o,e,k,D,_.length,c,f,c),D=1,k++;break;case 59:case 125:if(0===I+N+A+w){D++;break}default:switch(D++,h=l.charAt(Y),p){case 9:case 32:if(0===N+w+I)switch(x){case 44:case 58:case 9:case 32:h="";break;default:32!==p&&(h=" ")}break;case 0:h="\\0";break;case 12:h="\\f";break;case 11:h="\\v";break;case 38:0===N+I+w&&(P=R=1,h="\f"+h);break;case 108:if(0===N+I+w+S&&0<E)switch(Y-E){case 2:112===x&&58===l.charCodeAt(Y-3)&&(S=x);case 8:111===z&&(S=z)}break;case 58:0===N+I+w&&(E=Y);break;case 44:0===I+A+N+w&&(P=1,h+="\r");break;case 34:case 39:0===I&&(N=N===p?0:0===N?p:N);break;case 91:0===N+I+A&&w++;break;case 93:0===N+I+A&&w--;break;case 41:0===N+I+w&&A--;break;case 40:0===N+I+w&&(0===g&&(2*x+3*z==533||(g=1)),A++);break;case 64:0===I+A+N+w+E+m&&(m=1);break;case 42:case 47:if(!(0<N+w+A))switch(I){case 0:switch(2*p+3*l.charCodeAt(Y+1)){case 235:I=47;break;case 220:Z=Y,I=42}break;case 42:47===p&&42===x&&Z+2!==Y&&(33===l.charCodeAt(Z+2)&&(_+=l.substring(Z,Y+1)),h="",I=0)}}0===I&&(Q+=h)}z=x,x=p,Y++}if(0<(Z=_.length)){if(P=o,0<T&&void 0!==(b=s(2,_,P,e,k,D,Z,c,f,c))&&0===(_=b).length)return F+_+H;if(_=P.join(",")+"{"+_+"}",0!=C*S){switch(2!==C||i(_,2)||(S=0),S){case 111:_=_.replace(v,":-moz-$1")+_;break;case 112:_=_.replace(M,"::-webkit-input-$1")+_.replace(M,"::-moz-$1")+_.replace(M,":-ms-input-$1")+_}S=0}}return F+_+H}function r(e,t,r){var n=t.trim().split(m);t=n;var i=n.length,a=e.length;switch(a){case 0:case 1:var s=0;for(e=0===a?"":e[0]+" ";s<i;++s)t[s]=o(e,t[s],r).trim();break;default:var l=s=0;for(t=[];s<i;++s)for(var c=0;c<a;++c)t[l++]=o(e[c]+" ",n[s],r).trim()}return t}function o(e,t,r){var o=t.charCodeAt(0);switch(33>o&&(o=(t=t.trim()).charCodeAt(0)),o){case 38:return t.replace(h,"$1"+e.trim());case 58:return e.trim()+t.replace(h,"$1"+e.trim());default:if(0<1*r&&0<t.indexOf("\f"))return t.replace(h,(58===e.charCodeAt(0)?"":"$1")+e.trim())}return e+t}function n(e,t,r,o){var a=e+";",s=2*t+3*r+4*o;if(944===s){e=a.indexOf(":",9)+1;var l=a.substring(e,a.length-1).trim();return l=a.substring(0,e).trim()+l+";",1===C||2===C&&i(l,1)?"-webkit-"+l+l:l}if(0===C||2===C&&!i(a,1))return a;switch(s){case 1015:return 97===a.charCodeAt(10)?"-webkit-"+a+a:a;case 951:return 116===a.charCodeAt(3)?"-webkit-"+a+a:a;case 963:return 110===a.charCodeAt(5)?"-webkit-"+a+a:a;case 1009:if(100!==a.charCodeAt(4))break;case 969:case 942:return"-webkit-"+a+a;case 978:return"-webkit-"+a+"-moz-"+a+a;case 1019:case 983:return"-webkit-"+a+"-moz-"+a+"-ms-"+a+a;case 883:if(45===a.charCodeAt(8))return"-webkit-"+a+a;if(0<a.indexOf("image-set(",11))return a.replace(x,"$1-webkit-$2")+a;break;case 932:if(45===a.charCodeAt(4))switch(a.charCodeAt(5)){case 103:return"-webkit-box-"+a.replace("-grow","")+"-webkit-"+a+"-ms-"+a.replace("grow","positive")+a;case 115:return"-webkit-"+a+"-ms-"+a.replace("shrink","negative")+a;case 98:return"-webkit-"+a+"-ms-"+a.replace("basis","preferred-size")+a}return"-webkit-"+a+"-ms-"+a+a;case 964:return"-webkit-"+a+"-ms-flex-"+a+a;case 1023:if(99!==a.charCodeAt(8))break;return"-webkit-box-pack"+(l=a.substring(a.indexOf(":",15)).replace("flex-","").replace("space-between","justify"))+"-webkit-"+a+"-ms-flex-pack"+l+a;case 1005:return g.test(a)?a.replace(f,":-webkit-")+a.replace(f,":-moz-")+a:a;case 1e3:switch(t=(l=a.substring(13).trim()).indexOf("-")+1,l.charCodeAt(0)+l.charCodeAt(t)){case 226:l=a.replace(b,"tb");break;case 232:l=a.replace(b,"tb-rl");break;case 220:l=a.replace(b,"lr");break;default:return a}return"-webkit-"+a+"-ms-"+l+a;case 1017:if(-1===a.indexOf("sticky",9))break;case 975:switch(t=(a=e).length-10,s=(l=(33===a.charCodeAt(t)?a.substring(0,t):a).substring(e.indexOf(":",7)+1).trim()).charCodeAt(0)+(0|l.charCodeAt(7))){case 203:if(111>l.charCodeAt(8))break;case 115:a=a.replace(l,"-webkit-"+l)+";"+a;break;case 207:case 102:a=a.replace(l,"-webkit-"+(102<s?"inline-":"")+"box")+";"+a.replace(l,"-webkit-"+l)+";"+a.replace(l,"-ms-"+l+"box")+";"+a}return a+";";case 938:if(45===a.charCodeAt(5))switch(a.charCodeAt(6)){case 105:return l=a.replace("-items",""),"-webkit-"+a+"-webkit-box-"+l+"-ms-flex-"+l+a;case 115:return"-webkit-"+a+"-ms-flex-item-"+a.replace(I,"")+a;default:return"-webkit-"+a+"-ms-flex-line-pack"+a.replace("align-content","").replace(I,"")+a}break;case 973:case 989:if(45!==a.charCodeAt(3)||122===a.charCodeAt(4))break;case 931:case 953:if(!0===N.test(e))return 115===(l=e.substring(e.indexOf(":")+1)).charCodeAt(0)?n(e.replace("stretch","fill-available"),t,r,o).replace(":fill-available",":stretch"):a.replace(l,"-webkit-"+l)+a.replace(l,"-moz-"+l.replace("fill-",""))+a;break;case 962:if(a="-webkit-"+a+(102===a.charCodeAt(5)?"-ms-"+a:"")+a,211===r+o&&105===a.charCodeAt(13)&&0<a.indexOf("transform",10))return a.substring(0,a.indexOf(";",27)+1).replace(p,"$1-webkit-$2")+a}return a}function i(e,t){var r=e.indexOf(1===t?":":"{"),o=e.substring(0,3!==t?r:10);return r=e.substring(r+1,e.length-1),E(2!==t?o:o.replace(A,"$1"),r,t)}function a(e,t){var r=n(t,t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2));return r!==t+";"?r.replace(w," or ($1)").substring(4):"("+t+")"}function s(e,t,r,o,n,i,a,s,l,u){for(var d,f=0,g=t;f<T;++f)switch(d=z[f].call(c,e,g,r,o,n,i,a,s,l,u)){case void 0:case!1:case!0:case null:break;default:g=d}if(g!==t)return g}function l(e){return void 0!==(e=e.prefix)&&(E=null,e?"function"!=typeof e?C=1:(C=2,E=e):C=0),l}function c(e,r){var o=e;if(33>o.charCodeAt(0)&&(o=o.trim()),o=[o],0<T){var n=s(-1,r,o,o,k,D,0,0,0,0);void 0!==n&&"string"==typeof n&&(r=n)}var i=t(O,o,r,0,0);return 0<T&&void 0!==(n=s(-2,i,o,o,k,D,i.length,0,0,0))&&(i=n),S=0,D=k=1,i}var u=/^\0+/g,d=/[\0\r\f]/g,f=/: */g,g=/zoo|gra/,p=/([,: ])(transform)/g,m=/,\r+?/g,h=/([\t\r\n ])*\f?&/g,y=/@(k\w+)\s*(\S*)\s*/,M=/::(place)/g,v=/:(read-only)/g,b=/[svh]\w+-[tblr]{2}/,j=/\(\s*(.*)\s*\)/g,w=/([\s\S]*?);/g,I=/-self|flex-/g,A=/[^]*?(:[rp][el]a[\w-]+)[^]*/,N=/stretch|:\s*\w+\-(?:conte|avail)/,x=/([^-])(image-set\()/,D=1,k=1,S=0,C=1,O=[],z=[],T=0,E=null,L=0;return c.use=function e(t){switch(t){case void 0:case null:T=z.length=0;break;default:if("function"==typeof t)z[T++]=t;else if("object"==typeof t)for(var r=0,o=t.length;r<o;++r)e(t[r]);else L=0|!!t}return e},c.set=l,void 0!==e&&l(e),c},u={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};var d=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|inert|itemProp|itemScope|itemType|itemID|itemRef|on|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/;const f=(g={},function(e){return void 0===g[e]&&(g[e]=(t=e,d.test(t)||111===t.charCodeAt(0)&&110===t.charCodeAt(1)&&t.charCodeAt(2)<91)),g[e];var t});var g,p=i(58),m=i.n(p);function h(){return(h=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e}).apply(this,arguments)}var y=function(e,t){for(var r=[e[0]],o=0,n=t.length;o<n;o+=1)r.push(t[o],e[o+1]);return r},M=function(e){return null!==e&&"object"==typeof e&&"[object Object]"===(e.toString?e.toString():Object.prototype.toString.call(e))&&!(0,n.typeOf)(e)},v=Object.freeze([]),b=Object.freeze({});function j(e){return"function"==typeof e}function w(e){return e.displayName||e.name||"Component"}function I(e){return e&&"string"==typeof e.styledComponentId}var A="undefined"!=typeof process&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||"data-styled",N="undefined"!=typeof window&&"HTMLElement"in window,x=Boolean("boolean"==typeof SC_DISABLE_SPEEDY?SC_DISABLE_SPEEDY:"undefined"!=typeof process&&void 0!==process.env.REACT_APP_SC_DISABLE_SPEEDY&&""!==process.env.REACT_APP_SC_DISABLE_SPEEDY?"false"!==process.env.REACT_APP_SC_DISABLE_SPEEDY&&process.env.REACT_APP_SC_DISABLE_SPEEDY:"undefined"!=typeof process&&void 0!==process.env.SC_DISABLE_SPEEDY&&""!==process.env.SC_DISABLE_SPEEDY&&"false"!==process.env.SC_DISABLE_SPEEDY&&process.env.SC_DISABLE_SPEEDY);function D(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),o=1;o<t;o++)r[o-1]=arguments[o];throw new Error("An error occurred. See https://git.io/JUIaE#"+e+" for more information."+(r.length>0?" Args: "+r.join(", "):""))}var k=function(){function e(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e}var t=e.prototype;return t.indexOfGroup=function(e){for(var t=0,r=0;r<e;r++)t+=this.groupSizes[r];return t},t.insertRules=function(e,t){if(e>=this.groupSizes.length){for(var r=this.groupSizes,o=r.length,n=o;e>=n;)(n<<=1)<0&&D(16,""+e);this.groupSizes=new Uint32Array(n),this.groupSizes.set(r),this.length=n;for(var i=o;i<n;i++)this.groupSizes[i]=0}for(var a=this.indexOfGroup(e+1),s=0,l=t.length;s<l;s++)this.tag.insertRule(a,t[s])&&(this.groupSizes[e]++,a++)},t.clearGroup=function(e){if(e<this.length){var t=this.groupSizes[e],r=this.indexOfGroup(e),o=r+t;this.groupSizes[e]=0;for(var n=r;n<o;n++)this.tag.deleteRule(r)}},t.getGroup=function(e){var t="";if(e>=this.length||0===this.groupSizes[e])return t;for(var r=this.groupSizes[e],o=this.indexOfGroup(e),n=o+r,i=o;i<n;i++)t+=this.tag.getRule(i)+"/*!sc*/\n";return t},e}(),S=new Map,C=new Map,O=1,z=function(e){if(S.has(e))return S.get(e);for(;C.has(O);)O++;var t=O++;return S.set(e,t),C.set(t,e),t},T=function(e){return C.get(e)},E=function(e,t){t>=O&&(O=t+1),S.set(e,t),C.set(t,e)},L="style["+A+'][data-styled-version="5.3.3"]',Y=new RegExp("^"+A+'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)'),P=function(e,t,r){for(var o,n=r.split(","),i=0,a=n.length;i<a;i++)(o=n[i])&&e.registerName(t,o)},R=function(e,t){for(var r=(t.textContent||"").split("/*!sc*/\n"),o=[],n=0,i=r.length;n<i;n++){var a=r[n].trim();if(a){var s=a.match(Y);if(s){var l=0|parseInt(s[1],10),c=s[2];0!==l&&(E(c,l),P(e,c,s[3]),e.getTag().insertRules(l,o)),o.length=0}else o.push(a)}}},Z=function(){return"undefined"!=typeof window&&void 0!==window.__webpack_nonce__?window.__webpack_nonce__:null},B=function(e){var t=document.head,r=e||t,o=document.createElement("style"),n=function(e){for(var t=e.childNodes,r=t.length;r>=0;r--){var o=t[r];if(o&&1===o.nodeType&&o.hasAttribute(A))return o}}(r),i=void 0!==n?n.nextSibling:null;o.setAttribute(A,"active"),o.setAttribute("data-styled-version","5.3.3");var a=Z();return a&&o.setAttribute("nonce",a),r.insertBefore(o,i),o},U=function(){function e(e){var t=this.element=B(e);t.appendChild(document.createTextNode("")),this.sheet=function(e){if(e.sheet)return e.sheet;for(var t=document.styleSheets,r=0,o=t.length;r<o;r++){var n=t[r];if(n.ownerNode===e)return n}D(17)}(t),this.length=0}var t=e.prototype;return t.insertRule=function(e,t){try{return this.sheet.insertRule(t,e),this.length++,!0}catch(e){return!1}},t.deleteRule=function(e){this.sheet.deleteRule(e),this.length--},t.getRule=function(e){var t=this.sheet.cssRules[e];return void 0!==t&&"string"==typeof t.cssText?t.cssText:""},e}(),Q=function(){function e(e){var t=this.element=B(e);this.nodes=t.childNodes,this.length=0}var t=e.prototype;return t.insertRule=function(e,t){if(e<=this.length&&e>=0){var r=document.createTextNode(t),o=this.nodes[e];return this.element.insertBefore(r,o||null),this.length++,!0}return!1},t.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--},t.getRule=function(e){return e<this.length?this.nodes[e].textContent:""},e}(),_=function(){function e(e){this.rules=[],this.length=0}var t=e.prototype;return t.insertRule=function(e,t){return e<=this.length&&(this.rules.splice(e,0,t),this.length++,!0)},t.deleteRule=function(e){this.rules.splice(e,1),this.length--},t.getRule=function(e){return e<this.length?this.rules[e]:""},e}(),H=N,F={isServer:!N,useCSSOMInjection:!x},G=function(){function e(e,t,r){void 0===e&&(e=b),void 0===t&&(t={}),this.options=h({},F,{},e),this.gs=t,this.names=new Map(r),this.server=!!e.isServer,!this.server&&N&&H&&(H=!1,function(e){for(var t=document.querySelectorAll(L),r=0,o=t.length;r<o;r++){var n=t[r];n&&"active"!==n.getAttribute(A)&&(R(e,n),n.parentNode&&n.parentNode.removeChild(n))}}(this))}e.registerId=function(e){return z(e)};var t=e.prototype;return t.reconstructWithOptions=function(t,r){return void 0===r&&(r=!0),new e(h({},this.options,{},t),this.gs,r&&this.names||void 0)},t.allocateGSInstance=function(e){return this.gs[e]=(this.gs[e]||0)+1},t.getTag=function(){return this.tag||(this.tag=(r=(t=this.options).isServer,o=t.useCSSOMInjection,n=t.target,e=r?new _(n):o?new U(n):new Q(n),new k(e)));var e,t,r,o,n},t.hasNameForId=function(e,t){return this.names.has(e)&&this.names.get(e).has(t)},t.registerName=function(e,t){if(z(e),this.names.has(e))this.names.get(e).add(t);else{var r=new Set;r.add(t),this.names.set(e,r)}},t.insertRules=function(e,t,r){this.registerName(e,t),this.getTag().insertRules(z(e),r)},t.clearNames=function(e){this.names.has(e)&&this.names.get(e).clear()},t.clearRules=function(e){this.getTag().clearGroup(z(e)),this.clearNames(e)},t.clearTag=function(){this.tag=void 0},t.toString=function(){return function(e){for(var t=e.getTag(),r=t.length,o="",n=0;n<r;n++){var i=T(n);if(void 0!==i){var a=e.names.get(i),s=t.getGroup(n);if(a&&s&&a.size){var l=A+".g"+n+'[id="'+i+'"]',c="";void 0!==a&&a.forEach((function(e){e.length>0&&(c+=e+",")})),o+=""+s+l+'{content:"'+c+'"}/*!sc*/\n'}}}return o}(this)},e}(),$=/(a)(d)/gi,W=function(e){return String.fromCharCode(e+(e>25?39:97))};function X(e){var t,r="";for(t=Math.abs(e);t>52;t=t/52|0)r=W(t%52)+r;return(W(t%52)+r).replace($,"$1-$2")}var V=function(e,t){for(var r=t.length;r;)e=33*e^t.charCodeAt(--r);return e},J=function(e){return V(5381,e)};function q(e){for(var t=0;t<e.length;t+=1){var r=e[t];if(j(r)&&!I(r))return!1}return!0}var K=J("5.3.3"),ee=function(){function e(e,t,r){this.rules=e,this.staticRulesId="",this.isStatic=(void 0===r||r.isStatic)&&q(e),this.componentId=t,this.baseHash=V(K,t),this.baseStyle=r,G.registerId(t)}return e.prototype.generateAndInjectStyles=function(e,t,r){var o=this.componentId,n=[];if(this.baseStyle&&n.push(this.baseStyle.generateAndInjectStyles(e,t,r)),this.isStatic&&!r.hash)if(this.staticRulesId&&t.hasNameForId(o,this.staticRulesId))n.push(this.staticRulesId);else{var i=ye(this.rules,e,t,r).join(""),a=X(V(this.baseHash,i)>>>0);if(!t.hasNameForId(o,a)){var s=r(i,"."+a,void 0,o);t.insertRules(o,a,s)}n.push(a),this.staticRulesId=a}else{for(var l=this.rules.length,c=V(this.baseHash,r.hash),u="",d=0;d<l;d++){var f=this.rules[d];if("string"==typeof f)u+=f;else if(f){var g=ye(f,e,t,r),p=Array.isArray(g)?g.join(""):g;c=V(c,p+d),u+=p}}if(u){var m=X(c>>>0);if(!t.hasNameForId(o,m)){var h=r(u,"."+m,void 0,o);t.insertRules(o,m,h)}n.push(m)}}return n.join(" ")},e}(),te=/^\s*\/\/.*$/gm,re=[":","[",".","#"];function oe(e){var t,r,o,n,i=void 0===e?b:e,a=i.options,s=void 0===a?b:a,l=i.plugins,u=void 0===l?v:l,d=new c(s),f=[],g=function(e){function t(t){if(t)try{e(t+"}")}catch(e){}}return function(r,o,n,i,a,s,l,c,u,d){switch(r){case 1:if(0===u&&64===o.charCodeAt(0))return e(o+";"),"";break;case 2:if(0===c)return o+"/*|*/";break;case 3:switch(c){case 102:case 112:return e(n[0]+o),"";default:return o+(0===d?"/*|*/":"")}case-2:o.split("/*|*/}").forEach(t)}}}((function(e){f.push(e)})),p=function(e,o,i){return 0===o&&-1!==re.indexOf(i[r.length])||i.match(n)?e:"."+t};function m(e,i,a,s){void 0===s&&(s="&");var l=e.replace(te,""),c=i&&a?a+" "+i+" { "+l+" }":l;return t=s,r=i,o=new RegExp("\\"+r+"\\b","g"),n=new RegExp("(\\"+r+"\\b){2,}"),d(a||!i?"":i,c)}return d.use([].concat(u,[function(e,t,n){2===e&&n.length&&n[0].lastIndexOf(r)>0&&(n[0]=n[0].replace(o,p))},g,function(e){if(-2===e){var t=f;return f=[],t}}])),m.hash=u.length?u.reduce((function(e,t){return t.name||D(15),V(e,t.name)}),5381).toString():"",m}var ne=r().createContext(),ie=(ne.Consumer,r().createContext()),ae=(ie.Consumer,new G),se=oe();function le(){return(0,t.useContext)(ne)||ae}function ce(e){var o=(0,t.useState)(e.stylisPlugins),n=o[0],i=o[1],a=le(),s=(0,t.useMemo)((function(){var t=a;return e.sheet?t=e.sheet:e.target&&(t=t.reconstructWithOptions({target:e.target},!1)),e.disableCSSOMInjection&&(t=t.reconstructWithOptions({useCSSOMInjection:!1})),t}),[e.disableCSSOMInjection,e.sheet,e.target]),c=(0,t.useMemo)((function(){return oe({options:{prefix:!e.disableVendorPrefixes},plugins:n})}),[e.disableVendorPrefixes,n]);return(0,t.useEffect)((function(){l()(n,e.stylisPlugins)||i(e.stylisPlugins)}),[e.stylisPlugins]),r().createElement(ne.Provider,{value:s},r().createElement(ie.Provider,{value:c},e.children))}var ue=function(){function e(e,t){var r=this;this.inject=function(e,t){void 0===t&&(t=se);var o=r.name+t.hash;e.hasNameForId(r.id,o)||e.insertRules(r.id,o,t(r.rules,o,"@keyframes"))},this.toString=function(){return D(12,String(r.name))},this.name=e,this.id="sc-keyframes-"+e,this.rules=t}return e.prototype.getName=function(e){return void 0===e&&(e=se),this.name+e.hash},e}(),de=/([A-Z])/,fe=/([A-Z])/g,ge=/^ms-/,pe=function(e){return"-"+e.toLowerCase()};function me(e){return de.test(e)?e.replace(fe,pe).replace(ge,"-ms-"):e}var he=function(e){return null==e||!1===e||""===e};function ye(e,t,r,o){if(Array.isArray(e)){for(var n,i=[],a=0,s=e.length;a<s;a+=1)""!==(n=ye(e[a],t,r,o))&&(Array.isArray(n)?i.push.apply(i,n):i.push(n));return i}return he(e)?"":I(e)?"."+e.styledComponentId:j(e)?"function"!=typeof(l=e)||l.prototype&&l.prototype.isReactComponent||!t?e:ye(e(t),t,r,o):e instanceof ue?r?(e.inject(r,o),e.getName(o)):e:M(e)?function e(t,r){var o,n,i=[];for(var a in t)t.hasOwnProperty(a)&&!he(t[a])&&(Array.isArray(t[a])&&t[a].isCss||j(t[a])?i.push(me(a)+":",t[a],";"):M(t[a])?i.push.apply(i,e(t[a],a)):i.push(me(a)+": "+(o=a,(null==(n=t[a])||"boolean"==typeof n||""===n?"":"number"!=typeof n||0===n||o in u?String(n).trim():n+"px")+";")));return r?[r+" {"].concat(i,["}"]):i}(e):e.toString();var l}var Me=function(e){return Array.isArray(e)&&(e.isCss=!0),e};function ve(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),o=1;o<t;o++)r[o-1]=arguments[o];return j(e)||M(e)?Me(ye(y(v,[e].concat(r)))):0===r.length&&1===e.length&&"string"==typeof e[0]?e:Me(ye(y(e,r)))}new Set;var be=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,je=/(^-|-$)/g;function we(e){return e.replace(be,"-").replace(je,"")}function Ie(e){return"string"==typeof e&&!0}var Ae=function(e){return"function"==typeof e||"object"==typeof e&&null!==e&&!Array.isArray(e)},Ne=function(e){return"__proto__"!==e&&"constructor"!==e&&"prototype"!==e};function xe(e,t,r){var o=e[r];Ae(t)&&Ae(o)?De(o,t):e[r]=t}function De(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),o=1;o<t;o++)r[o-1]=arguments[o];for(var n=0,i=r;n<i.length;n++){var a=i[n];if(Ae(a))for(var s in a)Ne(s)&&xe(e,a[s],s)}return e}var ke=r().createContext();ke.Consumer;var Se={};function Ce(e,o,n){var i=I(e),a=!Ie(e),s=o.attrs,l=void 0===s?v:s,c=o.componentId,u=void 0===c?function(e,t){var r="string"!=typeof e?"sc":we(e);Se[r]=(Se[r]||0)+1;var o=r+"-"+function(e){return X(J(e)>>>0)}("5.3.3"+r+Se[r]);return t?t+"-"+o:o}(o.displayName,o.parentComponentId):c,d=o.displayName,g=void 0===d?function(e){return Ie(e)?"styled."+e:"Styled("+w(e)+")"}(e):d,p=o.displayName&&o.componentId?we(o.displayName)+"-"+o.componentId:o.componentId||u,y=i&&e.attrs?Array.prototype.concat(e.attrs,l).filter(Boolean):l,M=o.shouldForwardProp;i&&e.shouldForwardProp&&(M=o.shouldForwardProp?function(t,r,n){return e.shouldForwardProp(t,r,n)&&o.shouldForwardProp(t,r,n)}:e.shouldForwardProp);var A,N=new ee(n,p,i?e.componentStyle:void 0),x=N.isStatic&&0===l.length,D=function(e,r){return function(e,r,o,n){var i=e.attrs,a=e.componentStyle,s=e.defaultProps,l=e.foldedComponentIds,c=e.shouldForwardProp,u=e.styledComponentId,d=e.target,g=function(e,t,r){void 0===e&&(e=b);var o=h({},t,{theme:e}),n={};return r.forEach((function(e){var t,r,i,a=e;for(t in j(a)&&(a=a(o)),a)o[t]=n[t]="className"===t?(r=n[t],i=a[t],r&&i?r+" "+i:r||i):a[t]})),[o,n]}(function(e,t,r){return void 0===r&&(r=b),e.theme!==r.theme&&e.theme||t||r.theme}(r,(0,t.useContext)(ke),s)||b,r,i),p=g[0],m=g[1],y=function(e,r,o,n){var i=le(),a=(0,t.useContext)(ie)||se;return r?e.generateAndInjectStyles(b,i,a):e.generateAndInjectStyles(o,i,a)}(a,n,p),M=o,v=m.$as||r.$as||m.as||r.as||d,w=Ie(v),I=m!==r?h({},r,{},m):r,A={};for(var N in I)"$"!==N[0]&&"as"!==N&&("forwardedAs"===N?A.as=I[N]:(c?c(N,f,v):!w||f(N))&&(A[N]=I[N]));return r.style&&m.style!==r.style&&(A.style=h({},r.style,{},m.style)),A.className=Array.prototype.concat(l,u,y!==u?y:null,r.className,m.className).filter(Boolean).join(" "),A.ref=M,(0,t.createElement)(v,A)}(A,e,r,x)};return D.displayName=g,(A=r().forwardRef(D)).attrs=y,A.componentStyle=N,A.displayName=g,A.shouldForwardProp=M,A.foldedComponentIds=i?Array.prototype.concat(e.foldedComponentIds,e.styledComponentId):v,A.styledComponentId=p,A.target=i?e.target:e,A.withComponent=function(e){var t=o.componentId,r=function(e,t){if(null==e)return{};var r,o,n={},i=Object.keys(e);for(o=0;o<i.length;o++)r=i[o],t.indexOf(r)>=0||(n[r]=e[r]);return n}(o,["componentId"]),i=t&&t+"-"+(Ie(e)?e:we(w(e)));return Ce(e,h({},r,{attrs:y,componentId:i}),n)},Object.defineProperty(A,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(t){this._foldedDefaultProps=i?De({},e.defaultProps,t):t}}),A.toString=function(){return"."+A.styledComponentId},a&&m()(A,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0,withComponent:!0}),A}var Oe,ze=function(e){return function e(t,r,o){if(void 0===o&&(o=b),!(0,n.isValidElementType)(r))return D(1,String(r));var i=function(){return t(r,o,ve.apply(void 0,arguments))};return i.withConfig=function(n){return e(t,r,h({},o,{},n))},i.attrs=function(n){return e(t,r,h({},o,{attrs:Array.prototype.concat(o.attrs,n).filter(Boolean)}))},i}(Ce,e)};["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","textPath","tspan"].forEach((function(e){ze[e]=ze(e)})),Oe=function(e,t){this.rules=e,this.componentId=t,this.isStatic=q(e),G.registerId(this.componentId+1)}.prototype,Oe.createStyles=function(e,t,r,o){var n=o(ye(this.rules,t,r,o).join(""),""),i=this.componentId+e;r.insertRules(i,i,n)},Oe.removeStyles=function(e,t){t.clearRules(this.componentId+e)},Oe.renderStyles=function(e,t,r,o){e>2&&G.registerId(this.componentId+e),this.removeStyles(e,r),this.createStyles(e,t,r,o)},function(){var e=function(){var e=this;this._emitSheetCSS=function(){var t=e.instance.toString();if(!t)return"";var r=Z();return"<style "+[r&&'nonce="'+r+'"',A+'="true"','data-styled-version="5.3.3"'].filter(Boolean).join(" ")+">"+t+"</style>"},this.getStyleTags=function(){return e.sealed?D(2):e._emitSheetCSS()},this.getStyleElement=function(){var t;if(e.sealed)return D(2);var o=((t={})[A]="",t["data-styled-version"]="5.3.3",t.dangerouslySetInnerHTML={__html:e.instance.toString()},t),n=Z();return n&&(o.nonce=n),[r().createElement("style",h({},o,{key:"sc-0-0"}))]},this.seal=function(){e.sealed=!0},this.instance=new G({isServer:!0}),this.sealed=!1}.prototype;e.collectStyles=function(e){return this.sealed?D(2):r().createElement(ce,{sheet:this.instance},e)},e.interleaveWithNodeStream=function(e){return D(3)}}();const Te=ze,Ee=Te.div`
position: absolute;

@@ -113,3 +113,3 @@ top: 50%;

border-radius: 0.5rem;
`;const Be=(t,r,o)=>(0,e.jsx)(Pe,Object.assign({type:"button",className:o?"focus":""},t,{children:r}),void 0),Ue=(t,r)=>(0,e.jsx)(Re,Object.assign({},t,{children:r}),void 0),Qe=(t,r)=>(0,e.jsx)(Ze,Object.assign({},t,{children:r}),void 0),_e=r=>{var{id:o,initialFocus:n=!1,label:i,content:a,tooltipContent:s,labelElement:l,contentElement:c,tooltipElement:u,cullingBehavior:d={opacity:.3,hide:!0,closeContent:!0,effect:"fade"},tooltipBehavior:f={hideOnFocus:!0},onOutsideClickBehavior:g={focusOut:!0},hide:p=!1,onClick:m,onFocusOut:h,onMouseEnter:y,onMouseLeave:M}=r,v=function(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(o=Object.getOwnPropertySymbols(e);n<o.length;n++)t.indexOf(o[n])<0&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(r[o[n]]=e[o[n]])}return r}(r,["id","initialFocus","label","content","tooltipContent","labelElement","contentElement","tooltipElement","cullingBehavior","tooltipBehavior","onOutsideClickBehavior","hide","onClick","onFocusOut","onMouseEnter","onMouseLeave"]);const[b,j]=(0,t.useState)(n),[w,I]=(0,t.useState)(!1),[A,N]=(0,t.useState)(!1),x=(0,t.useRef)(null),D=document.querySelector(".hotspots-container"),k=null!=l?l:Be,S=null!=c?c:Ue,C=null!=u?u:Qe,O=e=>{D&&x.current&&(!D.contains(e.target)&&g.focusOut||D.contains(e.target)&&!x.current.contains(e.target))&&j(!1)},z=e=>{e?y&&y(o):M&&M(o),N(e)};return(0,t.useEffect)((()=>(window.addEventListener("mousedown",O),()=>{window.removeEventListener("mousedown",O)})),[x]),(0,t.useEffect)((()=>{!b&&h&&h(o)}),[b]),(0,t.useEffect)((()=>{j(n)}),[n]),(0,t.useEffect)((()=>{const e=new MutationObserver((()=>{var e;(null===(e=x.current)||void 0===e?void 0:e.classList.contains("visible"))?I(!0):I(!1)}));return p||e.observe(x.current,{attributes:!0}),()=>e.disconnect()}),[x]),p?null:(0,e.jsxs)(Ee,Object.assign({id:o,ref:x},v,{className:!1===d.hide?"always-visible":"",onMouseEnter:()=>z(!0),onMouseLeave:()=>z(!1),effectTransition:d.effect,hide:d.hide,opacity:d.opacity},{children:[A&&s&&(!(null==f?void 0:f.hideOnFocus)||!b)&&C({},s,b),k({onClick:()=>{j((e=>!e)),m&&!b&&m(o)}},i,b),a&&b&&(!d.closeContent||w)?S({},a,b):null]}),void 0)};var He=function(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(o=Object.getOwnPropertySymbols(e);n<o.length;n++)t.indexOf(o[n])<0&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(r[o[n]]=e[o[n]])}return r},Fe=function(e,t,r,o){return new(r||(r=Promise))((function(n,i){function a(e){try{l(o.next(e))}catch(e){i(e)}}function s(e){try{l(o.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}l((o=o.apply(e,t||[])).next())}))};const Ge=(0,t.createContext)({}),$e=r().forwardRef((({glbSrc:r,exposure:o,hdri:n,noZoom:i,minZoom:a,maxZoom:s,initialZoom:l,backgroundColor:c,backgroundImage:u,sceneBackground:d,activeShadow:f,activeBakedShadow:g,shadowOffsetX:p,shadowOffsetY:m,shadowOffsetZ:h,shadowOpacity:y,shadowRadius:M,cameraOrbitSensitivity:v,minAzimuthalAngleRotation:b,maxAzimuthalAngleRotation:j,minPolarAngleRotation:w,maxPolarAngleRotation:I,maxDragX:A,minDragX:N,maxDragY:x,minDragY:D,maxDragZ:k,minDragZ:S,activeFog:C,fogColor:O,fogNear:z,fogFar:T,cameraNear:E,cameraFar:L,bloom:Y,initialBloom:P,enableBloomButton:R,bloomIntensity:Z,bloomRadius:B,bloomThreshold:U,initialAnimation:Q,children:_},H)=>{const[F,G]=(0,t.useState)(),[$,W]=(0,t.useState)(Y?P?"bloomOn":"bloomOff":"noBloom"),{hotspots:X,renderHotspots:V,insertHotspot:J,updateHotspot:q,removeHotspot:K,showHotspot:ee,hideHotspot:te,focusHotspot:re}=(()=>{const[r,o]=(0,t.useState)([]),n=e=>{var{id:t}=e,r=He(e,["id"]);o((e=>{const o=e.find((e=>e.id===t));return e.filter((e=>e.id!==t)).concat(Object.assign(Object.assign({id:t},o),r))}))};return{hotspots:r,renderHotspots:()=>(0,e.jsx)("div",Object.assign({className:"hotspots-container"},{children:r.map((t=>{var{id:r}=t,o=He(t,["id"]);return(0,e.jsx)(_e,Object.assign({id:r},o),r)}))}),void 0),insertHotspot:e=>{var t=He(e,[]);o((e=>e.concat(Object.assign({},t))))},updateHotspot:n,removeHotspot:e=>{o((t=>t.filter((t=>t.id!==e))))},showHotspot:e=>{n({id:e,hide:!1})},hideHotspot:e=>{n({id:e,hide:!0})},focusHotspot:(e,t=!0,o=!1,i=!1)=>{n({id:e,initialFocus:t}),o&&(e=>{const t=r.find((t=>t.id===e));t&&t.onClick&&t.onClick(e)})(e),i&&(e=>{const t=r.find((t=>t.id===e));t&&t.onFocusOut&&t.onFocusOut(e)})(e)}}})();return(0,t.useImperativeHandle)(H,(()=>({insertModelNode:e=>{F&&F.insertModelNode(e)},insertSlotModelNode:e=>Fe(void 0,void 0,void 0,(function*(){return F?F.insertSlotModelNode(e):null})),deleteModelNode:e=>{F&&F.deleteModelNode(e)},updateBloom:e=>{W(e?"bloomOn":"bloomOff")},getAllSlotsMaterials:()=>F?F.getAllSlotsMaterials():null,setMaterial:(...e)=>{F&&F.setMaterial(...e)},getAllSlotsModels:()=>F?F.getAllSlotsModels():null,setModel:(...e)=>{F&&F.setModel(...e)},getCamera:()=>F?F.camera.controls.getCamera():null,setCamera:e=>{F&&F.camera.controls.setCamera(e)},updateShadow:e=>{var t;F&&(null===(t=F.world.environment)||void 0===t||t.updateShadow(e))},updateFog:e=>{var t;F&&(null===(t=F.world.environment)||void 0===t||t.updateFog(e))},updateBloomProps:e=>{var t;F&&(null===(t=F.world.environment)||void 0===t||t.updateBloom(e))},updateEnvironment:e=>{F&&F.updateEnvironment(e)},getCustomizedModel:(...e)=>Fe(void 0,void 0,void 0,(function*(){return F?F.getCustomizedModel(...e):null})),getCurrentCustomization:()=>F?F.getCurrentCustomization():null,insertHotspot:e=>{var t,r,o,n,i,a,s,l;return F?X.find((t=>t.id===e.id))?null:(J(Object.assign(Object.assign({},e),{onClick:t=>{e.onClick&&e.onClick(t),e.onClickBehavior&&(e.onClickBehavior.centerCameraAtHotspot&&F.centerCameraAtHotspot(e.id),e.onClickBehavior.lookToHotspot&&F.lookToHotspot(e.id),e.onClickBehavior.cameraSettings&&F.camera.controls.setCamera(Object.assign({},e.onClickBehavior.cameraSettings)))}})),F.insertHotspot(e.id,e.position,null===(r=null===(t=e.onClickBehavior)||void 0===t?void 0:t.cameraSettings)||void 0===r?void 0:r.cameraTarget,null===(n=null===(o=e.onClickBehavior)||void 0===o?void 0:o.cameraSettings)||void 0===n?void 0:n.polarAngle,null===(a=null===(i=e.onClickBehavior)||void 0===i?void 0:i.cameraSettings)||void 0===a?void 0:a.azimuthalAngle,null===(l=null===(s=e.onClickBehavior)||void 0===s?void 0:s.cameraSettings)||void 0===l?void 0:l.radius)):null},lookToHotspot:(...e)=>F?F.lookToHotspot(...e):null,updateHotspot:e=>{var t,r,o,n,i,a,s,l;return F?(q(Object.assign(Object.assign({},e),{onClick:t=>{e.onClick&&e.onClick(t),e.onClickBehavior&&(e.onClickBehavior.centerCameraAtHotspot&&F.centerCameraAtHotspot(e.id),e.onClickBehavior.lookToHotspot&&F.lookToHotspot(e.id),e.onClickBehavior.cameraSettings&&F.camera.controls.setCamera(Object.assign({},e.onClickBehavior.cameraSettings)))}})),F.updateHotspot(e.id,e.position,null===(r=null===(t=e.onClickBehavior)||void 0===t?void 0:t.cameraSettings)||void 0===r?void 0:r.cameraTarget,null===(n=null===(o=e.onClickBehavior)||void 0===o?void 0:o.cameraSettings)||void 0===n?void 0:n.polarAngle,null===(a=null===(i=e.onClickBehavior)||void 0===i?void 0:i.cameraSettings)||void 0===a?void 0:a.azimuthalAngle,null===(l=null===(s=e.onClickBehavior)||void 0===s?void 0:s.cameraSettings)||void 0===l?void 0:l.radius)):null},deleteHotspot:e=>F?(K(e),F.deleteHotspot(e)):null,showHotspot:e=>{ee(e)},hideHotspot:e=>{te(e)},focusHotspot:(...e)=>{re(...e)},downloadGlb:(e="model.glb",t=!0)=>{F&&F.getCustomizedModel(t).then((t=>{if(!t)return void console.error("Error: could not export the glb!");const r=document.createElement("a");r.href=URL.createObjectURL(t),r.download=e,r.click()}))},getAnimationIds:e=>(null==F?void 0:F.world.getAnimationIds(e))||[],playAnimation:(e,t,r)=>{var o;return void 0===r&&(r=null===(o=null==F?void 0:F.world.model)||void 0===o?void 0:o.id),(null==F?void 0:F.world.playAnimation(e,t,r))||Promise.reject()},stopAnimation:(e,t)=>{null==F||F.world.stopAnimation(e,t)}}))),(0,e.jsxs)(Ge.Provider,Object.assign({value:{glbSrc:r,exposure:o,hdri:"neutral"===n?"https://sdk.r2u.io/hdri/neutral.hdr":n,noZoom:i,minZoom:a,maxZoom:s,initialZoom:l,backgroundColor:c,backgroundImage:u,sceneBackground:d,activeShadow:f,activeBakedShadow:g,shadowOffsetX:p,shadowOffsetY:m,shadowOffsetZ:h,shadowOpacity:y,shadowRadius:M,cameraOrbitSensitivity:v,minAzimuthalAngleRotation:b,maxAzimuthalAngleRotation:j,minPolarAngleRotation:w,maxPolarAngleRotation:I,maxDragX:A,minDragX:N,maxDragY:x,minDragY:D,maxDragZ:k,minDragZ:S,activeFog:C,fogColor:O,fogNear:z,fogFar:T,cameraNear:E,cameraFar:L,experience:F,setExperience:G,bloom:Y,initialBloom:P,enableBloomButton:R,bloomIntensity:Z,bloomRadius:B,bloomThreshold:U,initialAnimation:Q,hasBloom:$,setHasBloom:W}},{children:[_,V()]}),void 0)})),We=()=>(0,t.useContext)(Ge),Xe=Te.div`
`;const Be=(t,r,o)=>(0,e.jsx)(Pe,Object.assign({type:"button",className:o?"focus":""},t,{children:r}),void 0),Ue=(t,r)=>(0,e.jsx)(Re,Object.assign({},t,{children:r}),void 0),Qe=(t,r)=>(0,e.jsx)(Ze,Object.assign({},t,{children:r}),void 0),_e=r=>{var{id:o,initialFocus:n=!1,label:i,content:a,tooltipContent:s,labelElement:l,contentElement:c,tooltipElement:u,cullingBehavior:d={opacity:.3,hide:!0,closeContent:!0,effect:"fade"},tooltipBehavior:f={hideOnFocus:!0},onOutsideClickBehavior:g={focusOut:!0},hide:p=!1,onClick:m,onFocusOut:h,onMouseEnter:y,onMouseLeave:M}=r,v=function(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(o=Object.getOwnPropertySymbols(e);n<o.length;n++)t.indexOf(o[n])<0&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(r[o[n]]=e[o[n]])}return r}(r,["id","initialFocus","label","content","tooltipContent","labelElement","contentElement","tooltipElement","cullingBehavior","tooltipBehavior","onOutsideClickBehavior","hide","onClick","onFocusOut","onMouseEnter","onMouseLeave"]);const[b,j]=(0,t.useState)(n),[w,I]=(0,t.useState)(!1),[A,N]=(0,t.useState)(!1),x=(0,t.useRef)(null),D=document.querySelector(".hotspots-container"),k=null!=l?l:Be,S=null!=c?c:Ue,C=null!=u?u:Qe,O=e=>{D&&x.current&&(!D.contains(e.target)&&g.focusOut||D.contains(e.target)&&!x.current.contains(e.target))&&j(!1)},z=e=>{e?y&&y(o):M&&M(o),N(e)};return(0,t.useEffect)((()=>(window.addEventListener("mousedown",O),()=>{window.removeEventListener("mousedown",O)})),[x]),(0,t.useEffect)((()=>{!b&&h&&h(o)}),[b]),(0,t.useEffect)((()=>{j(n)}),[n]),(0,t.useEffect)((()=>{const e=new MutationObserver((()=>{var e;(null===(e=x.current)||void 0===e?void 0:e.classList.contains("visible"))?I(!0):I(!1)}));return p||e.observe(x.current,{attributes:!0}),()=>e.disconnect()}),[x]),p?null:(0,e.jsxs)(Ee,Object.assign({id:o,ref:x},v,{className:!1===d.hide?"always-visible":"",onMouseEnter:()=>z(!0),onMouseLeave:()=>z(!1),effectTransition:d.effect,hide:d.hide,opacity:d.opacity},{children:[A&&s&&(!(null==f?void 0:f.hideOnFocus)||!b)&&C({},s,b),k({onClick:()=>{j((e=>!e)),m&&!b&&m(o)}},i,b),a&&b&&(!d.closeContent||w)?S({},a,b):null]}),void 0)};var He=function(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(o=Object.getOwnPropertySymbols(e);n<o.length;n++)t.indexOf(o[n])<0&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(r[o[n]]=e[o[n]])}return r};const Fe=()=>{const[r,o]=(0,t.useState)([]),n=e=>{var{id:t}=e,r=He(e,["id"]);o((e=>{const o=e.find((e=>e.id===t));return e.filter((e=>e.id!==t)).concat(Object.assign(Object.assign({id:t},o),r))}))};return{hotspots:r,renderHotspots:()=>(0,e.jsx)("div",Object.assign({className:"hotspots-container"},{children:r.map((t=>{var{id:r}=t,o=He(t,["id"]);return(0,e.jsx)(_e,Object.assign({id:r},o),r)}))}),void 0),insertHotspot:e=>{var t=He(e,[]);o((e=>e.concat(Object.assign({},t))))},updateHotspot:n,removeHotspot:e=>{o((t=>t.filter((t=>t.id!==e))))},showHotspot:e=>{n({id:e,hide:!1})},hideHotspot:e=>{n({id:e,hide:!0})},focusHotspot:(e,t=!0,i=!1,a=!1)=>{t&&(e=>r.find((t=>t.id===e)))(e)&&o((e=>e.map((e=>Object.assign(Object.assign({},e),{initialFocus:!1}))))),n({id:e,initialFocus:t}),i&&(e=>{const t=r.find((t=>t.id===e));t&&t.onClick&&t.onClick(e)})(e),a&&(e=>{const t=r.find((t=>t.id===e));t&&t.onFocusOut&&t.onFocusOut(e)})(e)}}};var Ge=function(e,t,r,o){return new(r||(r=Promise))((function(n,i){function a(e){try{l(o.next(e))}catch(e){i(e)}}function s(e){try{l(o.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}l((o=o.apply(e,t||[])).next())}))};const $e=(0,t.createContext)({}),We=r().forwardRef((({glbSrc:r,exposure:o,hdri:n,noZoom:i,minZoom:a,maxZoom:s,initialZoom:l,backgroundColor:c,backgroundImage:u,sceneBackground:d,activeShadow:f,activeBakedShadow:g,shadowOffsetX:p,shadowOffsetY:m,shadowOffsetZ:h,shadowOpacity:y,shadowRadius:M,cameraOrbitSensitivity:v,minAzimuthalAngleRotation:b,maxAzimuthalAngleRotation:j,minPolarAngleRotation:w,maxPolarAngleRotation:I,maxDragX:A,minDragX:N,maxDragY:x,minDragY:D,maxDragZ:k,minDragZ:S,activeFog:C,fogColor:O,fogNear:z,fogFar:T,cameraNear:E,cameraFar:L,bloom:Y,initialBloom:P,enableBloomButton:R,bloomIntensity:Z,bloomRadius:B,bloomThreshold:U,initialAnimation:Q,children:_},H)=>{const[F,G]=(0,t.useState)(),[$,W]=(0,t.useState)(Y?P?"bloomOn":"bloomOff":"noBloom"),{hotspots:X,renderHotspots:V,insertHotspot:J,updateHotspot:q,removeHotspot:K,showHotspot:ee,hideHotspot:te,focusHotspot:re}=Fe();return(0,t.useImperativeHandle)(H,(()=>({insertModelNode:e=>{F&&F.insertModelNode(e)},insertSlotModelNode:e=>Ge(void 0,void 0,void 0,(function*(){return F?F.insertSlotModelNode(e):null})),deleteModelNode:e=>{F&&F.deleteModelNode(e)},updateBloom:e=>{W(e?"bloomOn":"bloomOff")},getAllSlotsMaterials:()=>F?F.getAllSlotsMaterials():null,setMaterial:(...e)=>{F&&F.setMaterial(...e)},getAllSlotsModels:()=>F?F.getAllSlotsModels():null,setModel:(...e)=>{F&&F.setModel(...e)},getCamera:()=>F?F.camera.controls.getCamera():null,setCamera:e=>{F&&F.camera.controls.setCamera(e)},updateShadow:e=>{var t;F&&(null===(t=F.world.environment)||void 0===t||t.updateShadow(e))},updateFog:e=>{var t;F&&(null===(t=F.world.environment)||void 0===t||t.updateFog(e))},updateBloomProps:e=>{var t;F&&(null===(t=F.world.environment)||void 0===t||t.updateBloom(e))},updateEnvironment:e=>{F&&F.updateEnvironment(e)},getCustomizedModel:(...e)=>Ge(void 0,void 0,void 0,(function*(){return F?F.getCustomizedModel(...e):null})),getCurrentCustomization:()=>F?F.getCurrentCustomization():null,insertHotspot:e=>{var t,r,o,n,i,a,s,l;return F?X.find((t=>t.id===e.id))?null:(J(Object.assign(Object.assign({},e),{onClick:t=>{e.onClick&&e.onClick(t),e.onClickBehavior&&(e.onClickBehavior.centerCameraAtHotspot&&F.centerCameraAtHotspot(e.id),e.onClickBehavior.lookToHotspot&&F.lookToHotspot(e.id),e.onClickBehavior.cameraSettings&&F.camera.controls.setCamera(Object.assign({},e.onClickBehavior.cameraSettings)))}})),F.insertHotspot(e.id,e.position,null===(r=null===(t=e.onClickBehavior)||void 0===t?void 0:t.cameraSettings)||void 0===r?void 0:r.cameraTarget,null===(n=null===(o=e.onClickBehavior)||void 0===o?void 0:o.cameraSettings)||void 0===n?void 0:n.polarAngle,null===(a=null===(i=e.onClickBehavior)||void 0===i?void 0:i.cameraSettings)||void 0===a?void 0:a.azimuthalAngle,null===(l=null===(s=e.onClickBehavior)||void 0===s?void 0:s.cameraSettings)||void 0===l?void 0:l.radius)):null},lookToHotspot:(...e)=>F?F.lookToHotspot(...e):null,updateHotspot:e=>{var t,r,o,n,i,a,s,l;return F?(q(Object.assign(Object.assign({},e),{onClick:t=>{e.onClick&&e.onClick(t),e.onClickBehavior&&(e.onClickBehavior.centerCameraAtHotspot&&F.centerCameraAtHotspot(e.id),e.onClickBehavior.lookToHotspot&&F.lookToHotspot(e.id),e.onClickBehavior.cameraSettings&&F.camera.controls.setCamera(Object.assign({},e.onClickBehavior.cameraSettings)))}})),F.updateHotspot(e.id,e.position,null===(r=null===(t=e.onClickBehavior)||void 0===t?void 0:t.cameraSettings)||void 0===r?void 0:r.cameraTarget,null===(n=null===(o=e.onClickBehavior)||void 0===o?void 0:o.cameraSettings)||void 0===n?void 0:n.polarAngle,null===(a=null===(i=e.onClickBehavior)||void 0===i?void 0:i.cameraSettings)||void 0===a?void 0:a.azimuthalAngle,null===(l=null===(s=e.onClickBehavior)||void 0===s?void 0:s.cameraSettings)||void 0===l?void 0:l.radius)):null},deleteHotspot:e=>F?(K(e),F.deleteHotspot(e)):null,showHotspot:e=>{ee(e)},hideHotspot:e=>{te(e)},focusHotspot:(...e)=>{re(...e)},downloadGlb:(e="model.glb",t=!0)=>{F&&F.getCustomizedModel(t).then((t=>{if(!t)return void console.error("Error: could not export the glb!");const r=document.createElement("a");r.href=URL.createObjectURL(t),r.download=e,r.click()}))},getAnimationIds:e=>(null==F?void 0:F.world.getAnimationIds(e))||[],playAnimation:(e,t,r)=>{var o;return void 0===r&&(r=null===(o=null==F?void 0:F.world.model)||void 0===o?void 0:o.id),(null==F?void 0:F.world.playAnimation(e,t,r))||Promise.reject()},stopAnimation:(e,t)=>{null==F||F.world.stopAnimation(e,t)}}))),(0,e.jsxs)($e.Provider,Object.assign({value:{glbSrc:r,exposure:o,hdri:"neutral"===n?"https://sdk.r2u.io/hdri/neutral.hdr":n,noZoom:i,minZoom:a,maxZoom:s,initialZoom:l,backgroundColor:c,backgroundImage:u,sceneBackground:d,activeShadow:f,activeBakedShadow:g,shadowOffsetX:p,shadowOffsetY:m,shadowOffsetZ:h,shadowOpacity:y,shadowRadius:M,cameraOrbitSensitivity:v,minAzimuthalAngleRotation:b,maxAzimuthalAngleRotation:j,minPolarAngleRotation:w,maxPolarAngleRotation:I,maxDragX:A,minDragX:N,maxDragY:x,minDragY:D,maxDragZ:k,minDragZ:S,activeFog:C,fogColor:O,fogNear:z,fogFar:T,cameraNear:E,cameraFar:L,experience:F,setExperience:G,bloom:Y,initialBloom:P,enableBloomButton:R,bloomIntensity:Z,bloomRadius:B,bloomThreshold:U,initialAnimation:Q,hasBloom:$,setHasBloom:W}},{children:[_,V()]}),void 0)})),Xe=()=>(0,t.useContext)($e),Ve=Te.div`
opacity: 0;

@@ -146,6 +146,6 @@

}
`,Ve=r().forwardRef(((t,r)=>{const{hasBloom:o,setHasBloom:n,enableBloomButton:i}=We();return(0,e.jsx)(Xe,Object.assign({bloom:o,ref:r,style:i?{}:{display:"none"}},{children:(0,e.jsx)("button",Object.assign({type:"button",onMouseDown:e=>e.stopPropagation(),onClick:()=>n("bloomOff"===o?"bloomOn":"bloomOff"),className:"bloomButtonR2U"},{children:(0,e.jsx)("img",{src:"bloomOn"===o?"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDAiIGhlaWdodD0iNDAiIHZpZXdCb3g9IjAgMCA0MCA0MCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTE1LjM3MTYgMzcuMjZDMTUuMzcxNiAzOC4xMDcgMTYuMDY1OSAzOC44IDE2LjkxNDUgMzguOEgyMy4wODU5QzIzLjkzNDUgMzguOCAyNC42Mjg4IDM4LjEwNyAyNC42Mjg4IDM3LjI2VjM1LjcySDE1LjM3MTZWMzcuMjZaTTIwLjAwMDIgOEMxNC4wNDQ4IDggOS4yMDAyIDEyLjgzNTYgOS4yMDAyIDE4Ljc4QzkuMjAwMiAyMi40NDUyIDExLjAzNjIgMjUuNjYzOCAxMy44Mjg4IDI3LjYxOTZWMzEuMUMxMy44Mjg4IDMxLjk0NyAxNC41MjMxIDMyLjY0IDE1LjM3MTYgMzIuNjRIMjQuNjI4OEMyNS40NzczIDMyLjY0IDI2LjE3MTYgMzEuOTQ3IDI2LjE3MTYgMzEuMVYyNy42MTk2QzI4Ljk2NDIgMjUuNjYzOCAzMC44MDAyIDIyLjQ0NTIgMzAuODAwMiAxOC43OEMzMC44MDAyIDEyLjgzNTYgMjUuOTU1NiA4IDIwLjAwMDIgOFpNMjQuMzk3MyAyNS4wOTRMMjMuMDg1OSAyNi4wMThWMjkuNTZIMTYuOTE0NVYyNi4wMThMMTUuNjAzMSAyNS4wOTRDMTMuNTIwMiAyMy42NDY0IDEyLjI4NTkgMjEuMjkwMiAxMi4yODU5IDE4Ljc4QzEyLjI4NTkgMTQuNTI5NiAxNS43NDE5IDExLjA4IDIwLjAwMDIgMTEuMDhDMjQuMjU4NSAxMS4wOCAyNy43MTQ1IDE0LjUyOTYgMjcuNzE0NSAxOC43OEMyNy43MTQ1IDIxLjI5MDIgMjYuNDgwMiAyMy42NDY0IDI0LjM5NzMgMjUuMDk0WiIgZmlsbD0iIzAwM0U1OCIvPgo8cGF0aCBkPSJNMzQuMDE2NiA2LjUxNjY2TDMxLjY2NjYgNC4xNjY2NkwyOC42ODMzIDcuMTY2NjZMMzEuMDMzMyA5LjUxNjY2TDM0LjAxNjYgNi41MTY2NlpNMjEuNTk5OSA1TDE4LjI2NjYgNUwxOC4yNjY2IC01LjEzNGUtMDZMMjEuNTk5OSAtNC44NDI1OWUtMDZMMjEuNTk5OSA1Wk0zOC4yNjY2IDIwTDMzLjI2NjYgMjBMMzMuMjY2NiAxNi42NjY3TDM4LjI2NjYgMTYuNjY2N0wzOC4yNjY2IDIwWk02LjU5OTkzIDIwTDEuNTk5OTMgMjBMMS41OTk5MyAxNi42NjY3TDYuNTk5OTMgMTYuNjY2N0w2LjU5OTkzIDIwWk0xMS4xOTk5IDcuMTVMOC4yMTY2IDQuMTQ5OTlMNS44NjY2IDYuNDk5OTlMOC44NjY2IDkuNDgzMzNMMTEuMTk5OSA3LjE1WiIgZmlsbD0iIzAwM0U1OCIvPgo8L3N2Zz4K":"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDAiIGhlaWdodD0iNDAiIHZpZXdCb3g9IjAgMCA0MCA0MCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTE1LjAwMDIgMzcuNEMxNS4wMDAyIDM4LjMxNjcgMTUuNzUwMiAzOS4wNjY3IDE2LjY2NjggMzkuMDY2N0gyMy4zMzM1QzI0LjI1MDIgMzkuMDY2NyAyNS4wMDAyIDM4LjMxNjcgMjUuMDAwMiAzNy40VjM1LjczMzRIMTUuMDAwMlYzNy40Wk0yMC4wMDAyIDYuOTMzMzVDMTMuNTY2OCA2LjkzMzM1IDguMzMzNSAxMi4xNjY3IDguMzMzNSAxOC42QzguMzMzNSAyMi41NjY3IDEwLjMxNjggMjYuMDUgMTMuMzMzNSAyOC4xNjY3VjMxLjkzMzRDMTMuMzMzNSAzMi44NSAxNC4wODM1IDMzLjYgMTUuMDAwMiAzMy42SDI1LjAwMDJDMjUuOTE2OCAzMy42IDI2LjY2NjggMzIuODUgMjYuNjY2OCAzMS45MzM0VjI4LjE2NjdDMjkuNjgzNSAyNi4wNSAzMS42NjY4IDIyLjU2NjcgMzEuNjY2OCAxOC42QzMxLjY2NjggMTIuMTY2NyAyNi40MzM1IDYuOTMzMzUgMjAuMDAwMiA2LjkzMzM1Wk0yNC43NTAyIDI1LjQzMzRMMjMuMzMzNSAyNi40MzM0VjMwLjI2NjdIMTYuNjY2OFYyNi40MzM0TDE1LjI1MDIgMjUuNDMzNEMxMy4wMDAyIDIzLjg2NjcgMTEuNjY2OCAyMS4zMTY3IDExLjY2NjggMTguNkMxMS42NjY4IDE0IDE1LjQwMDIgMTAuMjY2NyAyMC4wMDAyIDEwLjI2NjdDMjQuNjAwMiAxMC4yNjY3IDI4LjMzMzUgMTQgMjguMzMzNSAxOC42QzI4LjMzMzUgMjEuMzE2NyAyNy4wMDAyIDIzLjg2NjcgMjQuNzUwMiAyNS40MzM0WiIgZmlsbD0iI0FGQUZBRiIvPgo8L3N2Zz4K",alt:"",className:"lampR2U"},void 0)}),void 0)}),void 0)})),Je=Te.div`
`,Je=r().forwardRef(((t,r)=>{const{hasBloom:o,setHasBloom:n,enableBloomButton:i}=Xe();return(0,e.jsx)(Ve,Object.assign({bloom:o,ref:r,style:i?{}:{display:"none"}},{children:(0,e.jsx)("button",Object.assign({type:"button",onMouseDown:e=>e.stopPropagation(),onClick:()=>n("bloomOff"===o?"bloomOn":"bloomOff"),className:"bloomButtonR2U"},{children:(0,e.jsx)("img",{src:"bloomOn"===o?"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDAiIGhlaWdodD0iNDAiIHZpZXdCb3g9IjAgMCA0MCA0MCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTE1LjM3MTYgMzcuMjZDMTUuMzcxNiAzOC4xMDcgMTYuMDY1OSAzOC44IDE2LjkxNDUgMzguOEgyMy4wODU5QzIzLjkzNDUgMzguOCAyNC42Mjg4IDM4LjEwNyAyNC42Mjg4IDM3LjI2VjM1LjcySDE1LjM3MTZWMzcuMjZaTTIwLjAwMDIgOEMxNC4wNDQ4IDggOS4yMDAyIDEyLjgzNTYgOS4yMDAyIDE4Ljc4QzkuMjAwMiAyMi40NDUyIDExLjAzNjIgMjUuNjYzOCAxMy44Mjg4IDI3LjYxOTZWMzEuMUMxMy44Mjg4IDMxLjk0NyAxNC41MjMxIDMyLjY0IDE1LjM3MTYgMzIuNjRIMjQuNjI4OEMyNS40NzczIDMyLjY0IDI2LjE3MTYgMzEuOTQ3IDI2LjE3MTYgMzEuMVYyNy42MTk2QzI4Ljk2NDIgMjUuNjYzOCAzMC44MDAyIDIyLjQ0NTIgMzAuODAwMiAxOC43OEMzMC44MDAyIDEyLjgzNTYgMjUuOTU1NiA4IDIwLjAwMDIgOFpNMjQuMzk3MyAyNS4wOTRMMjMuMDg1OSAyNi4wMThWMjkuNTZIMTYuOTE0NVYyNi4wMThMMTUuNjAzMSAyNS4wOTRDMTMuNTIwMiAyMy42NDY0IDEyLjI4NTkgMjEuMjkwMiAxMi4yODU5IDE4Ljc4QzEyLjI4NTkgMTQuNTI5NiAxNS43NDE5IDExLjA4IDIwLjAwMDIgMTEuMDhDMjQuMjU4NSAxMS4wOCAyNy43MTQ1IDE0LjUyOTYgMjcuNzE0NSAxOC43OEMyNy43MTQ1IDIxLjI5MDIgMjYuNDgwMiAyMy42NDY0IDI0LjM5NzMgMjUuMDk0WiIgZmlsbD0iIzAwM0U1OCIvPgo8cGF0aCBkPSJNMzQuMDE2NiA2LjUxNjY2TDMxLjY2NjYgNC4xNjY2NkwyOC42ODMzIDcuMTY2NjZMMzEuMDMzMyA5LjUxNjY2TDM0LjAxNjYgNi41MTY2NlpNMjEuNTk5OSA1TDE4LjI2NjYgNUwxOC4yNjY2IC01LjEzNGUtMDZMMjEuNTk5OSAtNC44NDI1OWUtMDZMMjEuNTk5OSA1Wk0zOC4yNjY2IDIwTDMzLjI2NjYgMjBMMzMuMjY2NiAxNi42NjY3TDM4LjI2NjYgMTYuNjY2N0wzOC4yNjY2IDIwWk02LjU5OTkzIDIwTDEuNTk5OTMgMjBMMS41OTk5MyAxNi42NjY3TDYuNTk5OTMgMTYuNjY2N0w2LjU5OTkzIDIwWk0xMS4xOTk5IDcuMTVMOC4yMTY2IDQuMTQ5OTlMNS44NjY2IDYuNDk5OTlMOC44NjY2IDkuNDgzMzNMMTEuMTk5OSA3LjE1WiIgZmlsbD0iIzAwM0U1OCIvPgo8L3N2Zz4K":"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDAiIGhlaWdodD0iNDAiIHZpZXdCb3g9IjAgMCA0MCA0MCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTE1LjAwMDIgMzcuNEMxNS4wMDAyIDM4LjMxNjcgMTUuNzUwMiAzOS4wNjY3IDE2LjY2NjggMzkuMDY2N0gyMy4zMzM1QzI0LjI1MDIgMzkuMDY2NyAyNS4wMDAyIDM4LjMxNjcgMjUuMDAwMiAzNy40VjM1LjczMzRIMTUuMDAwMlYzNy40Wk0yMC4wMDAyIDYuOTMzMzVDMTMuNTY2OCA2LjkzMzM1IDguMzMzNSAxMi4xNjY3IDguMzMzNSAxOC42QzguMzMzNSAyMi41NjY3IDEwLjMxNjggMjYuMDUgMTMuMzMzNSAyOC4xNjY3VjMxLjkzMzRDMTMuMzMzNSAzMi44NSAxNC4wODM1IDMzLjYgMTUuMDAwMiAzMy42SDI1LjAwMDJDMjUuOTE2OCAzMy42IDI2LjY2NjggMzIuODUgMjYuNjY2OCAzMS45MzM0VjI4LjE2NjdDMjkuNjgzNSAyNi4wNSAzMS42NjY4IDIyLjU2NjcgMzEuNjY2OCAxOC42QzMxLjY2NjggMTIuMTY2NyAyNi40MzM1IDYuOTMzMzUgMjAuMDAwMiA2LjkzMzM1Wk0yNC43NTAyIDI1LjQzMzRMMjMuMzMzNSAyNi40MzM0VjMwLjI2NjdIMTYuNjY2OFYyNi40MzM0TDE1LjI1MDIgMjUuNDMzNEMxMy4wMDAyIDIzLjg2NjcgMTEuNjY2OCAyMS4zMTY3IDExLjY2NjggMTguNkMxMS42NjY4IDE0IDE1LjQwMDIgMTAuMjY2NyAyMC4wMDAyIDEwLjI2NjdDMjQuNjAwMiAxMC4yNjY3IDI4LjMzMzUgMTQgMjguMzMzNSAxOC42QzI4LjMzMzUgMjEuMzE2NyAyNy4wMDAyIDIzLjg2NjcgMjQuNzUwMiAyNS40MzM0WiIgZmlsbD0iI0FGQUZBRiIvPgo8L3N2Zz4K",alt:"",className:"lampR2U"},void 0)}),void 0)}),void 0)})),qe=Te.div`
width: 100%;
background-color: white;
`,qe=Te.div`
`,Ke=Te.div`
z-index: 5;

@@ -159,7 +159,7 @@ position: absolute;

transition: transform 0.8s;
`,Ke=r().forwardRef(((t,r)=>(0,e.jsx)(Je,{children:(0,e.jsx)(qe,{ref:r},void 0)},void 0))),et=/^#([0-9a-f]{3}){1,2}$/i,tt=Te.div`
`,et=r().forwardRef(((t,r)=>(0,e.jsx)(qe,{children:(0,e.jsx)(Ke,{ref:r},void 0)},void 0))),tt=/^#([0-9a-f]{3}){1,2}$/i,rt=Te.div`
width: 100%;
height: 34px;
position: absolute;
`,rt=Te.div`
`,ot=Te.div`
width: 100% !important;

@@ -180,3 +180,3 @@ height: 100% !important;

opacity: 1;
${({background:e})=>""!==e&&et.test(e)?ve`
${({background:e})=>""!==e&&tt.test(e)?ve`
background: ${e};

@@ -213,3 +213,3 @@ `:ve`

}
`,ot=()=>{const r=(0,t.useRef)(null),n=(0,t.useRef)(null),a=(0,t.useRef)(null),s=(0,t.useRef)(null),{glbSrc:l,exposure:c,hdri:u,noZoom:d,minZoom:f,maxZoom:g,initialZoom:p,backgroundColor:m,backgroundImage:h,sceneBackground:y,activeShadow:M,activeBakedShadow:v,shadowOffsetX:b,shadowOffsetY:j,shadowOffsetZ:w,shadowOpacity:I,shadowRadius:A,cameraOrbitSensitivity:N,minAzimuthalAngleRotation:x,maxAzimuthalAngleRotation:D,minPolarAngleRotation:k,maxPolarAngleRotation:S,maxDragX:C,minDragX:O,maxDragY:z,minDragY:T,maxDragZ:E,minDragZ:L,activeFog:Y,fogColor:P,fogNear:R,fogFar:Z,cameraNear:B,cameraFar:U,experience:Q,setExperience:_,hasBloom:H,bloomIntensity:F,bloomRadius:G,bloomThreshold:$,initialAnimation:W}=We();return(0,t.useEffect)((()=>{r.current&&!Q&&n.current&&a.current&&s.current&&Promise.all([i.e(167),i.e(628)]).then(i.bind(i,259)).then((({default:e})=>{const t=new e({canvas:r.current,glbSrc:l,exposure:c,hdri:u,noZoom:d,minZoom:f,maxZoom:g,initialZoom:p,sceneBackground:y,activeShadow:M,activeBakedShadow:v,shadowOffsetX:b,shadowOffsetY:j,shadowOffsetZ:w,shadowOpacity:I,shadowRadius:A,cameraOrbitSensitivity:N,minAzimuthalAngleRotation:x,maxAzimuthalAngleRotation:D,minPolarAngleRotation:k,maxPolarAngleRotation:S,maxDragX:C,minDragX:O,maxDragY:z,minDragY:T,maxDragZ:E,minDragZ:L,activeFog:Y,fogColor:P,fogNear:R,fogFar:Z,cameraNear:B,cameraFar:U,bloomIntensity:F,bloomRadius:G,bloomThreshold:$,initialAnimation:W,loadingDiv:n.current,instructionsImg:a.current,bloomButton:s.current,defaultAnimationOptions:{}});_(t)}))}),[r,Q,n,a,s]),null==Q||Q.updateBloom(H),(0,t.useEffect)((()=>{Q&&Q.updateGlb(l)}),[l]),(0,t.useEffect)((()=>{Q&&Q.updateBloom(H)}),[H]),(0,e.jsxs)(rt,Object.assign({background:m,backgroundImage:h},{children:[(0,e.jsxs)(tt,{children:[(0,e.jsx)(Ke,{ref:n},void 0),(0,e.jsx)(Ve,{ref:s},void 0)]},void 0),(0,e.jsx)("canvas",{ref:r},void 0),(0,e.jsx)("img",{ref:a,className:"instructions",src:o,alt:o,style:{height:"30px",width:"30px"}},void 0)]}),void 0)},nt=Te.div`
`,nt=()=>{const r=(0,t.useRef)(null),n=(0,t.useRef)(null),a=(0,t.useRef)(null),s=(0,t.useRef)(null),{glbSrc:l,exposure:c,hdri:u,noZoom:d,minZoom:f,maxZoom:g,initialZoom:p,backgroundColor:m,backgroundImage:h,sceneBackground:y,activeShadow:M,activeBakedShadow:v,shadowOffsetX:b,shadowOffsetY:j,shadowOffsetZ:w,shadowOpacity:I,shadowRadius:A,cameraOrbitSensitivity:N,minAzimuthalAngleRotation:x,maxAzimuthalAngleRotation:D,minPolarAngleRotation:k,maxPolarAngleRotation:S,maxDragX:C,minDragX:O,maxDragY:z,minDragY:T,maxDragZ:E,minDragZ:L,activeFog:Y,fogColor:P,fogNear:R,fogFar:Z,cameraNear:B,cameraFar:U,experience:Q,setExperience:_,hasBloom:H,bloomIntensity:F,bloomRadius:G,bloomThreshold:$,initialAnimation:W}=Xe();return(0,t.useEffect)((()=>{r.current&&!Q&&n.current&&a.current&&s.current&&Promise.all([i.e(167),i.e(628)]).then(i.bind(i,155)).then((({default:e})=>{const t=new e({canvas:r.current,glbSrc:l,exposure:c,hdri:u,noZoom:d,minZoom:f,maxZoom:g,initialZoom:p,sceneBackground:y,activeShadow:M,activeBakedShadow:v,shadowOffsetX:b,shadowOffsetY:j,shadowOffsetZ:w,shadowOpacity:I,shadowRadius:A,cameraOrbitSensitivity:N,minAzimuthalAngleRotation:x,maxAzimuthalAngleRotation:D,minPolarAngleRotation:k,maxPolarAngleRotation:S,maxDragX:C,minDragX:O,maxDragY:z,minDragY:T,maxDragZ:E,minDragZ:L,activeFog:Y,fogColor:P,fogNear:R,fogFar:Z,cameraNear:B,cameraFar:U,bloomIntensity:F,bloomRadius:G,bloomThreshold:$,initialAnimation:W,loadingDiv:n.current,instructionsImg:a.current,bloomButton:s.current,defaultAnimationOptions:{}});_(t)}))}),[r,Q,n,a,s]),null==Q||Q.updateBloom(H),(0,t.useEffect)((()=>{Q&&Q.updateGlb(l)}),[l]),(0,t.useEffect)((()=>{Q&&Q.updateBloom(H)}),[H]),(0,e.jsxs)(ot,Object.assign({background:m,backgroundImage:h},{children:[(0,e.jsxs)(rt,{children:[(0,e.jsx)(et,{ref:n},void 0),(0,e.jsx)(Je,{ref:s},void 0)]},void 0),(0,e.jsx)("canvas",{ref:r},void 0),(0,e.jsx)("img",{ref:a,className:"instructions",src:o,alt:o,style:{height:"30px",width:"30px"}},void 0)]}),void 0)},it=Te.div`
position: relative;

@@ -220,2 +220,2 @@ width: 100% !important;

overflow: hidden;
`,it=r().forwardRef(((r,o)=>{const{glbSrc:n,exposure:i=.55,hdri:a="neutral",noZoom:s=!1,minZoom:l=null,maxZoom:c=null,initialZoom:u=null,backgroundColor:d="",backgroundImage:f="",sceneBackground:g=!1,activeShadow:p=!0,activeBakedShadow:m=!1,shadowOffsetX:h=0,shadowOffsetY:y=10,shadowOffsetZ:M=0,shadowOpacity:v=.1,shadowRadius:b=1,cameraOrbitSensitivity:j=2,minAzimuthalAngleRotation:w=-60,maxAzimuthalAngleRotation:I=60,minPolarAngleRotation:A=null,maxPolarAngleRotation:N=null,maxDragX:x=null,minDragX:D=null,maxDragY:k=null,minDragY:S=null,maxDragZ:C=null,minDragZ:O=null,activeFog:z=!1,fogColor:T="",fogNear:E=null,fogFar:L=null,cameraNear:Y=null,cameraFar:P=null,bloom:R=!1,initialBloom:Z=!1,enableBloomButton:B=!0,bloomIntensity:U=3,bloomRadius:Q=0,bloomThreshold:_=.21,initialAnimation:H=!0,children:F,componentDidMount:G=(()=>{}),onClick:$=(()=>{}),onSessionTimeCollect:W=(()=>{})}=r,[X,V]=(0,t.useState)();return(0,t.useEffect)((()=>{G()}),[]),(0,e.jsx)(nt,Object.assign({onClick:$,onMouseEnter:()=>{V(new Date)},onMouseLeave:()=>{if(X){const e=(new Date).getTime()-X.getTime();W(e)}}},{children:(0,e.jsxs)($e,Object.assign({ref:o,glbSrc:n,exposure:i,hdri:a,noZoom:s,minZoom:l,maxZoom:c,initialZoom:u,backgroundColor:d,backgroundImage:f,sceneBackground:g,activeShadow:p,activeBakedShadow:m,shadowOffsetX:h,shadowOffsetY:y,shadowOffsetZ:M,shadowOpacity:v,shadowRadius:b,cameraOrbitSensitivity:j,minAzimuthalAngleRotation:w,maxAzimuthalAngleRotation:I,minPolarAngleRotation:A,maxPolarAngleRotation:N,maxDragX:x,minDragX:D,maxDragY:k,minDragY:S,maxDragZ:C,minDragZ:O,activeFog:z,fogColor:T,fogNear:E,fogFar:L,cameraNear:Y,cameraFar:P,bloom:R,initialBloom:Z,enableBloomButton:B,bloomIntensity:U,bloomRadius:Q,bloomThreshold:_,initialAnimation:H},{children:[F,(0,e.jsx)(ot,{},void 0)]}),void 0)}),void 0)}))})(),a})()));
`,at=r().forwardRef(((r,o)=>{const{glbSrc:n,exposure:i=.55,hdri:a="neutral",noZoom:s=!1,minZoom:l=null,maxZoom:c=null,initialZoom:u=null,backgroundColor:d="",backgroundImage:f="",sceneBackground:g=!1,activeShadow:p=!0,activeBakedShadow:m=!1,shadowOffsetX:h=0,shadowOffsetY:y=10,shadowOffsetZ:M=0,shadowOpacity:v=.1,shadowRadius:b=1,cameraOrbitSensitivity:j=2,minAzimuthalAngleRotation:w=-60,maxAzimuthalAngleRotation:I=60,minPolarAngleRotation:A=null,maxPolarAngleRotation:N=null,maxDragX:x=null,minDragX:D=null,maxDragY:k=null,minDragY:S=null,maxDragZ:C=null,minDragZ:O=null,activeFog:z=!1,fogColor:T="",fogNear:E=null,fogFar:L=null,cameraNear:Y=null,cameraFar:P=null,bloom:R=!1,initialBloom:Z=!1,enableBloomButton:B=!0,bloomIntensity:U=3,bloomRadius:Q=0,bloomThreshold:_=.21,initialAnimation:H=!0,children:F,componentDidMount:G=(()=>{}),onClick:$=(()=>{}),onSessionTimeCollect:W=(()=>{})}=r,[X,V]=(0,t.useState)();return(0,t.useEffect)((()=>{G()}),[]),(0,e.jsx)(it,Object.assign({onClick:$,onMouseEnter:()=>{V(new Date)},onMouseLeave:()=>{if(X){const e=(new Date).getTime()-X.getTime();W(e)}}},{children:(0,e.jsxs)(We,Object.assign({ref:o,glbSrc:n,exposure:i,hdri:a,noZoom:s,minZoom:l,maxZoom:c,initialZoom:u,backgroundColor:d,backgroundImage:f,sceneBackground:g,activeShadow:p,activeBakedShadow:m,shadowOffsetX:h,shadowOffsetY:y,shadowOffsetZ:M,shadowOpacity:v,shadowRadius:b,cameraOrbitSensitivity:j,minAzimuthalAngleRotation:w,maxAzimuthalAngleRotation:I,minPolarAngleRotation:A,maxPolarAngleRotation:N,maxDragX:x,minDragX:D,maxDragY:k,minDragY:S,maxDragZ:C,minDragZ:O,activeFog:z,fogColor:T,fogNear:E,fogFar:L,cameraNear:Y,cameraFar:P,bloom:R,initialBloom:Z,enableBloomButton:B,bloomIntensity:U,bloomRadius:Q,bloomThreshold:_,initialAnimation:H},{children:[F,(0,e.jsx)(nt,{},void 0)]}),void 0)}),void 0)}))})(),a})()));

@@ -1,1 +0,1 @@

"use strict";(self.webpackChunk_r2u_viewer=self.webpackChunk_r2u_viewer||[]).push([[628],{259:(e,t,i)=>{i.r(t),i.d(t,{default:()=>j});var s=i(657),a=i(531),o=i.n(a),r=i(970),n=i(687),h=i(341),l=i(884);class d extends(o()){constructor({modelSource:e,environmentSource:t,progress:i,bloomButton:a,canvas:o,renderer:d}){super(),this.progress=i,this.bloomButton=a,this.loadingManager=new s.lLk((()=>{this.progress.style.transition="opacity 1s ease-in-out",this.progress.style.opacity="0",this.bloomButton.style.transition="opacity 0.5s ease-in-out",this.bloomButton.style.opacity="1",this.bloomButton.style.height="60px",o.classList.add("active")}),((e,t,i)=>{this.progress.style.transition="",this.progress.style.transform=`scaleX(${t/i})`})),this.modelSource=e,this.environmentSource=t,this.gltfLoader=new n.E(this.loadingManager),this.dracoLoader=new r._(this.loadingManager),this.dracoLoader.setDecoderPath("https://www.gstatic.com/draco/versioned/decoders/1.4.1/"),this.gltfLoader.setDRACOLoader(this.dracoLoader),this.ktx2Loader=new h.a(this.loadingManager),this.ktx2Loader.setTranscoderPath("https://www.gstatic.com/basis-universal/versioned/2021-04-15-ba1c3e4/").detectSupport(d.instance),this.gltfLoader.setKTX2Loader(this.ktx2Loader),this.rgbeLoader=new l.x(this.loadingManager),Promise.all([new Promise((e=>{this.gltfLoader.load(this.modelSource,e)})),new Promise((e=>{this.rgbeLoader.load(this.environmentSource,e)}))]).then((([e,t])=>{this.model=e.scene,this.animations=e.animations,this.environmentTexture=t,this.environmentTexture.mapping=s.dSO,this.environmentTexture.name=this.environmentSource,this.emit("modelReady"),this.emit("environmentReady"),this.emit("ready")}))}resetLoadingBar(){this.progress.style.transform="scaleX(0)",this.progress.style.transition="none",this.progress.style.opacity=""}updateEnvironment(e){this.resetLoadingBar(),this.rgbeLoader.load(e,(t=>{const i=this.environmentTexture;this.environmentTexture=t,this.environmentTexture.mapping=s.dSO,this.environmentTexture.name=e,null==i||i.dispose(),this.emit("environmentReady")}))}updateGlb(e){this.resetLoadingBar(),this.emit("modelDispose"),this.gltfLoader.load(e,(e=>{this.model=e.scene,this.animations=e.animations,this.emit("modelReady")}))}loadGlb(e){return t=this,i=void 0,a=function*(){return this.gltfLoader.loadAsync(e)},new((s=void 0)||(s=Promise))((function(e,o){function r(e){try{h(a.next(e))}catch(e){o(e)}}function n(e){try{h(a.throw(e))}catch(e){o(e)}}function h(t){var i;t.done?e(t.value):(i=t.value,i instanceof s?i:new s((function(e){e(i)}))).then(r,n)}h((a=a.apply(t,i||[])).next())}));var t,i,s,a}}class m extends(o()){constructor(e){super(),this.canvas=e,this.width=e.offsetWidth,this.height=e.offsetHeight,this.pixelRatio=Math.min(window.devicePixelRatio,2),window.ResizeObserver&&(this.resizeObserver=new ResizeObserver((()=>this.updateSizes())),this.resizeObserver.observe(this.canvas)),window.addEventListener("resize",(()=>this.updateSizes()))}updateSizes(){this.width=this.canvas.offsetWidth,this.height=this.canvas.offsetHeight,this.pixelRatio=Math.min(window.devicePixelRatio,2),this.emit("resize")}}class c extends(o()){constructor(){super(),this.start=Date.now(),this.current=this.start,this.elapsed=0,this.delta=1,window.requestAnimationFrame((()=>this.tick()))}tick(){const e=Date.now();this.delta=e-this.current,this.current=e,this.elapsed=this.current-this.start,this.emit("tick"),window.requestAnimationFrame((()=>this.tick()))}}c.singleton=new c;class u{constructor(e=50){this.velocity=0,this.naturalFrequency=0,this.setDecayTime(e)}setDecayTime(e){this.naturalFrequency=1/Math.max(.001,e)}update(e,t,i,s){const a=2e-4*this.naturalFrequency;if(null==e||0===s)return t;if(e===t&&0===this.velocity)return t;if(i<0)return e;const o=e-t,r=this.velocity+this.naturalFrequency*o,n=o+i*r,h=Math.exp(-this.naturalFrequency*i),l=(r-this.naturalFrequency*n)*h,d=-this.naturalFrequency*(l+r*h);return Math.abs(l)<a*Math.abs(s)&&d*o>=0?(this.velocity=0,t):(this.velocity=l,t+n*h)}}const p=Math.PI/1e3,g=Math.PI/6,v=2*Math.PI;class M{constructor({experience:e,controls:t}){this.canvas=e.canvas,this.instructionsImg=e.instructionsImg,this.controls=t,this.time=e.time,this.angleAnimation=0,this.elapsedAnimation=0,this.elapsedImgAnimation=0,this.damperImgAnimation=new u,this.idle=!1,this.active=!1,this.canvas.addEventListener("touchstart",(()=>{this.active=!1,clearTimeout(this.startTimer)})),this.canvas.addEventListener("mousedown",(()=>{this.active=!1,clearTimeout(this.startTimer)}))}play(){this.startTimer=setTimeout((()=>{this.active=!0,this.controls.requestUpdate()}),2e3)}stop(){this.active=!1}update(){this.active?(this.idle||(this.elapsedAnimation+=p*this.time.delta,this.instructionsImg.style.opacity="1"),this.elapsedAnimation>v&&(this.idle=!0,this.instructionsImg.style.opacity="0",this.elapsedAnimation=v,setTimeout((()=>{this.elapsedAnimation=0,this.elapsedImgAnimation=0,this.idle=!1,this.controls.requestUpdate()}),2e3)),this.angleAnimation=Math.sin(this.elapsedAnimation)*g,this.elapsedImgAnimation=this.damperImgAnimation.update(this.elapsedImgAnimation,this.elapsedAnimation,this.time.delta,1),this.instructionsImg.style.transform=`translate(calc(-50% + ${-Math.sin(this.elapsedImgAnimation)}*50px), -50%)`):this.instructionsImg.style.opacity="0"}isPaused(){return this.idle}isActive(){return this.active}}const f=Math.PI/2.4,A=Math.PI/10;class x{constructor(e,t,i){this.ORBIT_SENSITIVITY=e.orbitSensitivity,this.MIN_CAMERA_SCROLL=2,this.MAX_CAMERA_SCROLL=10,this.DEFAULT_CAMERA_SCROLL=4,this.MAX_XZ_ANGLE=e.maxAzimuthalAngleRotation*Math.PI/180,this.MIN_XZ_ANGLE=e.minAzimuthalAngleRotation*Math.PI/180,e.maxPolarAngleRotation&&(this.MAX_Y_ANGLE=e.maxPolarAngleRotation*Math.PI/180),e.minPolarAngleRotation&&(this.MIN_Y_ANGLE=e.minPolarAngleRotation*Math.PI/180),this.MAX_X_PAN=e.maxDragX,this.MIN_X_PAN=e.minDragX,this.MAX_Y_PAN=e.maxDragY,this.MIN_Y_PAN=e.minDragY,this.MAX_Z_PAN=e.maxDragZ,this.MIN_Z_PAN=e.minDragZ,this.canvas=e.canvas,this.camera=t,this.time=e.time,this.noZoom=!!e.noZoom,this.damperRadius=new u,this.damperYAngle=new u,this.damperXZAngle=new u,this.damperXPan=new u,this.damperYPan=new u,this.damperZPan=new u,this.canvas.oncontextmenu=e=>e.preventDefault(),this.yAngleTarget=f,this.xzAngleTarget=A,this.yAngle=f,this.xzAngle=A,this.orbitCamera=!1,this.moveCamera=!1,this.panTarget=new s.Pa4,this.pan=new s.Pa4,i?(this.cameraRadius=i,this.cameraRadiusTarget=i):(this.cameraRadius=this.DEFAULT_CAMERA_SCROLL,this.cameraRadiusTarget=this.DEFAULT_CAMERA_SCROLL),this.pageMode="none",this.addDragEventListener(),this.addWheelEventListener(),this.addTouchEventListener(),this.animation=new M({experience:e,controls:this})}addDragEventListener(){let e=0,t=0;this.canvas.onmousedown=i=>{i.stopPropagation(),this.requestUpdate(),0===i.button?(this.orbitCamera=!0,this.canvas.style.cursor="grabbing"):(this.moveCamera=!0,this.canvas.style.cursor="move"),e=i.clientX,t=i.clientY},document.addEventListener("mouseup",(()=>{this.orbitCamera=!1,this.moveCamera=!1,this.canvas.style.cursor=""})),this.canvas.addEventListener("mousemove",(i=>{if(this.requestUpdate(),this.orbitCamera)this.yAngleTarget+=this.ORBIT_SENSITIVITY*Math.PI*2*((e-i.clientX)/this.canvas.width),e=i.clientX,this.xzAngleTarget+=this.ORBIT_SENSITIVITY*Math.PI*2*((i.clientY-t)/this.canvas.height),t=i.clientY,this.xzAngleTarget<this.MIN_XZ_ANGLE&&(this.xzAngleTarget=this.MIN_XZ_ANGLE),this.xzAngleTarget>this.MAX_XZ_ANGLE&&(this.xzAngleTarget=this.MAX_XZ_ANGLE),this.MIN_Y_ANGLE&&this.yAngleTarget<this.MIN_Y_ANGLE&&(this.yAngleTarget=this.MIN_Y_ANGLE),this.MAX_Y_ANGLE&&this.yAngleTarget>this.MAX_Y_ANGLE&&(this.yAngleTarget=this.MAX_Y_ANGLE);else if(this.moveCamera){const a=.8*this.cameraRadius*(e-i.clientX)/this.canvas.width;e=i.clientX;const o=.8*this.cameraRadius*(i.clientY-t)/this.canvas.height;t=i.clientY,this.panTarget.add(new s.Pa4(a*Math.cos(this.yAngleTarget)+o*Math.sin(this.xzAngleTarget)*Math.sin(-this.yAngleTarget),o*Math.cos(this.xzAngleTarget),a*Math.sin(-this.yAngleTarget)+o*Math.sin(-this.xzAngleTarget)*Math.cos(this.yAngleTarget))),null!==this.MIN_X_PAN&&void 0!==this.MIN_X_PAN&&this.panTarget.x<this.MIN_X_PAN&&(this.panTarget.x=this.MIN_X_PAN),null!==this.MAX_X_PAN&&void 0!==this.MAX_X_PAN&&this.panTarget.x>this.MAX_X_PAN&&(this.panTarget.x=this.MAX_X_PAN),null!==this.MIN_Y_PAN&&void 0!==this.MIN_Y_PAN&&this.panTarget.y<this.MIN_Y_PAN&&(this.panTarget.y=this.MIN_Y_PAN),null!==this.MAX_Y_PAN&&void 0!==this.MAX_Y_PAN&&this.panTarget.y>this.MAX_Y_PAN&&(this.panTarget.y=this.MAX_Y_PAN),null!==this.MIN_Z_PAN&&void 0!==this.MIN_Z_PAN&&this.panTarget.z<this.MIN_Z_PAN&&(this.panTarget.z=this.MIN_Z_PAN),null!==this.MAX_Z_PAN&&void 0!==this.MAX_Z_PAN&&this.panTarget.z>this.MAX_Z_PAN&&(this.panTarget.z=this.MAX_Z_PAN)}}))}addWheelEventListener(){let e;this.canvas.onwheel=t=>{this.noZoom||(t.preventDefault(),this.requestUpdate(),t.deltaY>0?(this.cameraRadiusTarget+=.003*t.deltaY*this.cameraRadius,this.canvas.style.cursor="zoom-out"):(this.cameraRadiusTarget+=.003*t.deltaY*this.cameraRadius/2,this.canvas.style.cursor="zoom-in"),this.cameraRadiusTarget>this.MAX_CAMERA_SCROLL&&(this.cameraRadiusTarget=this.MAX_CAMERA_SCROLL),this.cameraRadiusTarget<this.MIN_CAMERA_SCROLL&&(this.cameraRadiusTarget=this.MIN_CAMERA_SCROLL),e&&clearTimeout(e),e=setTimeout((()=>{this.canvas.style.cursor=""}),300))}}addTouchEventListener(){let e=0,t=0;document.addEventListener("touchstart",(i=>{e=i.touches[0].clientX,t=i.touches[0].clientY})),document.addEventListener("touchmove",(i=>{"movingCamera"!==this.pageMode&&"orbitingCamera"!==this.pageMode&&"zoomingCamera"!==this.pageMode&&Math.abs(i.touches[0].clientY-t)>Math.abs(i.touches[0].clientX-e)&&(this.pageMode="scrolling")}));let i=0,a=0,o=0;this.canvas.ontouchstart=e=>{1===e.touches.length?(i=e.touches[0].clientX,a=e.touches[0].clientY):2===e.touches.length&&(this.pageMode="movingCamera",i=(e.touches[0].clientX+e.touches[1].clientX)/2,a=(e.touches[0].clientY+e.touches[1].clientY)/2,o=Math.hypot(e.touches[0].pageX-e.touches[1].pageX,e.touches[0].pageY-e.touches[1].pageY))},document.addEventListener("touchend",(e=>{"movingCamera"===this.pageMode||"zoomingCamera"===this.pageMode?(this.pageMode="orbitingCamera",i=e.touches[0].clientX,a=e.touches[0].clientY):this.pageMode="none"})),this.canvas.addEventListener("touchmove",(e=>{if(this.requestUpdate(),"scrolling"!==this.pageMode&&e.cancelable)if(Math.abs(e.touches[0].clientY-a)<=Math.abs(e.touches[0].clientX-i)&&"none"===this.pageMode&&(this.pageMode="orbitingCamera"),"movingCamera"!==this.pageMode&&"orbitingCamera"!==this.pageMode&&"zoomingCamera"!==this.pageMode||e.preventDefault(),"orbitingCamera"===this.pageMode)this.yAngleTarget+=this.ORBIT_SENSITIVITY*Math.PI*2*((i-e.touches[0].pageX)/this.canvas.width),i=e.touches[0].pageX,this.xzAngleTarget+=this.ORBIT_SENSITIVITY*Math.PI*2*((e.touches[0].pageY-a)/this.canvas.height),a=e.touches[0].pageY,this.xzAngleTarget<this.MIN_XZ_ANGLE&&(this.xzAngleTarget=this.MIN_XZ_ANGLE),this.xzAngleTarget>this.MAX_XZ_ANGLE&&(this.xzAngleTarget=this.MAX_XZ_ANGLE),this.MIN_Y_ANGLE&&this.yAngleTarget<this.MIN_Y_ANGLE&&(this.yAngleTarget=this.MIN_Y_ANGLE),this.MAX_Y_ANGLE&&this.yAngleTarget>this.MAX_Y_ANGLE&&(this.yAngleTarget=this.MAX_Y_ANGLE);else if("movingCamera"===this.pageMode){Math.abs(Math.hypot(e.touches[0].pageX-e.touches[1].pageX,e.touches[0].pageY-e.touches[1].pageY)-o)>50&&(o=Math.hypot(e.touches[0].pageX-e.touches[1].pageX,e.touches[0].pageY-e.touches[1].pageY),this.pageMode="zoomingCamera");const t=(e.touches[0].clientX+e.touches[1].clientX)/2,r=(e.touches[0].clientY+e.touches[1].clientY)/2,n=1.6*this.cameraRadius*(i-t)/this.canvas.width;i=t;const h=1.6*this.cameraRadius*(r-a)/this.canvas.height;a=r,this.panTarget.add(new s.Pa4(n*Math.cos(this.yAngleTarget)+h*Math.sin(this.xzAngleTarget)*Math.sin(-this.yAngleTarget),h*Math.cos(this.xzAngleTarget),n*Math.sin(-this.yAngleTarget)+h*Math.sin(-this.xzAngleTarget)*Math.cos(this.yAngleTarget))),null!==this.MIN_X_PAN&&void 0!==this.MIN_X_PAN&&this.panTarget.x<this.MIN_X_PAN&&(this.panTarget.x=this.MIN_X_PAN),null!==this.MAX_X_PAN&&void 0!==this.MAX_X_PAN&&this.panTarget.x>this.MAX_X_PAN&&(this.panTarget.x=this.MAX_X_PAN),null!==this.MIN_Y_PAN&&void 0!==this.MIN_Y_PAN&&this.panTarget.y<this.MIN_Y_PAN&&(this.panTarget.y=this.MIN_Y_PAN),null!==this.MAX_Y_PAN&&void 0!==this.MAX_Y_PAN&&this.panTarget.y>this.MAX_Y_PAN&&(this.panTarget.y=this.MAX_Y_PAN),null!==this.MIN_Z_PAN&&void 0!==this.MIN_Z_PAN&&this.panTarget.z<this.MIN_Z_PAN&&(this.panTarget.z=this.MIN_Z_PAN),null!==this.MAX_Z_PAN&&void 0!==this.MAX_Z_PAN&&this.panTarget.z>this.MAX_Z_PAN&&(this.panTarget.z=this.MAX_Z_PAN)}else if("zoomingCamera"===this.pageMode){const t=Math.hypot(e.touches[0].pageX-e.touches[1].pageX,e.touches[0].pageY-e.touches[1].pageY)-o;this.cameraRadiusTarget-=.03*t,o+=t,this.cameraRadiusTarget>this.MAX_CAMERA_SCROLL&&(this.cameraRadiusTarget=this.MAX_CAMERA_SCROLL),this.cameraRadiusTarget<this.MIN_CAMERA_SCROLL&&(this.cameraRadiusTarget=this.MIN_CAMERA_SCROLL)}}))}setCamera({radius:e,minRadius:t,maxRadius:i,initialRadius:s,orbitSensitivity:a,azimuthalAngle:o,maxAzimuthalAngle:r,minAzimuthalAngle:n,polarAngle:h,maxPolarAngle:l,minPolarAngle:d,dragX:m,maxDragX:c,minDragX:u,dragY:p,maxDragY:g,minDragY:v,dragZ:M,maxDragZ:f,minDragZ:A,near:x,far:T}){void 0!==e&&(this.cameraRadiusTarget=0===e?.01:e),void 0!==t&&(this.MIN_CAMERA_SCROLL=0===t?.01:t),void 0!==i&&(this.MAX_CAMERA_SCROLL=0===i?.01:i),void 0!==s&&(this.DEFAULT_CAMERA_SCROLL=0===s?.01:s),void 0!==a&&(this.ORBIT_SENSITIVITY=0===a?.01:a),void 0!==r&&(this.MAX_XZ_ANGLE=0===r?.01:r*Math.PI/180),void 0!==n&&(this.MIN_XZ_ANGLE=0===n?-.01:n*Math.PI/180),void 0!==l&&(this.MAX_Y_ANGLE=0===l?.01:l*Math.PI/180),void 0!==d&&(this.MIN_Y_ANGLE=0===d?-.01:d*Math.PI/180),void 0!==c&&(this.MAX_X_PAN=0===c?.01:c),void 0!==u&&(this.MIN_X_PAN=0===u?.01:u),void 0!==g&&(this.MAX_Y_PAN=0===g?.01:g),void 0!==v&&(this.MIN_Y_PAN=0===v?.01:v),void 0!==f&&(this.MAX_Z_PAN=0===f?.01:f),void 0!==A&&(this.MIN_Z_PAN=0===A?.01:A),void 0!==x&&(this.camera.near=0===x?.01:x),void 0!==T&&(this.camera.far=0===T?.01:T),void 0!==o&&(this.xzAngleTarget=o*Math.PI/180),void 0!==h&&(this.yAngleTarget=h*Math.PI/180),void 0!==m&&(this.panTarget.x=m),void 0!==p&&(this.panTarget.y=p),void 0!==M&&(this.panTarget.z=M),this.camera.updateProjectionMatrix()}lookTo(e){const t=this.camera.position.clone().multiply(new s.Pa4(0,1,0)).divideScalar(this.cameraRadius).angleTo(e)+(e.x<0?Math.PI:0);void 0!==t&&(this.yAngleTarget=t)}getCamera(){return{radius:this.cameraRadiusTarget,orbitSensitivity:this.ORBIT_SENSITIVITY,azimuthalAngle:180*this.xzAngleTarget/Math.PI,polarAngle:180*this.yAngleTarget/Math.PI,dragX:this.panTarget.x,dragY:this.panTarget.y,dragZ:this.panTarget.z,near:this.camera.near,far:this.camera.near}}update(){this.animation.update(),this.yAngle=this.damperYAngle.update(this.yAngle,this.yAngleTarget+this.animation.angleAnimation,this.time.delta,1),this.xzAngle=this.damperXZAngle.update(this.xzAngle,this.xzAngleTarget,this.time.delta,1),this.cameraRadius=this.damperRadius.update(this.cameraRadius,this.cameraRadiusTarget,this.time.delta,1),this.pan.x=this.damperXPan.update(this.pan.x,this.panTarget.x,this.time.delta,1),this.pan.y=this.damperYPan.update(this.pan.y,this.panTarget.y,this.time.delta,1),this.pan.z=this.damperZPan.update(this.pan.z,this.panTarget.z,this.time.delta,1),this.camera.position.x=Math.cos(this.xzAngle)*Math.sin(this.yAngle)*this.cameraRadius,this.camera.position.y=Math.sin(this.xzAngle)*this.cameraRadius,this.camera.position.z=Math.cos(this.xzAngle)*Math.cos(this.yAngle)*this.cameraRadius,this.camera.position.add(this.pan),this.camera.lookAt(this.pan)}requestUpdate(){this.needsUpdate=!0}shouldUpdate(){return this.needsUpdate?(this.needsUpdate=!1,!0):this.yAngle!==this.yAngleTarget+this.animation.angleAnimation||this.xzAngle!==this.xzAngleTarget||this.cameraRadius!==this.cameraRadiusTarget||this.pan.x!==this.panTarget.x||this.pan.y!==this.panTarget.y||this.pan.z!==this.panTarget.z||!(this.animation.isPaused()||!this.animation.isActive())}}class T{constructor(e){this.instance=null,this.experience=e,this.canvas=this.experience.canvas,this.sizes=this.experience.sizes,this.scene=this.experience.scene;const t=this.experience.cameraNear?this.experience.cameraNear:.1,i=this.experience.cameraFar?this.experience.cameraFar:100;this.instance=new s.cPb(35,this.sizes.width/this.sizes.height,t,i),this.instance.position.set(1,1,4),this.scene.add(this.instance),this.controls=new x(this.experience,this.instance,this.experience.initialZoom)}resize(){this.instance&&(this.instance.aspect=this.sizes.width/this.sizes.height,this.instance.updateProjectionMatrix())}update(){this.controls.update()}shouldUpdate(){return this.controls.shouldUpdate()}}class w{constructor(e){this.instance=null,this.canvas=e.canvas,this.sizes=e.sizes,this.scene=e.scene,this.camera=e.camera,this.instance=new s.CP7({canvas:this.canvas,antialias:!0,alpha:!0,powerPreference:"high-performance"}),this.instance.setSize(this.sizes.width,this.sizes.height),this.instance.setPixelRatio(this.sizes.pixelRatio),this.instance.setClearColor("",0),this.instance.setClearAlpha(0),this.instance.autoClear=!0,this.instance.shadowMap.enabled=!0,this.instance.shadowMap.type=s.dwk,this.instance.physicallyCorrectLights=!0,this.instance.outputEncoding=s.knz,this.instance.toneMapping=s.LY2,this.instance.toneMappingExposure=e.exposure}resize(){var e,t;null===(e=this.instance)||void 0===e||e.setSize(this.sizes.width,this.sizes.height),null===(t=this.instance)||void 0===t||t.setPixelRatio(this.sizes.pixelRatio)}update(){this.instance&&this.camera.instance&&this.instance.render(this.scene,this.camera.instance)}}var _=i(870);class b{constructor({id:e,position:t,cameraTarget:i,polarAngle:a,azimuthalAngle:o,radius:r}){this.id=e,this.position=new s.Pa4(t.x,t.y,t.z),i&&(this.cameraTarget=new s.Pa4(i.x,i.y,i.z)),a&&(this.polarAngle=a),o&&(this.azimuthalAngle=o),r&&(this.radius=r)}update(e,t,i){if(!t.instance||!i.model)return;const s=this.position.clone();s.project(t.instance),this.element=document.querySelector(`#${this.id}`),this.translateHotspot(t.sizes,s),this.updateHotspotVisibility(e,t.instance,i,s)}updateHotspotVisibility(e,t,i,s){var a,o;e.setFromCamera(s,t);const r=e.intersectObjects(i.model.children,!0);if(this.isVisible=!1,0===r.length)this.isVisible=!0;else{const e=r[0].distance;this.position.distanceTo(t.position)<e&&(this.isVisible=!0)}this.isVisible?null===(a=this.element)||void 0===a||a.classList.add("visible"):null===(o=this.element)||void 0===o||o.classList.remove("visible")}translateHotspot(e,t){const i=t.x*e.width*.5,s=t.y*e.height*-.5;this.element&&(this.element.style.transform=`translate(${i}px, ${s}px)`)}updateHotspot({position:e,cameraTarget:t,polarAngle:i,azimuthalAngle:s,radius:a}){e&&this.setPosition(e),t&&this.setCameraTarget(t),i&&this.setPolarAngle(i),s&&this.setAzimuthalAngle(s),a&&this.setRadius(a)}setPosition(e){this.position=new s.Pa4(e.x,e.y,e.z)}setCameraTarget(e){this.cameraTarget=new s.Pa4(e.x,e.y,e.z)}setPolarAngle(e){this.polarAngle=e}setAzimuthalAngle(e){this.azimuthalAngle=e}setRadius(e){this.radius=e}}var P=i(643),y=i(220),S=i(175),N=i(475),z=i(612),C=i(248),I=i(655);class L extends z.w{constructor(e,t,i,a){super(),this.strength=void 0!==t?t:1,this.radius=i,this.threshold=a,this.resolution=void 0!==e?new s.FM8(e.x,e.y):new s.FM8(256,256),this.clearColor=new s.Ilk(0,0,0);const o={minFilter:s.wem,magFilter:s.wem,format:s.wk1};this.renderTargetsHorizontal=[],this.renderTargetsVertical=[],this.nMips=5;let r=Math.round(this.resolution.x/2),n=Math.round(this.resolution.y/2);this.renderTargetBright=new s.dd2(r,n,o),this.renderTargetBright.texture.name="UnrealBloomPass.bright",this.renderTargetBright.texture.generateMipmaps=!1;for(let e=0;e<this.nMips;e++){const t=new s.dd2(r,n,o);t.texture.name=`UnrealBloomPass.h${e}`,t.texture.generateMipmaps=!1,this.renderTargetsHorizontal.push(t);const i=new s.dd2(r,n,o);i.texture.name=`UnrealBloomPass.v${e}`,i.texture.generateMipmaps=!1,this.renderTargetsVertical.push(i),r=Math.round(r/2),n=Math.round(n/2)}void 0===I.Y&&console.error("THREE.UnrealBloomPass relies on LuminosityHighPassShader");const h=I.Y;this.highPassUniforms=s.rDY.clone(h.uniforms),this.highPassUniforms.luminosityThreshold.value=a,this.highPassUniforms.smoothWidth.value=.01,this.materialHighPassFilter=new s.jyz({uniforms:this.highPassUniforms,vertexShader:h.vertexShader,fragmentShader:h.fragmentShader,defines:{}}),this.separableBlurMaterials=[];const l=[3,5,7,9,11];r=Math.round(this.resolution.x/2),n=Math.round(this.resolution.y/2);for(let e=0;e<this.nMips;e++)this.separableBlurMaterials.push(this.getSeperableBlurMaterial(l[e])),this.separableBlurMaterials[e].uniforms.texSize.value=new s.FM8(r,n),r=Math.round(r/2),n=Math.round(n/2);this.compositeMaterial=this.getCompositeMaterial(this.nMips),this.compositeMaterial.uniforms.blurTexture1.value=this.renderTargetsVertical[0].texture,this.compositeMaterial.uniforms.blurTexture2.value=this.renderTargetsVertical[1].texture,this.compositeMaterial.uniforms.blurTexture3.value=this.renderTargetsVertical[2].texture,this.compositeMaterial.uniforms.blurTexture4.value=this.renderTargetsVertical[3].texture,this.compositeMaterial.uniforms.blurTexture5.value=this.renderTargetsVertical[4].texture,this.compositeMaterial.uniforms.bloomStrength.value=t,this.compositeMaterial.uniforms.bloomRadius.value=.1,this.compositeMaterial.needsUpdate=!0,this.compositeMaterial.uniforms.bloomFactors.value=[1,.8,.6,.4,.2],this.bloomTintColors=[new s.Pa4(1,1,1),new s.Pa4(1,1,1),new s.Pa4(1,1,1),new s.Pa4(1,1,1),new s.Pa4(1,1,1)],this.compositeMaterial.uniforms.bloomTintColors.value=this.bloomTintColors,void 0===C.C&&console.error("THREE.UnrealBloomPass relies on CopyShader");const d=C.C;this.copyUniforms=s.rDY.clone(d.uniforms),this.copyUniforms.opacity.value=1,this.materialCopy=new s.jyz({uniforms:this.copyUniforms,vertexShader:d.vertexShader,fragmentShader:d.fragmentShader,blending:s.WMw,depthTest:!1,depthWrite:!1,transparent:!0}),this.enabled=!0,this.needsSwap=!1,this._oldClearColor=new s.Ilk,this.oldClearAlpha=1,this.basic=new s.vBJ,this.fsQuad=new z.T(null)}dispose(){for(let e=0;e<this.renderTargetsHorizontal.length;e++)this.renderTargetsHorizontal[e].dispose();for(let e=0;e<this.renderTargetsVertical.length;e++)this.renderTargetsVertical[e].dispose();this.renderTargetBright.dispose()}setSize(e,t){let i=Math.round(e/2),a=Math.round(t/2);this.renderTargetBright.setSize(i,a);for(let e=0;e<this.nMips;e++)this.renderTargetsHorizontal[e].setSize(i,a),this.renderTargetsVertical[e].setSize(i,a),this.separableBlurMaterials[e].uniforms.texSize.value=new s.FM8(i,a),i=Math.round(i/2),a=Math.round(a/2)}render(e,t,i,s,a){e.getClearColor(this._oldClearColor),this.oldClearAlpha=e.getClearAlpha();const o=e.autoClear;e.autoClear=!1,e.setClearColor(this.clearColor,0),a&&e.state.buffers.stencil.setTest(!1),this.renderToScreen&&(this.fsQuad.material=this.basic,this.basic.map=i.texture,e.setRenderTarget(null),e.clear(),this.fsQuad.render(e)),this.highPassUniforms.tDiffuse.value=i.texture,this.highPassUniforms.luminosityThreshold.value=this.threshold,this.fsQuad.material=this.materialHighPassFilter,e.setRenderTarget(this.renderTargetBright),e.clear(),this.fsQuad.render(e);let r=this.renderTargetBright;for(let t=0;t<this.nMips;t++)this.fsQuad.material=this.separableBlurMaterials[t],this.separableBlurMaterials[t].uniforms.colorTexture.value=r.texture,this.separableBlurMaterials[t].uniforms.direction.value=L.BlurDirectionX,e.setRenderTarget(this.renderTargetsHorizontal[t]),e.clear(),this.fsQuad.render(e),this.separableBlurMaterials[t].uniforms.colorTexture.value=this.renderTargetsHorizontal[t].texture,this.separableBlurMaterials[t].uniforms.direction.value=L.BlurDirectionY,e.setRenderTarget(this.renderTargetsVertical[t]),e.clear(),this.fsQuad.render(e),r=this.renderTargetsVertical[t];this.fsQuad.material=this.compositeMaterial,this.compositeMaterial.uniforms.bloomStrength.value=this.strength,this.compositeMaterial.uniforms.bloomRadius.value=this.radius,this.compositeMaterial.uniforms.bloomTintColors.value=this.bloomTintColors,e.setRenderTarget(this.renderTargetsHorizontal[0]),e.clear(),this.fsQuad.render(e),this.fsQuad.material=this.materialCopy,this.copyUniforms.tDiffuse.value=this.renderTargetsHorizontal[0].texture,a&&e.state.buffers.stencil.setTest(!0),this.renderToScreen?(e.setRenderTarget(null),this.fsQuad.render(e)):(e.setRenderTarget(i),this.fsQuad.render(e)),e.setClearColor(this._oldClearColor,this.oldClearAlpha),e.autoClear=o}getSeperableBlurMaterial(e){return new s.jyz({defines:{KERNEL_RADIUS:e,SIGMA:e},uniforms:{colorTexture:{value:null},texSize:{value:new s.FM8(.5,.5)},direction:{value:new s.FM8(.5,.5)}},vertexShader:"varying vec2 vUv;\n void main() {\n vUv = uv;\n gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n }",fragmentShader:"#include <common>\n varying vec2 vUv;\n uniform sampler2D colorTexture;\n uniform vec2 texSize;\n uniform vec2 direction;\n float gaussianPdf(in float x, in float sigma) {\n return 0.39894 * exp( -0.5 * x * x/( sigma * sigma))/sigma;\n }\n void main() {\n vec2 invSize = 1.0 / texSize; float fSigma = float(SIGMA); float weightSum = gaussianPdf(0.0, fSigma); float alphaSum = 0.0; vec3 diffuseSum = texture2D( colorTexture, vUv).rgb * weightSum; for( int i = 1; i < KERNEL_RADIUS; i ++ ) { float x = float(i); float w = gaussianPdf(x, fSigma); vec2 uvOffset = direction * invSize * x; vec4 sample1 = texture2D( colorTexture, vUv + uvOffset); vec4 sample2 = texture2D( colorTexture, vUv - uvOffset); diffuseSum += (sample1.rgb + sample2.rgb) * w; alphaSum += (sample1.a + sample2.a) * w; weightSum += 2.0 * w; } gl_FragColor = vec4(diffuseSum/weightSum, alphaSum/weightSum);\n }"})}getCompositeMaterial(e){return new s.jyz({defines:{NUM_MIPS:e},uniforms:{blurTexture1:{value:null},blurTexture2:{value:null},blurTexture3:{value:null},blurTexture4:{value:null},blurTexture5:{value:null},dirtTexture:{value:null},bloomStrength:{value:1},bloomFactors:{value:null},bloomTintColors:{value:null},bloomRadius:{value:0}},vertexShader:"varying vec2 vUv;\n void main() {\n vUv = uv;\n gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n }",fragmentShader:"varying vec2 vUv;\n uniform sampler2D blurTexture1;\n uniform sampler2D blurTexture2;\n uniform sampler2D blurTexture3;\n uniform sampler2D blurTexture4;\n uniform sampler2D blurTexture5;\n uniform sampler2D dirtTexture;\n uniform float bloomStrength;\n uniform float bloomRadius;\n uniform float bloomFactors[NUM_MIPS];\n uniform vec3 bloomTintColors[NUM_MIPS];\n float lerpBloomFactor(const in float factor) {\n float mirrorFactor = 1.2 - factor;\n return mix(factor, mirrorFactor, bloomRadius);\n }\n void main() {\n gl_FragColor = bloomStrength * ( lerpBloomFactor(bloomFactors[0]) * vec4(bloomTintColors[0], 1.0) * texture2D(blurTexture1, vUv) +\n lerpBloomFactor(bloomFactors[1]) * vec4(bloomTintColors[1], 1.0) * texture2D(blurTexture2, vUv) +\n lerpBloomFactor(bloomFactors[2]) * vec4(bloomTintColors[2], 1.0) * texture2D(blurTexture3, vUv) +\n lerpBloomFactor(bloomFactors[3]) * vec4(bloomTintColors[3], 1.0) * texture2D(blurTexture4, vUv) +\n lerpBloomFactor(bloomFactors[4]) * vec4(bloomTintColors[4], 1.0) * texture2D(blurTexture5, vUv) );\n }"})}}L.BlurDirectionX=new s.FM8(1,0),L.BlurDirectionY=new s.FM8(0,1);class R{constructor(e){var t,i;if(this.scene=e.scene,this.bloomModels=null===(t=e.world.model)||void 0===t?void 0:t.bloomModels,this.lightModels=null===(i=e.world.model)||void 0===i?void 0:i.lightModels,this.experience=e,this.sunLight=new s.Ox3("",0),this.sunLight.position.set(this.experience.shadowOffsetX,this.experience.shadowOffsetY,this.experience.shadowOffsetZ),this.experience.activeShadow&&(this.sunLight.castShadow=!0),this.sunLight.shadow.camera.near=.01,this.sunLight.shadow.camera.far=100,this.sunLight.shadow.bias=-1e-5,this.sunLight.shadow.mapSize.width=2048,this.sunLight.shadow.mapSize.height=2048,this.sunLight.shadow.blurSamples=20,this.sunLight.shadow.radius=this.experience.shadowRadius?this.experience.shadowRadius:1,this.scene.add(this.sunLight),this.experience.activeFog){const e=this.experience.fogColor?this.experience.fogColor:"#ffffff",t=this.experience.fogNear?this.experience.fogNear:1,i=this.experience.fogFar?this.experience.fogFar:15;this.fog=new s.ybr(e,t,i),this.scene.fog=this.fog}}initializeBloom(){var e;if(this.experience.renderer.instance){const t=new s.dd2(this.experience.sizes.width,this.experience.sizes.height,{minFilter:s.wem,magFilter:s.wem,format:s.wk1,type:s.cLu,stencilBuffer:!1});t.samples=3;const i=new S.T(N.Y);this.darkMaterial=new s.vBJ({color:"black"}),this.darkGlassMaterial=new s.vBJ({color:"black",visible:!1}),this.materials={};const a=new y.C(this.scene,this.experience.camera.instance);this.bloomPass=new L(new s.FM8(this.experience.sizes.width,this.experience.sizes.height),this.experience.bloomIntensity,this.experience.bloomRadius,this.experience.bloomThreshold),this.bloomComposer=new P.xC(this.experience.renderer.instance,t),this.bloomComposer.renderToScreen=!1,this.bloomComposer.addPass(a),this.bloomComposer.addPass(this.bloomPass),this.bloomPass.enabled=!1,this.lightModels&&this.lightModels.forEach((e=>{e.visible=!1})),null===(e=this.bloomModels)||void 0===e||e.forEach((e=>{e.material instanceof s.Wid&&(e.material.emissiveIntensity=0)}));const o=new S.T(new s.jyz({uniforms:{baseTexture:{value:null},bloomTexture:{value:this.bloomComposer.renderTarget2.texture}},vertexShader:"varying vec2 vUv;\n\nvoid main() {\n\n vUv = uv;\n\n gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\n}",fragmentShader:"uniform sampler2D baseTexture;\nuniform sampler2D bloomTexture;\n\nvarying vec2 vUv;\n\nvoid main() {\n\n gl_FragColor = ( texture2D( baseTexture, vUv ) + vec4( 1.0 ) * texture2D( bloomTexture, vUv ) );\n\n}",defines:{}}),"baseTexture");o.needsSwap=!0,this.finalComposer=new P.xC(this.experience.renderer.instance,t),this.finalComposer.addPass(a),this.finalComposer.addPass(o),this.finalComposer.addPass(i)}}update(){var e,t,i,a;this.experience.world.model&&this.bloomPass&&("bloomOn"===this.bloom?(this.bloomPass.enabled=!0,this.lightModels&&this.lightModels.forEach((e=>{e.visible=!0})),null===(e=this.bloomModels)||void 0===e||e.forEach((e=>{e.material instanceof s.Wid&&(e.material.emissiveIntensity=1)}))):(this.bloomPass.enabled=!1,this.lightModels&&this.lightModels.forEach((e=>{e.visible=!1})),null===(t=this.bloomModels)||void 0===t||t.forEach((e=>{e.material instanceof s.Wid&&(e.material.emissiveIntensity=0)}))),this.experience.camera.instance&&(null===(i=this.experience.world.model.model)||void 0===i||i.traverse((e=>this.darkenNonBloomed(e))),this.bloomComposer.render(),null===(a=this.experience.world.model.model)||void 0===a||a.traverse((e=>this.restoreMaterial(e))),this.finalComposer.render()))}resize(){this.bloomComposer.setSize(this.experience.sizes.width,this.experience.sizes.height),this.finalComposer.setSize(this.experience.sizes.width,this.experience.sizes.height)}updateShadow({opacity:e,XOffset:t,YOffset:i,ZOffset:s,radius:a,activeShadow:o}){var r;(t||0===t)&&(this.sunLight.position.x=t),(i||0===i)&&(this.sunLight.position.y=i),(s||0===s)&&(this.sunLight.position.z=s),void 0!==a&&(this.sunLight.shadow.radius=a||1),void 0!==o&&(null===(r=this.experience.world.model)||void 0===r||r.updateFloor(o)),this.experience.world.model&&(e||0===e)&&(this.experience.world.model.shadowMaterial.opacity=e)}updateBloom({intensity:e,radius:t,threshold:i}){void 0!==e&&(this.bloomPass.strength=e),void 0!==t&&(this.bloomPass.radius=t),void 0!==i&&(this.bloomPass.threshold=i)}updateFog({enable:e,color:t,near:i,far:a}){const o=/^#([0-9a-f]{3}){1,2}$/i;if(this.fog)e?this.scene.fog=this.fog:void 0!==e&&(this.scene.fog=null),t&&o.test(t)&&(this.fog.color=new s.Ilk(t)),i&&(this.fog.near=i),a&&(this.fog.far=a);else if(e){const e=t&&o.test(t)?t:"#ffffff",r=i||1,n=a||15;this.fog=new s.ybr(e,r,n),this.scene.fog=this.fog}}darkenNonBloomed(e){var t;e instanceof s.Kj0&&!(null===(t=this.bloomModels)||void 0===t?void 0:t.find((t=>e===t)))&&(this.materials[e.uuid]=e.material,Array.isArray(e.material)||0===e.material.alphaTest&&1===e.material.opacity?e.material=this.darkMaterial:e.material=this.darkGlassMaterial)}restoreMaterial(e){var t;e instanceof s.Kj0&&this.materials[e.uuid]&&!(null===(t=this.bloomModels)||void 0===t?void 0:t.find((t=>e===t)))&&(e.material=this.materials[e.uuid],delete this.materials[e.uuid])}}const E=(e,t)=>{if(t(e))for(let i=0,s=e.children.length;i<s;i++)E(e.children[i],t)},X=E;class O extends a.EventEmitter{constructor(e,t,i){super(),this.animationActions={},this.activeAnimations={},this.defaultAnimationOptions={loop:!1,resetOnFinish:!1,timeScale:1,fadeFactor:0},(null==e?void 0:e.model)&&(this.model=e,this.defaultAnimationOptions=Object.assign(Object.assign({},this.defaultAnimationOptions),i),this.mixer=new s.Xcj(e.model),t.forEach((e=>{e.optimize(),this.animationActions[e.name]=this.mixer.clipAction(e)})),this.mixer.addEventListener("finished",(e=>{const t=e;this.animationFinished(t.action)})),0!==Object.keys(this.animationActions).length&&c.singleton.on("tick",(()=>{Object.keys(this.activeAnimations).length&&(this.mixer.update(c.singleton.delta/1e3),this.model.world.requestUpdate())})),this.emit("animatorReady"))}getAnimationIds(){return Object.keys(this.animationActions)}play(e,t={}){return e=this.getAnimationId(e),new Promise((i=>{const a=this.animationActions[e];this.activeAnimations[e]?i():(a.timeScale=t.timeScale||this.defaultAnimationOptions.timeScale,a.clampWhenFinished=!(t.resetOnFinish||this.defaultAnimationOptions.resetOnFinish),a.fadeIn(t.fadeFactor||this.defaultAnimationOptions.fadeFactor),a.setLoop(t.loop?s.YKA:s.jAl,1/0),this.activeAnimations[a.getClip().name]={action:a,resolve:i},a.stop(),a.play())}))}stop(e){e=this.getAnimationId(e);const t=this.animationActions[e];t?(t.stop(),this.activeAnimations[e]&&this.animationFinished(t)):console.error(`Coultn't find animationId "${e}" in model "${this.model.id}".`)}getAnimationId(e){return this.animationActions[e]||Object.keys(this.animationActions).forEach((t=>t.toLocaleLowerCase()!==e.toLocaleLowerCase()||(console.warn(`Coultn't find animationId "${e}" in model "${this.model.id}". Using animationId as "${t}" instead.`),e=t,!1))),e}animationFinished(e){const t=e.getClip().name;this.activeAnimations[t].resolve(),delete this.activeAnimations[t]}}class Y{constructor({id:e,model:t,parentModel:i,materialPalette:a,defaultAnimationOptions:o,animations:r,world:n}){this.id=e,this.model=t,this.parentModel=i,this.modelParts=[],this.slotsModels={},this.slotsMaterials={},this.bloomModels=[],this.lightModels=[],this.world=n,this.animator=new O(this,r,o),this.model&&X(this.model,(e=>{if(/^SLOT_/.test(e.name))return this.slotsModels[e.name.replace(/^SLOT_/,"")]={slot:e,activeModel:-1,models:[]},!1;if(e instanceof s.Kj0){if(/^SLOT_/.test(e.material.name)){const t=e.material;this.slotsMaterials[t.name.replace(/^SLOT_/,"").replace(/-(\d|\D|\|)*$/,"")]={slot:t,group:t.name.replace(/^(\d|\D)*-/,""),materials:[]}}new s.Ilk("rgb(0, 0, 0)").equals(e.material.emissive)||this.bloomModels.push(e),e.castShadow=!0,e.receiveShadow=!0,e.frustumCulled=!0}return e instanceof s._kC&&e.name.toLowerCase().startsWith("dynamic")&&this.lightModels.push(e),!0})),a.forEach((e=>{const t=e.name.replace(/^(\d|\D)*-/,"").split("|");Object.values(this.slotsMaterials).forEach((i=>{t.includes(i.group)&&i.materials.push({name:e.name.replace(/^MATERIAL_/,"").replace(/-(\d|\D|\|)*$/,""),material:e})}))})),Object.values(this.slotsModels).forEach((e=>{const t=[];X(e.slot,(e=>!/^MODEL-PART_/.test(e.name)||(t.push(e),!1))),t.forEach((t=>{t.removeFromParent(),e.models.push(new U({model:t,id:t.name.replace(/^MODEL-PART_/,""),parentModel:this,materialPalette:a,defaultAnimationOptions:o,animations:r,world:n}))}))}))}getAnimations(){return this.animator.getAnimationIds()}playAnimation(e,t){return this.animator.play(e,t)}stoAnimation(e){this.animator.stop(e)}removeFromParent(){var e;null===(e=this.model)||void 0===e||e.removeFromParent()}}class U extends Y{constructor({model:e,id:t,parentModel:i,constraints:s,materialPalette:a,defaultAnimationOptions:o,animations:r,world:n}){var h,l,d;super({id:t,model:e,parentModel:i,materialPalette:a,defaultAnimationOptions:o,animations:r,world:n}),(null==s?void 0:s.position)&&(null===(h=this.model)||void 0===h||h.position.set(s.position[0],s.position[1],s.position[2])),(null==s?void 0:s.scale)&&(null===(l=this.model)||void 0===l||l.scale.set(s.scale[0],s.scale[1],s.scale[2])),(null==s?void 0:s.rotation)&&(null===(d=this.model)||void 0===d||d.rotation.set(s.rotation[0],s.rotation[1],s.rotation[2]))}dispose(){var e,t;this.model&&(this.model.traverse((e=>{var t;e instanceof s.Kj0&&(e.geometry.dispose(),/SLOT_/.test(e.material.name)?null===(t=e.material.aoMap)||void 0===t||t.dispose():Object.values(e.material).forEach((e=>{e instanceof s.xEZ&&e.dispose()})),e.material.dispose())})),Object.values(this.slotsModels).forEach((e=>e.models.forEach((e=>e.dispose())))),null===(t=null===(e=this.parentModel)||void 0===e?void 0:e.model)||void 0===t||t.remove(this.model))}}const D=Math.PI/2;class F extends Y{constructor(e,t,i,a){super({id:"root-model",model:e.resources.model,materialPalette:t,defaultAnimationOptions:a,animations:i,world:e.world}),this.experience=e,this.scene=e.scene,this.resources=e.resources,this.time=e.time,this.activeShadow=e.activeShadow,this.box=new s.ZzF;const o=(new s.Pa4).setScalar(1.7);if(this.model){this.box.setFromObject(this.model);const t=new s.Pa4;this.box.getSize(t),this.center=new s.Pa4,this.box.getCenter(this.center);const i=(new s.Pa4).copy(o).divide(t);let a=Math.min(i.x,Math.min(i.y,i.z));e.maxZoom||0===e.maxZoom?e.camera.controls.MIN_CAMERA_SCROLL=e.maxZoom+.01:e.camera.controls.MIN_CAMERA_SCROLL=a<1?a/.6:a<2?a/1.2:a<3?a/1.5:a<4?a/2.5:a<5?a/3:a/3.5,e.minZoom&&(e.camera.controls.MAX_CAMERA_SCROLL=e.minZoom),this.resources.animations!==[]&&(a/=1.2),this.model.scale.setScalar(a),this.model.position.sub(this.center.multiplyScalar(a)),this.model.rotation.y=D,this.activeShadow&&(this.shadowMaterial=new s.Tn7,this.shadowMaterial.opacity=e.shadowOpacity,this.shadowMaterial.needsUpdate=!0,this.floor=new s.Kj0(new s.BKK(100,100,1),this.shadowMaterial),this.floor.rotation.x=-Math.PI/2,this.floor.receiveShadow=!0,this.floor.castShadow=!1,this.floor.position.sub(this.center),this.scene.add(this.floor)),this.scene.add(this.model),0!==this.resources.animations.length&&(this.mixer=new s.Xcj(this.model),this.mixer.clipAction(this.resources.animations[0]).play())}}update(){var e;null===(e=this.mixer)||void 0===e||e.update(this.time.delta/1e3)}updateFloor(e){e&&!this.floor&&(this.shadowMaterial=new s.Tn7,this.shadowMaterial.opacity=this.experience.shadowOpacity,this.shadowMaterial.needsUpdate=!0,this.floor=new s.Kj0(new s.BKK(100,100,1),this.shadowMaterial),this.floor.rotation.x=-Math.PI/2,this.floor.receiveShadow=!0,this.floor.castShadow=!1,this.floor.position.sub(this.center),this.scene.add(this.floor),this.scene.traverse((e=>{e instanceof s.Kj0&&(e.castShadow=!0,e.receiveShadow=!0)}))),!e&&this.floor&&(this.floor.geometry.dispose(),this.floor.material.dispose(),Object.values(this.floor.material).forEach((e=>{e instanceof s.xEZ&&e.dispose()})),this.scene.remove(this.floor),this.scene.traverse((e=>{e instanceof s.Kj0&&(e.castShadow=!1,e.receiveShadow=!1)})),this.floor=void 0)}dispose(){this.model&&(this.model.traverse((e=>{e instanceof s.Kj0&&(e.geometry.dispose(),e.material.dispose())})),this.floor&&(this.floor.geometry.dispose(),this.floor.material.dispose(),Object.values(this.floor.material).forEach((e=>{e instanceof s.xEZ&&e.dispose()})),this.mixer=void 0,this.scene.remove(this.floor)),this.scene.remove(this.model))}}var B=function(e,t,i,s){return new(i||(i=Promise))((function(a,o){function r(e){try{h(s.next(e))}catch(e){o(e)}}function n(e){try{h(s.throw(e))}catch(e){o(e)}}function h(e){var t;e.done?a(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,n)}h((s=s.apply(e,t||[])).next())}))};class Z{constructor(e,t){this.scene=e.scene,this.resources=e.resources,this.camera=e.camera,this.materialPalette=[],this.hotspotRaycaster=new s.iMs,this.hotspots=[],this.resources.on("modelReady",(()=>{e.resources.model&&this.prepareCustomizationPalette(e.resources.model),this.model=new F(e,this.materialPalette,this.resources.animations,t),this.environment||(this.environment=new R(e)),"noBloom"!==e.bloom&&e.initializeBloom(),this.requestUpdate()})),this.resources.on("modelDispose",(()=>{var e;null===(e=this.model)||void 0===e||e.dispose(),this.model=void 0,this.requestUpdate()}))}prepareCustomizationPalette(e){const t=[];e.traverse((e=>{e instanceof s.Kj0&&/MATERIAL_/.test(e.material.name)&&t.push(e)})),t.forEach((e=>{-1===this.materialPalette.findIndex((t=>t.name.replace(/^MATERIAL_/,"").replace(/-(\d|\D|\|)*$/,"")===e.material.name.replace(/^MATERIAL_/,"").replace(/-(\d|\D|\|)*$/,"")))?this.materialPalette.push(e.material):(Object.values(e.material).forEach((e=>{e instanceof s.xEZ&&e.dispose()})),e.material.dispose()),e.geometry.dispose(),e.removeFromParent()}))}forEachModel(e,t=this.model){t&&(e(t),[...t.modelParts,...Object.values(t.slotsModels).filter((e=>-1!==e.activeModel)).map((e=>e.models[e.activeModel]))].forEach((t=>{this.forEachModel(e,t)})))}findModel(e,t){return e===t.id?t:[...t.modelParts,...Object.values(t.slotsModels).filter((e=>-1!==e.activeModel)).map((e=>e.models[e.activeModel]))].reduce(((t,i)=>t||this.findModel(e,i)),null)}insertModelNode({url:e,id:t,parentId:i="root-model",constraints:s}){if(!this.model)return;const a=this.findModel(i,this.model);a&&this.resources.loadGlb(e).then((e=>{var i;this.prepareCustomizationPalette(e.scene);const o=new U({model:e.scene,id:t,parentModel:a,constraints:s,materialPalette:this.materialPalette,animations:e.animations,world:this});a.modelParts.push(o),null===(i=a.model)||void 0===i||i.add(o.model),this.requestUpdate()}))}insertSlotModelNode({url:e,modelId:t,slotName:i,parentId:a="root-model",constraints:o}){var r,n;return B(this,void 0,void 0,(function*(){if(!this.model)return;const h=this.findModel(a,this.model);if(h&&!(null===(r=h.slotsModels[i])||void 0===r?void 0:r.models.find((e=>e.id===t))))try{if(!h.slotsModels[i]){const e=new s.Tme;e.name=i,null===(n=h.model)||void 0===n||n.add(e),h.slotsModels[i]={slot:e,activeModel:-1,models:[]}}const a=yield this.resources.loadGlb(e);this.prepareCustomizationPalette(a.scene);const r=new U({model:a.scene,id:t,parentModel:h,constraints:o,materialPalette:this.materialPalette,animations:a.animations,world:this});h.slotsModels[i].models.push(r),this.requestUpdate()}catch(e){console.error("Error on load model resource")}}))}deleteModelNode(e){if(!this.model)return;const t=this.findModel(e,this.model);t&&(t.dispose(),t instanceof U&&t.parentModel&&(t.parentModel.modelParts=t.parentModel.modelParts.filter((t=>t.id!==e))),this.requestUpdate())}getAllSlotsMaterials(e){if(!this.model)return null;const t=e||this.model,i=[...t.modelParts,...Object.values(t.slotsModels).filter((e=>-1!==e.activeModel)).map((e=>e.models[e.activeModel]))];return{id:t.id,slots:Object.keys(t.slotsMaterials).map((e=>({name:e,materials:t.slotsMaterials[e].materials.map((e=>e.name))}))),models:i.map((e=>this.getAllSlotsMaterials(e)))}}setMaterial({modelId:e="root-model",slot:t,materialName:i}){var s,a;if(!this.model)return;const o=this.findModel(e,this.model);if(!o)return void console.error("Model with Id",e,"not found!");if(!o.slotsMaterials[t])return void console.error("Slot",t,"not found!");const r=null===(a=null===(s=o.slotsMaterials[t])||void 0===s?void 0:s.materials.find((e=>e.name===i)))||void 0===a?void 0:a.material;if(!r)return void console.error("Material name",i,"not found!");const n=["isMaterial","id","name","needsUpdate","uuid","version","isMeshStandardMaterial"],{slot:h}=o.slotsMaterials[t];Object.keys(h).forEach((e=>{n.includes(e)||(h[e]=r[e])})),o.slotsMaterials[t].slot.needsUpdate=!0,this.requestUpdate()}getAllSlotsModels(e){if(!this.model)return null;const t=e||this.model;return{id:t.id,slots:Object.keys(t.slotsModels).map((e=>({name:e,models:t.slotsModels[e].models.map((e=>this.getAllSlotsModels(e)))}))),modelParts:t.modelParts.map((e=>this.getAllSlotsModels(e)))}}setModel({modelId:e="root-model",slot:t,modelName:i}){if(!this.model)return;const s=this.findModel(e,this.model);if(!s)return void console.error("Model with Id",e,"not found!");const a=s.slotsModels[t];if(!a)return void console.error("Slot",t,"not found!");const o=a.models.findIndex((e=>e.id===i));-1!==a.activeModel&&a.models[a.activeModel].removeFromParent(),a.activeModel=o,-1!==o&&a.slot.add(a.models[o].model),this.requestUpdate()}getCustomizedModel(e=!0){var t;return B(this,void 0,void 0,(function*(){if(!(null===(t=this.model)||void 0===t?void 0:t.model))return null;this.gltfExporter||(this.gltfExporter=new _.M);const a=this.model.model.clone(!0);a.scale.setScalar(1),a.rotation.fromArray([0,0,0]),a.position.fromArray([0,0,0]),a.traverse((e=>{e.name&&(e.name=e.name.replace("MODEL-PART_",""),e.name=e.name.replace("SLOT_","")),e instanceof s.Kj0&&(e.material.name=e.material.name.replace("SLOT_",""))}));const o=yield this.gltfExporter.parseAsync(a,{binary:!0}).then((t=>e?Promise.all([i.e(27),i.e(322)]).then(i.bind(i,710)).then((({default:e})=>e(t))):t)),r=new Blob([o],{type:"application/octet-stream"});return a.traverse((e=>{e instanceof s.Kj0&&(e.geometry.dispose(),Object.values(e.material).forEach((e=>{e instanceof s.xEZ&&e.dispose()})),e.material.dispose())})),r}))}getCurrentCustomization(e=this.model){return e?{id:e.id,materialSlots:Object.keys(e.slotsMaterials).map((t=>{var i;return{slot:t,activeMaterial:null===(i=e.slotsMaterials[t].materials.find((({material:i})=>{const s=e.slotsMaterials[t].slot;return o=i,(a=s).color.getHexString()===o.color.getHexString()&&a.map===o.map&&a.alphaMap===o.alphaMap&&a.aoMap===o.aoMap&&a.roughness===o.roughness&&a.roughnessMap===o.roughnessMap&&a.metalness===o.metalness&&a.metalnessMap===o.metalnessMap&&a.normalMap===o.normalMap;var a,o})))||void 0===i?void 0:i.name}})),modelSlots:Object.keys(e.slotsModels).map((t=>({slot:t,activeModel:-1!==e.slotsModels[t].activeModel?this.getCurrentCustomization(e.slotsModels[t].models[e.slotsModels[t].activeModel]):null})))}:null}insertHotspot(e,t,i,s,a,o){const r=new b({id:e,position:t,cameraTarget:i,polarAngle:s,azimuthalAngle:a,radius:o});this.hotspots.push(r),this.requestUpdate()}lookToHotspot(e){const t=this.hotspots.find((t=>t.id===e));return t&&this.camera?this.camera.controls.lookTo(t.position):null}centerCameraAtHotspot(e){const t=this.hotspots.find((t=>t.id===e));return t&&this.camera?this.camera.controls.setCamera({dragX:t.position.x,dragY:t.position.y,dragZ:t.position.z}):null}updateHotspot(e,t,i,s,a,o){const r=this.hotspots.find((t=>t.id===e));return r?r.updateHotspot({position:t,cameraTarget:i,polarAngle:s,azimuthalAngle:a,radius:o}):null}deleteHotspot(e){this.hotspots=this.hotspots.filter((t=>t.id!==e))}getAnimationIds(e){var t;void 0===e&&(e=null===(t=this.model)||void 0===t?void 0:t.id);const i=[];return e?this.model&&i.push({modelId:this.model.id,animations:this.model.getAnimations()}):this.forEachModel((e=>{i.push({modelId:e.id,animations:e.getAnimations()})})),i}playAnimation(e,t,i){var s;if(void 0===i&&(i=null===(s=this.model)||void 0===s?void 0:s.id),!this.model||!i)return Promise.reject(new Error("No models found."));const a=this.findModel(i,this.model);return a?a.playAnimation(e,t):(console.error(`Couldn't find model with modelId "${i}".`),Promise.resolve())}stopAnimation(e,t){if(!this.model)return Promise.resolve();t||(t=this.model.id);const i=this.findModel(t,this.model);return i?i.stoAnimation(e):(console.error(`Couldn't find model with modelId "${t}".`),Promise.resolve())}update(){var e;null===(e=this.model)||void 0===e||e.update(),this.camera&&this.model&&this.hotspots.forEach((e=>e.update(this.hotspotRaycaster,this.camera,this.model)))}requestUpdate(){this.needsUpdate=!0}shouldUpdate(){return!!this.needsUpdate&&(this.needsUpdate=!1,!0)}}var k=function(e,t,i,s){return new(i||(i=Promise))((function(a,o){function r(e){try{h(s.next(e))}catch(e){o(e)}}function n(e){try{h(s.throw(e))}catch(e){o(e)}}function h(e){var t;e.done?a(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,n)}h((s=s.apply(e,t||[])).next())}))};class j{constructor({canvas:e,glbSrc:t,exposure:i,noZoom:a,minZoom:o,maxZoom:r,initialZoom:n,sceneBackground:h,activeShadow:l,activeBakedShadow:u,shadowOffsetX:p,shadowOffsetY:g,shadowOffsetZ:v,shadowOpacity:M,shadowRadius:f,cameraOrbitSensitivity:A,minAzimuthalAngleRotation:x,maxAzimuthalAngleRotation:_,minPolarAngleRotation:b,maxPolarAngleRotation:P,maxDragX:y,minDragX:S,maxDragY:N,minDragY:z,maxDragZ:C,minDragZ:I,activeFog:L,fogColor:R,fogNear:E,fogFar:X,cameraNear:O,cameraFar:Y,hdri:U,bloomIntensity:D,bloomRadius:F,bloomThreshold:B,initialAnimation:k,loadingDiv:j,instructionsImg:H,bloomButton:q,defaultAnimationOptions:G}){this.canvas=e,this.canvasObserver=new IntersectionObserver((([e])=>{this.isVisible=e.isIntersecting})),this.canvasObserver.observe(this.canvas),this.progress=j,this.bloomButton=q,this.glbSrc=t,this.needsUpdate=!0,this.exposure=i,this.instructionsImg=H,this.noZoom=a,this.minZoom=o,this.maxZoom=r,this.initialZoom=n,this.activeShadow=l,this.activeBakedShadow=u,this.shadowOffsetX=p,this.shadowOffsetY=g,this.shadowOffsetZ=v,this.shadowOpacity=M,this.shadowRadius=f,this.orbitSensitivity=A,this.minAzimuthalAngleRotation=x,this.maxAzimuthalAngleRotation=_,this.minPolarAngleRotation=b,this.maxPolarAngleRotation=P,this.maxDragX=y,this.minDragX=S,this.maxDragY=N,this.minDragY=z,this.maxDragZ=C,this.minDragZ=I,this.activeFog=L,this.fogColor=/^#([0-9a-f]{3}){1,2}$/i.test(R)?R:"",this.fogNear=E,this.fogFar=X,this.cameraNear=O,this.cameraFar=Y,this.bloomIntensity=D,this.bloomRadius=F,this.bloomThreshold=B,this.sizes=new m(this.canvas),this.time=c.singleton,this.scene=new s.xsS,this.camera=new T(this),this.hdri=U,this.renderer=new w(this),this.resources=new d({modelSource:this.glbSrc,environmentSource:this.hdri,progress:this.progress,bloomButton:this.bloomButton,canvas:this.canvas,renderer:this.renderer}),this.world=new Z(this,G),this.sizes.on("resize",(()=>this.resize())),this.time.on("tick",(()=>this.update())),this.resources.on("ready",(()=>{0===this.resources.animations.length&&k&&this.camera.controls.animation.play(),this.requestUpdate()})),this.resources.on("environmentReady",(()=>{this.resources.environmentTexture&&(h&&(this.scene.background=this.resources.environmentTexture),this.scene.environment=this.resources.environmentTexture,this.requestUpdate())}))}update(){var e;this.isVisible&&(this.camera.shouldUpdate()&&this.requestUpdate(),this.world.shouldUpdate()&&this.requestUpdate(),this.shouldUpdate()&&(this.world.update(),this.camera.update(),"noBloom"===this.bloom?this.renderer.update():null===(e=this.world.environment)||void 0===e||e.update(),this.hasUpdated()))}requestUpdate(){this.needsUpdate=!0}shouldUpdate(){return this.needsUpdate}hasUpdated(){this.needsUpdate=!1}updateGlb(e){this.resources.updateGlb(e),this.requestUpdate()}updateEnvironment({exposure:e,hdri:t,sceneBackground:i,initialAnimation:s}){void 0!==e&&this.renderer.instance&&(this.renderer.instance.toneMappingExposure=e),void 0!==t&&("neutral"===t?this.resources.updateEnvironment("https://sdk.r2u.io/hdri/neutral.hdr"):this.resources.updateEnvironment(t)),i&&this.resources.environmentTexture?this.scene.background=this.resources.environmentTexture:void 0!==i&&(this.scene.background=null),s?this.camera.controls.animation.play():void 0!==s&&this.camera.controls.animation.stop(),this.requestUpdate()}initializeBloom(){var e;null===(e=this.world.environment)||void 0===e||e.initializeBloom(),this.requestUpdate()}updateBloom(e){this.bloom=e,this.world.environment&&(this.world.environment.bloom=e),this.requestUpdate()}resize(){var e;this.camera.resize(),"noBloom"===this.bloom?this.renderer.resize():null===(e=this.world.environment)||void 0===e||e.resize(),this.requestUpdate()}insertModelNode(e){this.world.insertModelNode(e)}insertSlotModelNode(e){return k(this,void 0,void 0,(function*(){return this.world.insertSlotModelNode(e)}))}deleteModelNode(e){this.world.deleteModelNode(e)}getAllSlotsMaterials(){return this.world.getAllSlotsMaterials()}setMaterial(...e){this.world.setMaterial(...e)}getAllSlotsModels(){return this.world.getAllSlotsModels()}setModel(...e){this.world.setModel(...e)}getCustomizedModel(...e){return k(this,void 0,void 0,(function*(){return this.world.getCustomizedModel(...e)}))}getCurrentCustomization(){return this.world.getCurrentCustomization()}insertHotspot(...e){return this.world.insertHotspot(...e)}lookToHotspot(...e){return this.world.lookToHotspot(...e)}centerCameraAtHotspot(...e){return this.world.centerCameraAtHotspot(...e)}updateHotspot(...e){return this.world.updateHotspot(...e)}deleteHotspot(...e){return this.world.deleteHotspot(...e)}}}}]);
"use strict";(self.webpackChunk_r2u_viewer=self.webpackChunk_r2u_viewer||[]).push([[628],{155:(e,t,i)=>{i.r(t),i.d(t,{default:()=>H});var s=i(657),a=i(531),o=i.n(a),r=i(970),n=i(687),h=i(341),l=i(884);class d extends(o()){constructor({modelSource:e,environmentSource:t,progress:i,bloomButton:a,canvas:o,renderer:d}){super(),this.progress=i,this.bloomButton=a,this.loadingManager=new s.lLk((()=>{this.progress.style.transition="opacity 1s ease-in-out",this.progress.style.opacity="0",this.bloomButton.style.transition="opacity 0.5s ease-in-out",this.bloomButton.style.opacity="1",this.bloomButton.style.height="60px",o.classList.add("active")}),((e,t,i)=>{this.progress.style.transition="",this.progress.style.transform=`scaleX(${t/i})`})),this.modelSource=e,this.environmentSource=t,this.gltfLoader=new n.E(this.loadingManager),this.dracoLoader=new r._(this.loadingManager),this.dracoLoader.setDecoderPath("https://www.gstatic.com/draco/versioned/decoders/1.4.1/"),this.gltfLoader.setDRACOLoader(this.dracoLoader),this.ktx2Loader=new h.a(this.loadingManager),this.ktx2Loader.setTranscoderPath("https://www.gstatic.com/basis-universal/versioned/2021-04-15-ba1c3e4/").detectSupport(d.instance),this.gltfLoader.setKTX2Loader(this.ktx2Loader),this.rgbeLoader=new l.x(this.loadingManager),Promise.all([new Promise((e=>{this.gltfLoader.load(this.modelSource,e)})),new Promise((e=>{this.rgbeLoader.load(this.environmentSource,e)}))]).then((([e,t])=>{this.model=e.scene,this.animations=e.animations,this.environmentTexture=t,this.environmentTexture.mapping=s.dSO,this.environmentTexture.name=this.environmentSource,this.emit("modelReady"),this.emit("environmentReady"),this.emit("ready")}))}resetLoadingBar(){this.progress.style.transform="scaleX(0)",this.progress.style.transition="none",this.progress.style.opacity=""}updateEnvironment(e){this.resetLoadingBar(),this.rgbeLoader.load(e,(t=>{const i=this.environmentTexture;this.environmentTexture=t,this.environmentTexture.mapping=s.dSO,this.environmentTexture.name=e,null==i||i.dispose(),this.emit("environmentReady")}))}updateGlb(e){this.resetLoadingBar(),this.emit("modelDispose"),this.gltfLoader.load(e,(e=>{this.model=e.scene,this.animations=e.animations,this.emit("modelReady")}))}loadGlb(e){return t=this,i=void 0,a=function*(){return this.gltfLoader.loadAsync(e)},new((s=void 0)||(s=Promise))((function(e,o){function r(e){try{h(a.next(e))}catch(e){o(e)}}function n(e){try{h(a.throw(e))}catch(e){o(e)}}function h(t){var i;t.done?e(t.value):(i=t.value,i instanceof s?i:new s((function(e){e(i)}))).then(r,n)}h((a=a.apply(t,i||[])).next())}));var t,i,s,a}}class m extends(o()){constructor(e){super(),this.canvas=e,this.width=e.offsetWidth,this.height=e.offsetHeight,this.pixelRatio=Math.min(window.devicePixelRatio,2),window.ResizeObserver&&(this.resizeObserver=new ResizeObserver((()=>this.updateSizes())),this.resizeObserver.observe(this.canvas)),window.addEventListener("resize",(()=>this.updateSizes()))}updateSizes(){this.width=this.canvas.offsetWidth,this.height=this.canvas.offsetHeight,this.pixelRatio=Math.min(window.devicePixelRatio,2),this.emit("resize")}}class c extends(o()){constructor(){super(),this.start=Date.now(),this.current=this.start,this.elapsed=0,this.delta=1,window.requestAnimationFrame((()=>this.tick()))}tick(){const e=Date.now();this.delta=e-this.current,this.current=e,this.elapsed=this.current-this.start,this.emit("tick"),window.requestAnimationFrame((()=>this.tick()))}}c.singleton=new c;const u=e=>e%(2*Math.PI)<0?2*Math.PI+e%(2*Math.PI):e%(2*Math.PI);class p{constructor(e=50){this.velocity=0,this.naturalFrequency=0,this.setDecayTime(e)}setDecayTime(e){this.naturalFrequency=1/Math.max(.001,e)}update(e,t,i,s){const a=2e-4*this.naturalFrequency;if(e=u(e),t=u(t),null==e||0===s)return t;if(e===t&&0===this.velocity)return t;if(i<0)return e;const o=((e,t)=>{const i=u(e),s=u(t),a=-(2*Math.PI-i*Math.pow(1,i)+s*Math.pow(1,s)),o=2*Math.PI-s*Math.pow(1,s)+i*Math.pow(1,i),r=i-s,n=Math.abs(a),h=Math.abs(o),l=Math.abs(r);switch(Math.min(n,h,l)){case n:return a;case h:return o;default:return r}})(e,t),r=this.velocity+this.naturalFrequency*o,n=o+i*r,h=Math.exp(-this.naturalFrequency*i),l=(r-this.naturalFrequency*n)*h,d=-this.naturalFrequency*(l+r*h);return Math.abs(l)<a*Math.abs(s)&&d*o>=0?(this.velocity=0,t):(this.velocity=l,t+n*h)}}const g=Math.PI/1e3,v=Math.PI/6,M=2*Math.PI;class f{constructor({experience:e,controls:t}){this.canvas=e.canvas,this.instructionsImg=e.instructionsImg,this.controls=t,this.time=e.time,this.angleAnimation=0,this.elapsedAnimation=0,this.elapsedImgAnimation=0,this.damperImgAnimation=new p,this.idle=!1,this.active=!1,this.canvas.addEventListener("touchstart",(()=>{this.active=!1,clearTimeout(this.startTimer)})),this.canvas.addEventListener("mousedown",(()=>{this.active=!1,clearTimeout(this.startTimer)}))}play(){this.startTimer=setTimeout((()=>{this.active=!0,this.controls.requestUpdate()}),2e3)}stop(){this.active=!1}update(){this.active?(this.idle||(this.elapsedAnimation+=g*this.time.delta,this.instructionsImg.style.opacity="1"),this.elapsedAnimation>M&&(this.idle=!0,this.instructionsImg.style.opacity="0",this.elapsedAnimation=M,setTimeout((()=>{this.elapsedAnimation=0,this.elapsedImgAnimation=0,this.idle=!1,this.controls.requestUpdate()}),2e3)),this.angleAnimation=Math.sin(this.elapsedAnimation)*v,this.elapsedImgAnimation=this.damperImgAnimation.update(this.elapsedImgAnimation,this.elapsedAnimation,this.time.delta,1),this.instructionsImg.style.transform=`translate(calc(-50% + ${-Math.sin(this.elapsedImgAnimation)}*50px), -50%)`):this.instructionsImg.style.opacity="0"}isPaused(){return this.idle}isActive(){return this.active}}const A=Math.PI/2.4,x=Math.PI/10;class w{constructor(e,t,i){this.ORBIT_SENSITIVITY=e.orbitSensitivity,this.MIN_CAMERA_SCROLL=2,this.MAX_CAMERA_SCROLL=10,this.DEFAULT_CAMERA_SCROLL=4,this.MAX_XZ_ANGLE=e.maxAzimuthalAngleRotation*Math.PI/180,this.MIN_XZ_ANGLE=e.minAzimuthalAngleRotation*Math.PI/180,e.maxPolarAngleRotation&&(this.MAX_Y_ANGLE=e.maxPolarAngleRotation*Math.PI/180),e.minPolarAngleRotation&&(this.MIN_Y_ANGLE=e.minPolarAngleRotation*Math.PI/180),this.MAX_X_PAN=e.maxDragX,this.MIN_X_PAN=e.minDragX,this.MAX_Y_PAN=e.maxDragY,this.MIN_Y_PAN=e.minDragY,this.MAX_Z_PAN=e.maxDragZ,this.MIN_Z_PAN=e.minDragZ,this.canvas=e.canvas,this.camera=t,this.time=e.time,this.noZoom=!!e.noZoom,this.damperRadius=new p,this.damperYAngle=new p,this.damperXZAngle=new p,this.damperXPan=new p,this.damperYPan=new p,this.damperZPan=new p,this.canvas.oncontextmenu=e=>e.preventDefault(),this.yAngleTarget=A,this.xzAngleTarget=x,this.yAngle=A,this.xzAngle=x,this.orbitCamera=!1,this.moveCamera=!1,this.panTarget=new s.Pa4,this.pan=new s.Pa4,i?(this.cameraRadius=i,this.cameraRadiusTarget=i):(this.cameraRadius=this.DEFAULT_CAMERA_SCROLL,this.cameraRadiusTarget=this.DEFAULT_CAMERA_SCROLL),this.pageMode="none",this.addDragEventListener(),this.addWheelEventListener(),this.addTouchEventListener(),this.animation=new f({experience:e,controls:this})}addDragEventListener(){let e=0,t=0;this.canvas.onmousedown=i=>{i.stopPropagation(),this.requestUpdate(),0===i.button?(this.orbitCamera=!0,this.canvas.style.cursor="grabbing"):(this.moveCamera=!0,this.canvas.style.cursor="move"),e=i.clientX,t=i.clientY},document.addEventListener("mouseup",(()=>{this.orbitCamera=!1,this.moveCamera=!1,this.canvas.style.cursor=""})),this.canvas.addEventListener("mousemove",(i=>{if(this.requestUpdate(),this.orbitCamera)this.yAngleTarget+=this.ORBIT_SENSITIVITY*Math.PI*2*((e-i.clientX)/this.canvas.width),e=i.clientX,this.xzAngleTarget+=this.ORBIT_SENSITIVITY*Math.PI*2*((i.clientY-t)/this.canvas.height),t=i.clientY,this.xzAngleTarget<this.MIN_XZ_ANGLE&&(this.xzAngleTarget=this.MIN_XZ_ANGLE),this.xzAngleTarget>this.MAX_XZ_ANGLE&&(this.xzAngleTarget=this.MAX_XZ_ANGLE),this.MIN_Y_ANGLE&&this.yAngleTarget<this.MIN_Y_ANGLE&&(this.yAngleTarget=this.MIN_Y_ANGLE),this.MAX_Y_ANGLE&&this.yAngleTarget>this.MAX_Y_ANGLE&&(this.yAngleTarget=this.MAX_Y_ANGLE);else if(this.moveCamera){const a=.8*this.cameraRadius*(e-i.clientX)/this.canvas.width;e=i.clientX;const o=.8*this.cameraRadius*(i.clientY-t)/this.canvas.height;t=i.clientY,this.panTarget.add(new s.Pa4(a*Math.cos(this.yAngleTarget)+o*Math.sin(this.xzAngleTarget)*Math.sin(-this.yAngleTarget),o*Math.cos(this.xzAngleTarget),a*Math.sin(-this.yAngleTarget)+o*Math.sin(-this.xzAngleTarget)*Math.cos(this.yAngleTarget))),null!==this.MIN_X_PAN&&void 0!==this.MIN_X_PAN&&this.panTarget.x<this.MIN_X_PAN&&(this.panTarget.x=this.MIN_X_PAN),null!==this.MAX_X_PAN&&void 0!==this.MAX_X_PAN&&this.panTarget.x>this.MAX_X_PAN&&(this.panTarget.x=this.MAX_X_PAN),null!==this.MIN_Y_PAN&&void 0!==this.MIN_Y_PAN&&this.panTarget.y<this.MIN_Y_PAN&&(this.panTarget.y=this.MIN_Y_PAN),null!==this.MAX_Y_PAN&&void 0!==this.MAX_Y_PAN&&this.panTarget.y>this.MAX_Y_PAN&&(this.panTarget.y=this.MAX_Y_PAN),null!==this.MIN_Z_PAN&&void 0!==this.MIN_Z_PAN&&this.panTarget.z<this.MIN_Z_PAN&&(this.panTarget.z=this.MIN_Z_PAN),null!==this.MAX_Z_PAN&&void 0!==this.MAX_Z_PAN&&this.panTarget.z>this.MAX_Z_PAN&&(this.panTarget.z=this.MAX_Z_PAN)}}))}addWheelEventListener(){let e;this.canvas.onwheel=t=>{this.noZoom||(t.preventDefault(),this.requestUpdate(),t.deltaY>0?(this.cameraRadiusTarget+=.003*t.deltaY*this.cameraRadius,this.canvas.style.cursor="zoom-out"):(this.cameraRadiusTarget+=.003*t.deltaY*this.cameraRadius/2,this.canvas.style.cursor="zoom-in"),this.cameraRadiusTarget>this.MAX_CAMERA_SCROLL&&(this.cameraRadiusTarget=this.MAX_CAMERA_SCROLL),this.cameraRadiusTarget<this.MIN_CAMERA_SCROLL&&(this.cameraRadiusTarget=this.MIN_CAMERA_SCROLL),e&&clearTimeout(e),e=setTimeout((()=>{this.canvas.style.cursor=""}),300))}}addTouchEventListener(){let e=0,t=0;document.addEventListener("touchstart",(i=>{e=i.touches[0].clientX,t=i.touches[0].clientY})),document.addEventListener("touchmove",(i=>{"movingCamera"!==this.pageMode&&"orbitingCamera"!==this.pageMode&&"zoomingCamera"!==this.pageMode&&Math.abs(i.touches[0].clientY-t)>Math.abs(i.touches[0].clientX-e)&&(this.pageMode="scrolling")}));let i=0,a=0,o=0;this.canvas.ontouchstart=e=>{1===e.touches.length?(i=e.touches[0].clientX,a=e.touches[0].clientY):2===e.touches.length&&(this.pageMode="movingCamera",i=(e.touches[0].clientX+e.touches[1].clientX)/2,a=(e.touches[0].clientY+e.touches[1].clientY)/2,o=Math.hypot(e.touches[0].pageX-e.touches[1].pageX,e.touches[0].pageY-e.touches[1].pageY))},document.addEventListener("touchend",(e=>{"movingCamera"===this.pageMode||"zoomingCamera"===this.pageMode?(this.pageMode="orbitingCamera",i=e.touches[0].clientX,a=e.touches[0].clientY):this.pageMode="none"})),this.canvas.addEventListener("touchmove",(e=>{if(this.requestUpdate(),"scrolling"!==this.pageMode&&e.cancelable)if(Math.abs(e.touches[0].clientY-a)<=Math.abs(e.touches[0].clientX-i)&&"none"===this.pageMode&&(this.pageMode="orbitingCamera"),"movingCamera"!==this.pageMode&&"orbitingCamera"!==this.pageMode&&"zoomingCamera"!==this.pageMode||e.preventDefault(),"orbitingCamera"===this.pageMode)this.yAngleTarget+=this.ORBIT_SENSITIVITY*Math.PI*2*((i-e.touches[0].pageX)/this.canvas.width),i=e.touches[0].pageX,this.xzAngleTarget+=this.ORBIT_SENSITIVITY*Math.PI*2*((e.touches[0].pageY-a)/this.canvas.height),a=e.touches[0].pageY,this.xzAngleTarget<this.MIN_XZ_ANGLE&&(this.xzAngleTarget=this.MIN_XZ_ANGLE),this.xzAngleTarget>this.MAX_XZ_ANGLE&&(this.xzAngleTarget=this.MAX_XZ_ANGLE),this.MIN_Y_ANGLE&&this.yAngleTarget<this.MIN_Y_ANGLE&&(this.yAngleTarget=this.MIN_Y_ANGLE),this.MAX_Y_ANGLE&&this.yAngleTarget>this.MAX_Y_ANGLE&&(this.yAngleTarget=this.MAX_Y_ANGLE);else if("movingCamera"===this.pageMode){Math.abs(Math.hypot(e.touches[0].pageX-e.touches[1].pageX,e.touches[0].pageY-e.touches[1].pageY)-o)>50&&(o=Math.hypot(e.touches[0].pageX-e.touches[1].pageX,e.touches[0].pageY-e.touches[1].pageY),this.pageMode="zoomingCamera");const t=(e.touches[0].clientX+e.touches[1].clientX)/2,r=(e.touches[0].clientY+e.touches[1].clientY)/2,n=1.6*this.cameraRadius*(i-t)/this.canvas.width;i=t;const h=1.6*this.cameraRadius*(r-a)/this.canvas.height;a=r,this.panTarget.add(new s.Pa4(n*Math.cos(this.yAngleTarget)+h*Math.sin(this.xzAngleTarget)*Math.sin(-this.yAngleTarget),h*Math.cos(this.xzAngleTarget),n*Math.sin(-this.yAngleTarget)+h*Math.sin(-this.xzAngleTarget)*Math.cos(this.yAngleTarget))),null!==this.MIN_X_PAN&&void 0!==this.MIN_X_PAN&&this.panTarget.x<this.MIN_X_PAN&&(this.panTarget.x=this.MIN_X_PAN),null!==this.MAX_X_PAN&&void 0!==this.MAX_X_PAN&&this.panTarget.x>this.MAX_X_PAN&&(this.panTarget.x=this.MAX_X_PAN),null!==this.MIN_Y_PAN&&void 0!==this.MIN_Y_PAN&&this.panTarget.y<this.MIN_Y_PAN&&(this.panTarget.y=this.MIN_Y_PAN),null!==this.MAX_Y_PAN&&void 0!==this.MAX_Y_PAN&&this.panTarget.y>this.MAX_Y_PAN&&(this.panTarget.y=this.MAX_Y_PAN),null!==this.MIN_Z_PAN&&void 0!==this.MIN_Z_PAN&&this.panTarget.z<this.MIN_Z_PAN&&(this.panTarget.z=this.MIN_Z_PAN),null!==this.MAX_Z_PAN&&void 0!==this.MAX_Z_PAN&&this.panTarget.z>this.MAX_Z_PAN&&(this.panTarget.z=this.MAX_Z_PAN)}else if("zoomingCamera"===this.pageMode){const t=Math.hypot(e.touches[0].pageX-e.touches[1].pageX,e.touches[0].pageY-e.touches[1].pageY)-o;this.cameraRadiusTarget-=.03*t,o+=t,this.cameraRadiusTarget>this.MAX_CAMERA_SCROLL&&(this.cameraRadiusTarget=this.MAX_CAMERA_SCROLL),this.cameraRadiusTarget<this.MIN_CAMERA_SCROLL&&(this.cameraRadiusTarget=this.MIN_CAMERA_SCROLL)}}))}setCamera({radius:e,minRadius:t,maxRadius:i,initialRadius:s,orbitSensitivity:a,azimuthalAngle:o,maxAzimuthalAngle:r,minAzimuthalAngle:n,polarAngle:h,maxPolarAngle:l,minPolarAngle:d,dragX:m,maxDragX:c,minDragX:u,dragY:p,maxDragY:g,minDragY:v,dragZ:M,maxDragZ:f,minDragZ:A,near:x,far:w}){void 0!==e&&(this.cameraRadiusTarget=0===e?.01:e),void 0!==t&&(this.MIN_CAMERA_SCROLL=0===t?.01:t),void 0!==i&&(this.MAX_CAMERA_SCROLL=0===i?.01:i),void 0!==s&&(this.DEFAULT_CAMERA_SCROLL=0===s?.01:s),void 0!==a&&(this.ORBIT_SENSITIVITY=0===a?.01:a),void 0!==r&&(this.MAX_XZ_ANGLE=0===r?.01:r*Math.PI/180),void 0!==n&&(this.MIN_XZ_ANGLE=0===n?-.01:n*Math.PI/180),void 0!==l&&(this.MAX_Y_ANGLE=0===l?.01:l*Math.PI/180),void 0!==d&&(this.MIN_Y_ANGLE=0===d?-.01:d*Math.PI/180),void 0!==c&&(this.MAX_X_PAN=0===c?.01:c),void 0!==u&&(this.MIN_X_PAN=0===u?.01:u),void 0!==g&&(this.MAX_Y_PAN=0===g?.01:g),void 0!==v&&(this.MIN_Y_PAN=0===v?.01:v),void 0!==f&&(this.MAX_Z_PAN=0===f?.01:f),void 0!==A&&(this.MIN_Z_PAN=0===A?.01:A),void 0!==x&&(this.camera.near=0===x?.01:x),void 0!==w&&(this.camera.far=0===w?.01:w),void 0!==o&&(this.xzAngleTarget=o*Math.PI/180),void 0!==h&&(this.yAngleTarget=h*Math.PI/180),void 0!==m&&(this.panTarget.x=m),void 0!==p&&(this.panTarget.y=p),void 0!==M&&(this.panTarget.z=M),this.camera.updateProjectionMatrix()}lookTo(e){const t=this.camera.position.clone().multiply(new s.Pa4(0,1,0)).divideScalar(this.cameraRadius).angleTo(e)+(e.x<0?Math.PI:0);void 0!==t&&(this.yAngleTarget=t)}getCamera(){return{radius:this.cameraRadiusTarget,orbitSensitivity:this.ORBIT_SENSITIVITY,azimuthalAngle:180*this.xzAngleTarget/Math.PI,polarAngle:180*this.yAngleTarget/Math.PI,dragX:this.panTarget.x,dragY:this.panTarget.y,dragZ:this.panTarget.z,near:this.camera.near,far:this.camera.near}}update(){this.animation.update(),this.yAngle=this.damperYAngle.update(this.yAngle,this.yAngleTarget+this.animation.angleAnimation,this.time.delta,1),this.xzAngle=this.damperXZAngle.update(this.xzAngle,this.xzAngleTarget,this.time.delta,1),this.cameraRadius=this.damperRadius.update(this.cameraRadius,this.cameraRadiusTarget,this.time.delta,1),this.pan.x=this.damperXPan.update(this.pan.x,this.panTarget.x,this.time.delta,1),this.pan.y=this.damperYPan.update(this.pan.y,this.panTarget.y,this.time.delta,1),this.pan.z=this.damperZPan.update(this.pan.z,this.panTarget.z,this.time.delta,1),this.camera.position.x=Math.cos(this.xzAngle)*Math.sin(this.yAngle)*this.cameraRadius,this.camera.position.y=Math.sin(this.xzAngle)*this.cameraRadius,this.camera.position.z=Math.cos(this.xzAngle)*Math.cos(this.yAngle)*this.cameraRadius,this.camera.position.add(this.pan),this.camera.lookAt(this.pan)}requestUpdate(){this.needsUpdate=!0}shouldUpdate(){return this.needsUpdate?(this.needsUpdate=!1,!0):this.yAngle!==this.yAngleTarget+this.animation.angleAnimation||this.xzAngle!==this.xzAngleTarget||this.cameraRadius!==this.cameraRadiusTarget||this.pan.x!==this.panTarget.x||this.pan.y!==this.panTarget.y||this.pan.z!==this.panTarget.z||!(this.animation.isPaused()||!this.animation.isActive())}}class T{constructor(e){this.instance=null,this.experience=e,this.canvas=this.experience.canvas,this.sizes=this.experience.sizes,this.scene=this.experience.scene;const t=this.experience.cameraNear?this.experience.cameraNear:.1,i=this.experience.cameraFar?this.experience.cameraFar:100;this.instance=new s.cPb(35,this.sizes.width/this.sizes.height,t,i),this.instance.position.set(1,1,4),this.scene.add(this.instance),this.controls=new w(this.experience,this.instance,this.experience.initialZoom)}resize(){this.instance&&(this.instance.aspect=this.sizes.width/this.sizes.height,this.instance.updateProjectionMatrix())}update(){this.controls.update()}shouldUpdate(){return this.controls.shouldUpdate()}}class _{constructor(e){this.instance=null,this.canvas=e.canvas,this.sizes=e.sizes,this.scene=e.scene,this.camera=e.camera,this.instance=new s.CP7({canvas:this.canvas,antialias:!0,alpha:!0,powerPreference:"high-performance"}),this.instance.setSize(this.sizes.width,this.sizes.height),this.instance.setPixelRatio(this.sizes.pixelRatio),this.instance.setClearColor("",0),this.instance.setClearAlpha(0),this.instance.autoClear=!0,this.instance.shadowMap.enabled=!0,this.instance.shadowMap.type=s.dwk,this.instance.physicallyCorrectLights=!0,this.instance.outputEncoding=s.knz,this.instance.toneMapping=s.LY2,this.instance.toneMappingExposure=e.exposure}resize(){var e,t;null===(e=this.instance)||void 0===e||e.setSize(this.sizes.width,this.sizes.height),null===(t=this.instance)||void 0===t||t.setPixelRatio(this.sizes.pixelRatio)}update(){this.instance&&this.camera.instance&&this.instance.render(this.scene,this.camera.instance)}}var b=i(870);class P{constructor({id:e,position:t,cameraTarget:i,polarAngle:a,azimuthalAngle:o,radius:r}){this.id=e,this.position=new s.Pa4(t.x,t.y,t.z),i&&(this.cameraTarget=new s.Pa4(i.x,i.y,i.z)),a&&(this.polarAngle=a),o&&(this.azimuthalAngle=o),r&&(this.radius=r)}update(e,t,i){if(!t.instance||!i.model)return;const s=this.position.clone();s.project(t.instance),this.element=document.querySelector(`#${this.id}`),this.translateHotspot(t.sizes,s),this.updateHotspotVisibility(e,t.instance,i,s)}updateHotspotVisibility(e,t,i,s){var a,o;e.setFromCamera(s,t);const r=e.intersectObjects(i.model.children,!0);if(this.isVisible=!1,0===r.length)this.isVisible=!0;else{const e=r[0].distance;this.position.distanceTo(t.position)<e&&(this.isVisible=!0)}this.isVisible?null===(a=this.element)||void 0===a||a.classList.add("visible"):null===(o=this.element)||void 0===o||o.classList.remove("visible")}translateHotspot(e,t){const i=t.x*e.width*.5,s=t.y*e.height*-.5;this.element&&(this.element.style.transform=`translate(${i}px, ${s}px)`)}updateHotspot({position:e,cameraTarget:t,polarAngle:i,azimuthalAngle:s,radius:a}){e&&this.setPosition(e),t&&this.setCameraTarget(t),i&&this.setPolarAngle(i),s&&this.setAzimuthalAngle(s),a&&this.setRadius(a)}setPosition(e){this.position=new s.Pa4(e.x,e.y,e.z)}setCameraTarget(e){this.cameraTarget=new s.Pa4(e.x,e.y,e.z)}setPolarAngle(e){this.polarAngle=e}setAzimuthalAngle(e){this.azimuthalAngle=e}setRadius(e){this.radius=e}}var y=i(643),S=i(220),N=i(175),I=i(475),z=i(612),C=i(248),L=i(655);class R extends z.w{constructor(e,t,i,a){super(),this.strength=void 0!==t?t:1,this.radius=i,this.threshold=a,this.resolution=void 0!==e?new s.FM8(e.x,e.y):new s.FM8(256,256),this.clearColor=new s.Ilk(0,0,0);const o={minFilter:s.wem,magFilter:s.wem,format:s.wk1};this.renderTargetsHorizontal=[],this.renderTargetsVertical=[],this.nMips=5;let r=Math.round(this.resolution.x/2),n=Math.round(this.resolution.y/2);this.renderTargetBright=new s.dd2(r,n,o),this.renderTargetBright.texture.name="UnrealBloomPass.bright",this.renderTargetBright.texture.generateMipmaps=!1;for(let e=0;e<this.nMips;e++){const t=new s.dd2(r,n,o);t.texture.name=`UnrealBloomPass.h${e}`,t.texture.generateMipmaps=!1,this.renderTargetsHorizontal.push(t);const i=new s.dd2(r,n,o);i.texture.name=`UnrealBloomPass.v${e}`,i.texture.generateMipmaps=!1,this.renderTargetsVertical.push(i),r=Math.round(r/2),n=Math.round(n/2)}void 0===L.Y&&console.error("THREE.UnrealBloomPass relies on LuminosityHighPassShader");const h=L.Y;this.highPassUniforms=s.rDY.clone(h.uniforms),this.highPassUniforms.luminosityThreshold.value=a,this.highPassUniforms.smoothWidth.value=.01,this.materialHighPassFilter=new s.jyz({uniforms:this.highPassUniforms,vertexShader:h.vertexShader,fragmentShader:h.fragmentShader,defines:{}}),this.separableBlurMaterials=[];const l=[3,5,7,9,11];r=Math.round(this.resolution.x/2),n=Math.round(this.resolution.y/2);for(let e=0;e<this.nMips;e++)this.separableBlurMaterials.push(this.getSeperableBlurMaterial(l[e])),this.separableBlurMaterials[e].uniforms.texSize.value=new s.FM8(r,n),r=Math.round(r/2),n=Math.round(n/2);this.compositeMaterial=this.getCompositeMaterial(this.nMips),this.compositeMaterial.uniforms.blurTexture1.value=this.renderTargetsVertical[0].texture,this.compositeMaterial.uniforms.blurTexture2.value=this.renderTargetsVertical[1].texture,this.compositeMaterial.uniforms.blurTexture3.value=this.renderTargetsVertical[2].texture,this.compositeMaterial.uniforms.blurTexture4.value=this.renderTargetsVertical[3].texture,this.compositeMaterial.uniforms.blurTexture5.value=this.renderTargetsVertical[4].texture,this.compositeMaterial.uniforms.bloomStrength.value=t,this.compositeMaterial.uniforms.bloomRadius.value=.1,this.compositeMaterial.needsUpdate=!0,this.compositeMaterial.uniforms.bloomFactors.value=[1,.8,.6,.4,.2],this.bloomTintColors=[new s.Pa4(1,1,1),new s.Pa4(1,1,1),new s.Pa4(1,1,1),new s.Pa4(1,1,1),new s.Pa4(1,1,1)],this.compositeMaterial.uniforms.bloomTintColors.value=this.bloomTintColors,void 0===C.C&&console.error("THREE.UnrealBloomPass relies on CopyShader");const d=C.C;this.copyUniforms=s.rDY.clone(d.uniforms),this.copyUniforms.opacity.value=1,this.materialCopy=new s.jyz({uniforms:this.copyUniforms,vertexShader:d.vertexShader,fragmentShader:d.fragmentShader,blending:s.WMw,depthTest:!1,depthWrite:!1,transparent:!0}),this.enabled=!0,this.needsSwap=!1,this._oldClearColor=new s.Ilk,this.oldClearAlpha=1,this.basic=new s.vBJ,this.fsQuad=new z.T(null)}dispose(){for(let e=0;e<this.renderTargetsHorizontal.length;e++)this.renderTargetsHorizontal[e].dispose();for(let e=0;e<this.renderTargetsVertical.length;e++)this.renderTargetsVertical[e].dispose();this.renderTargetBright.dispose()}setSize(e,t){let i=Math.round(e/2),a=Math.round(t/2);this.renderTargetBright.setSize(i,a);for(let e=0;e<this.nMips;e++)this.renderTargetsHorizontal[e].setSize(i,a),this.renderTargetsVertical[e].setSize(i,a),this.separableBlurMaterials[e].uniforms.texSize.value=new s.FM8(i,a),i=Math.round(i/2),a=Math.round(a/2)}render(e,t,i,s,a){e.getClearColor(this._oldClearColor),this.oldClearAlpha=e.getClearAlpha();const o=e.autoClear;e.autoClear=!1,e.setClearColor(this.clearColor,0),a&&e.state.buffers.stencil.setTest(!1),this.renderToScreen&&(this.fsQuad.material=this.basic,this.basic.map=i.texture,e.setRenderTarget(null),e.clear(),this.fsQuad.render(e)),this.highPassUniforms.tDiffuse.value=i.texture,this.highPassUniforms.luminosityThreshold.value=this.threshold,this.fsQuad.material=this.materialHighPassFilter,e.setRenderTarget(this.renderTargetBright),e.clear(),this.fsQuad.render(e);let r=this.renderTargetBright;for(let t=0;t<this.nMips;t++)this.fsQuad.material=this.separableBlurMaterials[t],this.separableBlurMaterials[t].uniforms.colorTexture.value=r.texture,this.separableBlurMaterials[t].uniforms.direction.value=R.BlurDirectionX,e.setRenderTarget(this.renderTargetsHorizontal[t]),e.clear(),this.fsQuad.render(e),this.separableBlurMaterials[t].uniforms.colorTexture.value=this.renderTargetsHorizontal[t].texture,this.separableBlurMaterials[t].uniforms.direction.value=R.BlurDirectionY,e.setRenderTarget(this.renderTargetsVertical[t]),e.clear(),this.fsQuad.render(e),r=this.renderTargetsVertical[t];this.fsQuad.material=this.compositeMaterial,this.compositeMaterial.uniforms.bloomStrength.value=this.strength,this.compositeMaterial.uniforms.bloomRadius.value=this.radius,this.compositeMaterial.uniforms.bloomTintColors.value=this.bloomTintColors,e.setRenderTarget(this.renderTargetsHorizontal[0]),e.clear(),this.fsQuad.render(e),this.fsQuad.material=this.materialCopy,this.copyUniforms.tDiffuse.value=this.renderTargetsHorizontal[0].texture,a&&e.state.buffers.stencil.setTest(!0),this.renderToScreen?(e.setRenderTarget(null),this.fsQuad.render(e)):(e.setRenderTarget(i),this.fsQuad.render(e)),e.setClearColor(this._oldClearColor,this.oldClearAlpha),e.autoClear=o}getSeperableBlurMaterial(e){return new s.jyz({defines:{KERNEL_RADIUS:e,SIGMA:e},uniforms:{colorTexture:{value:null},texSize:{value:new s.FM8(.5,.5)},direction:{value:new s.FM8(.5,.5)}},vertexShader:"varying vec2 vUv;\n void main() {\n vUv = uv;\n gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n }",fragmentShader:"#include <common>\n varying vec2 vUv;\n uniform sampler2D colorTexture;\n uniform vec2 texSize;\n uniform vec2 direction;\n float gaussianPdf(in float x, in float sigma) {\n return 0.39894 * exp( -0.5 * x * x/( sigma * sigma))/sigma;\n }\n void main() {\n vec2 invSize = 1.0 / texSize; float fSigma = float(SIGMA); float weightSum = gaussianPdf(0.0, fSigma); float alphaSum = 0.0; vec3 diffuseSum = texture2D( colorTexture, vUv).rgb * weightSum; for( int i = 1; i < KERNEL_RADIUS; i ++ ) { float x = float(i); float w = gaussianPdf(x, fSigma); vec2 uvOffset = direction * invSize * x; vec4 sample1 = texture2D( colorTexture, vUv + uvOffset); vec4 sample2 = texture2D( colorTexture, vUv - uvOffset); diffuseSum += (sample1.rgb + sample2.rgb) * w; alphaSum += (sample1.a + sample2.a) * w; weightSum += 2.0 * w; } gl_FragColor = vec4(diffuseSum/weightSum, alphaSum/weightSum);\n }"})}getCompositeMaterial(e){return new s.jyz({defines:{NUM_MIPS:e},uniforms:{blurTexture1:{value:null},blurTexture2:{value:null},blurTexture3:{value:null},blurTexture4:{value:null},blurTexture5:{value:null},dirtTexture:{value:null},bloomStrength:{value:1},bloomFactors:{value:null},bloomTintColors:{value:null},bloomRadius:{value:0}},vertexShader:"varying vec2 vUv;\n void main() {\n vUv = uv;\n gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n }",fragmentShader:"varying vec2 vUv;\n uniform sampler2D blurTexture1;\n uniform sampler2D blurTexture2;\n uniform sampler2D blurTexture3;\n uniform sampler2D blurTexture4;\n uniform sampler2D blurTexture5;\n uniform sampler2D dirtTexture;\n uniform float bloomStrength;\n uniform float bloomRadius;\n uniform float bloomFactors[NUM_MIPS];\n uniform vec3 bloomTintColors[NUM_MIPS];\n float lerpBloomFactor(const in float factor) {\n float mirrorFactor = 1.2 - factor;\n return mix(factor, mirrorFactor, bloomRadius);\n }\n void main() {\n gl_FragColor = bloomStrength * ( lerpBloomFactor(bloomFactors[0]) * vec4(bloomTintColors[0], 1.0) * texture2D(blurTexture1, vUv) +\n lerpBloomFactor(bloomFactors[1]) * vec4(bloomTintColors[1], 1.0) * texture2D(blurTexture2, vUv) +\n lerpBloomFactor(bloomFactors[2]) * vec4(bloomTintColors[2], 1.0) * texture2D(blurTexture3, vUv) +\n lerpBloomFactor(bloomFactors[3]) * vec4(bloomTintColors[3], 1.0) * texture2D(blurTexture4, vUv) +\n lerpBloomFactor(bloomFactors[4]) * vec4(bloomTintColors[4], 1.0) * texture2D(blurTexture5, vUv) );\n }"})}}R.BlurDirectionX=new s.FM8(1,0),R.BlurDirectionY=new s.FM8(0,1);class E{constructor(e){var t,i;if(this.scene=e.scene,this.bloomModels=null===(t=e.world.model)||void 0===t?void 0:t.bloomModels,this.lightModels=null===(i=e.world.model)||void 0===i?void 0:i.lightModels,this.experience=e,this.sunLight=new s.Ox3("",0),this.sunLight.position.set(this.experience.shadowOffsetX,this.experience.shadowOffsetY,this.experience.shadowOffsetZ),this.experience.activeShadow&&(this.sunLight.castShadow=!0),this.sunLight.shadow.camera.near=.01,this.sunLight.shadow.camera.far=100,this.sunLight.shadow.bias=-1e-5,this.sunLight.shadow.mapSize.width=2048,this.sunLight.shadow.mapSize.height=2048,this.sunLight.shadow.blurSamples=20,this.sunLight.shadow.radius=this.experience.shadowRadius?this.experience.shadowRadius:1,this.scene.add(this.sunLight),this.experience.activeFog){const e=this.experience.fogColor?this.experience.fogColor:"#ffffff",t=this.experience.fogNear?this.experience.fogNear:1,i=this.experience.fogFar?this.experience.fogFar:15;this.fog=new s.ybr(e,t,i),this.scene.fog=this.fog}}initializeBloom(){var e;if(this.experience.renderer.instance){const t=new s.dd2(this.experience.sizes.width,this.experience.sizes.height,{minFilter:s.wem,magFilter:s.wem,format:s.wk1,type:s.cLu,stencilBuffer:!1});t.samples=3;const i=new N.T(I.Y);this.darkMaterial=new s.vBJ({color:"black"}),this.darkGlassMaterial=new s.vBJ({color:"black",visible:!1}),this.materials={};const a=new S.C(this.scene,this.experience.camera.instance);this.bloomPass=new R(new s.FM8(this.experience.sizes.width,this.experience.sizes.height),this.experience.bloomIntensity,this.experience.bloomRadius,this.experience.bloomThreshold),this.bloomComposer=new y.xC(this.experience.renderer.instance,t),this.bloomComposer.renderToScreen=!1,this.bloomComposer.addPass(a),this.bloomComposer.addPass(this.bloomPass),this.bloomPass.enabled=!1,this.lightModels&&this.lightModels.forEach((e=>{e.visible=!1})),null===(e=this.bloomModels)||void 0===e||e.forEach((e=>{e.material instanceof s.Wid&&(e.material.emissiveIntensity=0)}));const o=new N.T(new s.jyz({uniforms:{baseTexture:{value:null},bloomTexture:{value:this.bloomComposer.renderTarget2.texture}},vertexShader:"varying vec2 vUv;\n\nvoid main() {\n\n vUv = uv;\n\n gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\n}",fragmentShader:"uniform sampler2D baseTexture;\nuniform sampler2D bloomTexture;\n\nvarying vec2 vUv;\n\nvoid main() {\n\n gl_FragColor = ( texture2D( baseTexture, vUv ) + vec4( 1.0 ) * texture2D( bloomTexture, vUv ) );\n\n}",defines:{}}),"baseTexture");o.needsSwap=!0,this.finalComposer=new y.xC(this.experience.renderer.instance,t),this.finalComposer.addPass(a),this.finalComposer.addPass(o),this.finalComposer.addPass(i)}}update(){var e,t,i,a;this.experience.world.model&&this.bloomPass&&("bloomOn"===this.bloom?(this.bloomPass.enabled=!0,this.lightModels&&this.lightModels.forEach((e=>{e.visible=!0})),null===(e=this.bloomModels)||void 0===e||e.forEach((e=>{e.material instanceof s.Wid&&(e.material.emissiveIntensity=1)}))):(this.bloomPass.enabled=!1,this.lightModels&&this.lightModels.forEach((e=>{e.visible=!1})),null===(t=this.bloomModels)||void 0===t||t.forEach((e=>{e.material instanceof s.Wid&&(e.material.emissiveIntensity=0)}))),this.experience.camera.instance&&(null===(i=this.experience.world.model.model)||void 0===i||i.traverse((e=>this.darkenNonBloomed(e))),this.bloomComposer.render(),null===(a=this.experience.world.model.model)||void 0===a||a.traverse((e=>this.restoreMaterial(e))),this.finalComposer.render()))}resize(){this.bloomComposer.setSize(this.experience.sizes.width,this.experience.sizes.height),this.finalComposer.setSize(this.experience.sizes.width,this.experience.sizes.height)}updateShadow({opacity:e,XOffset:t,YOffset:i,ZOffset:s,radius:a,activeShadow:o}){var r;(t||0===t)&&(this.sunLight.position.x=t),(i||0===i)&&(this.sunLight.position.y=i),(s||0===s)&&(this.sunLight.position.z=s),void 0!==a&&(this.sunLight.shadow.radius=a||1),void 0!==o&&(null===(r=this.experience.world.model)||void 0===r||r.updateFloor(o)),this.experience.world.model&&(e||0===e)&&(this.experience.world.model.shadowMaterial.opacity=e)}updateBloom({intensity:e,radius:t,threshold:i}){void 0!==e&&(this.bloomPass.strength=e),void 0!==t&&(this.bloomPass.radius=t),void 0!==i&&(this.bloomPass.threshold=i)}updateFog({enable:e,color:t,near:i,far:a}){const o=/^#([0-9a-f]{3}){1,2}$/i;if(this.fog)e?this.scene.fog=this.fog:void 0!==e&&(this.scene.fog=null),t&&o.test(t)&&(this.fog.color=new s.Ilk(t)),i&&(this.fog.near=i),a&&(this.fog.far=a);else if(e){const e=t&&o.test(t)?t:"#ffffff",r=i||1,n=a||15;this.fog=new s.ybr(e,r,n),this.scene.fog=this.fog}}darkenNonBloomed(e){var t;e instanceof s.Kj0&&!(null===(t=this.bloomModels)||void 0===t?void 0:t.find((t=>e===t)))&&(this.materials[e.uuid]=e.material,Array.isArray(e.material)||0===e.material.alphaTest&&1===e.material.opacity?e.material=this.darkMaterial:e.material=this.darkGlassMaterial)}restoreMaterial(e){var t;e instanceof s.Kj0&&this.materials[e.uuid]&&!(null===(t=this.bloomModels)||void 0===t?void 0:t.find((t=>e===t)))&&(e.material=this.materials[e.uuid],delete this.materials[e.uuid])}}const X=(e,t)=>{if(t(e))for(let i=0,s=e.children.length;i<s;i++)X(e.children[i],t)},O=X;class Y extends a.EventEmitter{constructor(e,t,i){super(),this.animationActions={},this.activeAnimations={},this.defaultAnimationOptions={loop:!1,resetOnFinish:!1,timeScale:1,fadeFactor:0},(null==e?void 0:e.model)&&(this.model=e,this.defaultAnimationOptions=Object.assign(Object.assign({},this.defaultAnimationOptions),i),this.mixer=new s.Xcj(e.model),t.forEach((e=>{e.optimize(),this.animationActions[e.name]=this.mixer.clipAction(e)})),this.mixer.addEventListener("finished",(e=>{const t=e;this.animationFinished(t.action)})),0!==Object.keys(this.animationActions).length&&c.singleton.on("tick",(()=>{Object.keys(this.activeAnimations).length&&(this.mixer.update(c.singleton.delta/1e3),this.model.world.requestUpdate())})),this.emit("animatorReady"))}getAnimationIds(){return Object.keys(this.animationActions)}play(e,t={}){return e=this.getAnimationId(e),new Promise((i=>{const a=this.animationActions[e];this.activeAnimations[e]?i():(a.timeScale=t.timeScale||this.defaultAnimationOptions.timeScale,a.clampWhenFinished=!(t.resetOnFinish||this.defaultAnimationOptions.resetOnFinish),a.fadeIn(t.fadeFactor||this.defaultAnimationOptions.fadeFactor),a.setLoop(t.loop?s.YKA:s.jAl,1/0),this.activeAnimations[a.getClip().name]={action:a,resolve:i},a.stop(),a.play())}))}stop(e){e=this.getAnimationId(e);const t=this.animationActions[e];t?(t.stop(),this.activeAnimations[e]&&this.animationFinished(t)):console.error(`Coultn't find animationId "${e}" in model "${this.model.id}".`)}getAnimationId(e){return this.animationActions[e]||Object.keys(this.animationActions).forEach((t=>t.toLocaleLowerCase()!==e.toLocaleLowerCase()||(console.warn(`Coultn't find animationId "${e}" in model "${this.model.id}". Using animationId as "${t}" instead.`),e=t,!1))),e}animationFinished(e){const t=e.getClip().name;this.activeAnimations[t].resolve(),delete this.activeAnimations[t]}}class U{constructor({id:e,model:t,parentModel:i,materialPalette:a,defaultAnimationOptions:o,animations:r,world:n}){this.id=e,this.model=t,this.parentModel=i,this.modelParts=[],this.slotsModels={},this.slotsMaterials={},this.bloomModels=[],this.lightModels=[],this.world=n,this.animator=new Y(this,r,o),this.model&&O(this.model,(e=>{if(/^SLOT_/.test(e.name))return this.slotsModels[e.name.replace(/^SLOT_/,"")]={slot:e,activeModel:-1,models:[]},!1;if(e instanceof s.Kj0){if(/^SLOT_/.test(e.material.name)){const t=e.material;this.slotsMaterials[t.name.replace(/^SLOT_/,"").replace(/-(\d|\D|\|)*$/,"")]={slot:t,group:t.name.replace(/^(\d|\D)*-/,""),materials:[]}}new s.Ilk("rgb(0, 0, 0)").equals(e.material.emissive)||this.bloomModels.push(e),e.castShadow=!0,e.receiveShadow=!0,e.frustumCulled=!0}return e instanceof s._kC&&e.name.toLowerCase().startsWith("dynamic")&&this.lightModels.push(e),!0})),a.forEach((e=>{const t=e.name.replace(/^(\d|\D)*-/,"").split("|");Object.values(this.slotsMaterials).forEach((i=>{t.includes(i.group)&&i.materials.push({name:e.name.replace(/^MATERIAL_/,"").replace(/-(\d|\D|\|)*$/,""),material:e})}))})),Object.values(this.slotsModels).forEach((e=>{const t=[];O(e.slot,(e=>!/^MODEL-PART_/.test(e.name)||(t.push(e),!1))),t.forEach((t=>{t.removeFromParent(),e.models.push(new D({model:t,id:t.name.replace(/^MODEL-PART_/,""),parentModel:this,materialPalette:a,defaultAnimationOptions:o,animations:r,world:n}))}))}))}getAnimations(){return this.animator.getAnimationIds()}playAnimation(e,t){return this.animator.play(e,t)}stoAnimation(e){this.animator.stop(e)}removeFromParent(){var e;null===(e=this.model)||void 0===e||e.removeFromParent()}}class D extends U{constructor({model:e,id:t,parentModel:i,constraints:s,materialPalette:a,defaultAnimationOptions:o,animations:r,world:n}){var h,l,d;super({id:t,model:e,parentModel:i,materialPalette:a,defaultAnimationOptions:o,animations:r,world:n}),(null==s?void 0:s.position)&&(null===(h=this.model)||void 0===h||h.position.set(s.position[0],s.position[1],s.position[2])),(null==s?void 0:s.scale)&&(null===(l=this.model)||void 0===l||l.scale.set(s.scale[0],s.scale[1],s.scale[2])),(null==s?void 0:s.rotation)&&(null===(d=this.model)||void 0===d||d.rotation.set(s.rotation[0],s.rotation[1],s.rotation[2]))}dispose(){var e,t;this.model&&(this.model.traverse((e=>{var t;e instanceof s.Kj0&&(e.geometry.dispose(),/SLOT_/.test(e.material.name)?null===(t=e.material.aoMap)||void 0===t||t.dispose():Object.values(e.material).forEach((e=>{e instanceof s.xEZ&&e.dispose()})),e.material.dispose())})),Object.values(this.slotsModels).forEach((e=>e.models.forEach((e=>e.dispose())))),null===(t=null===(e=this.parentModel)||void 0===e?void 0:e.model)||void 0===t||t.remove(this.model))}}const F=Math.PI/2;class B extends U{constructor(e,t,i,a){super({id:"root-model",model:e.resources.model,materialPalette:t,defaultAnimationOptions:a,animations:i,world:e.world}),this.experience=e,this.scene=e.scene,this.resources=e.resources,this.time=e.time,this.activeShadow=e.activeShadow,this.box=new s.ZzF;const o=(new s.Pa4).setScalar(1.7);if(this.model){this.box.setFromObject(this.model);const t=new s.Pa4;this.box.getSize(t),this.center=new s.Pa4,this.box.getCenter(this.center);const i=(new s.Pa4).copy(o).divide(t);let a=Math.min(i.x,Math.min(i.y,i.z));e.maxZoom||0===e.maxZoom?e.camera.controls.MIN_CAMERA_SCROLL=e.maxZoom+.01:e.camera.controls.MIN_CAMERA_SCROLL=a<1?a/.6:a<2?a/1.2:a<3?a/1.5:a<4?a/2.5:a<5?a/3:a/3.5,e.minZoom&&(e.camera.controls.MAX_CAMERA_SCROLL=e.minZoom),this.resources.animations!==[]&&(a/=1.2),this.model.scale.setScalar(a),this.model.position.sub(this.center.multiplyScalar(a)),this.model.rotation.y=F,this.activeShadow&&(this.shadowMaterial=new s.Tn7,this.shadowMaterial.opacity=e.shadowOpacity,this.shadowMaterial.needsUpdate=!0,this.floor=new s.Kj0(new s.BKK(100,100,1),this.shadowMaterial),this.floor.rotation.x=-Math.PI/2,this.floor.receiveShadow=!0,this.floor.castShadow=!1,this.floor.position.sub(this.center),this.scene.add(this.floor)),this.scene.add(this.model),0!==this.resources.animations.length&&(this.mixer=new s.Xcj(this.model),this.mixer.clipAction(this.resources.animations[0]).play())}}update(){var e;null===(e=this.mixer)||void 0===e||e.update(this.time.delta/1e3)}updateFloor(e){e&&!this.floor&&(this.shadowMaterial=new s.Tn7,this.shadowMaterial.opacity=this.experience.shadowOpacity,this.shadowMaterial.needsUpdate=!0,this.floor=new s.Kj0(new s.BKK(100,100,1),this.shadowMaterial),this.floor.rotation.x=-Math.PI/2,this.floor.receiveShadow=!0,this.floor.castShadow=!1,this.floor.position.sub(this.center),this.scene.add(this.floor),this.scene.traverse((e=>{e instanceof s.Kj0&&(e.castShadow=!0,e.receiveShadow=!0)}))),!e&&this.floor&&(this.floor.geometry.dispose(),this.floor.material.dispose(),Object.values(this.floor.material).forEach((e=>{e instanceof s.xEZ&&e.dispose()})),this.scene.remove(this.floor),this.scene.traverse((e=>{e instanceof s.Kj0&&(e.castShadow=!1,e.receiveShadow=!1)})),this.floor=void 0)}dispose(){this.model&&(this.model.traverse((e=>{e instanceof s.Kj0&&(e.geometry.dispose(),e.material.dispose())})),this.floor&&(this.floor.geometry.dispose(),this.floor.material.dispose(),Object.values(this.floor.material).forEach((e=>{e instanceof s.xEZ&&e.dispose()})),this.mixer=void 0,this.scene.remove(this.floor)),this.scene.remove(this.model))}}var Z=function(e,t,i,s){return new(i||(i=Promise))((function(a,o){function r(e){try{h(s.next(e))}catch(e){o(e)}}function n(e){try{h(s.throw(e))}catch(e){o(e)}}function h(e){var t;e.done?a(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,n)}h((s=s.apply(e,t||[])).next())}))};class k{constructor(e,t){this.scene=e.scene,this.resources=e.resources,this.camera=e.camera,this.materialPalette=[],this.hotspotRaycaster=new s.iMs,this.hotspots=[],this.resources.on("modelReady",(()=>{e.resources.model&&this.prepareCustomizationPalette(e.resources.model),this.model=new B(e,this.materialPalette,this.resources.animations,t),this.environment||(this.environment=new E(e)),"noBloom"!==e.bloom&&e.initializeBloom(),this.requestUpdate()})),this.resources.on("modelDispose",(()=>{var e;null===(e=this.model)||void 0===e||e.dispose(),this.model=void 0,this.requestUpdate()}))}prepareCustomizationPalette(e){const t=[];e.traverse((e=>{e instanceof s.Kj0&&/MATERIAL_/.test(e.material.name)&&t.push(e)})),t.forEach((e=>{-1===this.materialPalette.findIndex((t=>t.name.replace(/^MATERIAL_/,"").replace(/-(\d|\D|\|)*$/,"")===e.material.name.replace(/^MATERIAL_/,"").replace(/-(\d|\D|\|)*$/,"")))?this.materialPalette.push(e.material):(Object.values(e.material).forEach((e=>{e instanceof s.xEZ&&e.dispose()})),e.material.dispose()),e.geometry.dispose(),e.removeFromParent()}))}forEachModel(e,t=this.model){t&&(e(t),[...t.modelParts,...Object.values(t.slotsModels).filter((e=>-1!==e.activeModel)).map((e=>e.models[e.activeModel]))].forEach((t=>{this.forEachModel(e,t)})))}findModel(e,t){return e===t.id?t:[...t.modelParts,...Object.values(t.slotsModels).filter((e=>-1!==e.activeModel)).map((e=>e.models[e.activeModel]))].reduce(((t,i)=>t||this.findModel(e,i)),null)}insertModelNode({url:e,id:t,parentId:i="root-model",constraints:s}){if(!this.model)return;const a=this.findModel(i,this.model);a&&this.resources.loadGlb(e).then((e=>{var i;this.prepareCustomizationPalette(e.scene);const o=new D({model:e.scene,id:t,parentModel:a,constraints:s,materialPalette:this.materialPalette,animations:e.animations,world:this});a.modelParts.push(o),null===(i=a.model)||void 0===i||i.add(o.model),this.requestUpdate()}))}insertSlotModelNode({url:e,modelId:t,slotName:i,parentId:a="root-model",constraints:o}){var r,n;return Z(this,void 0,void 0,(function*(){if(!this.model)return;const h=this.findModel(a,this.model);if(h&&!(null===(r=h.slotsModels[i])||void 0===r?void 0:r.models.find((e=>e.id===t))))try{if(!h.slotsModels[i]){const e=new s.Tme;e.name=i,null===(n=h.model)||void 0===n||n.add(e),h.slotsModels[i]={slot:e,activeModel:-1,models:[]}}const a=yield this.resources.loadGlb(e);this.prepareCustomizationPalette(a.scene);const r=new D({model:a.scene,id:t,parentModel:h,constraints:o,materialPalette:this.materialPalette,animations:a.animations,world:this});h.slotsModels[i].models.push(r),this.requestUpdate()}catch(e){console.error("Error on load model resource")}}))}deleteModelNode(e){if(!this.model)return;const t=this.findModel(e,this.model);t&&(t.dispose(),t instanceof D&&t.parentModel&&(t.parentModel.modelParts=t.parentModel.modelParts.filter((t=>t.id!==e))),this.requestUpdate())}getAllSlotsMaterials(e){if(!this.model)return null;const t=e||this.model,i=[...t.modelParts,...Object.values(t.slotsModels).filter((e=>-1!==e.activeModel)).map((e=>e.models[e.activeModel]))];return{id:t.id,slots:Object.keys(t.slotsMaterials).map((e=>({name:e,materials:t.slotsMaterials[e].materials.map((e=>e.name))}))),models:i.map((e=>this.getAllSlotsMaterials(e)))}}setMaterial({modelId:e="root-model",slot:t,materialName:i}){var s,a;if(!this.model)return;const o=this.findModel(e,this.model);if(!o)return void console.error("Model with Id",e,"not found!");if(!o.slotsMaterials[t])return void console.error("Slot",t,"not found!");const r=null===(a=null===(s=o.slotsMaterials[t])||void 0===s?void 0:s.materials.find((e=>e.name===i)))||void 0===a?void 0:a.material;if(!r)return void console.error("Material name",i,"not found!");const n=["isMaterial","id","name","needsUpdate","uuid","version","isMeshStandardMaterial"],{slot:h}=o.slotsMaterials[t];Object.keys(h).forEach((e=>{n.includes(e)||(h[e]=r[e])})),o.slotsMaterials[t].slot.needsUpdate=!0,this.requestUpdate()}getAllSlotsModels(e){if(!this.model)return null;const t=e||this.model;return{id:t.id,slots:Object.keys(t.slotsModels).map((e=>({name:e,models:t.slotsModels[e].models.map((e=>this.getAllSlotsModels(e)))}))),modelParts:t.modelParts.map((e=>this.getAllSlotsModels(e)))}}setModel({modelId:e="root-model",slot:t,modelName:i}){if(!this.model)return;const s=this.findModel(e,this.model);if(!s)return void console.error("Model with Id",e,"not found!");const a=s.slotsModels[t];if(!a)return void console.error("Slot",t,"not found!");const o=a.models.findIndex((e=>e.id===i));-1!==a.activeModel&&a.models[a.activeModel].removeFromParent(),a.activeModel=o,-1!==o&&a.slot.add(a.models[o].model),this.requestUpdate()}getCustomizedModel(e=!0){var t;return Z(this,void 0,void 0,(function*(){if(!(null===(t=this.model)||void 0===t?void 0:t.model))return null;this.gltfExporter||(this.gltfExporter=new b.M);const a=this.model.model.clone(!0);a.scale.setScalar(1),a.rotation.fromArray([0,0,0]),a.position.fromArray([0,0,0]),a.traverse((e=>{e.name&&(e.name=e.name.replace("MODEL-PART_",""),e.name=e.name.replace("SLOT_","")),e instanceof s.Kj0&&(e.material.name=e.material.name.replace("SLOT_",""))}));const o=yield this.gltfExporter.parseAsync(a,{binary:!0}).then((t=>e?Promise.all([i.e(27),i.e(322)]).then(i.bind(i,710)).then((({default:e})=>e(t))):t)),r=new Blob([o],{type:"application/octet-stream"});return a.traverse((e=>{e instanceof s.Kj0&&(e.geometry.dispose(),Object.values(e.material).forEach((e=>{e instanceof s.xEZ&&e.dispose()})),e.material.dispose())})),r}))}getCurrentCustomization(e=this.model){return e?{id:e.id,materialSlots:Object.keys(e.slotsMaterials).map((t=>{var i;return{slot:t,activeMaterial:null===(i=e.slotsMaterials[t].materials.find((({material:i})=>{const s=e.slotsMaterials[t].slot;return o=i,(a=s).color.getHexString()===o.color.getHexString()&&a.map===o.map&&a.alphaMap===o.alphaMap&&a.aoMap===o.aoMap&&a.roughness===o.roughness&&a.roughnessMap===o.roughnessMap&&a.metalness===o.metalness&&a.metalnessMap===o.metalnessMap&&a.normalMap===o.normalMap;var a,o})))||void 0===i?void 0:i.name}})),modelSlots:Object.keys(e.slotsModels).map((t=>({slot:t,activeModel:-1!==e.slotsModels[t].activeModel?this.getCurrentCustomization(e.slotsModels[t].models[e.slotsModels[t].activeModel]):null})))}:null}insertHotspot(e,t,i,s,a,o){const r=new P({id:e,position:t,cameraTarget:i,polarAngle:s,azimuthalAngle:a,radius:o});this.hotspots.push(r),this.requestUpdate()}lookToHotspot(e){const t=this.hotspots.find((t=>t.id===e));return t&&this.camera?this.camera.controls.lookTo(t.position):null}centerCameraAtHotspot(e){const t=this.hotspots.find((t=>t.id===e));return t&&this.camera?this.camera.controls.setCamera({dragX:t.position.x,dragY:t.position.y,dragZ:t.position.z}):null}updateHotspot(e,t,i,s,a,o){const r=this.hotspots.find((t=>t.id===e));return r?r.updateHotspot({position:t,cameraTarget:i,polarAngle:s,azimuthalAngle:a,radius:o}):null}deleteHotspot(e){this.hotspots=this.hotspots.filter((t=>t.id!==e))}getAnimationIds(e){var t;void 0===e&&(e=null===(t=this.model)||void 0===t?void 0:t.id);const i=[];return e?this.model&&i.push({modelId:this.model.id,animations:this.model.getAnimations()}):this.forEachModel((e=>{i.push({modelId:e.id,animations:e.getAnimations()})})),i}playAnimation(e,t,i){var s;if(void 0===i&&(i=null===(s=this.model)||void 0===s?void 0:s.id),!this.model||!i)return Promise.reject(new Error("No models found."));const a=this.findModel(i,this.model);return a?a.playAnimation(e,t):(console.error(`Couldn't find model with modelId "${i}".`),Promise.resolve())}stopAnimation(e,t){if(!this.model)return Promise.resolve();t||(t=this.model.id);const i=this.findModel(t,this.model);return i?i.stoAnimation(e):(console.error(`Couldn't find model with modelId "${t}".`),Promise.resolve())}update(){var e;null===(e=this.model)||void 0===e||e.update(),this.camera&&this.model&&this.hotspots.forEach((e=>e.update(this.hotspotRaycaster,this.camera,this.model)))}requestUpdate(){this.needsUpdate=!0}shouldUpdate(){return!!this.needsUpdate&&(this.needsUpdate=!1,!0)}}var j=function(e,t,i,s){return new(i||(i=Promise))((function(a,o){function r(e){try{h(s.next(e))}catch(e){o(e)}}function n(e){try{h(s.throw(e))}catch(e){o(e)}}function h(e){var t;e.done?a(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,n)}h((s=s.apply(e,t||[])).next())}))};class H{constructor({canvas:e,glbSrc:t,exposure:i,noZoom:a,minZoom:o,maxZoom:r,initialZoom:n,sceneBackground:h,activeShadow:l,activeBakedShadow:u,shadowOffsetX:p,shadowOffsetY:g,shadowOffsetZ:v,shadowOpacity:M,shadowRadius:f,cameraOrbitSensitivity:A,minAzimuthalAngleRotation:x,maxAzimuthalAngleRotation:w,minPolarAngleRotation:b,maxPolarAngleRotation:P,maxDragX:y,minDragX:S,maxDragY:N,minDragY:I,maxDragZ:z,minDragZ:C,activeFog:L,fogColor:R,fogNear:E,fogFar:X,cameraNear:O,cameraFar:Y,hdri:U,bloomIntensity:D,bloomRadius:F,bloomThreshold:B,initialAnimation:Z,loadingDiv:j,instructionsImg:H,bloomButton:q,defaultAnimationOptions:G}){this.canvas=e,this.canvasObserver=new IntersectionObserver((([e])=>{this.isVisible=e.isIntersecting})),this.canvasObserver.observe(this.canvas),this.progress=j,this.bloomButton=q,this.glbSrc=t,this.needsUpdate=!0,this.exposure=i,this.instructionsImg=H,this.noZoom=a,this.minZoom=o,this.maxZoom=r,this.initialZoom=n,this.activeShadow=l,this.activeBakedShadow=u,this.shadowOffsetX=p,this.shadowOffsetY=g,this.shadowOffsetZ=v,this.shadowOpacity=M,this.shadowRadius=f,this.orbitSensitivity=A,this.minAzimuthalAngleRotation=x,this.maxAzimuthalAngleRotation=w,this.minPolarAngleRotation=b,this.maxPolarAngleRotation=P,this.maxDragX=y,this.minDragX=S,this.maxDragY=N,this.minDragY=I,this.maxDragZ=z,this.minDragZ=C,this.activeFog=L,this.fogColor=/^#([0-9a-f]{3}){1,2}$/i.test(R)?R:"",this.fogNear=E,this.fogFar=X,this.cameraNear=O,this.cameraFar=Y,this.bloomIntensity=D,this.bloomRadius=F,this.bloomThreshold=B,this.sizes=new m(this.canvas),this.time=c.singleton,this.scene=new s.xsS,this.camera=new T(this),this.hdri=U,this.renderer=new _(this),this.resources=new d({modelSource:this.glbSrc,environmentSource:this.hdri,progress:this.progress,bloomButton:this.bloomButton,canvas:this.canvas,renderer:this.renderer}),this.world=new k(this,G),this.sizes.on("resize",(()=>this.resize())),this.time.on("tick",(()=>this.update())),this.resources.on("ready",(()=>{0===this.resources.animations.length&&Z&&this.camera.controls.animation.play(),this.requestUpdate()})),this.resources.on("environmentReady",(()=>{this.resources.environmentTexture&&(h&&(this.scene.background=this.resources.environmentTexture),this.scene.environment=this.resources.environmentTexture,this.requestUpdate())}))}update(){var e;this.isVisible&&(this.camera.shouldUpdate()&&this.requestUpdate(),this.world.shouldUpdate()&&this.requestUpdate(),this.shouldUpdate()&&(this.world.update(),this.camera.update(),"noBloom"===this.bloom?this.renderer.update():null===(e=this.world.environment)||void 0===e||e.update(),this.hasUpdated()))}requestUpdate(){this.needsUpdate=!0}shouldUpdate(){return this.needsUpdate}hasUpdated(){this.needsUpdate=!1}updateGlb(e){this.resources.updateGlb(e),this.requestUpdate()}updateEnvironment({exposure:e,hdri:t,sceneBackground:i,initialAnimation:s}){void 0!==e&&this.renderer.instance&&(this.renderer.instance.toneMappingExposure=e),void 0!==t&&("neutral"===t?this.resources.updateEnvironment("https://sdk.r2u.io/hdri/neutral.hdr"):this.resources.updateEnvironment(t)),i&&this.resources.environmentTexture?this.scene.background=this.resources.environmentTexture:void 0!==i&&(this.scene.background=null),s?this.camera.controls.animation.play():void 0!==s&&this.camera.controls.animation.stop(),this.requestUpdate()}initializeBloom(){var e;null===(e=this.world.environment)||void 0===e||e.initializeBloom(),this.requestUpdate()}updateBloom(e){this.bloom=e,this.world.environment&&(this.world.environment.bloom=e),this.requestUpdate()}resize(){var e;this.camera.resize(),"noBloom"===this.bloom?this.renderer.resize():null===(e=this.world.environment)||void 0===e||e.resize(),this.requestUpdate()}insertModelNode(e){this.world.insertModelNode(e)}insertSlotModelNode(e){return j(this,void 0,void 0,(function*(){return this.world.insertSlotModelNode(e)}))}deleteModelNode(e){this.world.deleteModelNode(e)}getAllSlotsMaterials(){return this.world.getAllSlotsMaterials()}setMaterial(...e){this.world.setMaterial(...e)}getAllSlotsModels(){return this.world.getAllSlotsModels()}setModel(...e){this.world.setModel(...e)}getCustomizedModel(...e){return j(this,void 0,void 0,(function*(){return this.world.getCustomizedModel(...e)}))}getCurrentCustomization(){return this.world.getCurrentCustomization()}insertHotspot(...e){return this.world.insertHotspot(...e)}lookToHotspot(...e){return this.world.lookToHotspot(...e)}centerCameraAtHotspot(...e){return this.world.centerCameraAtHotspot(...e)}updateHotspot(...e){return this.world.updateHotspot(...e)}deleteHotspot(...e){return this.world.deleteHotspot(...e)}}}}]);
{
"name": "@r2u/viewer",
"version": "1.5.2",
"version": "1.5.3",
"files": [

@@ -5,0 +5,0 @@ "dist"

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc