@bimdata/viewer 2.16.2-beta.2 → 2.16.2-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1385,7 +1385,7 @@ Fragment shader:
|
|
|
1385
1385
|
} catch (error) {
|
|
1386
1386
|
console.error(error);
|
|
1387
1387
|
throw error;
|
|
1388
|
-
}`}function Lee(i,e=!0,t){const n=t||new Set;if(i){if(Fee(i))n.add(i);else if(Fee(i.buffer))n.add(i.buffer);else if(!ArrayBuffer.isView(i)){if(e&&typeof i=="object")for(const o in i)Lee(i[o],e,n)}}return t===void 0?Array.from(n):[]}function Fee(i){return i?i instanceof ArrayBuffer||typeof MessagePort<"u"&&i instanceof MessagePort||typeof ImageBitmap<"u"&&i instanceof ImageBitmap||typeof OffscreenCanvas<"u"&&i instanceof OffscreenCanvas:!1}const uT=()=>{};class dT{name;source;url;terminated=!1;worker;onMessage;onError;_loadableURL="";static isSupported(){return typeof Worker<"u"&&Jr||typeof lT<"u"&&!Jr}constructor(e){const{name:t,source:n,url:o}=e;wc(n||o),this.name=t,this.source=n,this.url=o,this.onMessage=uT,this.onError=r=>console.log(r),this.worker=Jr?this._createBrowserWorker():this._createNodeWorker()}destroy(){this.onMessage=uT,this.onError=uT,this.worker.terminate(),this.terminated=!0}get isRunning(){return!!this.onMessage}postMessage(e,t){t=t||Lee(e),this.worker.postMessage(e,t)}_getErrorFromErrorEvent(e){let t="Failed to load ";return t+=`worker ${this.name} from ${this.url}. `,e.message&&(t+=`${e.message} in `),e.lineno&&(t+=`:${e.lineno}:${e.colno}`),new Error(t)}_createBrowserWorker(){this._loadableURL=T4t({source:this.source,url:this.url});const e=new Worker(this._loadableURL,{name:this.name});return e.onmessage=t=>{t.data?this.onMessage(t.data):this.onError(new Error("No data received"))},e.onerror=t=>{this.onError(this._getErrorFromErrorEvent(t)),this.terminated=!0},e.onmessageerror=t=>console.error(t),e}_createNodeWorker(){let e;if(this.url){const n=this.url.includes(":/")||this.url.startsWith("/")?this.url:`./${this.url}`;e=new lT(n,{eval:!1})}else if(this.source)e=new lT(this.source,{eval:!0});else throw new Error("no worker");return e.on("message",t=>{this.onMessage(t)}),e.on("error",t=>{this.onError(t)}),e.on("exit",t=>{}),e}}class _4t{name="unnamed";source;url;maxConcurrency=1;maxMobileConcurrency=1;onDebug=()=>{};reuseWorkers=!0;props={};jobQueue=[];idleQueue=[];count=0;isDestroyed=!1;static isSupported(){return dT.isSupported()}constructor(e){this.source=e.source,this.url=e.url,this.setProps(e)}destroy(){this.idleQueue.forEach(e=>e.destroy()),this.isDestroyed=!0}setProps(e){this.props={...this.props,...e},e.name!==void 0&&(this.name=e.name),e.maxConcurrency!==void 0&&(this.maxConcurrency=e.maxConcurrency),e.maxMobileConcurrency!==void 0&&(this.maxMobileConcurrency=e.maxMobileConcurrency),e.reuseWorkers!==void 0&&(this.reuseWorkers=e.reuseWorkers),e.onDebug!==void 0&&(this.onDebug=e.onDebug)}async startJob(e,t=(o,r,s)=>o.done(s),n=(o,r)=>o.error(r)){const o=new Promise(r=>(this.jobQueue.push({name:e,onMessage:t,onError:n,onStart:r}),this));return this._startQueuedJob(),await o}async _startQueuedJob(){if(!this.jobQueue.length)return;const e=this._getAvailableWorker();if(!e)return;const t=this.jobQueue.shift();if(t){this.onDebug({message:"Starting job",name:t.name,workerThread:e,backlog:this.jobQueue.length});const n=new P4t(t.name,e);e.onMessage=o=>t.onMessage(n,o.type,o.payload),e.onError=o=>t.onError(n,o),t.onStart(n);try{await n.result}catch(o){console.error(`Worker exception: ${o}`)}finally{this.returnWorkerToQueue(e)}}}returnWorkerToQueue(e){!Jr||this.isDestroyed||!this.reuseWorkers||this.count>this._getMaxConcurrency()?(e.destroy(),this.count--):this.idleQueue.push(e),this.isDestroyed||this._startQueuedJob()}_getAvailableWorker(){if(this.idleQueue.length>0)return this.idleQueue.shift()||null;if(this.count<this._getMaxConcurrency()){this.count++;const e=`${this.name.toLowerCase()} (#${this.count} of ${this.maxConcurrency})`;return new dT({name:e,source:this.source,url:this.url})}return null}_getMaxConcurrency(){return S4t?this.maxMobileConcurrency:this.maxConcurrency}}const D4t={maxConcurrency:3,maxMobileConcurrency:1,reuseWorkers:!0,onDebug:()=>{}};class Hu{props;workerPools=new Map;static _workerFarm;static isSupported(){return dT.isSupported()}static getWorkerFarm(e={}){return Hu._workerFarm=Hu._workerFarm||new Hu({}),Hu._workerFarm.setProps(e),Hu._workerFarm}constructor(e){this.props={...D4t},this.setProps(e),this.workerPools=new Map}destroy(){for(const e of this.workerPools.values())e.destroy();this.workerPools=new Map}setProps(e){this.props={...this.props,...e};for(const t of this.workerPools.values())t.setProps(this._getWorkerPoolProps())}getWorkerPool(e){const{name:t,source:n,url:o}=e;let r=this.workerPools.get(t);return r||(r=new _4t({name:t,source:n,url:o}),r.setProps(this._getWorkerPoolProps()),this.workerPools.set(t,r)),r}_getWorkerPoolProps(){return{maxConcurrency:this.props.maxConcurrency,maxMobileConcurrency:this.props.maxMobileConcurrency,reuseWorkers:this.props.reuseWorkers,onDebug:this.props.onDebug}}}function L4t(i,e={}){const t=e[i.id]||{},n=Jr?`${i.id}-worker.js`:`${i.id}-worker-node.js`;let o=t.workerUrl;if(!o&&i.id==="compression"&&(o=e.workerUrl),e._workerType==="test"&&(Jr?o=`modules/${i.module}/dist/${n}`:o=`modules/${i.module}/src/workers/${i.id}-worker-node.ts`),!o){let r=i.version;r==="latest"&&(r=B4t);const s=r?`@${r}`:"";o=`https://unpkg.com/@loaders.gl/${i.module}${s}/dist/${n}`}return wc(o),o}function F4t(i,e=Ree){wc(i,"no worker provided");const t=i.version;return!(!e||!t)}const hT={};async function Mh(i,e=null,t={},n=null){return e&&(i=O4t(i,e,t,n)),hT[i]=hT[i]||N4t(i),await hT[i]}function O4t(i,e,t={},n=null){if(!t.useLocalLibraries&&i.startsWith("http"))return i;n=n||i;const o=t.modules||{};return o[n]?o[n]:Jr?t.CDN?(wc(t.CDN.startsWith("http")),`${t.CDN}/${e}@${Ree}/dist/libs/${n}`):aT?`../src/libs/${n}`:`modules/${e}/src/libs/${n}`:`modules/${e}/dist/libs/${n}`}async function N4t(i){if(i.endsWith("wasm"))return await V4t(i);if(!Jr)try{const{requireFromFile:t}=globalThis.loaders||{};return await t?.(i)}catch(t){return console.error(t),null}if(aT)return importScripts(i);const e=await H4t(i);return U4t(e,i)}function U4t(i,e){if(!Jr){const{requireFromString:n}=globalThis.loaders||{};return n?.(i,e)}if(aT)return eval.call(globalThis,i),null;const t=document.createElement("script");t.id=e;try{t.appendChild(document.createTextNode(i))}catch{t.text=i}return document.body.appendChild(t),null}async function V4t(i){const{readFileAsArrayBuffer:e}=globalThis.loaders||{};return Jr||!e||i.startsWith("http")?await(await fetch(i)).arrayBuffer():await e(i)}async function H4t(i){const{readFileAsText:e}=globalThis.loaders||{};return Jr||!e||i.startsWith("http")?await(await fetch(i)).text():await e(i)}function z4t(i,e){return!Hu.isSupported()||!Jr&&!e?._nodeWorkers?!1:i.worker&&e?.worker}async function j4t(i,e,t,n,o){const r=i.id,s=L4t(i,t),l=Hu.getWorkerFarm(t).getWorkerPool({name:r,url:s});t=JSON.parse(JSON.stringify(t)),n=JSON.parse(JSON.stringify(n||{}));const c=await l.startJob("process-on-worker",G4t.bind(null,o));return c.postMessage("process",{input:e,options:t,context:n}),await(await c.result).result}async function G4t(i,e,t,n){switch(t){case"done":e.done(n);break;case"error":e.error(new Error(n.error));break;case"process":const{id:o,input:r,options:s}=n;try{const a=await i(r,s);e.postMessage("done",{id:o,result:a})}catch(a){const l=a instanceof Error?a.message:"unknown error";e.postMessage("error",{id:o,error:l})}break;default:console.warn(`parse-with-worker unknown message ${t}`)}}function Q4t(i,e=5){return typeof i=="string"?i.slice(0,e):ArrayBuffer.isView(i)?Oee(i.buffer,i.byteOffset,e):i instanceof ArrayBuffer?Oee(i,0,e):""}function Oee(i,e,t){if(i.byteLength<=e+t)return"";const n=new DataView(i);let o="";for(let r=0;r<t;r++)o+=String.fromCharCode(n.getUint8(e+r));return o}function q4t(i){try{return JSON.parse(i)}catch{throw new Error(`Failed to parse JSON from data starting with "${Q4t(i)}"`)}}function K4t(i,e,t){if(t=t||i.byteLength,i.byteLength<t||e.byteLength<t)return!1;const n=new Uint8Array(i),o=new Uint8Array(e);for(let r=0;r<n.length;++r)if(n[r]!==o[r])return!1;return!0}function J4t(...i){return W4t(i)}function W4t(i){const e=i.map(r=>r instanceof ArrayBuffer?new Uint8Array(r):r),t=e.reduce((r,s)=>r+s.byteLength,0),n=new Uint8Array(t);let o=0;for(const r of e)n.set(r,o),o+=r.byteLength;return n.buffer}function Nee(i,e,t){const n=t!==void 0?new Uint8Array(i).subarray(e,e+t):new Uint8Array(i).subarray(e);return new Uint8Array(n).buffer}function V4(i,e){return vc(i>=0),vc(e>0),i+(e-1)&-4}function Z4t(i,e,t){let n;if(i instanceof ArrayBuffer)n=new Uint8Array(i);else{const o=i.byteOffset,r=i.byteLength;n=new Uint8Array(i.buffer||i.arrayBuffer,o,r)}return e.set(n,t),t+V4(n.byteLength,4)}async function Y4t(i){const e=[];for await(const t of i)e.push(t);return J4t(...e)}let X4t="";const Uee={};function $4t(i){for(const e in Uee)if(i.startsWith(e)){const t=Uee[e];i=i.replace(e,t)}return!i.startsWith("http://")&&!i.startsWith("https://")&&(i=`${X4t}${i}`),i}function h5i(i){return i}function e5t(i){return i&&typeof i=="object"&&i.isBuffer}function Vee(i){if(e5t(i))return i;if(i instanceof ArrayBuffer)return i;if(ArrayBuffer.isView(i))return i.byteOffset===0&&i.byteLength===i.buffer.byteLength?i.buffer:i.buffer.slice(i.byteOffset,i.byteOffset+i.byteLength);if(typeof i=="string"){const e=i;return new TextEncoder().encode(e).buffer}if(i&&typeof i=="object"&&i._toArrayBuffer)return i._toArrayBuffer();throw new Error("toArrayBuffer")}function Hee(i){const e=i?i.lastIndexOf("/"):-1;return e>=0?i.substr(e+1):""}function t5t(i){const e=i?i.lastIndexOf("/"):-1;return e>=0?i.substr(0,e):""}const i5t=i=>typeof i=="boolean",H4=i=>typeof i=="function",z4=i=>i!==null&&typeof i=="object",zee=i=>z4(i)&&i.constructor==={}.constructor,n5t=i=>!!i&&typeof i[Symbol.iterator]=="function",o5t=i=>i&&typeof i[Symbol.asyncIterator]=="function",Eh=i=>typeof Response<"u"&&i instanceof Response||i&&i.arrayBuffer&&i.text&&i.json,Wf=i=>typeof Blob<"u"&&i instanceof Blob,s5t=i=>i&&typeof i=="object"&&i.isBuffer,r5t=i=>typeof ReadableStream<"u"&&i instanceof ReadableStream||z4(i)&&H4(i.tee)&&H4(i.cancel)&&H4(i.getReader),a5t=i=>z4(i)&&H4(i.read)&&H4(i.pipe)&&i5t(i.readable),jee=i=>r5t(i)||a5t(i);class l5t extends Error{constructor(e,t){super(e),this.reason=t.reason,this.url=t.url,this.response=t.response}reason;url;response}const c5t=/^data:([-\w.]+\/[-\w.+]+)(;|,)/,u5t=/^([-\w.]+\/[-\w.+]+)/;function Gee(i,e){return i.toLowerCase()===e.toLowerCase()}function d5t(i){const e=u5t.exec(i);return e?e[1]:i}function Qee(i){const e=c5t.exec(i);return e?e[1]:""}const qee=/\?.*/;function h5t(i){const e=i.match(qee);return e&&e[0]}function pT(i){return i.replace(qee,"")}function p5t(i){if(i.length<50)return i;const e=i.slice(i.length-15);return`${i.substr(0,32)}...${e}`}function J7(i){return Eh(i)?i.url:Wf(i)?i.name||"":typeof i=="string"?i:""}function fT(i){if(Eh(i)){const e=i,t=e.headers.get("content-type")||"",n=pT(e.url);return d5t(t)||Qee(n)}return Wf(i)?i.type||"":typeof i=="string"?Qee(i):""}function f5t(i){return Eh(i)?i.headers["content-length"]||-1:Wf(i)?i.size:typeof i=="string"?i.length:i instanceof ArrayBuffer||ArrayBuffer.isView(i)?i.byteLength:-1}async function Kee(i){if(Eh(i))return i;const e={},t=f5t(i);t>=0&&(e["content-length"]=String(t));const n=J7(i),o=fT(i);o&&(e["content-type"]=o);const r=await g5t(i);r&&(e["x-first-bytes"]=r),typeof i=="string"&&(i=new TextEncoder().encode(i));const s=new Response(i,{headers:e});return Object.defineProperty(s,"url",{value:n}),s}async function A5t(i){if(!i.ok)throw await m5t(i)}async function m5t(i){const e=p5t(i.url);let t=`Failed to fetch resource (${i.status}) ${i.statusText}: ${e}`;t=t.length>100?`${t.slice(0,100)}...`:t;const n={reason:i.statusText,url:i.url,response:i};try{const o=i.headers.get("Content-Type");n.reason=!i.bodyUsed&&o?.includes("application/json")?await i.json():await i.text()}catch{}return new l5t(t,n)}async function g5t(i){if(typeof i=="string")return`data:,${i.slice(0,5)}`;if(i instanceof Blob){const t=i.slice(0,5);return await new Promise(n=>{const o=new FileReader;o.onload=r=>n(r?.target?.result),o.readAsDataURL(t)})}if(i instanceof ArrayBuffer){const t=i.slice(0,5);return`data:base64,${y5t(t)}`}return null}function y5t(i){let e="";const t=new Uint8Array(i);for(let n=0;n<t.byteLength;n++)e+=String.fromCharCode(t[n]);return btoa(e)}function v5t(i){return!w5t(i)&&!C5t(i)}function w5t(i){return i.startsWith("http:")||i.startsWith("https:")}function C5t(i){return i.startsWith("data:")}async function Jee(i,e){if(typeof i=="string"){const t=$4t(i);return v5t(t)&&globalThis.loaders?.fetchNode?globalThis.loaders?.fetchNode(t,e):await fetch(t,e)}return await Kee(i)}const Wee=new sT({id:"loaders.gl"});class b5t{log(){return()=>{}}info(){return()=>{}}warn(){return()=>{}}error(){return()=>{}}}class x5t{console;constructor(){this.console=console}log(...e){return this.console.log.bind(this.console,...e)}info(...e){return this.console.info.bind(this.console,...e)}warn(...e){return this.console.warn.bind(this.console,...e)}error(...e){return this.console.error.bind(this.console,...e)}}const Zee={fetch:null,mimeType:void 0,nothrow:!1,log:new x5t,useLocalLibraries:!1,CDN:"https://unpkg.com/@loaders.gl",worker:!0,maxConcurrency:3,maxMobileConcurrency:1,reuseWorkers:q7,_nodeWorkers:!1,_workerType:"",limit:0,_limitMB:0,batchSize:"auto",batchDebounceMs:0,metadata:!1,transforms:[]},M5t={throws:"nothrow",dataType:"(no longer used)",uri:"baseUri",method:"fetch.method",headers:"fetch.headers",body:"fetch.body",mode:"fetch.mode",credentials:"fetch.credentials",cache:"fetch.cache",redirect:"fetch.redirect",referrer:"fetch.referrer",referrerPolicy:"fetch.referrerPolicy",integrity:"fetch.integrity",keepalive:"fetch.keepalive",signal:"fetch.signal"};function Yee(){globalThis.loaders=globalThis.loaders||{};const{loaders:i}=globalThis;return i._state||(i._state={}),i._state}function Xee(){const i=Yee();return i.globalOptions=i.globalOptions||{...Zee},i.globalOptions}function E5t(i,e,t,n){return t=t||[],t=Array.isArray(t)?t:[t],B5t(i,t),S5t(e,i,n)}function B5t(i,e){$ee(i,null,Zee,M5t,e);for(const t of e){const n=i&&i[t.id]||{},o=t.options&&t.options[t.id]||{},r=t.deprecatedOptions&&t.deprecatedOptions[t.id]||{};$ee(n,t.id,o,r,e)}}function $ee(i,e,t,n,o){const r=e||"Top level",s=e?`${e}.`:"";for(const a in i){const l=!e&&z4(i[a]),c=a==="baseUri"&&!e,u=a==="workerUrl"&&e;if(!(a in t)&&!c&&!u){if(a in n)Wee.warn(`${r} loader option '${s}${a}' no longer supported, use '${n[a]}'`)();else if(!l){const d=I5t(a,o);Wee.warn(`${r} loader option '${s}${a}' not recognized. ${d}`)()}}}}function I5t(i,e){const t=i.toLowerCase();let n="";for(const o of e)for(const r in o.options){if(i===r)return`Did you mean '${o.id}.${r}'?`;const s=r.toLowerCase();(t.startsWith(s)||s.startsWith(t))&&(n=n||`Did you mean '${o.id}.${r}'?`)}return n}function S5t(i,e,t){const o={...i.options||{}};return P5t(o,t),o.log===null&&(o.log=new b5t),ete(o,Xee()),ete(o,e),o}function ete(i,e){for(const t in e)if(t in e){const n=e[t];zee(n)&&zee(i[t])?i[t]={...i[t],...e[t]}:i[t]=e[t]}}function P5t(i,e){e&&!("baseUri"in i)&&(i.baseUri=e)}function tte(i){return i?(Array.isArray(i)&&(i=i[0]),Array.isArray(i?.extensions)):!1}function ite(i){vc(i,"null loader"),vc(tte(i),"invalid loader");let e;return Array.isArray(i)&&(e=i[1],i=i[0],i={...i,options:{...i.options,...e}}),(i?.parseTextSync||i?.parseText)&&(i.text=!0),i.text||(i.binary=!0),i}const T5t=()=>{const i=Yee();return i.loaderRegistry=i.loaderRegistry||[],i.loaderRegistry};function k5t(){return T5t()}const R5t=/\.([^.]+)$/;async function _5t(i,e=[],t,n){if(!ote(i))return null;let o=nte(i,e,{...t,nothrow:!0},n);if(o)return o;if(Wf(i)&&(i=await i.slice(0,10).arrayBuffer(),o=nte(i,e,t,n)),!o&&!t?.nothrow)throw new Error(ste(i));return o}function nte(i,e=[],t,n){if(!ote(i))return null;if(e&&!Array.isArray(e))return ite(e);let o=[];e&&(o=o.concat(e)),t?.ignoreRegisteredLoaders||o.push(...k5t()),L5t(o);const r=D5t(i,o,t,n);if(!r&&!t?.nothrow)throw new Error(ste(i));return r}function D5t(i,e,t,n){const o=J7(i),r=fT(i),s=pT(o)||n?.url;let a=null,l="";return t?.mimeType&&(a=AT(e,t?.mimeType),l=`match forced by supplied MIME type ${t?.mimeType}`),a=a||F5t(e,s),l=l||(a?`matched url ${s}`:""),a=a||AT(e,r),l=l||(a?`matched MIME type ${r}`:""),a=a||N5t(e,i),l=l||(a?`matched initial data ${ate(i)}`:""),t?.fallbackMimeType&&(a=a||AT(e,t?.fallbackMimeType),l=l||(a?`matched fallback MIME type ${r}`:"")),l&&b4t.log(1,`selectLoader selected ${a?.name}: ${l}.`),a}function ote(i){return!(i instanceof Response&&i.status===204)}function ste(i){const e=J7(i),t=fT(i);let n="No valid loader found (";n+=e?`${Hee(e)}, `:"no url provided, ",n+=`MIME type: ${t?`"${t}"`:"not provided"}, `;const o=i?ate(i):"";return n+=o?` first bytes: "${o}"`:"first bytes: not available",n+=")",n}function L5t(i){for(const e of i)ite(e)}function F5t(i,e){const t=e&&R5t.exec(e),n=t&&t[1];return n?O5t(i,n):null}function O5t(i,e){e=e.toLowerCase();for(const t of i)for(const n of t.extensions)if(n.toLowerCase()===e)return t;return null}function AT(i,e){for(const t of i)if(t.mimeTypes?.some(n=>Gee(e,n))||Gee(e,`application/x.${t.id}`))return t;return null}function N5t(i,e){if(!e)return null;for(const t of i)if(typeof e=="string"){if(U5t(e,t))return t}else if(ArrayBuffer.isView(e)){if(rte(e.buffer,e.byteOffset,t))return t}else if(e instanceof ArrayBuffer&&rte(e,0,t))return t;return null}function U5t(i,e){return e.testText?e.testText(i):(Array.isArray(e.tests)?e.tests:[e.tests]).some(n=>i.startsWith(n))}function rte(i,e,t){return(Array.isArray(t.tests)?t.tests:[t.tests]).some(o=>V5t(i,e,t,o))}function V5t(i,e,t,n){if(n instanceof ArrayBuffer)return K4t(n,i,n.byteLength);switch(typeof n){case"function":return n(i);case"string":const o=mT(i,e,n.length);return n===o;default:return!1}}function ate(i,e=5){return typeof i=="string"?i.slice(0,e):ArrayBuffer.isView(i)?mT(i.buffer,i.byteOffset,e):i instanceof ArrayBuffer?mT(i,0,e):""}function mT(i,e,t){if(i.byteLength<e+t)return"";const n=new DataView(i);let o="";for(let r=0;r<t;r++)o+=String.fromCharCode(n.getUint8(e+r));return o}const H5t=256*1024;function*z5t(i,e){const t=e?.chunkSize||H5t;let n=0;const o=new TextEncoder;for(;n<i.length;){const r=Math.min(i.length-n,t),s=i.slice(n,n+r);n+=r,yield o.encode(s)}}const j5t=256*1024;function*G5t(i,e={}){const{chunkSize:t=j5t}=e;let n=0;for(;n<i.byteLength;){const o=Math.min(i.byteLength-n,t),r=new ArrayBuffer(o),s=new Uint8Array(i,n,o);new Uint8Array(r).set(s),n+=o,yield r}}const Q5t=1024*1024;async function*q5t(i,e){const t=e?.chunkSize||Q5t;let n=0;for(;n<i.size;){const o=n+t,r=await i.slice(n,o).arrayBuffer();n=o,yield r}}function lte(i,e){return q7?K5t(i,e):J5t(i)}async function*K5t(i,e){const t=i.getReader();let n;try{for(;;){const o=n||t.read();e?._streamReadAhead&&(n=t.read());const{done:r,value:s}=await o;if(r)return;yield Vee(s)}}catch{t.releaseLock()}}async function*J5t(i,e){for await(const t of i)yield Vee(t)}function W5t(i,e){if(typeof i=="string")return z5t(i,e);if(i instanceof ArrayBuffer)return G5t(i,e);if(Wf(i))return q5t(i,e);if(jee(i))return lte(i,e);if(Eh(i))return lte(i.body,e);throw new Error("makeIterator")}const cte="Cannot convert supplied data type";function Z5t(i,e,t){if(e.text&&typeof i=="string")return i;if(s5t(i)&&(i=i.buffer),i instanceof ArrayBuffer){const n=i;return e.text&&!e.binary?new TextDecoder("utf8").decode(n):n}if(ArrayBuffer.isView(i)){if(e.text&&!e.binary)return new TextDecoder("utf8").decode(i);let n=i.buffer;const o=i.byteLength||i.length;return(i.byteOffset!==0||o!==n.byteLength)&&(n=n.slice(i.byteOffset,i.byteOffset+o)),n}throw new Error(cte)}async function Y5t(i,e,t){const n=i instanceof ArrayBuffer||ArrayBuffer.isView(i);if(typeof i=="string"||n)return Z5t(i,e);if(Wf(i)&&(i=await Kee(i)),Eh(i)){const o=i;return await A5t(o),e.binary?await o.arrayBuffer():await o.text()}if(jee(i)&&(i=W5t(i,t)),n5t(i)||o5t(i))return Y4t(i);throw new Error(cte)}function X5t(i,e){const t=Xee(),n=i||t;return typeof n.fetch=="function"?n.fetch:z4(n.fetch)?o=>Jee(o,n.fetch):e?.fetch?e?.fetch:Jee}function $5t(i,e,t){if(t)return t;const n={fetch:X5t(e,i),...i};if(n.url){const o=pT(n.url);n.baseUrl=o,n.queryString=h5t(n.url),n.filename=Hee(o),n.baseUrl=t5t(o)}return Array.isArray(n.loaders)||(n.loaders=null),n}function eyt(i,e){if(i&&!Array.isArray(i))return i;let t;if(i&&(t=Array.isArray(i)?i:[i]),e&&e.loaders){const n=Array.isArray(e.loaders)?e.loaders:[e.loaders];t=t?[...t,...n]:n}return t&&t.length?t:void 0}async function gT(i,e,t,n){e&&!Array.isArray(e)&&!tte(e)&&(n=void 0,t=e,e=void 0),i=await i,t=t||{};const o=J7(i),s=eyt(e,n),a=await _5t(i,s,t);return a?(t=E5t(t,a,s,o),n=$5t({url:o,_parse:gT,loaders:s},t,n||null),await tyt(a,i,t,n)):null}async function tyt(i,e,t,n){if(F4t(i),t=x4t(i.options,t),Eh(e)){const r=e,{ok:s,redirected:a,status:l,statusText:c,type:u,url:d}=r,h=Object.fromEntries(r.headers.entries());n.response={headers:h,ok:s,redirected:a,status:l,statusText:c,type:u,url:d}}e=await Y5t(e,i,t);const o=i;if(o.parseTextSync&&typeof e=="string")return o.parseTextSync(e,t,n);if(z4t(i,t))return await j4t(i,e,t,n,gT);if(o.parseText&&typeof e=="string")return await o.parseText(e,t,n);if(o.parse)return await o.parse(e,t,n);throw wc(!o.parseSync),new Error(`${i.id} loader - no parser found and worker is disabled`)}function iyt(i){switch(i.constructor){case Int8Array:return"int8";case Uint8Array:case Uint8ClampedArray:return"uint8";case Int16Array:return"int16";case Uint16Array:return"uint16";case Int32Array:return"int32";case Uint32Array:return"uint32";case Float32Array:return"float32";case Float64Array:return"float64";default:return"null"}}function nyt(i){let e=1/0,t=1/0,n=1/0,o=-1/0,r=-1/0,s=-1/0;const a=i.POSITION?i.POSITION.value:[],l=a&&a.length;for(let c=0;c<l;c+=3){const u=a[c],d=a[c+1],h=a[c+2];e=u<e?u:e,t=d<t?d:t,n=h<n?h:n,o=u>o?u:o,r=d>r?d:r,s=h>s?h:s}return[[e,t,n],[o,r,s]]}function oyt(i,e,t){const n=iyt(e.value),o=t||syt(e);return{name:i,type:{type:"fixed-size-list",listSize:e.size,children:[{name:"value",type:n}]},nullable:!1,metadata:o}}function syt(i){const e={};return"byteOffset"in i&&(e.byteOffset=i.byteOffset.toString(10)),"byteStride"in i&&(e.byteStride=i.byteStride.toString(10)),"normalized"in i&&(e.normalized=i.normalized.toString()),e}const ryt="4.3.3",ayt=globalThis.loaders?.parseImageNode,yT=typeof Image<"u",vT=typeof ImageBitmap<"u",wT=q7?!0:!!ayt;function lyt(i){switch(i){case"auto":return vT||yT||wT;case"imagebitmap":return vT;case"image":return yT;case"data":return wT;default:throw new Error(`@loaders.gl/images: image ${i} not supported in this environment`)}}function cyt(){if(vT)return"imagebitmap";if(yT)return"image";if(wT)return"data";throw new Error("Install '@loaders.gl/polyfills' to parse images under Node.js")}function uyt(i){const e=dyt(i);if(!e)throw new Error("Not an image");return e}function ute(i){switch(uyt(i)){case"data":return i;case"image":case"imagebitmap":const e=document.createElement("canvas"),t=e.getContext("2d");if(!t)throw new Error("getImageData");return e.width=i.width,e.height=i.height,t.drawImage(i,0,0),t.getImageData(0,0,i.width,i.height);default:throw new Error("getImageData")}}function dyt(i){return typeof ImageBitmap<"u"&&i instanceof ImageBitmap?"imagebitmap":typeof Image<"u"&&i instanceof Image?"image":i&&typeof i=="object"&&i.data&&i.width&&i.height?"data":null}const hyt=/^data:image\/svg\+xml/,pyt=/\.svg((\?|#).*)?$/;function CT(i){return i&&(hyt.test(i)||pyt.test(i))}function fyt(i,e){if(CT(e)){let n=new TextDecoder().decode(i);try{typeof unescape=="function"&&typeof encodeURIComponent=="function"&&(n=unescape(encodeURIComponent(n)))}catch(r){throw new Error(r.message)}return`data:image/svg+xml;base64,${btoa(n)}`}return dte(i,e)}function dte(i,e){if(CT(e))throw new Error("SVG cannot be parsed directly to imagebitmap");return new Blob([new Uint8Array(i)])}async function hte(i,e,t){const n=fyt(i,t),o=self.URL||self.webkitURL,r=typeof n!="string"&&o.createObjectURL(n);try{return await Ayt(r||n,e)}finally{r&&o.revokeObjectURL(r)}}async function Ayt(i,e){const t=new Image;return t.src=i,e.image&&e.image.decode&&t.decode?(await t.decode(),t):await new Promise((n,o)=>{try{t.onload=()=>n(t),t.onerror=r=>{const s=r instanceof Error?r.message:"error";o(new Error(s))}}catch(r){o(r)}})}const myt={};let pte=!0;async function gyt(i,e,t){let n;CT(t)?n=await hte(i,e,t):n=dte(i,t);const o=e&&e.imagebitmap;return await yyt(n,o)}async function yyt(i,e=null){if((vyt(e)||!pte)&&(e=null),e)try{return await createImageBitmap(i,e)}catch(t){console.warn(t),pte=!1}return await createImageBitmap(i)}function vyt(i){for(const e in i||myt)return!1;return!0}function wyt(i){return!Myt(i,"ftyp",4)||(i[8]&96)===0?null:Cyt(i)}function Cyt(i){switch(byt(i,8,12).replace("\0"," ").trim()){case"avif":case"avis":return{extension:"avif",mimeType:"image/avif"};default:return null}}function byt(i,e,t){return String.fromCharCode(...i.slice(e,t))}function xyt(i){return[...i].map(e=>e.charCodeAt(0))}function Myt(i,e,t=0){const n=xyt(e);for(let o=0;o<n.length;++o)if(n[o]!==i[o+t])return!1;return!0}const bl=!1,j4=!0;function bT(i){const e=G4(i);return Byt(e)||Pyt(e)||Iyt(e)||Syt(e)||Eyt(e)}function Eyt(i){const e=new Uint8Array(i instanceof DataView?i.buffer:i),t=wyt(e);return t?{mimeType:t.mimeType,width:0,height:0}:null}function Byt(i){const e=G4(i);return e.byteLength>=24&&e.getUint32(0,bl)===2303741511?{mimeType:"image/png",width:e.getUint32(16,bl),height:e.getUint32(20,bl)}:null}function Iyt(i){const e=G4(i);return e.byteLength>=10&&e.getUint32(0,bl)===1195984440?{mimeType:"image/gif",width:e.getUint16(6,j4),height:e.getUint16(8,j4)}:null}function Syt(i){const e=G4(i);return e.byteLength>=14&&e.getUint16(0,bl)===16973&&e.getUint32(2,j4)===e.byteLength?{mimeType:"image/bmp",width:e.getUint32(18,j4),height:e.getUint32(22,j4)}:null}function Pyt(i){const e=G4(i);if(!(e.byteLength>=3&&e.getUint16(0,bl)===65496&&e.getUint8(2)===255))return null;const{tableMarkers:n,sofMarkers:o}=Tyt();let r=2;for(;r+9<e.byteLength;){const s=e.getUint16(r,bl);if(o.has(s))return{mimeType:"image/jpeg",height:e.getUint16(r+5,bl),width:e.getUint16(r+7,bl)};if(!n.has(s))return null;r+=2,r+=e.getUint16(r,bl)}return null}function Tyt(){const i=new Set([65499,65476,65484,65501,65534]);for(let t=65504;t<65520;++t)i.add(t);return{tableMarkers:i,sofMarkers:new Set([65472,65473,65474,65475,65477,65478,65479,65481,65482,65483,65485,65486,65487,65502])}}function G4(i){if(i instanceof DataView)return i;if(ArrayBuffer.isView(i))return new DataView(i.buffer);if(i instanceof ArrayBuffer)return new DataView(i);throw new Error("toDataView")}async function kyt(i,e){const{mimeType:t}=bT(i)||{},n=globalThis.loaders?.parseImageNode;return vc(n),await n(i,t)}async function Ryt(i,e,t){e=e||{};const o=(e.image||{}).type||"auto",{url:r}=t||{},s=_yt(o);let a;switch(s){case"imagebitmap":a=await gyt(i,e,r);break;case"image":a=await hte(i,e,r);break;case"data":a=await kyt(i);break;default:vc(!1)}return o==="data"&&(a=ute(a)),a}function _yt(i){switch(i){case"auto":case"data":return cyt();default:return lyt(i),i}}const Dyt={dataType:null,batchType:null,id:"image",module:"images",name:"Images",version:ryt,mimeTypes:["image/png","image/jpeg","image/gif","image/webp","image/avif","image/bmp","image/vnd.microsoft.icon","image/svg+xml"],extensions:["png","jpg","jpeg","gif","webp","bmp","ico","svg","avif"],parse:Ryt,tests:[i=>!!bT(new DataView(i))],options:{image:{type:"auto",decode:!0}}},xT={};function Lyt(i){if(xT[i]===void 0){const e=q7?Oyt(i):Fyt(i);xT[i]=e}return xT[i]}function Fyt(i){const e=["image/png","image/jpeg","image/gif"],t=globalThis.loaders?.imageFormatsNode||e;return!!globalThis.loaders?.parseImageNode&&t.includes(i)}function Oyt(i){switch(i){case"image/avif":case"image/webp":return Nyt(i);default:return!0}}function Nyt(i){try{return document.createElement("canvas").toDataURL(i).indexOf(`data:${i}`)===0}catch{return!1}}function br(i,e){if(!i)throw new Error(e||"assert failed: gltf")}const fte={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},Ate={5120:1,5121:1,5122:2,5123:2,5125:4,5126:4},mte=["SCALAR","VEC2","VEC3","VEC4"],Uyt=[[Int8Array,5120],[Uint8Array,5121],[Int16Array,5122],[Uint16Array,5123],[Uint32Array,5125],[Float32Array,5126],[Float64Array,5130]],Vyt=new Map(Uyt),Hyt={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},zyt={5120:1,5121:1,5122:2,5123:2,5125:4,5126:4},jyt={5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5126:Float32Array};function gte(i){return mte[i-1]||mte[0]}function W7(i){const e=Vyt.get(i.constructor);if(!e)throw new Error("Illegal typed array");return e}function MT(i,e){const t=jyt[i.componentType],n=Hyt[i.type],o=zyt[i.componentType],r=i.count*n,s=i.count*n*o;br(s>=0&&s<=e.byteLength);const a=Ate[i.componentType],l=fte[i.type];return{ArrayType:t,length:r,byteLength:s,componentByteSize:a,numberOfComponentsInElement:l}}function Gyt(i,e,t){const n=i.bufferViews[t];br(n);const o=n.buffer,r=e[o];br(r);const s=(n.byteOffset||0)+r.byteOffset;return new Uint8Array(r.arrayBuffer,s,n.byteLength)}function Qyt(i,e,t){const n=typeof t=="number"?i.accessors?.[t]:t;if(!n)throw new Error(`No gltf accessor ${JSON.stringify(t)}`);const o=i.bufferViews?.[n.bufferView||0];if(!o)throw new Error(`No gltf buffer view for accessor ${o}`);const{arrayBuffer:r,byteOffset:s}=e[o.buffer],a=(s||0)+(n.byteOffset||0)+(o.byteOffset||0),{ArrayType:l,length:c,componentByteSize:u,numberOfComponentsInElement:d}=MT(n,o),h=u*d,p=o.byteStride||h;if(typeof o.byteStride>"u"||o.byteStride===h)return new l(r,a,c);const A=new l(c);for(let f=0;f<n.count;f++){const g=new l(r,a+f*p,d);A.set(g,f*d)}return A}function qyt(){return{asset:{version:"2.0",generator:"loaders.gl"},buffers:[],extensions:{},extensionsRequired:[],extensionsUsed:[]}}class _o{gltf;sourceBuffers;byteLength;constructor(e){this.gltf={json:e?.json||qyt(),buffers:e?.buffers||[],images:e?.images||[]},this.sourceBuffers=[],this.byteLength=0,this.gltf.buffers&&this.gltf.buffers[0]&&(this.byteLength=this.gltf.buffers[0].byteLength,this.sourceBuffers=[this.gltf.buffers[0]])}get json(){return this.gltf.json}getApplicationData(e){return this.json[e]}getExtraData(e){return(this.json.extras||{})[e]}hasExtension(e){const t=this.getUsedExtensions().find(o=>o===e),n=this.getRequiredExtensions().find(o=>o===e);return typeof t=="string"||typeof n=="string"}getExtension(e){const t=this.getUsedExtensions().find(o=>o===e),n=this.json.extensions||{};return t?n[e]:null}getRequiredExtension(e){return this.getRequiredExtensions().find(n=>n===e)?this.getExtension(e):null}getRequiredExtensions(){return this.json.extensionsRequired||[]}getUsedExtensions(){return this.json.extensionsUsed||[]}getRemovedExtensions(){return this.json.extensionsRemoved||[]}getObjectExtension(e,t){return(e.extensions||{})[t]}getScene(e){return this.getObject("scenes",e)}getNode(e){return this.getObject("nodes",e)}getSkin(e){return this.getObject("skins",e)}getMesh(e){return this.getObject("meshes",e)}getMaterial(e){return this.getObject("materials",e)}getAccessor(e){return this.getObject("accessors",e)}getTexture(e){return this.getObject("textures",e)}getSampler(e){return this.getObject("samplers",e)}getImage(e){return this.getObject("images",e)}getBufferView(e){return this.getObject("bufferViews",e)}getBuffer(e){return this.getObject("buffers",e)}getObject(e,t){if(typeof t=="object")return t;const n=this.json[e]&&this.json[e][t];if(!n)throw new Error(`glTF file error: Could not find ${e}[${t}]`);return n}getTypedArrayForBufferView(e){e=this.getBufferView(e);const t=e.buffer,n=this.gltf.buffers[t];br(n);const o=(e.byteOffset||0)+n.byteOffset;return new Uint8Array(n.arrayBuffer,o,e.byteLength)}getTypedArrayForAccessor(e){const t=this.getAccessor(e);return Qyt(this.gltf.json,this.gltf.buffers,t)}getTypedArrayForImageData(e){e=this.getAccessor(e);const t=this.getBufferView(e.bufferView),o=this.getBuffer(t.buffer).data,r=t.byteOffset||0;return new Uint8Array(o,r,t.byteLength)}addApplicationData(e,t){return this.json[e]=t,this}addExtraData(e,t){return this.json.extras=this.json.extras||{},this.json.extras[e]=t,this}addObjectExtension(e,t,n){return e.extensions=e.extensions||{},e.extensions[t]=n,this.registerUsedExtension(t),this}setObjectExtension(e,t,n){const o=e.extensions||{};o[t]=n}removeObjectExtension(e,t){const n=e?.extensions||{};if(n[t]){this.json.extensionsRemoved=this.json.extensionsRemoved||[];const o=this.json.extensionsRemoved;o.includes(t)||o.push(t)}delete n[t]}addExtension(e,t={}){return br(t),this.json.extensions=this.json.extensions||{},this.json.extensions[e]=t,this.registerUsedExtension(e),t}addRequiredExtension(e,t={}){return br(t),this.addExtension(e,t),this.registerRequiredExtension(e),t}registerUsedExtension(e){this.json.extensionsUsed=this.json.extensionsUsed||[],this.json.extensionsUsed.find(t=>t===e)||this.json.extensionsUsed.push(e)}registerRequiredExtension(e){this.registerUsedExtension(e),this.json.extensionsRequired=this.json.extensionsRequired||[],this.json.extensionsRequired.find(t=>t===e)||this.json.extensionsRequired.push(e)}removeExtension(e){if(this.json.extensions?.[e]){this.json.extensionsRemoved=this.json.extensionsRemoved||[];const t=this.json.extensionsRemoved;t.includes(e)||t.push(e)}this.json.extensions&&delete this.json.extensions[e],this.json.extensionsRequired&&this._removeStringFromArray(this.json.extensionsRequired,e),this.json.extensionsUsed&&this._removeStringFromArray(this.json.extensionsUsed,e)}setDefaultScene(e){this.json.scene=e}addScene(e){const{nodeIndices:t}=e;return this.json.scenes=this.json.scenes||[],this.json.scenes.push({nodes:t}),this.json.scenes.length-1}addNode(e){const{meshIndex:t,matrix:n}=e;this.json.nodes=this.json.nodes||[];const o={mesh:t};return n&&(o.matrix=n),this.json.nodes.push(o),this.json.nodes.length-1}addMesh(e){const{attributes:t,indices:n,material:o,mode:r=4}=e,a={primitives:[{attributes:this._addAttributes(t),mode:r}]};if(n){const l=this._addIndices(n);a.primitives[0].indices=l}return Number.isFinite(o)&&(a.primitives[0].material=o),this.json.meshes=this.json.meshes||[],this.json.meshes.push(a),this.json.meshes.length-1}addPointCloud(e){const n={primitives:[{attributes:this._addAttributes(e),mode:0}]};return this.json.meshes=this.json.meshes||[],this.json.meshes.push(n),this.json.meshes.length-1}addImage(e,t){const n=bT(e),o=t||n?.mimeType,s={bufferView:this.addBufferView(e),mimeType:o};return this.json.images=this.json.images||[],this.json.images.push(s),this.json.images.length-1}addBufferView(e,t=0,n=this.byteLength){const o=e.byteLength;br(Number.isFinite(o)),this.sourceBuffers=this.sourceBuffers||[],this.sourceBuffers.push(e);const r={buffer:t,byteOffset:n,byteLength:o};return this.byteLength+=V4(o,4),this.json.bufferViews=this.json.bufferViews||[],this.json.bufferViews.push(r),this.json.bufferViews.length-1}addAccessor(e,t){const n={bufferView:e,type:gte(t.size),componentType:t.componentType,count:t.count,max:t.max,min:t.min};return this.json.accessors=this.json.accessors||[],this.json.accessors.push(n),this.json.accessors.length-1}addBinaryBuffer(e,t={size:3}){const n=this.addBufferView(e);let o={min:t.min,max:t.max};(!o.min||!o.max)&&(o=this._getAccessorMinMax(e,t.size));const r={size:t.size,componentType:W7(e),count:Math.round(e.length/t.size),min:o.min,max:o.max};return this.addAccessor(n,Object.assign(r,t))}addTexture(e){const{imageIndex:t}=e,n={source:t};return this.json.textures=this.json.textures||[],this.json.textures.push(n),this.json.textures.length-1}addMaterial(e){return this.json.materials=this.json.materials||[],this.json.materials.push(e),this.json.materials.length-1}createBinaryChunk(){const e=this.byteLength,t=new ArrayBuffer(e),n=new Uint8Array(t);let o=0;for(const r of this.sourceBuffers||[])o=Z4t(r,n,o);this.json?.buffers?.[0]?this.json.buffers[0].byteLength=e:this.json.buffers=[{byteLength:e}],this.gltf.binary=t,this.sourceBuffers=[t],this.gltf.buffers=[{arrayBuffer:t,byteOffset:0,byteLength:t.byteLength}]}_removeStringFromArray(e,t){let n=!0;for(;n;){const o=e.indexOf(t);o>-1?e.splice(o,1):n=!1}}_addAttributes(e={}){const t={};for(const n in e){const o=e[n],r=this._getGltfAttributeName(n),s=this.addBinaryBuffer(o.value,o);t[r]=s}return t}_addIndices(e){return this.addBinaryBuffer(e,{size:1})}_getGltfAttributeName(e){switch(e.toLowerCase()){case"position":case"positions":case"vertices":return"POSITION";case"normal":case"normals":return"NORMAL";case"color":case"colors":return"COLOR_0";case"texcoord":case"texcoords":return"TEXCOORD_0";default:return e}}_getAccessorMinMax(e,t){const n={min:null,max:null};if(e.length<t)return n;n.min=[],n.max=[];const o=e.subarray(0,t);for(const r of o)n.min.push(r),n.max.push(r);for(let r=t;r<e.length;r+=t)for(let s=0;s<t;s++)n.min[0+s]=Math.min(n.min[0+s],e[r+s]),n.max[0+s]=Math.max(n.max[0+s],e[r+s]);return n}}function yte(i){return(i%1+1)%1}const vte={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16,BOOLEAN:1,STRING:1,ENUM:1},Kyt={INT8:Int8Array,UINT8:Uint8Array,INT16:Int16Array,UINT16:Uint16Array,INT32:Int32Array,UINT32:Uint32Array,INT64:BigInt64Array,UINT64:BigUint64Array,FLOAT32:Float32Array,FLOAT64:Float64Array},wte={INT8:1,UINT8:1,INT16:2,UINT16:2,INT32:4,UINT32:4,INT64:8,UINT64:8,FLOAT32:4,FLOAT64:8};function ET(i,e){return wte[e]*vte[i]}function Z7(i,e,t,n){if(t!=="UINT8"&&t!=="UINT16"&&t!=="UINT32"&&t!=="UINT64")return null;const o=i.getTypedArrayForBufferView(e),r=Y7(o,"SCALAR",t,n+1);return r instanceof BigInt64Array||r instanceof BigUint64Array?null:r}function Y7(i,e,t,n=1){const o=vte[e],r=Kyt[t],s=wte[t],a=n*o,l=a*s;let c=i.buffer,u=i.byteOffset;return u%s!==0&&(c=new Uint8Array(c).slice(u,u+l).buffer,u=0),new r(c,u,a)}function BT(i,e,t){const n=`TEXCOORD_${e.texCoord||0}`,o=t.attributes[n],r=i.getTypedArrayForAccessor(o),s=i.gltf.json,a=e.index,l=s.textures?.[a]?.source;if(typeof l<"u"){const c=s.images?.[l]?.mimeType,u=i.gltf.images?.[l];if(u&&typeof u.width<"u"){const d=[];for(let h=0;h<r.length;h+=2){const p=Jyt(u,c,r,h,e.channels);d.push(p)}return d}}return[]}function Cte(i,e,t,n,o){if(!t?.length)return;const r=[];for(const u of t){let d=n.findIndex(h=>h===u);d===-1&&(d=n.push(u)-1),r.push(d)}const s=new Uint32Array(r),a=i.gltf.buffers.push({arrayBuffer:s.buffer,byteOffset:s.byteOffset,byteLength:s.byteLength})-1,l=i.addBufferView(s,a,0),c=i.addAccessor(l,{size:1,componentType:W7(s),count:s.length});o.attributes[e]=c}function Jyt(i,e,t,n,o=[0]){const r={r:{offset:0,shift:0},g:{offset:1,shift:8},b:{offset:2,shift:16},a:{offset:3,shift:24}},s=t[n],a=t[n+1];let l=1;e&&(e.indexOf("image/jpeg")!==-1||e.indexOf("image/png")!==-1)&&(l=4);const c=Wyt(s,a,i,l);let u=0;for(const d of o){const h=typeof d=="number"?Object.values(r)[d]:r[d],p=c+h.offset,A=ute(i);if(A.data.length<=p)throw new Error(`${A.data.length} <= ${p}`);const f=A.data[p];u|=f<<h.shift}return u}function Wyt(i,e,t,n=1){const o=t.width,r=yte(i)*(o-1),s=Math.round(r),a=t.height,l=yte(e)*(a-1),c=Math.round(l),u=t.components?t.components:n;return(c*o+s)*u}function bte(i,e,t,n,o){const r=[];for(let s=0;s<e;s++){const a=t[s],l=t[s+1]-t[s];if(l+a>n)break;const c=a/o,u=l/o;r.push(i.slice(c,c+u))}return r}function xte(i,e,t){const n=[];for(let o=0;o<e;o++){const r=o*t;n.push(i.slice(r,r+t))}return n}function Mte(i,e,t,n){if(t)throw new Error("Not implemented - arrayOffsets for strings is specified");if(n){const o=[],r=new TextDecoder("utf8");let s=0;for(let a=0;a<i;a++){const l=n[a+1]-n[a];if(l+s<=e.length){const c=e.subarray(s,l+s),u=r.decode(c);o.push(u),s+=l}}return o}return[]}const Zf="EXT_mesh_features",Zyt=Zf;async function Yyt(i,e){const t=new _o(i);$yt(t,e)}function Xyt(i,e){const t=new _o(i);return tvt(t),t.createBinaryChunk(),t.gltf}function $yt(i,e){const t=i.gltf.json;if(t.meshes)for(const n of t.meshes)for(const o of n.primitives)evt(i,o,e)}function evt(i,e,t){if(!t?.gltf?.loadBuffers)return;const o=e.extensions?.[Zf]?.featureIds;if(o)for(const r of o){let s;if(typeof r.attribute<"u"){const a=`_FEATURE_ID_${r.attribute}`,l=e.attributes[a];s=i.getTypedArrayForAccessor(l)}else typeof r.texture<"u"&&t?.gltf?.loadImages?s=BT(i,r.texture,e):s=[];r.data=s}}function tvt(i,e){const t=i.gltf.json.meshes;if(t)for(const n of t)for(const o of n.primitives)nvt(i,o)}function ivt(i,e,t,n){e.extensions||(e.extensions={});let o=e.extensions[Zf];o||(o={featureIds:[]},e.extensions[Zf]=o);const{featureIds:r}=o,s={featureCount:t.length,propertyTable:n,data:t};r.push(s),i.addObjectExtension(e,Zf,o)}function nvt(i,e){const t=e.extensions?.[Zf];if(!t)return;const n=t.featureIds;n.forEach((o,r)=>{if(o.data){const{accessorKey:s,index:a}=ovt(e.attributes),l=new Uint32Array(o.data);n[r]={featureCount:l.length,propertyTable:o.propertyTable,attribute:a},i.gltf.buffers.push({arrayBuffer:l.buffer,byteOffset:l.byteOffset,byteLength:l.byteLength});const c=i.addBufferView(l),u=i.addAccessor(c,{size:1,componentType:W7(l),count:l.length});e.attributes[s]=u}})}function ovt(i){const e="_FEATURE_ID_",t=Object.keys(i).filter(r=>r.indexOf(e)===0);let n=-1;for(const r of t){const s=Number(r.substring(e.length));s>n&&(n=s)}return n++,{accessorKey:`${e}${n}`,index:n}}const svt=Object.freeze(Object.defineProperty({__proto__:null,createExtMeshFeatures:ivt,decode:Yyt,encode:Xyt,name:Zyt},Symbol.toStringTag,{value:"Module"})),Yf="EXT_structural_metadata",rvt=Yf;async function avt(i,e){const t=new _o(i);cvt(t,e)}function lvt(i,e){const t=new _o(i);return Evt(t),t.createBinaryChunk(),t.gltf}function cvt(i,e){if(!e.gltf?.loadBuffers)return;const t=i.getExtension(Yf);t&&(e.gltf?.loadImages&&uvt(i,t),dvt(i,t))}function uvt(i,e){const t=e.propertyTextures,n=i.gltf.json;if(t&&n.meshes)for(const o of n.meshes)for(const r of o.primitives)pvt(i,t,r,e)}function dvt(i,e){const t=e.schema;if(!t)return;const n=t.classes,o=e.propertyTables;if(n&&o)for(const r in n){const s=hvt(o,r);s&&Avt(i,t,s)}}function hvt(i,e){for(const t of i)if(t.class===e)return t;return null}function pvt(i,e,t,n){if(!e)return;const r=t.extensions?.[Yf]?.propertyTextures;if(r)for(const s of r){const a=e[s];fvt(i,a,t,n)}}function fvt(i,e,t,n){if(!e.properties)return;n.dataAttributeNames||(n.dataAttributeNames=[]);const o=e.class;for(const r in e.properties){const s=`${o}_${r}`,a=e.properties?.[r];if(!a)continue;a.data||(a.data=[]);const l=a.data,c=BT(i,a,t);c!==null&&(Cte(i,s,c,l,t),a.data=l,n.dataAttributeNames.push(s))}}function Avt(i,e,t){const n=e.classes?.[t.class];if(!n)throw new Error(`Incorrect data in the EXT_structural_metadata extension: no schema class with name ${t.class}`);const o=t.count;for(const r in n.properties){const s=n.properties[r],a=t.properties?.[r];if(a){const l=mvt(i,e,s,o,a);a.data=l}}}function mvt(i,e,t,n,o){let r=[];const s=o.values,a=i.getTypedArrayForBufferView(s),l=gvt(i,t,o,n),c=yvt(i,o,n);switch(t.type){case"SCALAR":case"VEC2":case"VEC3":case"VEC4":case"MAT2":case"MAT3":case"MAT4":{r=vvt(t,n,a,l);break}case"BOOLEAN":throw new Error(`Not implemented - classProperty.type=${t.type}`);case"STRING":{r=Mte(n,a,l,c);break}case"ENUM":{r=wvt(e,t,n,a,l);break}default:throw new Error(`Unknown classProperty type ${t.type}`)}return r}function gvt(i,e,t,n){return e.array&&typeof e.count>"u"&&typeof t.arrayOffsets<"u"?Z7(i,t.arrayOffsets,t.arrayOffsetType||"UINT32",n):null}function yvt(i,e,t){return typeof e.stringOffsets<"u"?Z7(i,e.stringOffsets,e.stringOffsetType||"UINT32",t):null}function vvt(i,e,t,n){const o=i.array,r=i.count,s=ET(i.type,i.componentType),a=t.byteLength/s;let l;return i.componentType?l=Y7(t,i.type,i.componentType,a):l=t,o?n?bte(l,e,n,t.length,s):r?xte(l,e,r):[]:l}function wvt(i,e,t,n,o){const r=e.enumType;if(!r)throw new Error("Incorrect data in the EXT_structural_metadata extension: classProperty.enumType is not set for type ENUM");const s=i.enums?.[r];if(!s)throw new Error(`Incorrect data in the EXT_structural_metadata extension: schema.enums does't contain ${r}`);const a=s.valueType||"UINT16",l=ET(e.type,a),c=n.byteLength/l;let u=Y7(n,e.type,a,c);if(u||(u=n),e.array){if(o)return Cvt({valuesData:u,numberOfElements:t,arrayOffsets:o,valuesDataBytesLength:n.length,elementSize:l,enumEntry:s});const d=e.count;return d?bvt(u,t,d,s):[]}return IT(u,0,t,s)}function Cvt(i){const{valuesData:e,numberOfElements:t,arrayOffsets:n,valuesDataBytesLength:o,elementSize:r,enumEntry:s}=i,a=[];for(let l=0;l<t;l++){const c=n[l],u=n[l+1]-n[l];if(u+c>o)break;const d=c/r,h=u/r,p=IT(e,d,h,s);a.push(p)}return a}function bvt(i,e,t,n){const o=[];for(let r=0;r<e;r++){const s=t*r,a=IT(i,s,t,n);o.push(a)}return o}function IT(i,e,t,n){const o=[];for(let r=0;r<t;r++)if(i instanceof BigInt64Array||i instanceof BigUint64Array)o.push("");else{const s=i[e+r],a=xvt(n,s);a?o.push(a.name):o.push("")}return o}function xvt(i,e){for(const t of i.values)if(t.value===e)return t;return null}const Mvt="schemaClassId";function Evt(i,e){const t=i.getExtension(Yf);if(t&&t.propertyTables)for(const n of t.propertyTables){const o=n.class,r=t.schema?.classes?.[o];n.properties&&r&&Bvt(n,r,i)}}function Bvt(i,e,t){for(const n in i.properties){const o=i.properties[n].data;if(o){const r=e.properties[n];if(r){const s=Tvt(o,r,t);i.properties[n]=s}}}}function Ivt(i,e,t=Mvt){let n=i.getExtension(Yf);n||(n=i.addExtension(Yf)),n.schema=Svt(e,t,n.schema);const o=Pvt(e,t,n.schema);return n.propertyTables||(n.propertyTables=[]),n.propertyTables.push(o)-1}function Svt(i,e,t){const n=t??{id:"schema_id"},o={properties:{}};for(const r of i){const s={type:r.elementType,componentType:r.componentType};o.properties[r.name]=s}return n.classes={},n.classes[e]=o,n}function Pvt(i,e,t){const n={class:e,count:0};let o=0;const r=t.classes?.[e];for(const s of i){if(o===0&&(o=s.values.length),o!==s.values.length&&s.values.length)throw new Error("Illegal values in attributes");r?.properties[s.name]&&(n.properties||(n.properties={}),n.properties[s.name]={values:0,data:s.values})}return n.count=o,n}function Tvt(i,e,t){const n={values:0};if(e.type==="STRING"){const{stringData:o,stringOffsets:r}=_vt(i);n.stringOffsets=ST(r,t),n.values=ST(o,t)}else if(e.type==="SCALAR"&&e.componentType){const o=Rvt(i,e.componentType);n.values=ST(o,t)}return n}const kvt={INT8:Int8Array,UINT8:Uint8Array,INT16:Int16Array,UINT16:Uint16Array,INT32:Int32Array,UINT32:Uint32Array,INT64:Int32Array,UINT64:Uint32Array,FLOAT32:Float32Array,FLOAT64:Float64Array};function Rvt(i,e){const t=[];for(const o of i)t.push(Number(o));const n=kvt[e];if(!n)throw new Error("Illegal component type");return new n(t)}function _vt(i){const e=new TextEncoder,t=[];let n=0;for(const l of i){const c=e.encode(l);n+=c.length,t.push(c)}const o=new Uint8Array(n),r=[];let s=0;for(const l of t)o.set(l,s),r.push(s),s+=l.length;r.push(s);const a=new Uint32Array(r);return{stringData:o,stringOffsets:a}}function ST(i,e){return e.gltf.buffers.push({arrayBuffer:i.buffer,byteOffset:i.byteOffset,byteLength:i.byteLength}),e.addBufferView(i)}const Dvt=Object.freeze(Object.defineProperty({__proto__:null,createExtStructuralMetadata:Ivt,decode:avt,encode:lvt,name:rvt},Symbol.toStringTag,{value:"Module"})),Ete="EXT_feature_metadata",Lvt=Ete;async function Fvt(i,e){const t=new _o(i);Ovt(t,e)}function Ovt(i,e){if(!e.gltf?.loadBuffers)return;const t=i.getExtension(Ete);t&&(e.gltf?.loadImages&&Nvt(i,t),Uvt(i,t))}function Nvt(i,e){const t=e.schema;if(!t)return;const n=t.classes,{featureTextures:o}=e;if(n&&o)for(const r in n){const s=n[r],a=Hvt(o,r);a&&jvt(i,a,s)}}function Uvt(i,e){const t=e.schema;if(!t)return;const n=t.classes,o=e.featureTables;if(n&&o)for(const r in n){const s=Vvt(o,r);s&&zvt(i,t,s)}}function Vvt(i,e){for(const t in i){const n=i[t];if(n.class===e)return n}return null}function Hvt(i,e){for(const t in i){const n=i[t];if(n.class===e)return n}return null}function zvt(i,e,t){if(!t.class)return;const n=e.classes?.[t.class];if(!n)throw new Error(`Incorrect data in the EXT_structural_metadata extension: no schema class with name ${t.class}`);const o=t.count;for(const r in n.properties){const s=n.properties[r],a=t.properties?.[r];if(a){const l=Gvt(i,e,s,o,a);a.data=l}}}function jvt(i,e,t){const n=e.class;for(const o in t.properties){const r=e?.properties?.[o];if(r){const s=Wvt(i,r,n);r.data=s}}}function Gvt(i,e,t,n,o){let r=[];const s=o.bufferView,a=i.getTypedArrayForBufferView(s),l=Qvt(i,t,o,n),c=qvt(i,t,o,n);return t.type==="STRING"||t.componentType==="STRING"?r=Mte(n,a,l,c):Kvt(t)&&(r=Jvt(t,n,a,l)),r}function Qvt(i,e,t,n){return e.type==="ARRAY"&&typeof e.componentCount>"u"&&typeof t.arrayOffsetBufferView<"u"?Z7(i,t.arrayOffsetBufferView,t.offsetType||"UINT32",n):null}function qvt(i,e,t,n){return typeof t.stringOffsetBufferView<"u"?Z7(i,t.stringOffsetBufferView,t.offsetType||"UINT32",n):null}function Kvt(i){const e=["UINT8","INT16","UINT16","INT32","UINT32","INT64","UINT64","FLOAT32","FLOAT64"];return e.includes(i.type)||typeof i.componentType<"u"&&e.includes(i.componentType)}function Jvt(i,e,t,n){const o=i.type==="ARRAY",r=i.componentCount,s="SCALAR",a=i.componentType||i.type,l=ET(s,a),c=t.byteLength/l,u=Y7(t,s,a,c);return o?n?bte(u,e,n,t.length,l):r?xte(u,e,r):[]:u}function Wvt(i,e,t){const n=i.gltf.json;if(!n.meshes)return[];const o=[];for(const r of n.meshes)for(const s of r.primitives)Zvt(i,t,e,o,s);return o}function Zvt(i,e,t,n,o){const r={channels:t.channels,...t.texture},s=BT(i,r,o);s&&Cte(i,e,s,n,o)}const Yvt=Object.freeze(Object.defineProperty({__proto__:null,decode:Fvt,name:Lvt},Symbol.toStringTag,{value:"Module"})),Xvt="4.3.3",$vt="4.3.3",X7={TRANSCODER:"basis_transcoder.js",TRANSCODER_WASM:"basis_transcoder.wasm",ENCODER:"basis_encoder.js",ENCODER_WASM:"basis_encoder.wasm"};let Bte;async function Ite(i){M4t(i.modules);const e=E4t("basis");return e||(Bte||=e6t(i),await Bte)}async function e6t(i){let e=null,t=null;return[e,t]=await Promise.all([await Mh(X7.TRANSCODER,"textures",i),await Mh(X7.TRANSCODER_WASM,"textures",i)]),e=e||globalThis.BASIS,await t6t(e,t)}function t6t(i,e){const t={};return e&&(t.wasmBinary=e),new Promise(n=>{i(t).then(o=>{const{BasisFile:r,initializeBasis:s}=o;s(),n({BasisFile:r})})})}let PT;async function Ste(i){const e=i.modules||{};return e.basisEncoder?e.basisEncoder:(PT=PT||i6t(i),await PT)}async function i6t(i){let e=null,t=null;return[e,t]=await Promise.all([await Mh(X7.ENCODER,"textures",i),await Mh(X7.ENCODER_WASM,"textures",i)]),e=e||globalThis.BASIS,await n6t(e,t)}function n6t(i,e){const t={};return e&&(t.wasmBinary=e),new Promise(n=>{i(t).then(o=>{const{BasisFile:r,KTX2File:s,initializeBasis:a,BasisEncoder:l}=o;a(),n({BasisFile:r,KTX2File:s,BasisEncoder:l})})})}const Xf={COMPRESSED_RGB_S3TC_DXT1_EXT:33776,COMPRESSED_RGBA_S3TC_DXT5_EXT:33779,COMPRESSED_RGB_PVRTC_4BPPV1_IMG:35840,COMPRESSED_RGBA_PVRTC_4BPPV1_IMG:35842,COMPRESSED_RGB_ETC1_WEBGL:36196,COMPRESSED_RGBA_ASTC_4X4_KHR:37808},o6t=["","WEBKIT_","MOZ_"],Pte={WEBGL_compressed_texture_s3tc:"dxt",WEBGL_compressed_texture_s3tc_srgb:"dxt-srgb",WEBGL_compressed_texture_etc1:"etc1",WEBGL_compressed_texture_etc:"etc2",WEBGL_compressed_texture_pvrtc:"pvrtc",WEBGL_compressed_texture_atc:"atc",WEBGL_compressed_texture_astc:"astc",EXT_texture_compression_rgtc:"rgtc"};let $7=null;function s6t(i){if(!$7){i=i||r6t()||void 0,$7=new Set;for(const e of o6t)for(const t in Pte)if(i&&i.getExtension(`${e}${t}`)){const n=Pte[t];$7.add(n)}}return $7}function r6t(){try{return document.createElement("canvas").getContext("webgl")}catch{return null}}const xr=[171,75,84,88,32,50,48,187,13,10,26,10];function a6t(i){const e=new Uint8Array(i);return!(e.byteLength<xr.length||e[0]!==xr[0]||e[1]!==xr[1]||e[2]!==xr[2]||e[3]!==xr[3]||e[4]!==xr[4]||e[5]!==xr[5]||e[6]!==xr[6]||e[7]!==xr[7]||e[8]!==xr[8]||e[9]!==xr[9]||e[10]!==xr[10]||e[11]!==xr[11])}const l6t={etc1:{basisFormat:0,compressed:!0,format:Xf.COMPRESSED_RGB_ETC1_WEBGL},etc2:{basisFormat:1,compressed:!0},bc1:{basisFormat:2,compressed:!0,format:Xf.COMPRESSED_RGB_S3TC_DXT1_EXT},bc3:{basisFormat:3,compressed:!0,format:Xf.COMPRESSED_RGBA_S3TC_DXT5_EXT},bc4:{basisFormat:4,compressed:!0},bc5:{basisFormat:5,compressed:!0},"bc7-m6-opaque-only":{basisFormat:6,compressed:!0},"bc7-m5":{basisFormat:7,compressed:!0},"pvrtc1-4-rgb":{basisFormat:8,compressed:!0,format:Xf.COMPRESSED_RGB_PVRTC_4BPPV1_IMG},"pvrtc1-4-rgba":{basisFormat:9,compressed:!0,format:Xf.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG},"astc-4x4":{basisFormat:10,compressed:!0,format:Xf.COMPRESSED_RGBA_ASTC_4X4_KHR},"atc-rgb":{basisFormat:11,compressed:!0},"atc-rgba-interpolated-alpha":{basisFormat:12,compressed:!0},rgba32:{basisFormat:13,compressed:!1},rgb565:{basisFormat:14,compressed:!1},bgr565:{basisFormat:15,compressed:!1},rgba4444:{basisFormat:16,compressed:!1}};async function c6t(i,e){if(e.basis.containerFormat==="auto"){if(a6t(i)){const n=await Ste(e);return Tte(n.KTX2File,i,e)}const{BasisFile:t}=await Ite(e);return TT(t,i,e)}if(e.basis.module==="encoder"){const t=await Ste(e);return e.basis.containerFormat==="ktx2"?Tte(t.KTX2File,i,e):TT(t.BasisFile,i,e)}else{const{BasisFile:n}=await Ite(e);return TT(n,i,e)}}function TT(i,e,t){const n=new i(new Uint8Array(e));try{if(!n.startTranscoding())throw new Error("Failed to start basis transcoding");const o=n.getNumImages(),r=[];for(let s=0;s<o;s++){const a=n.getNumLevels(s),l=[];for(let c=0;c<a;c++)l.push(u6t(n,s,c,t));r.push(l)}return r}finally{n.close(),n.delete()}}function u6t(i,e,t,n){const o=i.getImageWidth(e,t),r=i.getImageHeight(e,t),s=i.getHasAlpha(),{compressed:a,format:l,basisFormat:c}=kte(n,s),u=i.getImageTranscodedSizeInBytes(e,t,c),d=new Uint8Array(u);if(!i.transcodeImage(d,e,t,c,0,0))throw new Error("failed to start Basis transcoding");return{width:o,height:r,data:d,compressed:a,format:l,hasAlpha:s}}function Tte(i,e,t){const n=new i(new Uint8Array(e));try{if(!n.startTranscoding())throw new Error("failed to start KTX2 transcoding");const o=n.getLevels(),r=[];for(let s=0;s<o;s++)r.push(d6t(n,s,t));return[r]}finally{n.close(),n.delete()}}function d6t(i,e,t){const{alphaFlag:n,height:o,width:r}=i.getImageLevelInfo(e,0,0),{compressed:s,format:a,basisFormat:l}=kte(t,n),c=i.getImageTranscodedSizeInBytes(e,0,0,l),u=new Uint8Array(c);if(!i.transcodeImage(u,e,0,0,l,0,-1,-1))throw new Error("Failed to transcode KTX2 image");return{width:r,height:o,data:u,compressed:s,levelSize:c,hasAlpha:n,format:a}}function kte(i,e){let t=i&&i.basis&&i.basis.format;return t==="auto"&&(t=Rte()),typeof t=="object"&&(t=e?t.alpha:t.noAlpha),t=t.toLowerCase(),l6t[t]}function Rte(){const i=s6t();return i.has("astc")?"astc-4x4":i.has("dxt")?{alpha:"bc3",noAlpha:"bc1"}:i.has("pvrtc")?{alpha:"pvrtc1-4-rgba",noAlpha:"pvrtc1-4-rgb"}:i.has("etc1")?"etc1":i.has("etc2")?"etc2":"rgb565"}const h6t={...{dataType:null,batchType:null,name:"Basis",id:"basis",module:"textures",version:$vt,worker:!0,extensions:["basis","ktx2"],mimeTypes:["application/octet-stream","image/ktx2"],tests:["sB"],binary:!0,options:{basis:{format:"auto",libraryPath:"libs/",containerFormat:"auto",module:"transcoder"}}},parse:c6t},$f=!0,_te=1735152710,kT=12,e9=8,p6t=1313821514,f6t=5130562,A6t=0,m6t=0,g6t=1;function y6t(i,e=0){return`${String.fromCharCode(i.getUint8(e+0))}${String.fromCharCode(i.getUint8(e+1))}${String.fromCharCode(i.getUint8(e+2))}${String.fromCharCode(i.getUint8(e+3))}`}function v6t(i,e=0,t={}){const n=new DataView(i),{magic:o=_te}=t,r=n.getUint32(e,!1);return r===o||r===_te}function w6t(i,e,t=0,n={}){const o=new DataView(e),r=y6t(o,t+0),s=o.getUint32(t+4,$f),a=o.getUint32(t+8,$f);switch(Object.assign(i,{header:{byteOffset:t,byteLength:a,hasBinChunk:!1},type:r,version:s,json:{},binChunks:[]}),t+=kT,i.version){case 1:return C6t(i,o,t);case 2:return b6t(i,o,t,n={});default:throw new Error(`Invalid GLB version ${i.version}. Only supports version 1 and 2.`)}}function C6t(i,e,t){vc(i.header.byteLength>kT+e9);const n=e.getUint32(t+0,$f),o=e.getUint32(t+4,$f);return t+=e9,vc(o===A6t),RT(i,e,t,n),t+=n,t+=_T(i,e,t,i.header.byteLength),t}function b6t(i,e,t,n){return vc(i.header.byteLength>kT+e9),x6t(i,e,t,n),t+i.header.byteLength}function x6t(i,e,t,n){for(;t+8<=i.header.byteLength;){const o=e.getUint32(t+0,$f),r=e.getUint32(t+4,$f);switch(t+=e9,r){case p6t:RT(i,e,t,o);break;case f6t:_T(i,e,t,o);break;case m6t:n.strict||RT(i,e,t,o);break;case g6t:n.strict||_T(i,e,t,o);break}t+=V4(o,4)}return t}function RT(i,e,t,n){const o=new Uint8Array(e.buffer,t,n),s=new TextDecoder("utf8").decode(o);return i.json=JSON.parse(s),V4(n,4)}function _T(i,e,t,n){return i.header.hasBinChunk=!0,i.binChunks.push({byteOffset:t,byteLength:n,arrayBuffer:e.buffer}),V4(n,4)}function Dte(i,e){if(i.startsWith("data:")||i.startsWith("http:")||i.startsWith("https:"))return i;const n=e.baseUri||e.uri;if(!n)throw new Error(`'baseUri' must be provided to resolve relative url ${i}`);return n.substr(0,n.lastIndexOf("/")+1)+i}const M6t="B9h9z9tFBBBF8fL9gBB9gLaaaaaFa9gEaaaB9gFaFa9gEaaaFaEMcBFFFGGGEIIILF9wFFFLEFBFKNFaFCx/IFMO/LFVK9tv9t9vq95GBt9f9f939h9z9t9f9j9h9s9s9f9jW9vq9zBBp9tv9z9o9v9wW9f9kv9j9v9kv9WvqWv94h919m9mvqBF8Z9tv9z9o9v9wW9f9kv9j9v9kv9J9u9kv94h919m9mvqBGy9tv9z9o9v9wW9f9kv9j9v9kv9J9u9kv949TvZ91v9u9jvBEn9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9P9jWBIi9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9R919hWBLn9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9F949wBKI9z9iqlBOc+x8ycGBM/qQFTa8jUUUUBCU/EBlHL8kUUUUBC9+RKGXAGCFJAI9LQBCaRKAE2BBC+gF9HQBALAEAIJHOAGlAGTkUUUBRNCUoBAG9uC/wgBZHKCUGAKCUG9JyRVAECFJRICBRcGXEXAcAF9PQFAVAFAclAcAVJAF9JyRMGXGXAG9FQBAMCbJHKC9wZRSAKCIrCEJCGrRQANCUGJRfCBRbAIRTEXGXAOATlAQ9PQBCBRISEMATAQJRIGXAS9FQBCBRtCBREEXGXAOAIlCi9PQBCBRISLMANCU/CBJAEJRKGXGXGXGXGXATAECKrJ2BBAtCKZrCEZfIBFGEBMAKhB83EBAKCNJhB83EBSEMAKAI2BIAI2BBHmCKrHYAYCE6HYy86BBAKCFJAICIJAYJHY2BBAmCIrCEZHPAPCE6HPy86BBAKCGJAYAPJHY2BBAmCGrCEZHPAPCE6HPy86BBAKCEJAYAPJHY2BBAmCEZHmAmCE6Hmy86BBAKCIJAYAmJHY2BBAI2BFHmCKrHPAPCE6HPy86BBAKCLJAYAPJHY2BBAmCIrCEZHPAPCE6HPy86BBAKCKJAYAPJHY2BBAmCGrCEZHPAPCE6HPy86BBAKCOJAYAPJHY2BBAmCEZHmAmCE6Hmy86BBAKCNJAYAmJHY2BBAI2BGHmCKrHPAPCE6HPy86BBAKCVJAYAPJHY2BBAmCIrCEZHPAPCE6HPy86BBAKCcJAYAPJHY2BBAmCGrCEZHPAPCE6HPy86BBAKCMJAYAPJHY2BBAmCEZHmAmCE6Hmy86BBAKCSJAYAmJHm2BBAI2BEHICKrHYAYCE6HYy86BBAKCQJAmAYJHm2BBAICIrCEZHYAYCE6HYy86BBAKCfJAmAYJHm2BBAICGrCEZHYAYCE6HYy86BBAKCbJAmAYJHK2BBAICEZHIAICE6HIy86BBAKAIJRISGMAKAI2BNAI2BBHmCIrHYAYCb6HYy86BBAKCFJAICNJAYJHY2BBAmCbZHmAmCb6Hmy86BBAKCGJAYAmJHm2BBAI2BFHYCIrHPAPCb6HPy86BBAKCEJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCIJAmAYJHm2BBAI2BGHYCIrHPAPCb6HPy86BBAKCLJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCKJAmAYJHm2BBAI2BEHYCIrHPAPCb6HPy86BBAKCOJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCNJAmAYJHm2BBAI2BIHYCIrHPAPCb6HPy86BBAKCVJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCcJAmAYJHm2BBAI2BLHYCIrHPAPCb6HPy86BBAKCMJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCSJAmAYJHm2BBAI2BKHYCIrHPAPCb6HPy86BBAKCQJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCfJAmAYJHm2BBAI2BOHICIrHYAYCb6HYy86BBAKCbJAmAYJHK2BBAICbZHIAICb6HIy86BBAKAIJRISFMAKAI8pBB83BBAKCNJAICNJ8pBB83BBAICTJRIMAtCGJRtAECTJHEAS9JQBMMGXAIQBCBRISEMGXAM9FQBANAbJ2BBRtCBRKAfREEXAEANCU/CBJAKJ2BBHTCFrCBATCFZl9zAtJHt86BBAEAGJREAKCFJHKAM9HQBMMAfCFJRfAIRTAbCFJHbAG9HQBMMABAcAG9sJANCUGJAMAG9sTkUUUBpANANCUGJAMCaJAG9sJAGTkUUUBpMAMCBAIyAcJRcAIQBMC9+RKSFMCBC99AOAIlAGCAAGCA9Ly6yRKMALCU/EBJ8kUUUUBAKM+OmFTa8jUUUUBCoFlHL8kUUUUBC9+RKGXAFCE9uHOCtJAI9LQBCaRKAE2BBHNC/wFZC/gF9HQBANCbZHVCF9LQBALCoBJCgFCUFT+JUUUBpALC84Jha83EBALC8wJha83EBALC8oJha83EBALCAJha83EBALCiJha83EBALCTJha83EBALha83ENALha83EBAEAIJC9wJRcAECFJHNAOJRMGXAF9FQBCQCbAVCF6yRSABRECBRVCBRQCBRfCBRICBRKEXGXAMAcuQBC9+RKSEMGXGXAN2BBHOC/vF9LQBALCoBJAOCIrCa9zAKJCbZCEWJHb8oGIRTAb8oGBRtGXAOCbZHbAS9PQBALAOCa9zAIJCbZCGWJ8oGBAVAbyROAb9FRbGXGXAGCG9HQBABAt87FBABCIJAO87FBABCGJAT87FBSFMAEAtjGBAECNJAOjGBAECIJATjGBMAVAbJRVALCoBJAKCEWJHmAOjGBAmATjGIALAICGWJAOjGBALCoBJAKCFJCbZHKCEWJHTAtjGBATAOjGIAIAbJRIAKCFJRKSGMGXGXAbCb6QBAQAbJAbC989zJCFJRQSFMAM1BBHbCgFZROGXGXAbCa9MQBAMCFJRMSFMAM1BFHbCgBZCOWAOCgBZqROGXAbCa9MQBAMCGJRMSFMAM1BGHbCgBZCfWAOqROGXAbCa9MQBAMCEJRMSFMAM1BEHbCgBZCdWAOqROGXAbCa9MQBAMCIJRMSFMAM2BIC8cWAOqROAMCLJRMMAOCFrCBAOCFZl9zAQJRQMGXGXAGCG9HQBABAt87FBABCIJAQ87FBABCGJAT87FBSFMAEAtjGBAECNJAQjGBAECIJATjGBMALCoBJAKCEWJHOAQjGBAOATjGIALAICGWJAQjGBALCoBJAKCFJCbZHKCEWJHOAtjGBAOAQjGIAICFJRIAKCFJRKSFMGXAOCDF9LQBALAIAcAOCbZJ2BBHbCIrHTlCbZCGWJ8oGBAVCFJHtATyROALAIAblCbZCGWJ8oGBAtAT9FHmJHtAbCbZHTyRbAT9FRTGXGXAGCG9HQBABAV87FBABCIJAb87FBABCGJAO87FBSFMAEAVjGBAECNJAbjGBAECIJAOjGBMALAICGWJAVjGBALCoBJAKCEWJHYAOjGBAYAVjGIALAICFJHICbZCGWJAOjGBALCoBJAKCFJCbZCEWJHYAbjGBAYAOjGIALAIAmJCbZHICGWJAbjGBALCoBJAKCGJCbZHKCEWJHOAVjGBAOAbjGIAKCFJRKAIATJRIAtATJRVSFMAVCBAM2BBHYyHTAOC/+F6HPJROAYCbZRtGXGXAYCIrHmQBAOCFJRbSFMAORbALAIAmlCbZCGWJ8oGBROMGXGXAtQBAbCFJRVSFMAbRVALAIAYlCbZCGWJ8oGBRbMGXGXAP9FQBAMCFJRYSFMAM1BFHYCgFZRTGXGXAYCa9MQBAMCGJRYSFMAM1BGHYCgBZCOWATCgBZqRTGXAYCa9MQBAMCEJRYSFMAM1BEHYCgBZCfWATqRTGXAYCa9MQBAMCIJRYSFMAM1BIHYCgBZCdWATqRTGXAYCa9MQBAMCLJRYSFMAMCKJRYAM2BLC8cWATqRTMATCFrCBATCFZl9zAQJHQRTMGXGXAmCb6QBAYRPSFMAY1BBHMCgFZROGXGXAMCa9MQBAYCFJRPSFMAY1BFHMCgBZCOWAOCgBZqROGXAMCa9MQBAYCGJRPSFMAY1BGHMCgBZCfWAOqROGXAMCa9MQBAYCEJRPSFMAY1BEHMCgBZCdWAOqROGXAMCa9MQBAYCIJRPSFMAYCLJRPAY2BIC8cWAOqROMAOCFrCBAOCFZl9zAQJHQROMGXGXAtCb6QBAPRMSFMAP1BBHMCgFZRbGXGXAMCa9MQBAPCFJRMSFMAP1BFHMCgBZCOWAbCgBZqRbGXAMCa9MQBAPCGJRMSFMAP1BGHMCgBZCfWAbqRbGXAMCa9MQBAPCEJRMSFMAP1BEHMCgBZCdWAbqRbGXAMCa9MQBAPCIJRMSFMAPCLJRMAP2BIC8cWAbqRbMAbCFrCBAbCFZl9zAQJHQRbMGXGXAGCG9HQBABAT87FBABCIJAb87FBABCGJAO87FBSFMAEATjGBAECNJAbjGBAECIJAOjGBMALCoBJAKCEWJHYAOjGBAYATjGIALAICGWJATjGBALCoBJAKCFJCbZCEWJHYAbjGBAYAOjGIALAICFJHICbZCGWJAOjGBALCoBJAKCGJCbZCEWJHOATjGBAOAbjGIALAIAm9FAmCb6qJHICbZCGWJAbjGBAIAt9FAtCb6qJRIAKCEJRKMANCFJRNABCKJRBAECSJREAKCbZRKAICbZRIAfCEJHfAF9JQBMMCBC99AMAc6yRKMALCoFJ8kUUUUBAKM/tIFGa8jUUUUBCTlRLC9+RKGXAFCLJAI9LQBCaRKAE2BBC/+FZC/QF9HQBALhB83ENAECFJRKAEAIJC98JREGXAF9FQBGXAGCG6QBEXGXAKAE9JQBC9+bMAK1BBHGCgFZRIGXGXAGCa9MQBAKCFJRKSFMAK1BFHGCgBZCOWAICgBZqRIGXAGCa9MQBAKCGJRKSFMAK1BGHGCgBZCfWAIqRIGXAGCa9MQBAKCEJRKSFMAK1BEHGCgBZCdWAIqRIGXAGCa9MQBAKCIJRKSFMAK2BIC8cWAIqRIAKCLJRKMALCNJAICFZCGWqHGAICGrCBAICFrCFZl9zAG8oGBJHIjGBABAIjGBABCIJRBAFCaJHFQBSGMMEXGXAKAE9JQBC9+bMAK1BBHGCgFZRIGXGXAGCa9MQBAKCFJRKSFMAK1BFHGCgBZCOWAICgBZqRIGXAGCa9MQBAKCGJRKSFMAK1BGHGCgBZCfWAIqRIGXAGCa9MQBAKCEJRKSFMAK1BEHGCgBZCdWAIqRIGXAGCa9MQBAKCIJRKSFMAK2BIC8cWAIqRIAKCLJRKMABAICGrCBAICFrCFZl9zALCNJAICFZCGWqHI8oGBJHG87FBAIAGjGBABCGJRBAFCaJHFQBMMCBC99AKAE6yRKMAKM+lLKFaF99GaG99FaG99GXGXAGCI9HQBAF9FQFEXGXGX9DBBB8/9DBBB+/ABCGJHG1BB+yAB1BBHE+yHI+L+TABCFJHL1BBHK+yHO+L+THN9DBBBB9gHVyAN9DBB/+hANAN+U9DBBBBANAVyHcAc+MHMAECa3yAI+SHIAI+UAcAMAKCa3yAO+SHcAc+U+S+S+R+VHO+U+SHN+L9DBBB9P9d9FQBAN+oRESFMCUUUU94REMAGAE86BBGXGX9DBBB8/9DBBB+/Ac9DBBBB9gyAcAO+U+SHN+L9DBBB9P9d9FQBAN+oRGSFMCUUUU94RGMALAG86BBGXGX9DBBB8/9DBBB+/AI9DBBBB9gyAIAO+U+SHN+L9DBBB9P9d9FQBAN+oRGSFMCUUUU94RGMABAG86BBABCIJRBAFCaJHFQBSGMMAF9FQBEXGXGX9DBBB8/9DBBB+/ABCIJHG8uFB+yAB8uFBHE+yHI+L+TABCGJHL8uFBHK+yHO+L+THN9DBBBB9gHVyAN9DB/+g6ANAN+U9DBBBBANAVyHcAc+MHMAECa3yAI+SHIAI+UAcAMAKCa3yAO+SHcAc+U+S+S+R+VHO+U+SHN+L9DBBB9P9d9FQBAN+oRESFMCUUUU94REMAGAE87FBGXGX9DBBB8/9DBBB+/Ac9DBBBB9gyAcAO+U+SHN+L9DBBB9P9d9FQBAN+oRGSFMCUUUU94RGMALAG87FBGXGX9DBBB8/9DBBB+/AI9DBBBB9gyAIAO+U+SHN+L9DBBB9P9d9FQBAN+oRGSFMCUUUU94RGMABAG87FBABCNJRBAFCaJHFQBMMM/SEIEaE99EaF99GXAF9FQBCBREABRIEXGXGX9D/zI818/AICKJ8uFBHLCEq+y+VHKAI8uFB+y+UHO9DB/+g6+U9DBBB8/9DBBB+/AO9DBBBB9gy+SHN+L9DBBB9P9d9FQBAN+oRVSFMCUUUU94RVMAICIJ8uFBRcAICGJ8uFBRMABALCFJCEZAEqCFWJAV87FBGXGXAKAM+y+UHN9DB/+g6+U9DBBB8/9DBBB+/AN9DBBBB9gy+SHS+L9DBBB9P9d9FQBAS+oRMSFMCUUUU94RMMABALCGJCEZAEqCFWJAM87FBGXGXAKAc+y+UHK9DB/+g6+U9DBBB8/9DBBB+/AK9DBBBB9gy+SHS+L9DBBB9P9d9FQBAS+oRcSFMCUUUU94RcMABALCaJCEZAEqCFWJAc87FBGXGX9DBBU8/AOAO+U+TANAN+U+TAKAK+U+THO9DBBBBAO9DBBBB9gy+R9DB/+g6+U9DBBB8/+SHO+L9DBBB9P9d9FQBAO+oRcSFMCUUUU94RcMABALCEZAEqCFWJAc87FBAICNJRIAECIJREAFCaJHFQBMMM9JBGXAGCGrAF9sHF9FQBEXABAB8oGBHGCNWCN91+yAGCi91CnWCUUU/8EJ+++U84GBABCIJRBAFCaJHFQBMMM9TFEaCBCB8oGUkUUBHFABCEJC98ZJHBjGUkUUBGXGXAB8/BCTWHGuQBCaREABAGlCggEJCTrXBCa6QFMAFREMAEM/lFFFaGXGXAFABqCEZ9FQBABRESFMGXGXAGCT9PQBABRESFMABREEXAEAF8oGBjGBAECIJAFCIJ8oGBjGBAECNJAFCNJ8oGBjGBAECSJAFCSJ8oGBjGBAECTJREAFCTJRFAGC9wJHGCb9LQBMMAGCI9JQBEXAEAF8oGBjGBAFCIJRFAECIJREAGC98JHGCE9LQBMMGXAG9FQBEXAEAF2BB86BBAECFJREAFCFJRFAGCaJHGQBMMABMoFFGaGXGXABCEZ9FQBABRESFMAFCgFZC+BwsN9sRIGXGXAGCT9PQBABRESFMABREEXAEAIjGBAECSJAIjGBAECNJAIjGBAECIJAIjGBAECTJREAGC9wJHGCb9LQBMMAGCI9JQBEXAEAIjGBAECIJREAGC98JHGCE9LQBMMGXAG9FQBEXAEAF86BBAECFJREAGCaJHGQBMMABMMMFBCUNMIT9kBB",E6t="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",B6t=new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,3,2,0,0,5,3,1,0,1,12,1,0,10,22,2,12,0,65,0,65,0,65,0,252,10,0,0,11,7,0,65,0,253,15,26,11]),I6t=new Uint8Array([32,0,65,253,3,1,2,34,4,106,6,5,11,8,7,20,13,33,12,16,128,9,116,64,19,113,127,15,10,21,22,14,255,66,24,54,136,107,18,23,192,26,114,118,132,17,77,101,130,144,27,87,131,44,45,74,156,154,70,167]),S6t={0:"",1:"meshopt_decodeFilterOct",2:"meshopt_decodeFilterQuat",3:"meshopt_decodeFilterExp",NONE:"",OCTAHEDRAL:"meshopt_decodeFilterOct",QUATERNION:"meshopt_decodeFilterQuat",EXPONENTIAL:"meshopt_decodeFilterExp"},P6t={0:"meshopt_decodeVertexBuffer",1:"meshopt_decodeIndexBuffer",2:"meshopt_decodeIndexSequence",ATTRIBUTES:"meshopt_decodeVertexBuffer",TRIANGLES:"meshopt_decodeIndexBuffer",INDICES:"meshopt_decodeIndexSequence"};async function T6t(i,e,t,n,o,r="NONE"){const s=await k6t();D6t(s,s.exports[P6t[o]],i,e,t,n,s.exports[S6t[r||"NONE"]])}let DT;async function k6t(){return DT||(DT=R6t()),DT}async function R6t(){let i=M6t;WebAssembly.validate(B6t)&&(i=E6t,console.log("Warning: meshopt_decoder is using experimental SIMD support"));const e=await WebAssembly.instantiate(_6t(i),{});return await e.instance.exports.__wasm_call_ctors(),e.instance}function _6t(i){const e=new Uint8Array(i.length);for(let n=0;n<i.length;++n){const o=i.charCodeAt(n);e[n]=o>96?o-71:o>64?o-65:o>47?o+4:o>46?63:62}let t=0;for(let n=0;n<i.length;++n)e[t++]=e[n]<60?I6t[e[n]]:(e[n]-60)*64+e[++n];return e.buffer.slice(0,t)}function D6t(i,e,t,n,o,r,s){const a=i.exports.sbrk,l=n+3&-4,c=a(l*o),u=a(r.length),d=new Uint8Array(i.exports.memory.buffer);d.set(r,u);const h=e(c,n,o,u,r.length);if(h===0&&s&&s(c,l,o),t.set(d.subarray(c,c+n*o)),a(c-a(0)),h!==0)throw new Error(`Malformed buffer data: ${h}`)}const t9="EXT_meshopt_compression",L6t=t9;async function F6t(i,e){const t=new _o(i);if(!e?.gltf?.decompressMeshes||!e.gltf?.loadBuffers)return;const n=[];for(const o of i.json.bufferViews||[])n.push(O6t(t,o));await Promise.all(n),t.removeExtension(t9)}async function O6t(i,e){const t=i.getObjectExtension(e,t9);if(t){const{byteOffset:n=0,byteLength:o=0,byteStride:r,count:s,mode:a,filter:l="NONE",buffer:c}=t,u=i.gltf.buffers[c],d=new Uint8Array(u.arrayBuffer,u.byteOffset+n,o),h=new Uint8Array(i.gltf.buffers[e.buffer].arrayBuffer,e.byteOffset,e.byteLength);await T6t(h,s,r,d,a,l),i.removeObjectExtension(e,t9)}}const N6t=Object.freeze(Object.defineProperty({__proto__:null,decode:F6t,name:L6t},Symbol.toStringTag,{value:"Module"})),e1="EXT_texture_webp",U6t=e1;function V6t(i,e){const t=new _o(i);if(!Lyt("image/webp")){if(t.getRequiredExtensions().includes(e1))throw new Error(`gltf: Required extension ${e1} not supported by browser`);return}const{json:n}=t;for(const o of n.textures||[]){const r=t.getObjectExtension(o,e1);r&&(o.source=r.source),t.removeObjectExtension(o,e1)}t.removeExtension(e1)}const H6t=Object.freeze(Object.defineProperty({__proto__:null,name:U6t,preprocess:V6t},Symbol.toStringTag,{value:"Module"})),i9="KHR_texture_basisu",z6t=i9;function j6t(i,e){const t=new _o(i),{json:n}=t;for(const o of n.textures||[]){const r=t.getObjectExtension(o,i9);r&&(o.source=r.source,t.removeObjectExtension(o,i9))}t.removeExtension(i9)}const G6t=Object.freeze(Object.defineProperty({__proto__:null,name:z6t,preprocess:j6t},Symbol.toStringTag,{value:"Module"})),Q6t={dataType:null,batchType:null,name:"Draco",id:"draco",module:"draco",version:"4.3.3",worker:!0,extensions:["drc"],mimeTypes:["application/octet-stream"],binary:!0,tests:["DRACO"],options:{draco:{decoderType:typeof WebAssembly=="object"?"wasm":"js",libraryPath:"libs/",extraAttributes:{},attributeNameEntry:void 0}}};function q6t(i,e,t){const n=Fte(e.metadata),o=[],r=K6t(e.attributes);for(const s in i){const a=i[s],l=Lte(s,a,r[s]);o.push(l)}if(t){const s=Lte("indices",t);o.push(s)}return{fields:o,metadata:n}}function K6t(i){const e={};for(const t in i){const n=i[t];e[n.name||"undefined"]=n}return e}function Lte(i,e,t){const n=t?Fte(t.metadata):void 0;return oyt(i,e,n)}function Fte(i){Object.entries(i);const e={};for(const t in i)e[`${t}.string`]=JSON.stringify(i[t]);return e}const Ote={POSITION:"POSITION",NORMAL:"NORMAL",COLOR:"COLOR_0",TEX_COORD:"TEXCOORD_0"},J6t={1:Int8Array,2:Uint8Array,3:Int16Array,4:Uint16Array,5:Int32Array,6:Uint32Array,9:Float32Array},W6t=4;class Z6t{draco;decoder;metadataQuerier;constructor(e){this.draco=e,this.decoder=new this.draco.Decoder,this.metadataQuerier=new this.draco.MetadataQuerier}destroy(){this.draco.destroy(this.decoder),this.draco.destroy(this.metadataQuerier)}parseSync(e,t={}){const n=new this.draco.DecoderBuffer;n.Init(new Int8Array(e),e.byteLength),this._disableAttributeTransforms(t);const o=this.decoder.GetEncodedGeometryType(n),r=o===this.draco.TRIANGULAR_MESH?new this.draco.Mesh:new this.draco.PointCloud;try{let s;switch(o){case this.draco.TRIANGULAR_MESH:s=this.decoder.DecodeBufferToMesh(n,r);break;case this.draco.POINT_CLOUD:s=this.decoder.DecodeBufferToPointCloud(n,r);break;default:throw new Error("DRACO: Unknown geometry type.")}if(!s.ok()||!r.ptr){const h=`DRACO decompression failed: ${s.error_msg()}`;throw new Error(h)}const a=this._getDracoLoaderData(r,o,t),l=this._getMeshData(r,a,t),c=nyt(l.attributes),u=q6t(l.attributes,a,l.indices);return{loader:"draco",loaderData:a,header:{vertexCount:r.num_points(),boundingBox:c},...l,schema:u}}finally{this.draco.destroy(n),r&&this.draco.destroy(r)}}_getDracoLoaderData(e,t,n){const o=this._getTopLevelMetadata(e),r=this._getDracoAttributes(e,n);return{geometry_type:t,num_attributes:e.num_attributes(),num_points:e.num_points(),num_faces:e instanceof this.draco.Mesh?e.num_faces():0,metadata:o,attributes:r}}_getDracoAttributes(e,t){const n={};for(let o=0;o<e.num_attributes();o++){const r=this.decoder.GetAttribute(e,o),s=this._getAttributeMetadata(e,o);n[r.unique_id()]={unique_id:r.unique_id(),attribute_type:r.attribute_type(),data_type:r.data_type(),num_components:r.num_components(),byte_offset:r.byte_offset(),byte_stride:r.byte_stride(),normalized:r.normalized(),attribute_index:o,metadata:s};const a=this._getQuantizationTransform(r,t);a&&(n[r.unique_id()].quantization_transform=a);const l=this._getOctahedronTransform(r,t);l&&(n[r.unique_id()].octahedron_transform=l)}return n}_getMeshData(e,t,n){const o=this._getMeshAttributes(t,e,n);if(!o.POSITION)throw new Error("DRACO: No position attribute found.");return e instanceof this.draco.Mesh?n.topology==="triangle-strip"?{topology:"triangle-strip",mode:4,attributes:o,indices:{value:this._getTriangleStripIndices(e),size:1}}:{topology:"triangle-list",mode:5,attributes:o,indices:{value:this._getTriangleListIndices(e),size:1}}:{topology:"point-list",mode:0,attributes:o}}_getMeshAttributes(e,t,n){const o={};for(const r of Object.values(e.attributes)){const s=this._deduceAttributeName(r,n);r.name=s;const a=this._getAttributeValues(t,r);if(a){const{value:l,size:c}=a;o[s]={value:l,size:c,byteOffset:r.byte_offset,byteStride:r.byte_stride,normalized:r.normalized}}}return o}_getTriangleListIndices(e){const n=e.num_faces()*3,o=n*W6t,r=this.draco._malloc(o);try{return this.decoder.GetTrianglesUInt32Array(e,o,r),new Uint32Array(this.draco.HEAPF32.buffer,r,n).slice()}finally{this.draco._free(r)}}_getTriangleStripIndices(e){const t=new this.draco.DracoInt32Array;try{return this.decoder.GetTriangleStripsFromMesh(e,t),$6t(t)}finally{this.draco.destroy(t)}}_getAttributeValues(e,t){const n=J6t[t.data_type];if(!n)return console.warn(`DRACO: Unsupported attribute type ${t.data_type}`),null;const o=t.num_components,s=e.num_points()*o,a=s*n.BYTES_PER_ELEMENT,l=Y6t(this.draco,n);let c;const u=this.draco._malloc(a);try{const d=this.decoder.GetAttribute(e,t.attribute_index);this.decoder.GetAttributeDataArrayForAllPoints(e,d,l,a,u),c=new n(this.draco.HEAPF32.buffer,u,s).slice()}finally{this.draco._free(u)}return{value:c,size:o}}_deduceAttributeName(e,t){const n=e.unique_id;for(const[s,a]of Object.entries(t.extraAttributes||{}))if(a===n)return s;const o=e.attribute_type;for(const s in Ote)if(this.draco[s]===o)return Ote[s];const r=t.attributeNameEntry||"name";return e.metadata[r]?e.metadata[r].string:`CUSTOM_ATTRIBUTE_${n}`}_getTopLevelMetadata(e){const t=this.decoder.GetMetadata(e);return this._getDracoMetadata(t)}_getAttributeMetadata(e,t){const n=this.decoder.GetAttributeMetadata(e,t);return this._getDracoMetadata(n)}_getDracoMetadata(e){if(!e||!e.ptr)return{};const t={},n=this.metadataQuerier.NumEntries(e);for(let o=0;o<n;o++){const r=this.metadataQuerier.GetEntryName(e,o);t[r]=this._getDracoMetadataField(e,r)}return t}_getDracoMetadataField(e,t){const n=new this.draco.DracoInt32Array;try{this.metadataQuerier.GetIntEntryArray(e,t,n);const o=X6t(n);return{int:this.metadataQuerier.GetIntEntry(e,t),string:this.metadataQuerier.GetStringEntry(e,t),double:this.metadataQuerier.GetDoubleEntry(e,t),intArray:o}}finally{this.draco.destroy(n)}}_disableAttributeTransforms(e){const{quantizedAttributes:t=[],octahedronAttributes:n=[]}=e,o=[...t,...n];for(const r of o)this.decoder.SkipAttributeTransform(this.draco[r])}_getQuantizationTransform(e,t){const{quantizedAttributes:n=[]}=t,o=e.attribute_type();if(n.map(s=>this.decoder[s]).includes(o)){const s=new this.draco.AttributeQuantizationTransform;try{if(s.InitFromAttribute(e))return{quantization_bits:s.quantization_bits(),range:s.range(),min_values:new Float32Array([1,2,3]).map(a=>s.min_value(a))}}finally{this.draco.destroy(s)}}return null}_getOctahedronTransform(e,t){const{octahedronAttributes:n=[]}=t,o=e.attribute_type();if(n.map(s=>this.decoder[s]).includes(o)){const s=new this.draco.AttributeQuantizationTransform;try{if(s.InitFromAttribute(e))return{quantization_bits:s.quantization_bits()}}finally{this.draco.destroy(s)}}return null}}function Y6t(i,e){switch(e){case Float32Array:return i.DT_FLOAT32;case Int8Array:return i.DT_INT8;case Int16Array:return i.DT_INT16;case Int32Array:return i.DT_INT32;case Uint8Array:return i.DT_UINT8;case Uint16Array:return i.DT_UINT16;case Uint32Array:return i.DT_UINT32;default:return i.DT_INVALID}}function X6t(i){const e=i.size(),t=new Int32Array(e);for(let n=0;n<e;n++)t[n]=i.GetValue(n);return t}function $6t(i){const e=i.size(),t=new Int32Array(e);for(let n=0;n<e;n++)t[n]=i.GetValue(n);return t}const e8t="1.5.6",t8t="1.4.1",LT=`https://www.gstatic.com/draco/versioned/decoders/${e8t}`,ir={DECODER:"draco_wasm_wrapper.js",DECODER_WASM:"draco_decoder.wasm",FALLBACK_DECODER:"draco_decoder.js",ENCODER:"draco_encoder.js"},FT={[ir.DECODER]:`${LT}/${ir.DECODER}`,[ir.DECODER_WASM]:`${LT}/${ir.DECODER_WASM}`,[ir.FALLBACK_DECODER]:`${LT}/${ir.FALLBACK_DECODER}`,[ir.ENCODER]:`https://raw.githubusercontent.com/google/draco/${t8t}/javascript/${ir.ENCODER}`};let OT;async function i8t(i){const e=i.modules||{};return e.draco3d?OT||=e.draco3d.createDecoderModule({}).then(t=>({draco:t})):OT||=n8t(i),await OT}async function n8t(i){let e,t;return(i.draco&&i.draco.decoderType)==="js"?e=await Mh(FT[ir.FALLBACK_DECODER],"draco",i,ir.FALLBACK_DECODER):[e,t]=await Promise.all([await Mh(FT[ir.DECODER],"draco",i,ir.DECODER),await Mh(FT[ir.DECODER_WASM],"draco",i,ir.DECODER_WASM)]),e=e||globalThis.DracoDecoderModule,await o8t(e,t)}function o8t(i,e){const t={};return e&&(t.wasmBinary=e),new Promise(n=>{i({...t,onModuleLoaded:o=>n({draco:o})})})}const s8t={...Q6t,parse:r8t};async function r8t(i,e){const{draco:t}=await i8t(e),n=new Z6t(t);try{return n.parseSync(i,e?.draco)}finally{n.destroy()}}function a8t(i){const e={};for(const t in i){const n=i[t];if(t!=="indices"){const o=Nte(n);e[t]=o}}return e}function Nte(i){const{buffer:e,size:t,count:n}=l8t(i);return{value:e,size:t,byteOffset:0,count:n,type:gte(t),componentType:W7(e)}}function l8t(i){let e=i,t=1,n=0;return i&&i.value&&(e=i.value,t=i.size||1),e&&(ArrayBuffer.isView(e)||(e=c8t(e,Float32Array)),n=e.length/t),{buffer:e,size:t,count:n}}function c8t(i,e,t=!1){return i?Array.isArray(i)?new e(i):t&&!(i instanceof e)?new e(i):i:null}const zu="KHR_draco_mesh_compression",u8t=zu;function d8t(i,e,t){const n=new _o(i);for(const o of Ute(n))n.getObjectExtension(o,zu)}async function h8t(i,e,t){if(!e?.gltf?.decompressMeshes)return;const n=new _o(i),o=[];for(const r of Ute(n))n.getObjectExtension(r,zu)&&o.push(f8t(n,r,e,t));await Promise.all(o),n.removeExtension(zu)}function p8t(i,e={}){const t=new _o(i);for(const n of t.json.meshes||[])A8t(n),t.addRequiredExtension(zu)}async function f8t(i,e,t,n){const o=i.getObjectExtension(e,zu);if(!o)return;const r=i.getTypedArrayForBufferView(o.bufferView),s=Nee(r.buffer,r.byteOffset),a={...t};delete a["3d-tiles"];const l=await Cee(s,s8t,a,n),c=a8t(l.attributes);for(const[u,d]of Object.entries(c))if(u in e.attributes){const h=e.attributes[u],p=i.getAccessor(h);p?.min&&p?.max&&(d.min=p.min,d.max=p.max)}e.attributes=c,l.indices&&(e.indices=Nte(l.indices)),i.removeObjectExtension(e,zu),m8t(e)}function A8t(i,e,t=4,n,o){if(!n.DracoWriter)throw new Error("options.gltf.DracoWriter not provided");const r=n.DracoWriter.encodeSync({attributes:i}),s=o?.parseSync?.({attributes:i}),a=n._addFauxAttributes(s.attributes),l=n.addBufferView(r);return{primitives:[{attributes:a,mode:t,extensions:{[zu]:{bufferView:l,attributes:a}}}]}}function m8t(i){if(!i.attributes&&Object.keys(i.attributes).length>0)throw new Error("glTF: Empty primitive detected: Draco decompression failure?")}function*Ute(i){for(const e of i.json.meshes||[])for(const t of e.primitives)yield t}const g8t=Object.freeze(Object.defineProperty({__proto__:null,decode:h8t,encode:p8t,name:u8t,preprocess:d8t},Symbol.toStringTag,{value:"Module"})),y8t={EPSILON:1e-12,debug:!1,precision:4,printTypes:!1,printDegrees:!1,printRowMajor:!0,_cartographicRadians:!1};globalThis.mathgl=globalThis.mathgl||{config:{...y8t}};const Wr=globalThis.mathgl.config;function v8t(i,{precision:e=Wr.precision}={}){return i=w8t(i),`${parseFloat(i.toPrecision(e))}`}function n9(i){return Array.isArray(i)||ArrayBuffer.isView(i)&&!(i instanceof DataView)}function Vte(i,e,t){const n=Wr.EPSILON;try{if(i===e)return!0;if(n9(i)&&n9(e)){if(i.length!==e.length)return!1;for(let o=0;o<i.length;++o)if(!Vte(i[o],e[o]))return!1;return!0}return i&&i.equals?i.equals(e):e&&e.equals?e.equals(i):typeof i=="number"&&typeof e=="number"?Math.abs(i-e)<=Wr.EPSILON*Math.max(1,Math.abs(i),Math.abs(e)):!1}finally{Wr.EPSILON=n}}function w8t(i){return Math.round(i/Wr.EPSILON)*Wr.EPSILON}class Hte extends Array{clone(){return new this.constructor().copy(this)}fromArray(e,t=0){for(let n=0;n<this.ELEMENTS;++n)this[n]=e[n+t];return this.check()}toArray(e=[],t=0){for(let n=0;n<this.ELEMENTS;++n)e[t+n]=this[n];return e}toObject(e){return e}from(e){return Array.isArray(e)?this.copy(e):this.fromObject(e)}to(e){return e===this?this:n9(e)?this.toArray(e):this.toObject(e)}toTarget(e){return e?this.to(e):this}toFloat32Array(){return new Float32Array(this)}toString(){return this.formatString(Wr)}formatString(e){let t="";for(let n=0;n<this.ELEMENTS;++n)t+=(n>0?", ":"")+v8t(this[n],e);return`${e.printTypes?this.constructor.name:""}[${t}]`}equals(e){if(!e||this.length!==e.length)return!1;for(let t=0;t<this.ELEMENTS;++t)if(!Vte(this[t],e[t]))return!1;return!0}exactEquals(e){if(!e||this.length!==e.length)return!1;for(let t=0;t<this.ELEMENTS;++t)if(this[t]!==e[t])return!1;return!0}negate(){for(let e=0;e<this.ELEMENTS;++e)this[e]=-this[e];return this.check()}lerp(e,t,n){if(n===void 0)return this.lerp(this,e,t);for(let o=0;o<this.ELEMENTS;++o){const r=e[o],s=typeof t=="number"?t:t[o];this[o]=r+n*(s-r)}return this.check()}min(e){for(let t=0;t<this.ELEMENTS;++t)this[t]=Math.min(e[t],this[t]);return this.check()}max(e){for(let t=0;t<this.ELEMENTS;++t)this[t]=Math.max(e[t],this[t]);return this.check()}clamp(e,t){for(let n=0;n<this.ELEMENTS;++n)this[n]=Math.min(Math.max(this[n],e[n]),t[n]);return this.check()}add(...e){for(const t of e)for(let n=0;n<this.ELEMENTS;++n)this[n]+=t[n];return this.check()}subtract(...e){for(const t of e)for(let n=0;n<this.ELEMENTS;++n)this[n]-=t[n];return this.check()}scale(e){if(typeof e=="number")for(let t=0;t<this.ELEMENTS;++t)this[t]*=e;else for(let t=0;t<this.ELEMENTS&&t<e.length;++t)this[t]*=e[t];return this.check()}multiplyByScalar(e){for(let t=0;t<this.ELEMENTS;++t)this[t]*=e;return this.check()}check(){if(Wr.debug&&!this.validate())throw new Error(`math.gl: ${this.constructor.name} some fields set to invalid numbers'`);return this}validate(){let e=this.length===this.ELEMENTS;for(let t=0;t<this.ELEMENTS;++t)e=e&&Number.isFinite(this[t]);return e}sub(e){return this.subtract(e)}setScalar(e){for(let t=0;t<this.ELEMENTS;++t)this[t]=e;return this.check()}addScalar(e){for(let t=0;t<this.ELEMENTS;++t)this[t]+=e;return this.check()}subScalar(e){return this.addScalar(-e)}multiplyScalar(e){for(let t=0;t<this.ELEMENTS;++t)this[t]*=e;return this.check()}divideScalar(e){return this.multiplyByScalar(1/e)}clampScalar(e,t){for(let n=0;n<this.ELEMENTS;++n)this[n]=Math.min(Math.max(this[n],e),t);return this.check()}get elements(){return this}}function C8t(i,e){if(i.length!==e)return!1;for(let t=0;t<i.length;++t)if(!Number.isFinite(i[t]))return!1;return!0}function Mr(i){if(!Number.isFinite(i))throw new Error(`Invalid number ${JSON.stringify(i)}`);return i}function b8t(i,e,t=""){if(Wr.debug&&!C8t(i,e))throw new Error(`math.gl: ${t} some fields set to invalid numbers'`);return i}function zte(i,e){if(!i)throw new Error(`math.gl assertion ${e}`)}class x8t extends Hte{get x(){return this[0]}set x(e){this[0]=Mr(e)}get y(){return this[1]}set y(e){this[1]=Mr(e)}len(){return Math.sqrt(this.lengthSquared())}magnitude(){return this.len()}lengthSquared(){let e=0;for(let t=0;t<this.ELEMENTS;++t)e+=this[t]*this[t];return e}magnitudeSquared(){return this.lengthSquared()}distance(e){return Math.sqrt(this.distanceSquared(e))}distanceSquared(e){let t=0;for(let n=0;n<this.ELEMENTS;++n){const o=this[n]-e[n];t+=o*o}return Mr(t)}dot(e){let t=0;for(let n=0;n<this.ELEMENTS;++n)t+=this[n]*e[n];return Mr(t)}normalize(){const e=this.magnitude();if(e!==0)for(let t=0;t<this.ELEMENTS;++t)this[t]/=e;return this.check()}multiply(...e){for(const t of e)for(let n=0;n<this.ELEMENTS;++n)this[n]*=t[n];return this.check()}divide(...e){for(const t of e)for(let n=0;n<this.ELEMENTS;++n)this[n]/=t[n];return this.check()}lengthSq(){return this.lengthSquared()}distanceTo(e){return this.distance(e)}distanceToSquared(e){return this.distanceSquared(e)}getComponent(e){return zte(e>=0&&e<this.ELEMENTS,"index is out of range"),Mr(this[e])}setComponent(e,t){return zte(e>=0&&e<this.ELEMENTS,"index is out of range"),this[e]=t,this.check()}addVectors(e,t){return this.copy(e).add(t)}subVectors(e,t){return this.copy(e).subtract(t)}multiplyVectors(e,t){return this.copy(e).multiply(t)}addScaledVector(e,t){return this.add(new this.constructor(e).multiplyScalar(t))}}let o9=typeof Float32Array<"u"?Float32Array:Array;function M8t(){const i=new o9(2);return o9!=Float32Array&&(i[0]=0,i[1]=0),i}function E8t(i,e,t){const n=e[0],o=e[1];return i[0]=t[0]*n+t[3]*o+t[6],i[1]=t[1]*n+t[4]*o+t[7],i}(function(){const i=M8t();return function(e,t,n,o,r,s){let a,l;for(t||(t=2),n||(n=0),o?l=Math.min(o*t+n,e.length):l=e.length,a=n;a<l;a+=t)i[0]=e[a],i[1]=e[a+1],r(i,i,s),e[a]=i[0],e[a+1]=i[1];return e}})();function B8t(i,e,t){const n=e[0],o=e[1],r=e[2],s=t[3]*n+t[7]*o+t[11]*r||1;return i[0]=(t[0]*n+t[4]*o+t[8]*r)/s,i[1]=(t[1]*n+t[5]*o+t[9]*r)/s,i[2]=(t[2]*n+t[6]*o+t[10]*r)/s,i}function I8t(i,e,t){const n=e[0],o=e[1];return i[0]=t[0]*n+t[2]*o,i[1]=t[1]*n+t[3]*o,i[2]=e[2],i}function S8t(i,e,t){const n=e[0],o=e[1],r=e[2];return i[0]=t[0]*n+t[3]*o+t[6]*r,i[1]=t[1]*n+t[4]*o+t[7]*r,i[2]=t[2]*n+t[5]*o+t[8]*r,i[3]=e[3],i}function P8t(){const i=new o9(3);return o9!=Float32Array&&(i[0]=0,i[1]=0,i[2]=0),i}function T8t(i,e){return i[0]*e[0]+i[1]*e[1]+i[2]*e[2]}function k8t(i,e,t){const n=e[0],o=e[1],r=e[2],s=t[0],a=t[1],l=t[2];return i[0]=o*l-r*a,i[1]=r*s-n*l,i[2]=n*a-o*s,i}function R8t(i,e,t){const n=e[0],o=e[1],r=e[2];let s=t[3]*n+t[7]*o+t[11]*r+t[15];return s=s||1,i[0]=(t[0]*n+t[4]*o+t[8]*r+t[12])/s,i[1]=(t[1]*n+t[5]*o+t[9]*r+t[13])/s,i[2]=(t[2]*n+t[6]*o+t[10]*r+t[14])/s,i}function jte(i,e,t){const n=e[0],o=e[1],r=e[2];return i[0]=n*t[0]+o*t[3]+r*t[6],i[1]=n*t[1]+o*t[4]+r*t[7],i[2]=n*t[2]+o*t[5]+r*t[8],i}function _8t(i,e,t){const n=t[0],o=t[1],r=t[2],s=t[3],a=e[0],l=e[1],c=e[2];let u=o*c-r*l,d=r*a-n*c,h=n*l-o*a,p=o*h-r*d,A=r*u-n*h,f=n*d-o*u;const g=s*2;return u*=g,d*=g,h*=g,p*=2,A*=2,f*=2,i[0]=a+u+p,i[1]=l+d+A,i[2]=c+h+f,i}function D8t(i,e,t,n){const o=[],r=[];return o[0]=e[0]-t[0],o[1]=e[1]-t[1],o[2]=e[2]-t[2],r[0]=o[0],r[1]=o[1]*Math.cos(n)-o[2]*Math.sin(n),r[2]=o[1]*Math.sin(n)+o[2]*Math.cos(n),i[0]=r[0]+t[0],i[1]=r[1]+t[1],i[2]=r[2]+t[2],i}function L8t(i,e,t,n){const o=[],r=[];return o[0]=e[0]-t[0],o[1]=e[1]-t[1],o[2]=e[2]-t[2],r[0]=o[2]*Math.sin(n)+o[0]*Math.cos(n),r[1]=o[1],r[2]=o[2]*Math.cos(n)-o[0]*Math.sin(n),i[0]=r[0]+t[0],i[1]=r[1]+t[1],i[2]=r[2]+t[2],i}function F8t(i,e,t,n){const o=[],r=[];return o[0]=e[0]-t[0],o[1]=e[1]-t[1],o[2]=e[2]-t[2],r[0]=o[0]*Math.cos(n)-o[1]*Math.sin(n),r[1]=o[0]*Math.sin(n)+o[1]*Math.cos(n),r[2]=o[2],i[0]=r[0]+t[0],i[1]=r[1]+t[1],i[2]=r[2]+t[2],i}function O8t(i,e){const t=i[0],n=i[1],o=i[2],r=e[0],s=e[1],a=e[2],l=Math.sqrt((t*t+n*n+o*o)*(r*r+s*s+a*a)),c=l&&T8t(i,e)/l;return Math.acos(Math.min(Math.max(c,-1),1))}(function(){const i=P8t();return function(e,t,n,o,r,s){let a,l;for(t||(t=3),n||(n=0),o?l=Math.min(o*t+n,e.length):l=e.length,a=n;a<l;a+=t)i[0]=e[a],i[1]=e[a+1],i[2]=e[a+2],r(i,i,s),e[a]=i[0],e[a+1]=i[1],e[a+2]=i[2];return e}})();const NT=[0,0,0];let s9,N8t=class cme extends x8t{static get ZERO(){return s9||(s9=new cme(0,0,0),Object.freeze(s9)),s9}constructor(e=0,t=0,n=0){super(-0,-0,-0),arguments.length===1&&n9(e)?this.copy(e):(Wr.debug&&(Mr(e),Mr(t),Mr(n)),this[0]=e,this[1]=t,this[2]=n)}set(e,t,n){return this[0]=e,this[1]=t,this[2]=n,this.check()}copy(e){return this[0]=e[0],this[1]=e[1],this[2]=e[2],this.check()}fromObject(e){return Wr.debug&&(Mr(e.x),Mr(e.y),Mr(e.z)),this[0]=e.x,this[1]=e.y,this[2]=e.z,this.check()}toObject(e){return e.x=this[0],e.y=this[1],e.z=this[2],e}get ELEMENTS(){return 3}get z(){return this[2]}set z(e){this[2]=Mr(e)}angle(e){return O8t(this,e)}cross(e){return k8t(this,this,e),this.check()}rotateX({radians:e,origin:t=NT}){return D8t(this,this,t,e),this.check()}rotateY({radians:e,origin:t=NT}){return L8t(this,this,t,e),this.check()}rotateZ({radians:e,origin:t=NT}){return F8t(this,this,t,e),this.check()}transform(e){return this.transformAsPoint(e)}transformAsPoint(e){return R8t(this,this,e),this.check()}transformAsVector(e){return B8t(this,this,e),this.check()}transformByMatrix3(e){return jte(this,this,e),this.check()}transformByMatrix2(e){return I8t(this,this,e),this.check()}transformByQuaternion(e){return _8t(this,this,e),this.check()}};class U8t extends Hte{toString(){let e="[";if(Wr.printRowMajor){e+="row-major:";for(let t=0;t<this.RANK;++t)for(let n=0;n<this.RANK;++n)e+=` ${this[n*this.RANK+t]}`}else{e+="column-major:";for(let t=0;t<this.ELEMENTS;++t)e+=` ${this[t]}`}return e+="]",e}getElementIndex(e,t){return t*this.RANK+e}getElement(e,t){return this[t*this.RANK+e]}setElement(e,t,n){return this[t*this.RANK+e]=Mr(n),this}getColumn(e,t=new Array(this.RANK).fill(-0)){const n=e*this.RANK;for(let o=0;o<this.RANK;++o)t[o]=this[n+o];return t}setColumn(e,t){const n=e*this.RANK;for(let o=0;o<this.RANK;++o)this[n+o]=t[o];return this}}function V8t(i,e){if(i===e){const t=e[1],n=e[2],o=e[5];i[1]=e[3],i[2]=e[6],i[3]=t,i[5]=e[7],i[6]=n,i[7]=o}else i[0]=e[0],i[1]=e[3],i[2]=e[6],i[3]=e[1],i[4]=e[4],i[5]=e[7],i[6]=e[2],i[7]=e[5],i[8]=e[8];return i}function H8t(i,e){const t=e[0],n=e[1],o=e[2],r=e[3],s=e[4],a=e[5],l=e[6],c=e[7],u=e[8],d=u*s-a*c,h=-u*r+a*l,p=c*r-s*l;let A=t*d+n*h+o*p;return A?(A=1/A,i[0]=d*A,i[1]=(-u*n+o*c)*A,i[2]=(a*n-o*s)*A,i[3]=h*A,i[4]=(u*t-o*l)*A,i[5]=(-a*t+o*r)*A,i[6]=p*A,i[7]=(-c*t+n*l)*A,i[8]=(s*t-n*r)*A,i):null}function z8t(i){const e=i[0],t=i[1],n=i[2],o=i[3],r=i[4],s=i[5],a=i[6],l=i[7],c=i[8];return e*(c*r-s*l)+t*(-c*o+s*a)+n*(l*o-r*a)}function Gte(i,e,t){const n=e[0],o=e[1],r=e[2],s=e[3],a=e[4],l=e[5],c=e[6],u=e[7],d=e[8],h=t[0],p=t[1],A=t[2],f=t[3],g=t[4],m=t[5],v=t[6],y=t[7],w=t[8];return i[0]=h*n+p*s+A*c,i[1]=h*o+p*a+A*u,i[2]=h*r+p*l+A*d,i[3]=f*n+g*s+m*c,i[4]=f*o+g*a+m*u,i[5]=f*r+g*l+m*d,i[6]=v*n+y*s+w*c,i[7]=v*o+y*a+w*u,i[8]=v*r+y*l+w*d,i}function j8t(i,e,t){const n=e[0],o=e[1],r=e[2],s=e[3],a=e[4],l=e[5],c=e[6],u=e[7],d=e[8],h=t[0],p=t[1];return i[0]=n,i[1]=o,i[2]=r,i[3]=s,i[4]=a,i[5]=l,i[6]=h*n+p*s+c,i[7]=h*o+p*a+u,i[8]=h*r+p*l+d,i}function G8t(i,e,t){const n=e[0],o=e[1],r=e[2],s=e[3],a=e[4],l=e[5],c=e[6],u=e[7],d=e[8],h=Math.sin(t),p=Math.cos(t);return i[0]=p*n+h*s,i[1]=p*o+h*a,i[2]=p*r+h*l,i[3]=p*s-h*n,i[4]=p*a-h*o,i[5]=p*l-h*r,i[6]=c,i[7]=u,i[8]=d,i}function Qte(i,e,t){const n=t[0],o=t[1];return i[0]=n*e[0],i[1]=n*e[1],i[2]=n*e[2],i[3]=o*e[3],i[4]=o*e[4],i[5]=o*e[5],i[6]=e[6],i[7]=e[7],i[8]=e[8],i}function Q8t(i,e){const t=e[0],n=e[1],o=e[2],r=e[3],s=t+t,a=n+n,l=o+o,c=t*s,u=n*s,d=n*a,h=o*s,p=o*a,A=o*l,f=r*s,g=r*a,m=r*l;return i[0]=1-d-A,i[3]=u-m,i[6]=h+g,i[1]=u+m,i[4]=1-c-A,i[7]=p-f,i[2]=h-g,i[5]=p+f,i[8]=1-c-d,i}var UT;(function(i){i[i.COL0ROW0=0]="COL0ROW0",i[i.COL0ROW1=1]="COL0ROW1",i[i.COL0ROW2=2]="COL0ROW2",i[i.COL1ROW0=3]="COL1ROW0",i[i.COL1ROW1=4]="COL1ROW1",i[i.COL1ROW2=5]="COL1ROW2",i[i.COL2ROW0=6]="COL2ROW0",i[i.COL2ROW1=7]="COL2ROW1",i[i.COL2ROW2=8]="COL2ROW2"})(UT||(UT={}));const q8t=Object.freeze([1,0,0,0,1,0,0,0,1]);let Q4=class extends U8t{static get IDENTITY(){return J8t()}static get ZERO(){return K8t()}get ELEMENTS(){return 9}get RANK(){return 3}get INDICES(){return UT}constructor(e,...t){super(-0,-0,-0,-0,-0,-0,-0,-0,-0),arguments.length===1&&Array.isArray(e)?this.copy(e):t.length>0?this.copy([e,...t]):this.identity()}copy(e){return this[0]=e[0],this[1]=e[1],this[2]=e[2],this[3]=e[3],this[4]=e[4],this[5]=e[5],this[6]=e[6],this[7]=e[7],this[8]=e[8],this.check()}identity(){return this.copy(q8t)}fromObject(e){return this.check()}fromQuaternion(e){return Q8t(this,e),this.check()}set(e,t,n,o,r,s,a,l,c){return this[0]=e,this[1]=t,this[2]=n,this[3]=o,this[4]=r,this[5]=s,this[6]=a,this[7]=l,this[8]=c,this.check()}setRowMajor(e,t,n,o,r,s,a,l,c){return this[0]=e,this[1]=o,this[2]=a,this[3]=t,this[4]=r,this[5]=l,this[6]=n,this[7]=s,this[8]=c,this.check()}determinant(){return z8t(this)}transpose(){return V8t(this,this),this.check()}invert(){return H8t(this,this),this.check()}multiplyLeft(e){return Gte(this,e,this),this.check()}multiplyRight(e){return Gte(this,this,e),this.check()}rotate(e){return G8t(this,this,e),this.check()}scale(e){return Array.isArray(e)?Qte(this,this,e):Qte(this,this,[e,e]),this.check()}translate(e){return j8t(this,this,e),this.check()}transform(e,t){let n;switch(e.length){case 2:n=E8t(t||[-0,-0],e,this);break;case 3:n=jte(t||[-0,-0,-0],e,this);break;case 4:n=S8t(t||[-0,-0,-0,-0],e,this);break;default:throw new Error("Illegal vector")}return b8t(n,e.length),n}transformVector(e,t){return this.transform(e,t)}transformVector2(e,t){return this.transform(e,t)}transformVector3(e,t){return this.transform(e,t)}},r9,a9=null;function K8t(){return r9||(r9=new Q4([0,0,0,0,0,0,0,0,0]),Object.freeze(r9)),r9}function J8t(){return a9||(a9=new Q4,Object.freeze(a9)),a9}const l9="KHR_texture_transform",W8t=l9,c9=new N8t,Z8t=new Q4,Y8t=new Q4;async function X8t(i,e){if(!new _o(i).hasExtension(l9)||!e.gltf?.loadBuffers)return;const o=i.json.materials||[];for(let r=0;r<o.length;r++)$8t(r,i)}function $8t(i,e){const t=e.json.materials?.[i],n=[t?.pbrMetallicRoughness?.baseColorTexture,t?.emissiveTexture,t?.normalTexture,t?.occlusionTexture,t?.pbrMetallicRoughness?.metallicRoughnessTexture],o=[];for(const r of n)r&&r?.extensions?.[l9]&&ewt(e,i,r,o)}function ewt(i,e,t,n){const o=twt(t,n);if(!o)return;const r=i.json.meshes||[];for(const s of r)for(const a of s.primitives){const l=a.material;Number.isFinite(l)&&e===l&&iwt(i,a,o)}}function twt(i,e){const t=i.extensions?.[l9],{texCoord:n=0}=i,{texCoord:o=n}=t;if(!(e.findIndex(([s,a])=>s===n&&a===o)!==-1)){const s=swt(t);return n!==o&&(i.texCoord=o),e.push([n,o]),{originalTexCoord:n,texCoord:o,matrix:s}}return null}function iwt(i,e,t){const{originalTexCoord:n,texCoord:o,matrix:r}=t,s=e.attributes[`TEXCOORD_${n}`];if(Number.isFinite(s)){const a=i.json.accessors?.[s];if(a&&a.bufferView){const l=i.json.bufferViews?.[a.bufferView];if(l){const{arrayBuffer:c,byteOffset:u}=i.buffers[l.buffer],d=(u||0)+(a.byteOffset||0)+(l.byteOffset||0),{ArrayType:h,length:p}=MT(a,l),A=Ate[a.componentType],f=fte[a.type],g=l.byteStride||A*f,m=new Float32Array(p);for(let v=0;v<a.count;v++){const y=new h(c,d+v*g,2);c9.set(y[0],y[1],1),c9.transformByMatrix3(r),m.set([c9[0],c9[1]],v*f)}n===o?nwt(a,l,i.buffers,m):owt(o,a,e,i,m)}}}}function nwt(i,e,t,n){i.componentType=5126,t.push({arrayBuffer:n.buffer,byteOffset:0,byteLength:n.buffer.byteLength}),e.buffer=t.length-1,e.byteLength=n.buffer.byteLength,e.byteOffset=0,delete e.byteStride}function owt(i,e,t,n,o){n.buffers.push({arrayBuffer:o.buffer,byteOffset:0,byteLength:o.buffer.byteLength});const r=n.json.bufferViews;if(!r)return;r.push({buffer:n.buffers.length-1,byteLength:o.buffer.byteLength,byteOffset:0});const s=n.json.accessors;s&&(s.push({bufferView:r?.length-1,byteOffset:0,componentType:5126,count:e.count,type:"VEC2"}),t.attributes[`TEXCOORD_${i}`]=s.length-1)}function swt(i){const{offset:e=[0,0],rotation:t=0,scale:n=[1,1]}=i,o=new Q4().set(1,0,0,0,1,0,e[0],e[1],1),r=Z8t.set(Math.cos(t),Math.sin(t),0,-Math.sin(t),Math.cos(t),0,0,0,1),s=Y8t.set(n[0],0,0,0,n[1],0,0,0,1);return o.multiplyRight(r).multiplyRight(s)}const rwt=Object.freeze(Object.defineProperty({__proto__:null,decode:X8t,name:W8t},Symbol.toStringTag,{value:"Module"})),Bh="KHR_lights_punctual",awt=Bh;async function lwt(i){const e=new _o(i),{json:t}=e,n=e.getExtension(Bh);n&&(e.json.lights=n.lights,e.removeExtension(Bh));for(const o of t.nodes||[]){const r=e.getObjectExtension(o,Bh);r&&(o.light=r.light),e.removeObjectExtension(o,Bh)}}async function cwt(i){const e=new _o(i),{json:t}=e;if(t.lights){const n=e.addExtension(Bh);br(!n.lights),n.lights=t.lights,delete t.lights}if(e.json.lights){for(const n of e.json.lights){const o=n.node;e.addObjectExtension(o,Bh,n)}delete e.json.lights}}const uwt=Object.freeze(Object.defineProperty({__proto__:null,decode:lwt,encode:cwt,name:awt},Symbol.toStringTag,{value:"Module"})),q4="KHR_materials_unlit",dwt=q4;async function hwt(i){const e=new _o(i),{json:t}=e;for(const n of t.materials||[])n.extensions&&n.extensions.KHR_materials_unlit&&(n.unlit=!0),e.removeObjectExtension(n,q4);e.removeExtension(q4)}function pwt(i){const e=new _o(i),{json:t}=e;if(e.materials)for(const n of t.materials||[])n.unlit&&(delete n.unlit,e.addObjectExtension(n,q4,{}),e.addExtension(q4))}const fwt=Object.freeze(Object.defineProperty({__proto__:null,decode:hwt,encode:pwt,name:dwt},Symbol.toStringTag,{value:"Module"})),K4="KHR_techniques_webgl",Awt=K4;async function mwt(i){const e=new _o(i),{json:t}=e,n=e.getExtension(K4);if(n){const o=ywt(n,e);for(const r of t.materials||[]){const s=e.getObjectExtension(r,K4);s&&(r.technique=Object.assign({},s,o[s.technique]),r.technique.values=vwt(r.technique,e)),e.removeObjectExtension(r,K4)}e.removeExtension(K4)}}async function gwt(i,e){}function ywt(i,e){const{programs:t=[],shaders:n=[],techniques:o=[]}=i,r=new TextDecoder;return n.forEach(s=>{if(Number.isFinite(s.bufferView))s.code=r.decode(e.getTypedArrayForBufferView(s.bufferView));else throw new Error("KHR_techniques_webgl: no shader code")}),t.forEach(s=>{s.fragmentShader=n[s.fragmentShader],s.vertexShader=n[s.vertexShader]}),o.forEach(s=>{s.program=t[s.program]}),o}function vwt(i,e){const t=Object.assign({},i.values);return Object.keys(i.uniforms||{}).forEach(n=>{i.uniforms[n].value&&!(n in t)&&(t[n]=i.uniforms[n].value)}),Object.keys(t).forEach(n=>{typeof t[n]=="object"&&t[n].index!==void 0&&(t[n].texture=e.getTexture(t[n].index))}),t}const qte=[Dvt,svt,N6t,H6t,G6t,g8t,uwt,fwt,Object.freeze(Object.defineProperty({__proto__:null,decode:mwt,encode:gwt,name:Awt},Symbol.toStringTag,{value:"Module"})),rwt,Yvt];function wwt(i,e={},t){const n=qte.filter(o=>Kte(o.name,e));for(const o of n)o.preprocess?.(i,e,t)}async function Cwt(i,e={},t){const n=qte.filter(o=>Kte(o.name,e));for(const o of n)await o.decode?.(i,e,t)}function Kte(i,e){const t=e?.gltf?.excludeExtensions||{};return!(i in t&&!t[i])}const VT="KHR_binary_glTF";function bwt(i){const e=new _o(i),{json:t}=e;for(const n of t.images||[]){const o=e.getObjectExtension(n,VT);o&&Object.assign(n,o),e.removeObjectExtension(n,VT)}t.buffers&&t.buffers[0]&&delete t.buffers[0].uri,e.removeExtension(VT)}const Jte={accessors:"accessor",animations:"animation",buffers:"buffer",bufferViews:"bufferView",images:"image",materials:"material",meshes:"mesh",nodes:"node",samplers:"sampler",scenes:"scene",skins:"skin",textures:"texture"},xwt={accessor:"accessors",animations:"animation",buffer:"buffers",bufferView:"bufferViews",image:"images",material:"materials",mesh:"meshes",node:"nodes",sampler:"samplers",scene:"scenes",skin:"skins",texture:"textures"};class Mwt{idToIndexMap={animations:{},accessors:{},buffers:{},bufferViews:{},images:{},materials:{},meshes:{},nodes:{},samplers:{},scenes:{},skins:{},textures:{}};json;normalize(e,t){this.json=e.json;const n=e.json;switch(n.asset&&n.asset.version){case"2.0":return;case void 0:case"1.0":break;default:console.warn(`glTF: Unknown version ${n.asset.version}`);return}if(!t.normalize)throw new Error("glTF v1 is not supported.");console.warn("Converting glTF v1 to glTF v2 format. This is experimental and may fail."),this._addAsset(n),this._convertTopLevelObjectsToArrays(n),bwt(e),this._convertObjectIdsToArrayIndices(n),this._updateObjects(n),this._updateMaterial(n)}_addAsset(e){e.asset=e.asset||{},e.asset.version="2.0",e.asset.generator=e.asset.generator||"Normalized to glTF 2.0 by loaders.gl"}_convertTopLevelObjectsToArrays(e){for(const t in Jte)this._convertTopLevelObjectToArray(e,t)}_convertTopLevelObjectToArray(e,t){const n=e[t];if(!(!n||Array.isArray(n))){e[t]=[];for(const o in n){const r=n[o];r.id=r.id||o;const s=e[t].length;e[t].push(r),this.idToIndexMap[t][o]=s}}}_convertObjectIdsToArrayIndices(e){for(const t in Jte)this._convertIdsToIndices(e,t);"scene"in e&&(e.scene=this._convertIdToIndex(e.scene,"scene"));for(const t of e.textures)this._convertTextureIds(t);for(const t of e.meshes)this._convertMeshIds(t);for(const t of e.nodes)this._convertNodeIds(t);for(const t of e.scenes)this._convertSceneIds(t)}_convertTextureIds(e){e.source&&(e.source=this._convertIdToIndex(e.source,"image"))}_convertMeshIds(e){for(const t of e.primitives){const{attributes:n,indices:o,material:r}=t;for(const s in n)n[s]=this._convertIdToIndex(n[s],"accessor");o&&(t.indices=this._convertIdToIndex(o,"accessor")),r&&(t.material=this._convertIdToIndex(r,"material"))}}_convertNodeIds(e){e.children&&(e.children=e.children.map(t=>this._convertIdToIndex(t,"node"))),e.meshes&&(e.meshes=e.meshes.map(t=>this._convertIdToIndex(t,"mesh")))}_convertSceneIds(e){e.nodes&&(e.nodes=e.nodes.map(t=>this._convertIdToIndex(t,"node")))}_convertIdsToIndices(e,t){e[t]||(console.warn(`gltf v1: json doesn't contain attribute ${t}`),e[t]=[]);for(const n of e[t])for(const o in n){const r=n[o],s=this._convertIdToIndex(r,o);n[o]=s}}_convertIdToIndex(e,t){const n=xwt[t];if(n in this.idToIndexMap){const o=this.idToIndexMap[n][e];if(!Number.isFinite(o))throw new Error(`gltf v1: failed to resolve ${t} with id ${e}`);return o}return e}_updateObjects(e){for(const t of this.json.buffers)delete t.type}_updateMaterial(e){for(const t of e.materials){t.pbrMetallicRoughness={baseColorFactor:[1,1,1,1],metallicFactor:1,roughnessFactor:1};const n=t.values?.tex||t.values?.texture2d_0||t.values?.diffuseTex,o=e.textures.findIndex(r=>r.id===n);o!==-1&&(t.pbrMetallicRoughness.baseColorTexture={index:o})}}}function Ewt(i,e={}){return new Mwt().normalize(i,e)}async function Bwt(i,e,t=0,n,o){return Iwt(i,e,t,n),Ewt(i,{normalize:n?.gltf?.normalize}),wwt(i,n,o),n?.gltf?.loadBuffers&&i.json.buffers&&await Swt(i,n,o),n?.gltf?.loadImages&&await Pwt(i,n,o),await Cwt(i,n,o),i}function Iwt(i,e,t,n){if(n.uri&&(i.baseUri=n.uri),e instanceof ArrayBuffer&&!v6t(e,t,n)&&(e=new TextDecoder().decode(e)),typeof e=="string")i.json=q4t(e);else if(e instanceof ArrayBuffer){const s={};t=w6t(s,e,t,n.glb),br(s.type==="glTF",`Invalid GLB magic string ${s.type}`),i._glb=s,i.json=s.json}else br(!1,"GLTF: must be ArrayBuffer or string");const o=i.json.buffers||[];if(i.buffers=new Array(o.length).fill(null),i._glb&&i._glb.header.hasBinChunk){const{binChunks:s}=i._glb;i.buffers[0]={arrayBuffer:s[0].arrayBuffer,byteOffset:s[0].byteOffset,byteLength:s[0].byteLength}}const r=i.json.images||[];i.images=new Array(r.length).fill({})}async function Swt(i,e,t){const n=i.json.buffers||[];for(let o=0;o<n.length;++o){const r=n[o];if(r.uri){const{fetch:s}=t;br(s);const a=Dte(r.uri,e),c=await(await t?.fetch?.(a))?.arrayBuffer?.();i.buffers[o]={arrayBuffer:c,byteOffset:0,byteLength:c.byteLength},delete r.uri}else i.buffers[o]===null&&(i.buffers[o]={arrayBuffer:new ArrayBuffer(r.byteLength),byteOffset:0,byteLength:r.byteLength})}}async function Pwt(i,e,t){const n=Twt(i),o=i.json.images||[],r=[];for(const s of n)r.push(kwt(i,o[s],s,e,t));return await Promise.all(r)}function Twt(i){const e=new Set,t=i.json.textures||[];for(const n of t)n.source!==void 0&&e.add(n.source);return Array.from(e).sort()}async function kwt(i,e,t,n,o){let r;if(e.uri&&!e.hasOwnProperty("bufferView")){const a=Dte(e.uri,n),{fetch:l}=o;r=await(await l(a)).arrayBuffer(),e.bufferView={data:r}}if(Number.isFinite(e.bufferView)){const a=Gyt(i.json,i.buffers,e.bufferView);r=Nee(a.buffer,a.byteOffset,a.byteLength)}br(r,"glTF image has no data");let s=await Cee(r,[Dyt,h6t],{...n,mimeType:e.mimeType,basis:n.basis||{format:Rte()}},o);s&&s[0]&&(s={compressed:!0,mipmaps:!1,width:s[0].width,height:s[0].height,data:s[0]}),i.images=i.images||[],i.images[t]=s}const HT={dataType:null,batchType:null,name:"glTF",id:"gltf",module:"gltf",version:Xvt,extensions:["gltf","glb"],mimeTypes:["model/gltf+json","model/gltf-binary"],text:!0,binary:!0,tests:["glTF"],parse:Rwt,options:{gltf:{normalize:!0,loadBuffers:!0,loadImages:!0,decompressMeshes:!0},log:console}};async function Rwt(i,e={},t){e={...HT.options,...e},e.gltf={...HT.options.gltf,...e.gltf};const{byteOffset:n=0}=e;return await Bwt({},i,n,e,t)}const _wt={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},Dwt={5120:1,5121:1,5122:2,5123:2,5125:4,5126:4},Zr={TEXTURE_MAG_FILTER:10240,TEXTURE_MIN_FILTER:10241,TEXTURE_WRAP_S:10242,TEXTURE_WRAP_T:10243,REPEAT:10497,LINEAR:9729,NEAREST_MIPMAP_LINEAR:9986},Lwt={magFilter:Zr.TEXTURE_MAG_FILTER,minFilter:Zr.TEXTURE_MIN_FILTER,wrapS:Zr.TEXTURE_WRAP_S,wrapT:Zr.TEXTURE_WRAP_T},Fwt={[Zr.TEXTURE_MAG_FILTER]:Zr.LINEAR,[Zr.TEXTURE_MIN_FILTER]:Zr.NEAREST_MIPMAP_LINEAR,[Zr.TEXTURE_WRAP_S]:Zr.REPEAT,[Zr.TEXTURE_WRAP_T]:Zr.REPEAT};function Owt(){return{id:"default-sampler",parameters:Fwt}}function Nwt(i){return Dwt[i]}function Uwt(i){return _wt[i]}class Vwt{baseUri="";jsonUnprocessed;json;buffers=[];images=[];postProcess(e,t={}){const{json:n,buffers:o=[],images:r=[]}=e,{baseUri:s=""}=e;return br(n),this.baseUri=s,this.buffers=o,this.images=r,this.jsonUnprocessed=n,this.json=this._resolveTree(e.json,t),this.json}_resolveTree(e,t={}){const n={...e};return this.json=n,e.bufferViews&&(n.bufferViews=e.bufferViews.map((o,r)=>this._resolveBufferView(o,r))),e.images&&(n.images=e.images.map((o,r)=>this._resolveImage(o,r))),e.samplers&&(n.samplers=e.samplers.map((o,r)=>this._resolveSampler(o,r))),e.textures&&(n.textures=e.textures.map((o,r)=>this._resolveTexture(o,r))),e.accessors&&(n.accessors=e.accessors.map((o,r)=>this._resolveAccessor(o,r))),e.materials&&(n.materials=e.materials.map((o,r)=>this._resolveMaterial(o,r))),e.meshes&&(n.meshes=e.meshes.map((o,r)=>this._resolveMesh(o,r))),e.nodes&&(n.nodes=e.nodes.map((o,r)=>this._resolveNode(o,r)),n.nodes=n.nodes.map((o,r)=>this._resolveNodeChildren(o))),e.skins&&(n.skins=e.skins.map((o,r)=>this._resolveSkin(o,r))),e.scenes&&(n.scenes=e.scenes.map((o,r)=>this._resolveScene(o,r))),typeof this.json.scene=="number"&&n.scenes&&(n.scene=n.scenes[this.json.scene]),n}getScene(e){return this._get(this.json.scenes,e)}getNode(e){return this._get(this.json.nodes,e)}getSkin(e){return this._get(this.json.skins,e)}getMesh(e){return this._get(this.json.meshes,e)}getMaterial(e){return this._get(this.json.materials,e)}getAccessor(e){return this._get(this.json.accessors,e)}getCamera(e){return this._get(this.json.cameras,e)}getTexture(e){return this._get(this.json.textures,e)}getSampler(e){return this._get(this.json.samplers,e)}getImage(e){return this._get(this.json.images,e)}getBufferView(e){return this._get(this.json.bufferViews,e)}getBuffer(e){return this._get(this.json.buffers,e)}_get(e,t){if(typeof t=="object")return t;const n=e&&e[t];return n||console.warn(`glTF file error: Could not find ${e}[${t}]`),n}_resolveScene(e,t){return{...e,id:e.id||`scene-${t}`,nodes:(e.nodes||[]).map(n=>this.getNode(n))}}_resolveNode(e,t){const n={...e,id:e?.id||`node-${t}`};return e.mesh!==void 0&&(n.mesh=this.getMesh(e.mesh)),e.camera!==void 0&&(n.camera=this.getCamera(e.camera)),e.skin!==void 0&&(n.skin=this.getSkin(e.skin)),e.meshes!==void 0&&e.meshes.length&&(n.mesh=e.meshes.reduce((o,r)=>{const s=this.getMesh(r);return o.id=s.id,o.primitives=o.primitives.concat(s.primitives),o},{primitives:[]})),n}_resolveNodeChildren(e){return e.children&&(e.children=e.children.map(t=>this.getNode(t))),e}_resolveSkin(e,t){const n=typeof e.inverseBindMatrices=="number"?this.getAccessor(e.inverseBindMatrices):void 0;return{...e,id:e.id||`skin-${t}`,inverseBindMatrices:n}}_resolveMesh(e,t){const n={...e,id:e.id||`mesh-${t}`,primitives:[]};return e.primitives&&(n.primitives=e.primitives.map(o=>{const r={...o,attributes:{},indices:void 0,material:void 0},s=o.attributes;for(const a in s)r.attributes[a]=this.getAccessor(s[a]);return o.indices!==void 0&&(r.indices=this.getAccessor(o.indices)),o.material!==void 0&&(r.material=this.getMaterial(o.material)),r})),n}_resolveMaterial(e,t){const n={...e,id:e.id||`material-${t}`};if(n.normalTexture&&(n.normalTexture={...n.normalTexture},n.normalTexture.texture=this.getTexture(n.normalTexture.index)),n.occlusionTexture&&(n.occlusionTexture={...n.occlusionTexture},n.occlusionTexture.texture=this.getTexture(n.occlusionTexture.index)),n.emissiveTexture&&(n.emissiveTexture={...n.emissiveTexture},n.emissiveTexture.texture=this.getTexture(n.emissiveTexture.index)),n.emissiveFactor||(n.emissiveFactor=n.emissiveTexture?[1,1,1]:[0,0,0]),n.pbrMetallicRoughness){n.pbrMetallicRoughness={...n.pbrMetallicRoughness};const o=n.pbrMetallicRoughness;o.baseColorTexture&&(o.baseColorTexture={...o.baseColorTexture},o.baseColorTexture.texture=this.getTexture(o.baseColorTexture.index)),o.metallicRoughnessTexture&&(o.metallicRoughnessTexture={...o.metallicRoughnessTexture},o.metallicRoughnessTexture.texture=this.getTexture(o.metallicRoughnessTexture.index))}return n}_resolveAccessor(e,t){const n=Nwt(e.componentType),o=Uwt(e.type),r=n*o,s={...e,id:e.id||`accessor-${t}`,bytesPerComponent:n,components:o,bytesPerElement:r,value:void 0,bufferView:void 0,sparse:void 0};if(e.bufferView!==void 0&&(s.bufferView=this.getBufferView(e.bufferView)),s.bufferView){const a=s.bufferView.buffer,{ArrayType:l,byteLength:c}=MT(s,s.bufferView),u=(s.bufferView.byteOffset||0)+(s.byteOffset||0)+a.byteOffset;let d=a.arrayBuffer.slice(u,u+c);s.bufferView.byteStride&&(d=this._getValueFromInterleavedBuffer(a,u,s.bufferView.byteStride,s.bytesPerElement,s.count)),s.value=new l(d)}return s}_getValueFromInterleavedBuffer(e,t,n,o,r){const s=new Uint8Array(r*o);for(let a=0;a<r;a++){const l=t+a*n;s.set(new Uint8Array(e.arrayBuffer.slice(l,l+o)),a*o)}return s.buffer}_resolveTexture(e,t){return{...e,id:e.id||`texture-${t}`,sampler:typeof e.sampler=="number"?this.getSampler(e.sampler):Owt(),source:typeof e.source=="number"?this.getImage(e.source):void 0}}_resolveSampler(e,t){const n={id:e.id||`sampler-${t}`,...e,parameters:{}};for(const o in n){const r=this._enumSamplerParameter(o);r!==void 0&&(n.parameters[r]=n[o])}return n}_enumSamplerParameter(e){return Lwt[e]}_resolveImage(e,t){const n={...e,id:e.id||`image-${t}`,image:null,bufferView:e.bufferView!==void 0?this.getBufferView(e.bufferView):void 0},o=this.images[t];return o&&(n.image=o),n}_resolveBufferView(e,t){const n=e.buffer,o=this.buffers[n].arrayBuffer;let r=this.buffers[n].byteOffset||0;return e.byteOffset&&(r+=e.byteOffset),{id:`bufferView-${t}`,...e,buffer:this.buffers[n],data:new Uint8Array(o,r,e.byteLength)}}_resolveCamera(e,t){const n={...e,id:e.id||`camera-${t}`};return n.perspective,n.orthographic,n}}function Hwt(i,e){return new Vwt().postProcess(i,e)}class zwt{constructor(e){}load(e,t,n,o,r,s,a){o=o||{},jwt(e,t,n,o,r,function(){hn.scheduleTask(function(){r.scene.fire("modelLoaded",r.id),r.fire("loaded",!0,!1)}),s&&s()},function(l){e.error(l),a&&a(l),r.fire("error",l)})}parse(e,t,n,o,r,s,a){o=o||{},zT(e,"",t,n,o,r,function(){r.scene.fire("modelLoaded",r.id),r.fire("loaded",!0,!1),s&&s()},function(l){r.error(l),r.fire("error",l),a&&a(l)})}}function jwt(i,e,t,n,o,r,s){const a=i.viewer.scene.canvas.spinner;a.processes++,e.split(".").pop()==="glb"?i.dataSource.getGLB(e,c=>{n.basePath=Wte(e),zT(i,e,c,t,n,o,r,s),a.processes--},c=>{a.processes--,s(c)}):i.dataSource.getGLTF(e,c=>{n.basePath=Wte(e),zT(i,e,c,t,n,o,r,s),a.processes--},c=>{a.processes--,s(c)})}function Wte(i){const e=i.lastIndexOf("/");return e!==0?i.substring(0,e+1):""}function zT(i,e,t,n,o,r,s,a){const l=i.viewer.scene.canvas.spinner;l.processes++,gT(t,HT,{baseUri:o.basePath}).then(c=>{const u=Hwt(c),d={entityId:o.entityId,autoMetaModel:o.autoMetaModel,globalizeObjectIds:o.globalizeObjectIds,metaObjects:[],loadBuffer:o.loadBuffer,basePath:o.basePath,handlenode:o.handlenode,backfaces:!!o.backfaces,gltfData:u,scene:r.scene,plugin:i,sceneModel:r,numObjects:0,nextId:0};Gwt(d),qwt(d),o.autoMetaModel&&d.metaObjects.push({id:r.id,type:"Default",name:r.id}),Wwt(d),r.finalize(),o.autoMetaModel&&i.viewer.metaScene.createMetaModel(r.id,{metaObjects:d.metaObjects}),l.processes--,s()}).catch(c=>{a&&a(c)})}function Gwt(i){const t=i.gltfData.textures;if(t)for(let n=0,o=t.length;n<o;n++)Qwt(i,t[n])}function Qwt(i,e){if(!e.source||!e.source.image)return;const t=`texture-${i.nextId++}`;let n=Ef;switch(e.sampler.minFilter){case 9728:n=mh;break;case 9729:n=As;break;case 9984:n=o4;break;case 9985:n=s4;break;case 9986:n=Ef;break;case 9987:n=Bf;break}let o=As;switch(e.sampler.magFilter){case 9728:o=mh;break;case 9729:o=As;break}let r=En;switch(e.sampler.wrapS){case 33071:r=fs;break;case 33648:r=uc;break;case 10497:r=En;break}let s=En;switch(e.sampler.wrapT){case 33071:s=fs;break;case 33648:s=uc;break;case 10497:s=En;break}let a=En;switch(e.sampler.wrapR){case 33071:a=fs;break;case 33648:a=uc;break;case 10497:a=En;break}i.sceneModel.createTexture({id:t,image:e.source.image,flipY:!!e.flipY,minFilter:n,magFilter:o,wrapS:r,wrapT:s,wrapR:a,encoding:pn}),e._textureId=t}function qwt(i){const t=i.gltfData.materials;if(t)for(let n=0,o=t.length;n<o;n++){const r=t[n];r._textureSetId=Kwt(i,r),r._attributes=Jwt(i,r)}}function Kwt(i,e){const t={};switch(e.normalTexture&&(t.normalTextureId=e.normalTexture.texture._textureId),e.occlusionTexture&&(t.occlusionTextureId=e.occlusionTexture.texture._textureId),e.emissiveTexture&&(t.emissiveTextureId=e.emissiveTexture.texture._textureId),e.alphaMode){case"OPAQUE":break;case"MASK":const r=e.alphaCutoff;t.alphaCutoff=r!==void 0?r:.5;break}const n=e.pbrMetallicRoughness;if(e.pbrMetallicRoughness){const r=e.pbrMetallicRoughness,s=r.baseColorTexture||r.colorTexture;s&&(s.texture?t.colorTextureId=s.texture._textureId:t.colorTextureId=i.gltfData.textures[s.index]._textureId),n.metallicRoughnessTexture&&(t.metallicRoughnessTextureId=n.metallicRoughnessTexture.texture._textureId)}const o=e.extensions;if(o){const r=o.KHR_materials_pbrSpecularGlossiness;if(r){r.specularTexture;const s=r.specularColorTexture;s!=null&&(t.colorTextureId=i.gltfData.textures[s.index]._textureId)}}return t.normalTextureId!==void 0||t.occlusionTextureId!==void 0||t.emissiveTextureId!==void 0||t.colorTextureId!==void 0||t.metallicRoughnessTextureId!==void 0?(t.id=`textureSet-${i.nextId++};`,i.sceneModel.createTextureSet(t),t.id):null}function Jwt(i,e){const t=e.extensions,n={color:new Float32Array([1,1,1,1]),opacity:1,metallic:0,roughness:1,doubleSided:!0};if(t){const r=t.KHR_materials_pbrSpecularGlossiness;if(r){const a=r.diffuseFactor;a!=null&&n.color.set(a)}const s=t.KHR_materials_common;if(s){const a=s.technique,l=s.values||{},c=a==="BLINN",u=a==="PHONG",d=a==="LAMBERT",h=l.diffuse;h&&(c||u||d)&&(At.isString(h)||n.color.set(h));const p=l.transparency;p!=null&&(n.opacity=p);const A=l.transparent;A!=null&&(n.opacity=A)}}const o=e.pbrMetallicRoughness;if(o){const r=o.baseColorFactor;r&&(n.color[0]=r[0],n.color[1]=r[1],n.color[2]=r[2],n.opacity=r[3]);const s=o.metallicFactor;s!=null&&(n.metallic=s);const a=o.roughnessFactor;a!=null&&(n.roughness=a)}return n.doubleSided=e.doubleSided!==!1,n}function Wwt(i){const e=i.gltfData,t=e.scene||e.scenes[0];if(!t){Xwt(i,"glTF has no default scene");return}const n=t.nodes;if(!n)return;(function s(a){a.forEach(l=>{const c=l.mesh;c&&(c.instances||=0,c.instances+=1),l.children&&s(l.children)})})(n);const o=[];let r=null;(function s(a,l,c){a.forEach(u=>{const d=u.name;let h=d!=null&&d||l===0&&"entity-"+i.nextId++;if(h){for(;i.sceneModel.objects[h];)h="entity-"+i.nextId++;o.push(r),r=[]}const p=Zwt(u,c);if(u.mesh&&Ywt(u,i,p,r),u.children&&s(u.children,l+1,p),h){if(r.length>0){const A=i.globalizeObjectIds?b.globalizeObjectId(i.sceneModel.id,h):h;i.sceneModel.createEntity({id:A,meshIds:r,isObject:!0}),i.autoMetaModel&&i.metaObjects.push({id:A,type:"Default",name:A,parent:i.sceneModel.id})}r=o.pop()}})})(n,0,null)}function Zwt(i,e){let t;return i.matrix&&(t=i.matrix,e?e=b.mulMat4(e,t,b.mat4()):e=t),i.translation&&(t=b.translationMat4v(i.translation),e?e=b.mulMat4(e,t,b.mat4()):e=t),i.rotation&&(t=b.quaternionToMat4(i.rotation),e?e=b.mulMat4(e,t,b.mat4()):e=t),i.scale&&(t=b.scalingMat4v(i.scale),e?e=b.mulMat4(e,t,b.mat4()):e=t),e}function Ywt(i,e,t,n){const o=i.mesh;if(!o)return;const r=o.primitives.length;if(r>0)for(let s=0;s<r;s++){const a=o.primitives[s];if(a.mode<4)continue;const l={id:e.sceneModel.id+"."+e.numObjects++},c=a.material;c?(l.textureSetId=c._textureSetId,l.color=c._attributes.color,l.opacity=c._attributes.opacity,l.metallic=c._attributes.metallic,l.roughness=c._attributes.roughness):(l.color=new Float32Array([1,1,1]),l.opacity=1);const u=e.backfaces!==!1||c&&c.doubleSided!==!1;switch(a.mode){case 0:l.primitive="points";break;case 1:l.primitive="lines";break;case 2:l.primitive="lines";break;case 3:l.primitive="lines";break;case 4:l.primitive=u?"triangles":"solid";break;case 5:l.primitive=u?"triangles":"solid";break;case 6:l.primitive=u?"triangles":"solid";break;default:l.primitive=u?"triangles":"solid"}const d=a.attributes.POSITION;if(!d)continue;l.localPositions=d.value,l.positions=new Float64Array(l.localPositions.length),a.attributes.NORMAL&&(l.normals=a.attributes.NORMAL.value),a.attributes.TEXCOORD_0&&(l.uv=a.attributes.TEXCOORD_0.value),a.indices&&(l.indices=a.indices.value),t?b.transformPositions3(t,l.localPositions,l.positions):l.positions.set(l.localPositions);const h=b.vec3();Ow(l.positions,l.positions,h)&&(l.origin=h),e.sceneModel.createMesh(l),n.push(l.id)}}function Xwt(i,e){i.plugin.error(e)}const Zte={DEFAULT:{}};class jT extends qr{constructor(e,t={}){super("GLTFLoader",e,t),this._sceneModelLoader=new zwt(this,t),this.dataSource=t.dataSource,this.objectDefaults=t.objectDefaults}set dataSource(e){this._dataSource=e||new wee}get dataSource(){return this._dataSource}set objectDefaults(e){this._objectDefaults=e||Zte}get objectDefaults(){return this._objectDefaults}load(e={}){e.id&&this.viewer.scene.components[e.id]&&(this.error("Component with this ID already exists in viewer: "+e.id+" - will autogenerate this ID"),delete e.id);const t=new I4(this.viewer.scene,At.apply(e,{isModel:!0,dtxEnabled:e.dtxEnabled})),n=t.id;if(!e.src&&!e.gltf)return this.error("load() param expected: src or gltf"),t;if(e.metaModelSrc||e.metaModelJSON){const o=r=>{this.viewer.metaScene.createMetaModel(n,r,{}),this.viewer.scene.canvas.spinner.processes--,e.src?this._sceneModelLoader.load(this,e.src,r,e,t):this._sceneModelLoader.parse(this,e.gltf,r,e,t)};if(e.metaModelSrc){const r=e.metaModelSrc;this.viewer.scene.canvas.spinner.processes++,this._dataSource.getMetaModel(r,s=>{this.viewer.scene.canvas.spinner.processes--,o(s)},s=>{this.error(`load(): Failed to load model metadata for model '${n} from '${r}' - ${s}`),this.viewer.scene.canvas.spinner.processes--})}else e.metaModelJSON&&o(e.metaModelJSON)}else e.src?this._sceneModelLoader.load(this,e.src,null,e,t):this._sceneModelLoader.parse(this,e.gltf,null,e,t);return t.once("destroyed",()=>{this.viewer.metaScene.destroyMetaModel(n)}),t}destroy(){super.destroy()}}function $wt(i,e,t={}){const n="lightgrey",o=t.hoverColor||"rgba(0,0,0,0.4)",r=t.textColor||"black",s=t.canvasElement||document.body,a=500,l=a+a/3,c=l/24,u=[{boundary:[6,6,6,6],color:t.frontColor||t.color||"#55FF55"},{boundary:[18,6,6,6],color:t.backColor||t.color||"#55FF55"},{boundary:[12,6,6,6],color:t.rightColor||t.color||"#FF5555"},{boundary:[0,6,6,6],color:t.leftColor||t.color||"#FF5555"},{boundary:[6,0,6,6],color:t.topColor||t.color||"#7777FF"},{boundary:[6,12,6,6],color:t.bottomColor||t.color||"#7777FF"}],d=[{label:"NavCube.front",boundaries:[[7,7,4,4]],dir:[0,1,0],up:[0,0,1]},{label:"NavCube.back",boundaries:[[19,7,4,4]],dir:[0,-1,0],up:[0,0,1]},{label:"NavCube.right",boundaries:[[13,7,4,4]],dir:[-1,0,0],up:[0,0,1]},{label:"NavCube.left",boundaries:[[1,7,4,4]],dir:[1,0,0],up:[0,0,1]},{label:"NavCube.top",boundaries:[[7,1,4,4]],dir:[0,0,-1],up:[0,1,0]},{label:"NavCube.bottom",boundaries:[[7,13,4,4]],dir:[0,0,1],up:[0,-1,0]},{boundaries:[[7,5,4,2]],dir:[0,1,-1],up:[0,1,1]},{boundaries:[[1,6,4,1],[6,1,1,4]],dir:[1,0,-1],up:[1,0,1]},{boundaries:[[7,0,4,1],[19,6,4,1]],dir:[0,-1,-1],up:[0,-1,1]},{boundaries:[[13,6,4,1],[11,1,1,4]],dir:[-1,0,-1],up:[-1,0,1]},{boundaries:[[7,11,4,2]],dir:[0,1,1],up:[0,-1,1]},{boundaries:[[1,11,4,1],[6,13,1,4]],dir:[1,0,1],up:[-1,0,1]},{boundaries:[[7,17,4,1],[19,11,4,1]],dir:[0,-1,1],up:[0,1,1]},{boundaries:[[13,11,4,1],[11,13,1,4]],dir:[-1,0,1],up:[1,0,1]},{boundaries:[[5,7,2,4]],dir:[1,1,0],up:[0,0,1]},{boundaries:[[11,7,2,4]],dir:[-1,1,0],up:[0,0,1]},{boundaries:[[17,7,2,4]],dir:[-1,-1,0],up:[0,0,1]},{boundaries:[[0,7,1,4],[23,7,1,4]],dir:[1,-1,0],up:[0,0,1]},{boundaries:[[5,11,2,2]],dir:[1,1,1],up:[-1,-1,1]},{boundaries:[[23,11,1,1],[6,17,1,1],[0,11,1,1]],dir:[1,-1,1],up:[-1,1,1]},{boundaries:[[5,5,2,2]],dir:[1,1,-1],up:[1,1,1]},{boundaries:[[11,17,1,1],[17,11,2,1]],dir:[-1,-1,1],up:[1,1,1]},{boundaries:[[17,6,2,1],[11,0,1,1]],dir:[-1,-1,-1],up:[-1,-1,1]},{boundaries:[[11,11,2,2]],dir:[-1,1,1],up:[1,-1,1]},{boundaries:[[0,6,1,1],[6,0,1,1],[23,6,1,1]],dir:[1,-1,-1],up:[1,-1,1]},{boundaries:[[11,5,2,2]],dir:[-1,1,-1],up:[-1,1,1]}];t.frontColor||t.color,t.backColor||t.color,t.rightColor||t.color,t.leftColor||t.color,t.topColor||t.color,t.bottomColor||t.color;const h=[{yUp:"",label:"NavCube.front",boundaries:[[7,7,4,4]],dir:[0,0,-1],up:[0,1,0]},{label:"NavCube.back",boundaries:[[19,7,4,4]],dir:[0,0,1],up:[0,1,0]},{label:"NavCube.right",boundaries:[[13,7,4,4]],dir:[-1,0,0],up:[0,1,0]},{label:"NavCube.left",boundaries:[[1,7,4,4]],dir:[1,0,0],up:[0,1,0]},{label:"NavCube.top",boundaries:[[7,1,4,4]],dir:[0,-1,0],up:[0,0,-1]},{label:"NavCube.bottom",boundaries:[[7,13,4,4]],dir:[0,1,0],up:[0,0,1]},{boundaries:[[7,5,4,2]],dir:[0,-.7071,-.7071],up:[0,.7071,-.7071]},{boundaries:[[1,6,4,1],[6,1,1,4]],dir:[1,-1,0],up:[1,1,0]},{boundaries:[[7,0,4,1],[19,6,4,1]],dir:[0,-.7071,.7071],up:[0,.7071,.7071]},{boundaries:[[13,6,4,1],[11,1,1,4]],dir:[-1,-1,0],up:[-1,1,0]},{boundaries:[[7,11,4,2]],dir:[0,1,-1],up:[0,1,1]},{boundaries:[[1,11,4,1],[6,13,1,4]],dir:[1,1,0],up:[-1,1,0]},{boundaries:[[7,17,4,1],[19,11,4,1]],dir:[0,1,1],up:[0,1,-1]},{boundaries:[[13,11,4,1],[11,13,1,4]],dir:[-1,1,0],up:[1,1,0]},{boundaries:[[5,7,2,4]],dir:[1,0,-1],up:[0,1,0]},{boundaries:[[11,7,2,4]],dir:[-1,0,-1],up:[0,1,0]},{boundaries:[[17,7,2,4]],dir:[-1,0,1],up:[0,1,0]},{boundaries:[[0,7,1,4],[23,7,1,4]],dir:[1,0,1],up:[0,1,0]},{boundaries:[[5,11,2,2]],dir:[.5,.7071,-.5],up:[-.5,.7071,.5]},{boundaries:[[23,11,1,1],[6,17,1,1],[0,11,1,1]],dir:[.5,.7071,.5],up:[-.5,.7071,-.5]},{boundaries:[[5,5,2,2]],dir:[.5,-.7071,-.5],up:[.5,.7071,-.5]},{boundaries:[[11,17,1,1],[17,11,2,1]],dir:[-.5,.7071,.5],up:[.5,.7071,-.5]},{boundaries:[[17,6,2,1],[11,0,1,1]],dir:[-.5,-.7071,.5],up:[-.5,.7071,.5]},{boundaries:[[11,11,2,2]],dir:[-.5,.7071,-.5],up:[.5,.7071,.5]},{boundaries:[[0,6,1,1],[6,0,1,1],[23,6,1,1]],dir:[.5,-.7071,.5],up:[.5,.7071,.5]},{boundaries:[[11,5,2,2]],dir:[-.5,-.7071,-.5],up:[-.5,.7071,-.5]}];for(let v=0,y=d.length;v<y;v++)b.normalizeVec3(d[v].dir,d[v].dir),b.normalizeVec3(d[v].up,d[v].up);for(let v=0,y=h.length;v<y;v++)b.normalizeVec3(h[v].dir,h[v].dir),b.normalizeVec3(h[v].up,h[v].up);var p=h;this._textureCanvas=document.createElement("canvas"),this._textureCanvas.width=l,this._textureCanvas.height=a,this._textureCanvas.style.width=l+"px",this._textureCanvas.style.height=a+"px",this._textureCanvas.style.padding="0",this._textureCanvas.style.margin="0",this._textureCanvas.style.top="0",this._textureCanvas.style.background=n,this._textureCanvas.style.position="absolute",this._textureCanvas.style.opacity="1.0",this._textureCanvas.style.visibility="hidden",this._textureCanvas.style["z-index"]=2e6,s.appendChild(this._textureCanvas);const A=this._textureCanvas.getContext("2d");let f=!1;function g(){for(let M=0,B=u.length;M<B;M++){const S=u[M],I=S.boundary,R=Math.round(I[0]*c),T=Math.round(I[1]*c),_=Math.round(I[2]*c),F=Math.round(I[3]*c);A.fillStyle=S.color,A.fillRect(R,T,_,F)}for(let M=0,B=p.length;M<B;M++){let S,I,R,T;const _=p[M],F=_.boundaries;for(var v=0,y=F.length;v<y;v++){const N=F[v];S=Math.round(N[0]*c),I=Math.round(N[1]*c),R=Math.round(N[2]*c),T=Math.round(N[3]*c),_.highlighted&&(A.fillStyle=_.highlighted?o:_.color||n,A.fillRect(S,I,R,T))}if(_.label){A.fillStyle=r,A.font="60px sans-serif",A.textAlign="center";var w=S+R*.5,x=I+T*.7;A.fillText(m(_.label),w,x,80)}}e.glRedraw()}const m=(function(){const v={"NavCube.front":"NavCube.front","NavCube.back":"NavCube.back","NavCube.right":"NavCube.right","NavCube.left":"NavCube.left","NavCube.top":"NavCube.top","NavCube.bottom":"NavCube.bottom"},y={"NavCube.front":"NavCube.front","NavCube.back":"NavCube.back","NavCube.right":"NavCube.right","NavCube.left":"NavCube.left","NavCube.top":"NavCube.top","NavCube.bottom":"NavCube.bottom"},w={"NavCube.front":"FRONT","NavCube.back":"BACK","NavCube.right":"RIGHT","NavCube.left":"LEFT","NavCube.top":"TOP","NavCube.bottom":"BOTTOM"};return function(x){const M=f?y:v,B=M?M[x]:null;return B?i.localeService.translate(B)||w[B]||B:x}})();this.setZUp=function(){f=!0,p=d,this.clear()},this.setYUp=function(){f=!1,p=h,this.clear()},this.clear=function(){A.fillStyle=n,A.fillRect(0,0,l,a);for(var v=0,y=p.length;v<y;v++){const w=p[v];w.highlighted=!1}g()},this.getArea=function(v){const y=v[0]*l,w=a-v[1]*a;for(var x=0,M=p.length;x<M;x++){const R=p[x].boundaries;for(var B=0,S=R.length;B<S;B++){const T=R[B];if(y>=T[0]*c&&y<=(T[0]+T[2])*c&&w>=T[1]*c&&w<=(T[1]+T[3])*c)return x}}return-1},this.setAreaHighlighted=function(v,y){var w=p[v];if(!w)throw"Area not found: "+v;w.highlighted=!!y,g()},this.getAreaDir=function(v){var y=p[v];if(!y)throw"Unknown area: "+v;return y.dir},this.getAreaUp=function(v){var y=p[v];if(!y)throw"Unknown area: "+v;return y.up},this.getImage=function(){return this._textureCanvas},this.destroy=function(){this._textureCanvas&&(this._textureCanvas.parentNode.removeChild(this._textureCanvas),this._textureCanvas=null)}}const Yte=b.vec3(),Xte=b.vec3();b.mat4();class GT extends qr{constructor(e,t={}){super("NavCube",e,t),e.navCube=this;try{this._navCubeScene=new x7(e,{canvasId:t.canvasId,canvasElement:t.canvasElement,transparent:!0}),this._navCubeCanvas=this._navCubeScene.canvas.canvas,this._navCubeScene.input.keyboardEnabled=!1}catch(m){this.error(m);return}const n=this._navCubeScene;n.clearLights(),new Ma(n,{dir:[.4,-.4,.8],color:[.8,1,1],intensity:1,space:"view"}),new Ma(n,{dir:[-.8,-.3,-.4],color:[.8,.8,.8],intensity:1,space:"view"}),new Ma(n,{dir:[.8,-.6,-.8],color:[1,1,1],intensity:1,space:"view"}),this._navCubeCamera=n.camera,this._navCubeCamera.ortho.scale=7,this._navCubeCamera.ortho.near=.1,this._navCubeCamera.ortho.far=2e3,n.edgeMaterial.edgeColor=[.2,.2,.2],n.edgeMaterial.edgeAlpha=.6,this._zUp=!!e.camera.zUp;var o=this;this.setIsProjectNorth(t.isProjectNorth),this.setProjectNorthOffsetAngle(t.projectNorthOffsetAngle);const r=(function(){const m=b.mat4();return function(v,y,w){return b.identityMat4(m),b.rotationMat4v(v*o._projectNorthOffsetAngle*b.DEGTORAD,[0,1,0],m),b.transformVec3(m,y,w)}})();this._synchCamera=(function(){var m=b.rotationMat4c(-90*b.DEGTORAD,1,0,0),v=b.vec3(),y=b.vec3(),w=b.vec3();return function(){var x=e.camera.eye,M=e.camera.look,B=e.camera.up;v=b.mulVec3Scalar(b.normalizeVec3(b.subVec3(x,M,v)),5),o._isProjectNorth&&o._projectNorthOffsetAngle&&(v=r(-1,v,Yte),B=r(-1,B,Xte)),o._zUp?(b.transformVec3(m,v,y),b.transformVec3(m,B,w),o._navCubeCamera.look=[0,0,0],o._navCubeCamera.eye=b.transformVec3(m,v,y),o._navCubeCamera.up=b.transformPoint3(m,B,w)):(o._navCubeCamera.look=[0,0,0],o._navCubeCamera.eye=v,o._navCubeCamera.up=B)}})(),this._cubeTextureCanvas=new $wt(e,n,t),this._cubeSampler=new If(n,{image:this._cubeTextureCanvas.getImage(),flipY:!0,wrapS:fs,wrapT:fs}),this._cubeMesh=new yi(n,{geometry:new yn(n,{primitive:"triangles",normals:[0,0,1,0,0,1,0,0,1,0,0,1,1,0,0,1,0,0,1,0,0,1,0,0,0,1,0,0,1,0,0,1,0,0,1,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,0,-1,0,0,-1,0,0,-1,0,0,-1],positions:[1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,1,1,-1,-1,1,-1,-1,1,1,-1,1,1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,1,-1,1,-1,-1,1,1,-1,-1,-1,-1,-1,-1,1,-1,1,1,-1],uv:[.5,.6666,.25,.6666,.25,.3333,.5,.3333,.5,.6666,.5,.3333,.75,.3333,.75,.6666,.5,.6666,.5,1,.25,1,.25,.6666,.25,.6666,0,.6666,0,.3333,.25,.3333,.25,0,.5,0,.5,.3333,.25,.3333,.75,.3333,1,.3333,1,.6666,.75,.6666],indices:[0,1,2,0,2,3,4,5,6,4,6,7,8,9,10,8,10,11,12,13,14,12,14,15,16,17,18,16,18,19,20,21,22,20,22,23]}),material:new vn(n,{diffuse:[.4,.4,.4],specular:[.4,.4,.4],emissive:[.6,.6,.6],diffuseMap:this._cubeSampler,emissiveMap:this._cubeSampler}),visible:!0,edges:!0}),this._shadow=t.shadowVisible===!1?null:new yi(n,{geometry:new yn(n,bf({center:[0,0,0],radiusTop:.001,radiusBottom:1.4,height:.01,radialSegments:20,heightSegments:1,openEnded:!0})),material:new vn(n,{diffuse:[0,0,0],specular:[0,0,0],emissive:[0,0,0],alpha:.5}),position:[0,-1.5,0],visible:!0,pickable:!1,backfaces:!1}),this._onCameraMatrix=e.camera.on("matrix",this._synchCamera),this._onCameraWorldAxis=e.camera.on("worldAxis",()=>{e.camera.zUp?(this._zUp=!0,this._cubeTextureCanvas.setZUp(),this._repaint(),this._synchCamera()):e.camera.yUp&&(this._zUp=!1,this._cubeTextureCanvas.setYUp(),this._repaint(),this._synchCamera())}),this._onCameraFOV=e.camera.perspective.on("fov",m=>{this._synchProjection&&(this._navCubeCamera.perspective.fov=m)}),this._onCameraProjection=e.camera.on("projection",m=>{this._synchProjection&&(this._navCubeCamera.projection=m==="ortho"||m==="perspective"?m:"perspective")});var s=-1;function a(m,v){var y=(m-A)*-p,w=(v-f)*-p;e.camera.orbitYaw(y),e.camera.orbitPitch(-w),A=m,f=v}function l(m){const{left:v,top:y}=o._navCubeCanvas.getBoundingClientRect();return[m.clientX-v,m.clientY-y]}{var c=null,u=null,d=!1,h=!1,p=.5,A,f;o._navCubeCanvas.addEventListener("mouseenter",o._onMouseEnter=function(m){h=!0}),o._navCubeCanvas.addEventListener("mouseleave",o._onMouseLeave=function(m){h=!1}),o._navCubeCanvas.addEventListener("mousedown",o._onMouseDown=function(m){if(m.which===1){c=m.x,u=m.y,A=m.clientX,f=m.clientY;var v=l({clientX:m.clientX,clientY:m.clientY}),y=n.pick({canvasPos:v});y?d=!0:d=!1}}),o._navCubeCanvas.addEventListener("mouseup",o._onMouseUp=function(m){if(m.which===1&&(d=!1,c!==null)){var v=l({clientX:m.clientX,clientY:m.clientY}),y=n.pick({canvasPos:v,pickSurface:!0});if(y&&y.uv){var w=o._cubeTextureCanvas.getArea(y.uv);if(w>=0&&(o._navCubeCanvas.style.cursor="pointer",s>=0&&(o._cubeTextureCanvas.setAreaHighlighted(s,!1),o._repaint(),s=-1),w>=0)){if(o._cubeTextureCanvas.setAreaHighlighted(w,!0),s=w,o._repaint(),m.x<c-3||m.x>c+3||m.y<u-3||m.y>u+3)return;var x=o._cubeTextureCanvas.getAreaDir(w);if(x){var M=o._cubeTextureCanvas.getAreaUp(w);o._isProjectNorth&&o._projectNorthOffsetAngle&&(x=r(1,x,Yte),M=r(1,M,Xte)),g(x,M,function(){s>=0&&(o._cubeTextureCanvas.setAreaHighlighted(s,!1),o._repaint(),s=-1),o._navCubeCanvas.style.cursor="pointer",s>=0&&(o._cubeTextureCanvas.setAreaHighlighted(s,!1),o._repaint(),s=-1),w>=0&&(o._cubeTextureCanvas.setAreaHighlighted(w,!1),s=-1,o._repaint())})}}}}}),o._navCubeCanvas.addEventListener("mousemove",o._onMouseMove=function(m){if(s>=0&&(o._cubeTextureCanvas.setAreaHighlighted(s,!1),o._repaint(),s=-1),!(m.buttons===1&&!d)){if(d){var v=m.clientX,y=m.clientY;o._navCubeCanvas.style.cursor="move",a(v,y);return}if(h){var w=l({clientX:m.clientX,clientY:m.clientY}),x=n.pick({canvasPos:w,pickSurface:!0});if(x){if(x.uv){o._navCubeCanvas.style.cursor="pointer";var M=o._cubeTextureCanvas.getArea(x.uv);if(M===s)return;s>=0&&o._cubeTextureCanvas.setAreaHighlighted(s,!1),M>=0&&(o._cubeTextureCanvas.setAreaHighlighted(M,!0),o._repaint(),s=M)}}else o._navCubeCanvas.style.cursor="default",s>=0&&(o._cubeTextureCanvas.setAreaHighlighted(s,!1),o._repaint(),s=-1)}}}),o._navCubeCanvas.addEventListener("touchstart",o._onTouchStart=function(m){if(m.touches.length>0){c=m.touches[0].clientX,u=m.touches[0].clientY,A=m.touches[0].clientX,f=m.touches[0].clientY;var v=l({clientX:m.touches[0].clientX,clientY:m.touches[0].clientY}),y=n.pick({canvasPos:v});y?d=!0:d=!1}},{passive:!1}),o._navCubeCanvas.addEventListener("touchmove",o._onTouchMove=function(m){m.preventDefault();var v=m.touches[0],y=v.clientX,w=v.clientY,x=document.elementFromPoint(y,w);if(h=o._navCubeCanvas===x,!!h&&d){a(y,w);return}},{passive:!1}),o._navCubeCanvas.addEventListener("touchend",o._onTouchEnd=function(m){d=!1});var g=(function(){var m=b.vec3();return function(v,y,w){var x=o._fitVisible?e.scene.getAABB(e.scene.visibleObjectIds):e.scene.aabb,M=b.getAABB3Diag(x);b.getAABB3Center(x,m);var B=Math.abs(M/Math.tan(o._cameraFitFOV*b.DEGTORAD));e.cameraControl.pivotPos=m,o._cameraFly?e.cameraFlight.flyTo({look:m,eye:[m[0]-B*v[0],m[1]-B*v[1],m[2]-B*v[2]],up:y||[0,1,0],orthoScale:M*1.1,fitFOV:o._cameraFitFOV,duration:o._cameraFlyDuration},w):e.cameraFlight.jumpTo({look:m,eye:[m[0]-B*v[0],m[1]-B*v[1],m[2]-B*v[2]],up:y||[0,1,0],orthoScale:M*1.1,fitFOV:o._cameraFitFOV},w)}})()}this._onUpdated=e.localeService.on("updated",()=>{this._cubeTextureCanvas.clear(),this._repaint()}),this.setVisible(t.visible),this.setCameraFitFOV(t.cameraFitFOV),this.setCameraFly(t.cameraFly),this.setCameraFlyDuration(t.cameraFlyDuration),this.setFitVisible(t.fitVisible),this.setSynchProjection(t.synchProjection)}send(e,t){e==="language"&&(this._cubeTextureCanvas.clear(),this._repaint())}_repaint(){const e=this._cubeTextureCanvas.getImage();this._cubeMesh.material.diffuseMap.image=e,this._cubeMesh.material.emissiveMap.image=e}setVisible(e=!0){this._navCubeCanvas&&(this._cubeMesh.visible=e,this._shadow&&(this._shadow.visible=e),this._navCubeCanvas.style.visibility=e?"visible":"hidden")}getVisible(){return this._navCubeCanvas?this._cubeMesh.visible:!1}setFitVisible(e=!1){this._fitVisible=e}getFitVisible(){return this._fitVisible}setCameraFly(e=!0){this._cameraFly=e}getCameraFly(){return this._cameraFly}setCameraFitFOV(e=45){this._cameraFitFOV=e}getCameraFitFOV(){return this._cameraFitFOV}setCameraFlyDuration(e=.5){this._cameraFlyDuration=e}getCameraFlyDuration(){return this._cameraFlyDuration}setSynchProjection(e=!1){this._synchProjection=e}getSynchProjection(){return this._synchProjection}setIsProjectNorth(e=!1){this._isProjectNorth=e}getIsProjectNorth(){return this._isProjectNorth}setProjectNorthOffsetAngle(e){this._projectNorthOffsetAngle=e}getProjectNorthOffsetAngle(){return this._projectNorthOffsetAngle}destroy(){this._navCubeCanvas&&(this.viewer.localeService.off(this._onUpdated),this.viewer.camera.off(this._onCameraMatrix),this.viewer.camera.off(this._onCameraWorldAxis),this.viewer.camera.perspective.off(this._onCameraFOV),this.viewer.camera.off(this._onCameraProjection),this._navCubeCanvas.removeEventListener("mouseenter",this._onMouseEnter),this._navCubeCanvas.removeEventListener("mouseleave",this._onMouseLeave),this._navCubeCanvas.removeEventListener("mousedown",this._onMouseDown),this._navCubeCanvas.removeEventListener("mousemove",this._onMouseMove),this._navCubeCanvas.removeEventListener("mouseup",this._onMouseUp),this._navCubeCanvas.removeEventListener("touchstart",this._onTouchStart),this._navCubeCanvas.removeEventListener("touchmove",this._onTouchMove),this._navCubeCanvas.removeEventListener("touchend",this._onTouchEnd),this._navCubeCanvas=null,this._cubeTextureCanvas.destroy(),this._cubeTextureCanvas=null,this._onMouseEnter=null,this._onMouseLeave=null,this._onMouseDown=null,this._onMouseMove=null,this._onMouseUp=null,this._onTouchStart=null,this._onTouchMove=null,this._onTouchEnd=null),this._navCubeScene.destroy(),this._navCubeScene=null,this._cubeMesh=null,this._shadow=null,super.destroy()}}class e7t{constructor(e){const t=e.cameraControl,n=e.scene,o=n.canvas.canvas,r=!1,s=1,a=.09,l=.01,c=new n4(n,{position:[0,0,0],scale:[5,5,5],isObject:!1}),u=b.vec3();this._setPosition=(function(){const x=b.vec3(),M=b.vec3();return function(B){u.set(B),Ah(B,x,M),c.origin=x,c.position=M}})(),this._setQuaternion=x=>{c.quaternion=x};const d=(x,M)=>new yn(c,bf({radiusTop:.001,radiusBottom:x,radialSegments:32,heightSegments:1,height:M,openEnded:!1})),h=(x,M,B)=>new yn(c,bf({radiusTop:x,radiusBottom:x,radialSegments:B,heightSegments:1,height:M,openEnded:!1})),p=(x,M,B)=>new yn(c,bS({radius:s-.2,tube:x,radialSegments:64,tubeSegments:B,arc:Math.PI*2*M})),A={curve:p(l,.25,14),curveHandle:p(a,.25,14),hoop:p(l,1,8),arrowHead:d(.07,.2),arrowHeadBig:d(.09,.25),arrowHeadHandle:h(a,.37,8),axis:h(l,s,20),axisHandle:h(a,s,20)},f=x=>new vn(c,{diffuse:x,emissive:x,ambient:[0,0,0],specular:[.6,.6,.3],shininess:80,lineWidth:2}),g=(x,M)=>new fc(c,{edges:!1,fill:!0,fillColor:x,fillAlpha:M}),m=new vn(c,{diffuse:[1,1,0],alpha:0,alphaMode:"blend"}),v={},y=(x,M)=>{b.mulVec3Scalar(x,-1,b.vec3());const B=f(x),S=b.quaternionToRotationMat4(M,b.identityMat4());b.mulMat4(b.rotationMat4v(Math.PI,[0,1,0],b.mat4()),S,S);const I=b.scaleMat4v([.6,.6,.6],b.identityMat4()),R=(ne,ie)=>{const Me=b.translateMat4v(ne,b.identityMat4()),Ae=b.identityMat4();return b.mulMat4(Me,ie,Ae),b.mulMat4(S,Ae,Ae),b.mulMat4(Ae,I,b.identityMat4())},T=c.addChild(new yi(c,{geometry:A.curve,material:B,matrix:S,pickable:!1,collidable:!0,clippable:!1,backfaces:!0,visible:!1,isUI:!0,isObject:!1}),r),_=c.addChild(new yi(c,{geometry:A.curveHandle,material:m,matrix:S,pickable:!0,collidable:!0,clippable:!1,backfaces:!0,visible:!1,isUI:!0,isObject:!1}),r),F=c.addChild(new yi(c,{geometry:A.arrowHead,material:B,matrix:R([.8,.07,0],b.rotationMat4v(180*b.DEGTORAD,[0,0,1],b.identityMat4())),pickable:!0,collidable:!0,clippable:!1,visible:!1,isUI:!0,isObject:!1}),r),N=c.addChild(new yi(c,{geometry:A.arrowHead,material:B,matrix:R([.07,.8,0],b.rotationMat4v(90*b.DEGTORAD,[0,0,1],b.identityMat4())),pickable:!0,collidable:!0,clippable:!1,visible:!1,isUI:!0,isObject:!1}),r),z=c.addChild(new yi(c,{geometry:A.hoop,material:B,highlighted:!0,highlightMaterial:g(x,.6),matrix:S,pickable:!1,collidable:!0,clippable:!1,visible:!1,isUI:!0,isObject:!1}),r),j=b.quaternionToRotationMat4(b.vec3PairToQuaternion([0,1,0],x),b.identityMat4());b.mulMat4(b.rotationMat4v(Math.PI,[0,1,0],b.mat4()),j,j);const W=ne=>b.mulMat4(j,b.translateMat4c(0,ne,0,b.identityMat4()),b.identityMat4()),J=W(s+.1),$=W(s/2),ue=c.addChild(new yi(c,{geometry:A.arrowHead,material:B,matrix:J,pickable:!1,collidable:!0,clippable:!1,visible:!1,isUI:!0,isObject:!1}),r),Ee=c.addChild(new yi(c,{geometry:A.arrowHeadHandle,material:m,matrix:J,pickable:!0,collidable:!0,clippable:!1,visible:!1,isUI:!0,isObject:!1}),r),Be=c.addChild(new yi(c,{geometry:A.axis,material:B,matrix:$,pickable:!1,collidable:!0,clippable:!1,visible:!1,isUI:!0,isObject:!1}),r),ze=c.addChild(new yi(c,{geometry:A.axisHandle,material:m,matrix:$,pickable:!0,collidable:!0,clippable:!1,visible:!1,isUI:!0,isObject:!1}),r),Qe=c.addChild(new yi(c,{geometry:A.arrowHeadBig,material:B,matrix:J,pickable:!1,collidable:!0,clippable:!1,visible:!1,isUI:!0,isObject:!1}),r),me=(ne,ie)=>b.vec3ApplyQuaternion(c.quaternion,ne,ie),_e=(function(){const ne=b.vec3(),ie=b.vec3(),Me=b.vec3();return(Ae,q)=>{me(x,ne);const Z=u,oe=ne;b.canvasPosToWorldRay(o,n.camera.viewMatrix,n.camera.projMatrix,n.camera.projection,Ae,ie,Me);const fe=b.dotVec3(oe,Me),Se=b.subVec3(ie,Z,q),X=b.dotVec3(Se,oe),H=b.dotVec3(Se,Me),ee=1-fe*fe;if(Math.abs(ee)>1e-10){const be=(X-fe*H)/ee;return b.addVec3(Z,b.mulVec3Scalar(oe,be,q),q),!0}else return!1}})(),De=b.vec3(),ve=b.vec3();v[Ee.id]=v[ze.id]={setActivated:ne=>Qe.visible=ne,initDragAction:ne=>_e(ne,De)&&b.subVec3(De,u,De)&&(ie=>{_e(ie,ve)&&(b.subVec3(ve,De,ve),this._setPosition(ve),this._handlers&&this._handlers.onPosition(ve))})},v[_.id]={setActivated:ne=>z.visible=ne,initDragAction:ne=>{const ie=(function(){const Ae=n.camera.projectWorldPos(u);me(x,ve),b.transformVec3(n.camera.normalMatrix,ve,ve);const q=Math.sign(ve[2]);return Z=>{const oe=Z[0]-Ae[0],fe=Z[1]-Ae[1];return q*Math.atan2(-fe,oe)}})();let Me=ie(ne);return Ae=>{const q=ie(Ae);c.rotate(x,(q-Me)*180/Math.PI),this._handlers&&this._handlers.onQuaternion(c.quaternion),Me=q}}};let ge=!1,Ie=!1,Ne=!1;const qe=()=>{const ne=Ne&≥Ee.visible=ze.visible=ue.visible=Be.visible=!!ne,ne||(Qe.visible=!1)},Q=()=>{const ne=Ne&&Ie;_.visible=T.visible=F.visible=N.visible=!!ne,ne||(z.visible=!1)};return{setPositionActive:ne=>{ge=ne,qe()},setRotationActive:ne=>{Ie=ne,Q()},set visible(ne){Ne=ne,qe(),Q()}}};this._displayMeshes={center:c.addChild(new yi(c,{geometry:new yn(c,xf({radius:.05})),material:new vn(c,{diffuse:[0,0,0],emissive:[0,0,0],ambient:[0,0,0],specular:[.6,.6,.3],shininess:80}),pickable:!1,collidable:!0,clippable:!1,visible:!1,isObject:!1}),r),x:y([1,0,0],b.vec3PairToQuaternion([1,0,0],[0,0,1])),y:y([0,1,0],b.eulerToQuaternion([90,0,0],"XYZ")),z:y([0,0,1],b.identityQuaternion())};const w=[];{let x=-1;const M=S=>{c.scale[0]!==S&&(c.scale=[S,S,S],this._handlers&&this._handlers.onScreenScale&&this._handlers.onScreenScale(c.scale))},B=n.on("tick",()=>{const S=n.camera,I=Math.abs(b.distVec3(S.eye,u));S.projection==="perspective"?I!==x&&M(.07*I*Math.tan(S.perspective.fov*b.DEGTORAD)):S.projection==="ortho"&&M(S.ortho.scale/10),x=I});w.push(()=>n.off(B))}{let x=null,M=null;w.push(()=>{M&&M.cleanup()});const B=b.vec2(),S=(F,N)=>{N[0]=F.pageX,N[1]=F.pageY,vl(o.ownerDocument.documentElement,o,N)},I=F=>{S(F,B);const N=n.pick({canvasPos:B}),z=N&&N.entity,j=z&&z.id;return j in v&&v[j]},R=(F,N)=>{const z=I(N(F));if(z){M&&M.cleanup();const j=z.initDragAction(B);return j&&(t.pointerEnabled=!1,z.setActivated(!0),M={onChange:W=>{const J=N(W);J&&(S(J,B),j(B))},cleanup:function(){M=null,t.pointerEnabled=!0,z.setActivated(!1)}}),!!j}else return!1},T=(F,N)=>{o.addEventListener(F,N),w.push(()=>o.removeEventListener(F,N))},_=F=>{F.preventDefault(),F.stopPropagation(),F.stopImmediatePropagation()};T("mousedown",F=>{F.which===1&&R(F,N=>N.which===1&&N)&&_(F)}),T("mousemove",F=>{if(M)M.onChange(F),_(F);else{x&&x();const N=I(F);N?(N.setActivated(!0),x=()=>N.setActivated(!1)):x=null}}),T("mouseup",F=>{M&&(M.onChange(F),M.cleanup())}),T("touchstart",F=>{if(F.preventDefault(),F.touches.length===1){const N=F.touches[0].identifier;R(F,z=>[...z.changedTouches].find(j=>j.identifier===N))&&_(F)}}),T("touchmove",F=>{M&&(M.onChange(F),_(F))}),T("touchend",F=>{M&&(M.onChange(F),M.cleanup())})}this.__destroy=()=>{w.forEach(x=>x()),c.destroy();for(let x in v)delete v[x]}}destroy(){this.__destroy()}setHandlers(e){Object.values(this._displayMeshes).forEach(t=>t.visible=!!e),this._handlers=e,this._displayMeshes.x.setPositionActive(e&&e.onPosition),this._displayMeshes.y.setPositionActive(e&&e.onPosition),this._displayMeshes.z.setPositionActive(e&&e.onPosition),this._displayMeshes.x.setRotationActive(e&&e.onQuaternion),this._displayMeshes.y.setRotationActive(e&&e.onQuaternion),this._displayMeshes.z.setRotationActive(e&&e.onQuaternion)}setPosition(e){this._setPosition(e)}setQuaternion(e){this._setQuaternion(e)}}let t7t=class{constructor(e,t,n){this.id=n.id,this._sectionPlane=n,this._mesh=new yi(t,{id:n.id,geometry:new yn(t,vS({xSize:.5,ySize:.5,zSize:.001})),material:new vn(t,{emissive:[1,1,1],diffuse:[0,0,0],backfaces:!1}),edgeMaterial:new ZS(t,{edgeColor:[0,0,0],edgeAlpha:1,edgeWidth:1}),highlightMaterial:new fc(t,{fill:!0,fillColor:[.5,1,.5],fillAlpha:.7,edges:!0,edgeColor:[0,0,0],edgeAlpha:1,edgeWidth:1}),selectedMaterial:new fc(t,{fill:!0,fillColor:[0,0,1],fillAlpha:.7,edges:!0,edgeColor:[1,0,0],edgeAlpha:1,edgeWidth:1}),highlighted:!0,scale:[3,3,3],position:[0,0,0],rotation:[0,0,0],opacity:.3,edges:!0});{const o=b.vec3([0,0,0]),r=b.vec3(),s=b.vec3([0,0,1]),a=b.vec4(4),l=b.vec3(),c=()=>{const u=this._sectionPlane.scene.center,d=[-this._sectionPlane.dir[0],-this._sectionPlane.dir[1],-this._sectionPlane.dir[2]];b.subVec3(u,this._sectionPlane.pos,o);const h=-b.dotVec3(d,o);b.normalizeVec3(d),b.mulVec3Scalar(d,h,r);const p=b.vec3PairToQuaternion(s,this._sectionPlane.dir,a);l[0]=r[0]*.1,l[1]=r[1]*.1,l[2]=r[2]*.1,this._mesh.quaternion=p,this._mesh.position=l};this._onSectionPlanePos=this._sectionPlane.on("pos",c),this._onSectionPlaneDir=this._sectionPlane.on("dir",c)}this._highlighted=!1,this._selected=!1}setHighlighted(e){this._highlighted=!!e,this._mesh.highlighted=this._highlighted,this._mesh.highlightMaterial.fillColor=e?[0,.7,0]:[0,0,0]}getHighlighted(){return this._highlighted}setSelected(e){this._selected=!!e,this._mesh.edgeMaterial.edgeWidth=e?3:1,this._mesh.highlightMaterial.edgeWidth=e?3:1}getSelected(){return this._selected}destroy(){this._sectionPlane.off(this._onSectionPlanePos),this._sectionPlane.off(this._onSectionPlaneDir),this._mesh.destroy()}};class i7t{constructor(e,t){if(!t.onHoverEnterPlane||!t.onHoverLeavePlane||!t.onClickedNothing||!t.onClickedPlane)throw"Missing config(s): onHoverEnterPlane, onHoverLeavePlane, onClickedNothing || onClickedPlane";this.plugin=e,this._viewer=e.viewer,this._onHoverEnterPlane=t.onHoverEnterPlane,this._onHoverLeavePlane=t.onHoverLeavePlane,this._onClickedNothing=t.onClickedNothing,this._onClickedPlane=t.onClickedPlane,this._visible=!0,this._planes={},this._canvas=t.overviewCanvas,this._scene=new x7(this._viewer,{canvasId:this._canvas.id,transparent:!0}),this._scene.clearLights(),new Ma(this._scene,{dir:[.4,-.4,.8],color:[.8,1,1],intensity:1,space:"view"}),new Ma(this._scene,{dir:[-.8,-.3,-.4],color:[.8,.8,.8],intensity:1,space:"view"}),new Ma(this._scene,{dir:[.8,-.6,-.8],color:[1,1,1],intensity:1,space:"view"}),this._scene.camera,this._scene.camera.perspective.fov=70,this._zUp=!1;{const o=this._scene.camera,r=b.rotationMat4c(-90*b.DEGTORAD,1,0,0),s=b.vec3(),a=b.vec3(),l=b.vec3();this._synchCamera=()=>{const c=this._viewer.camera.eye,u=this._viewer.camera.look,d=this._viewer.camera.up;b.mulVec3Scalar(b.normalizeVec3(b.subVec3(c,u,s)),7),this._zUp?(b.transformVec3(r,s,a),b.transformVec3(r,d,l),o.look=[0,0,0],o.eye=b.transformVec3(r,s,a),o.up=b.transformPoint3(r,d,l)):(o.look=[0,0,0],o.eye=s,o.up=d)}}this._onViewerCameraMatrix=this._viewer.camera.on("matrix",this._synchCamera),this._onViewerCameraWorldAxis=this._viewer.camera.on("worldAxis",this._synchCamera),this._onViewerCameraFOV=this._viewer.camera.perspective.on("fov",o=>{this._scene.camera.perspective.fov=o});{var n=null;this._onInputMouseMove=this._scene.input.on("mousemove",o=>{const r=this._scene.pick({canvasPos:o});r?(!n||r.entity.id!==n.id)&&(n&&this._planes[n.id]&&this._onHoverLeavePlane(n.id),n=r.entity,this._planes[n.id]&&this._onHoverEnterPlane(n.id)):n&&(this._onHoverLeavePlane(n.id),n=null)}),this._scene.canvas.canvas.addEventListener("mouseup",this._onCanvasMouseUp=()=>{n?this._planes[n.id]&&this._onClickedPlane(n.id):this._onClickedNothing()}),this._scene.canvas.canvas.addEventListener("mouseout",this._onCanvasMouseOut=()=>{n&&(this._onHoverLeavePlane(n.id),n=null)})}this.setVisible(t.overviewVisible)}addSectionPlane(e){this._planes[e.id]=new t7t(this,this._scene,e)}setPlaneHighlighted(e,t){const n=this._planes[e];n&&n.setHighlighted(t)}setPlaneSelected(e,t){const n=this._planes[e];n&&n.setSelected(t)}removeSectionPlane(e){const t=this._planes[e.id];t&&(t.destroy(),delete this._planes[e.id])}setVisible(e=!0){this._visible=e,this._canvas.style.visibility=e?"visible":"hidden"}getVisible(){return this._visible}destroy(){this._viewer.camera.off(this._onViewerCameraMatrix),this._viewer.camera.off(this._onViewerCameraWorldAxis),this._viewer.camera.perspective.off(this._onViewerCameraFOV),this._scene.input.off(this._onInputMouseMove),this._scene.canvas.canvas.removeEventListener("mouseup",this._onCanvasMouseUp),this._scene.canvas.canvas.removeEventListener("mouseout",this._onCanvasMouseOut),this._scene.destroy()}}const Cc=b.AABB3(),Ih=b.vec3();class n7t extends qr{constructor(e,t={}){if(super("SectionPlanes",e),this._freeControls=[],this._sectionPlanes=e.scene.sectionPlanes,this._controls={},this._shownControlId=null,t.overviewCanvasId!==null&&t.overviewCanvasId!==void 0){const n=document.getElementById(t.overviewCanvasId);n?this._overview=new i7t(this,{overviewCanvas:n,visible:t.overviewVisible,onHoverEnterPlane:(o=>{this._overview.setPlaneHighlighted(o,!0)}),onHoverLeavePlane:(o=>{this._overview.setPlaneHighlighted(o,!1)}),onClickedPlane:(o=>{if(this.getShownControl()===o){this.hideControl();return}this.showControl(o);const s=this.sectionPlanes[o].pos;Cc.set(this.viewer.scene.aabb),b.getAABB3Center(Cc,Ih),Cc[0]+=s[0]-Ih[0],Cc[1]+=s[1]-Ih[1],Cc[2]+=s[2]-Ih[2],Cc[3]+=s[0]-Ih[0],Cc[4]+=s[1]-Ih[1],Cc[5]+=s[2]-Ih[2],this.viewer.cameraFlight.flyTo({aabb:Cc,fitFOV:65})}),onClickedNothing:(()=>{this.hideControl()})}):this.warn("Can't find overview canvas: '"+t.overviewCanvasId+"' - will create plugin without overview")}this._onSceneSectionPlaneCreated=e.scene.on("sectionPlaneCreated",n=>{this._sectionPlaneCreated(n)})}setOverviewVisible(e){this._overview&&this._overview.setVisible(e)}getOverviewVisible(){if(this._overview)return this._overview.getVisible()}get sectionPlanes(){return this._sectionPlanes}createSectionPlane(e={}){return e.id!==void 0&&e.id!==null&&this.viewer.scene.components[e.id]&&(this.error("Viewer component with this ID already exists: "+e.id),delete e.id),new SP(this.viewer.scene,{id:e.id,pos:e.pos,dir:e.dir,active:!0})}_sectionPlaneCreated(e){const t=this._freeControls.length>0?this._freeControls.pop():(()=>{const n=this.viewer.scene,o=(function(){const d=new n4(n,{isObject:!1});return d.addChild(new yi(d,{geometry:new yn(d,{primitive:"triangles",positions:[.5,.5,0,.5,-.5,0,-.5,-.5,0,-.5,.5,0,.5,.5,-0,.5,-.5,-0,-.5,-.5,-0,-.5,.5,-0],indices:[0,1,2,2,3,0]}),material:new vn(d,{emissive:[0,0,0],diffuse:[0,0,0],backfaces:!0}),opacity:.6,ghosted:!0,ghostMaterial:new fc(d,{edges:!1,filled:!0,fillColor:[1,1,0],edgeColor:[0,0,0],fillAlpha:.1,backfaces:!0}),pickable:!1,collidable:!0,clippable:!1,visible:!1,scale:[2.4,2.4,1],isObject:!1})),d.addChild(new yi(d,{geometry:new yn(d,bS({center:[0,0,0],radius:1.7,tube:.02,radialSegments:4,tubeSegments:4,arc:Math.PI*2})),material:new vn(d,{emissive:[0,0,0],diffuse:[0,0,0],specular:[0,0,0],shininess:0}),highlightMaterial:new fc(d,{edges:!1,edgeColor:[0,0,0],filled:!0,fillColor:[.8,.8,.8],fillAlpha:1}),pickable:!1,collidable:!1,clippable:!1,visible:!1,scale:[1,1,.1],rotation:[0,0,45],isObject:!1})),{setPosition:(function(){const h=b.vec3(),p=b.vec3();return function(A){Ah(A,h,p),d.origin=h,d.position=p}})(),setQuaternion:h=>{d.quaternion=h},setScale:h=>{d.scale=h},setVisible:h=>{d.visible=h},destroy:()=>{d.destroy()}}})();let r=()=>{};const s=new e7t(this.viewer);let a=!1,l=!1,c=null;const u=()=>{const d=l&&!a;o.setVisible(d),s.setHandlers(d&&c)};return{_destroy:()=>{r(),s.destroy(),o.destroy()},setCulled:d=>{a=d,u()},setVisible:d=>{l=d,u()},_setSectionPlane:d=>{if(r(),d){let h=!1;c={onPosition:m=>{o.setPosition(m),d.pos=m},onQuaternion:m=>{o.setQuaternion(m),h=!0,d.quaternion=m},onScreenScale:m=>{o.setScale(m)}};const p=()=>{o.setPosition(d.pos),s.setPosition(d.pos)},A=()=>{o.setQuaternion(d.quaternion),s.setQuaternion(d.quaternion)};p(),A();const f=d.on("pos",p),g=d.on("dir",()=>{h?h=!1:A()});r=()=>{d.off(f),d.off(g),r=()=>{}}}}}})();t._setSectionPlane(e),t.setVisible(!1),this._controls[e.id]=t,this._overview&&this._overview.addSectionPlane(e),e.once("destroyed",()=>{this._sectionPlaneDestroyed(e)})}flipSectionPlanes(){const e=this.viewer.scene.sectionPlanes;for(let t in e)e[t].flipDir()}showControl(e){const t=this._controls[e];if(!t){this.error("Control not found: "+e);return}this.hideControl(),t.setVisible(!0),this._overview&&this._overview.setPlaneSelected(e,!0),this._shownControlId=e}getShownControl(){return this._shownControlId}hideControl(){for(var e in this._controls)this._controls.hasOwnProperty(e)&&(this._controls[e].setVisible(!1),this._overview&&this._overview.setPlaneSelected(e,!1));this._shownControlId=null}destroySectionPlane(e){var t=this.viewer.scene.sectionPlanes[e];if(!t){this.error("SectionPlane not found: "+e);return}this._sectionPlaneDestroyed(t),t.destroy(),e===this._shownControlId&&(this._shownControlId=null)}_sectionPlaneDestroyed(e){this._overview&&this._overview.removeSectionPlane(e);const t=this._controls[e.id];t&&(t.setVisible(!1),t._setSectionPlane(null),delete this._controls[e.id],this._freeControls.push(t))}clear(){const e=Object.keys(this._sectionPlanes);for(var t=0,n=e.length;t<n;t++)this.destroySectionPlane(e[t])}send(e,t){switch(e){case"snapshotStarting":for(let n in this._controls)this._controls.hasOwnProperty(n)&&this._controls[n].setCulled(!0);break;case"snapshotFinished":for(let n in this._controls)this._controls.hasOwnProperty(n)&&this._controls[n].setCulled(!1);break;case"clearSectionPlanes":this.clear();break}}destroy(){this.clear(),this._overview&&this._overview.destroy(),this._destroyFreeControls(),super.destroy()}_destroyFreeControls(){for(var e=this._freeControls.pop();e;)e._destroy(),e=this._freeControls.pop();this.viewer.scene.off(this._onSceneSectionPlaneCreated)}}class $te{constructor(e={}){this.cacheBuster=e.cacheBuster!==!1}_cacheBusterURL(e){if(!this.cacheBuster)return e;const t=new Date().getTime();return e.indexOf("?")>-1?e+"&_="+t:e+"?_="+t}getManifest(e,t,n){At.loadJSON(this._cacheBusterURL(e),o=>{t(o)},function(o){n(o)})}getMetaModel(e,t,n){At.loadJSON(this._cacheBusterURL(e),o=>{t(o)},function(o){n(o)})}getXKT(e,t,n){var o=()=>{};t=t||o,n=n||o;const r=/^data:(.*?)(;base64)?,(.*)$/,s=e.match(r);if(s){const c=!!s[2];var a=s[3];a=window.decodeURIComponent(a),c&&(a=window.atob(a));try{const u=new ArrayBuffer(a.length),d=new Uint8Array(u);for(var l=0;l<a.length;l++)d[l]=a.charCodeAt(l);t(u)}catch(u){n(u)}}else{const c=new XMLHttpRequest;c.open("GET",this._cacheBusterURL(e),!0),c.responseType="arraybuffer",c.onreadystatechange=function(){c.readyState===4&&(c.status===200?t(c.response):n("getXKT error : "+c.response))},c.send(null)}}}var J4={exports:{}};var o7t=J4.exports,eie;function s7t(){return eie||(eie=1,(function(i,e){(function(t,n){n(e)})(o7t,(function(t){function n(D){let Y=D.length;for(;--Y>=0;)D[Y]=0}const o=256,r=286,s=30,a=15,l=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),c=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),u=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),d=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),h=new Array(576);n(h);const p=new Array(60);n(p);const A=new Array(512);n(A);const f=new Array(256);n(f);const g=new Array(29);n(g);const m=new Array(s);function v(D,Y,O,xe,we){this.static_tree=D,this.extra_bits=Y,this.extra_base=O,this.elems=xe,this.max_length=we,this.has_stree=D&&D.length}let y,w,x;function M(D,Y){this.dyn_tree=D,this.max_code=0,this.stat_desc=Y}n(m);const B=D=>D<256?A[D]:A[256+(D>>>7)],S=(D,Y)=>{D.pending_buf[D.pending++]=255&Y,D.pending_buf[D.pending++]=Y>>>8&255},I=(D,Y,O)=>{D.bi_valid>16-O?(D.bi_buf|=Y<<D.bi_valid&65535,S(D,D.bi_buf),D.bi_buf=Y>>16-D.bi_valid,D.bi_valid+=O-16):(D.bi_buf|=Y<<D.bi_valid&65535,D.bi_valid+=O)},R=(D,Y,O)=>{I(D,O[2*Y],O[2*Y+1])},T=(D,Y)=>{let O=0;do O|=1&D,D>>>=1,O<<=1;while(--Y>0);return O>>>1},_=(D,Y,O)=>{const xe=new Array(16);let we,ye,tt=0;for(we=1;we<=a;we++)tt=tt+O[we-1]<<1,xe[we]=tt;for(ye=0;ye<=Y;ye++){let Oe=D[2*ye+1];Oe!==0&&(D[2*ye]=T(xe[Oe]++,Oe))}},F=D=>{let Y;for(Y=0;Y<r;Y++)D.dyn_ltree[2*Y]=0;for(Y=0;Y<s;Y++)D.dyn_dtree[2*Y]=0;for(Y=0;Y<19;Y++)D.bl_tree[2*Y]=0;D.dyn_ltree[512]=1,D.opt_len=D.static_len=0,D.sym_next=D.matches=0},N=D=>{D.bi_valid>8?S(D,D.bi_buf):D.bi_valid>0&&(D.pending_buf[D.pending++]=D.bi_buf),D.bi_buf=0,D.bi_valid=0},z=(D,Y,O,xe)=>{const we=2*Y,ye=2*O;return D[we]<D[ye]||D[we]===D[ye]&&xe[Y]<=xe[O]},j=(D,Y,O)=>{const xe=D.heap[O];let we=O<<1;for(;we<=D.heap_len&&(we<D.heap_len&&z(Y,D.heap[we+1],D.heap[we],D.depth)&&we++,!z(Y,xe,D.heap[we],D.depth));)D.heap[O]=D.heap[we],O=we,we<<=1;D.heap[O]=xe},W=(D,Y,O)=>{let xe,we,ye,tt,Oe=0;if(D.sym_next!==0)do xe=255&D.pending_buf[D.sym_buf+Oe++],xe+=(255&D.pending_buf[D.sym_buf+Oe++])<<8,we=D.pending_buf[D.sym_buf+Oe++],xe===0?R(D,we,Y):(ye=f[we],R(D,ye+o+1,Y),tt=l[ye],tt!==0&&(we-=g[ye],I(D,we,tt)),xe--,ye=B(xe),R(D,ye,O),tt=c[ye],tt!==0&&(xe-=m[ye],I(D,xe,tt)));while(Oe<D.sym_next);R(D,256,Y)},J=(D,Y)=>{const O=Y.dyn_tree,xe=Y.stat_desc.static_tree,we=Y.stat_desc.has_stree,ye=Y.stat_desc.elems;let tt,Oe,wt,Ve=-1;for(D.heap_len=0,D.heap_max=573,tt=0;tt<ye;tt++)O[2*tt]!==0?(D.heap[++D.heap_len]=Ve=tt,D.depth[tt]=0):O[2*tt+1]=0;for(;D.heap_len<2;)wt=D.heap[++D.heap_len]=Ve<2?++Ve:0,O[2*wt]=1,D.depth[wt]=0,D.opt_len--,we&&(D.static_len-=xe[2*wt+1]);for(Y.max_code=Ve,tt=D.heap_len>>1;tt>=1;tt--)j(D,O,tt);wt=ye;do tt=D.heap[1],D.heap[1]=D.heap[D.heap_len--],j(D,O,1),Oe=D.heap[1],D.heap[--D.heap_max]=tt,D.heap[--D.heap_max]=Oe,O[2*wt]=O[2*tt]+O[2*Oe],D.depth[wt]=(D.depth[tt]>=D.depth[Oe]?D.depth[tt]:D.depth[Oe])+1,O[2*tt+1]=O[2*Oe+1]=wt,D.heap[1]=wt++,j(D,O,1);while(D.heap_len>=2);D.heap[--D.heap_max]=D.heap[1],((et,si)=>{const Gt=si.dyn_tree,Ct=si.max_code,ho=si.stat_desc.static_tree,Di=si.stat_desc.has_stree,Kt=si.stat_desc.extra_bits,zi=si.stat_desc.extra_base,ni=si.stat_desc.max_length;let Bt,ti,ji,Pt,Ti,ri,Jt=0;for(Pt=0;Pt<=a;Pt++)et.bl_count[Pt]=0;for(Gt[2*et.heap[et.heap_max]+1]=0,Bt=et.heap_max+1;Bt<573;Bt++)ti=et.heap[Bt],Pt=Gt[2*Gt[2*ti+1]+1]+1,Pt>ni&&(Pt=ni,Jt++),Gt[2*ti+1]=Pt,ti>Ct||(et.bl_count[Pt]++,Ti=0,ti>=zi&&(Ti=Kt[ti-zi]),ri=Gt[2*ti],et.opt_len+=ri*(Pt+Ti),Di&&(et.static_len+=ri*(ho[2*ti+1]+Ti)));if(Jt!==0){do{for(Pt=ni-1;et.bl_count[Pt]===0;)Pt--;et.bl_count[Pt]--,et.bl_count[Pt+1]+=2,et.bl_count[ni]--,Jt-=2}while(Jt>0);for(Pt=ni;Pt!==0;Pt--)for(ti=et.bl_count[Pt];ti!==0;)ji=et.heap[--Bt],ji>Ct||(Gt[2*ji+1]!==Pt&&(et.opt_len+=(Pt-Gt[2*ji+1])*Gt[2*ji],Gt[2*ji+1]=Pt),ti--)}})(D,Y),_(O,Ve,D.bl_count)},$=(D,Y,O)=>{let xe,we,ye=-1,tt=Y[1],Oe=0,wt=7,Ve=4;for(tt===0&&(wt=138,Ve=3),Y[2*(O+1)+1]=65535,xe=0;xe<=O;xe++)we=tt,tt=Y[2*(xe+1)+1],++Oe<wt&&we===tt||(Oe<Ve?D.bl_tree[2*we]+=Oe:we!==0?(we!==ye&&D.bl_tree[2*we]++,D.bl_tree[32]++):Oe<=10?D.bl_tree[34]++:D.bl_tree[36]++,Oe=0,ye=we,tt===0?(wt=138,Ve=3):we===tt?(wt=6,Ve=3):(wt=7,Ve=4))},ue=(D,Y,O)=>{let xe,we,ye=-1,tt=Y[1],Oe=0,wt=7,Ve=4;for(tt===0&&(wt=138,Ve=3),xe=0;xe<=O;xe++)if(we=tt,tt=Y[2*(xe+1)+1],!(++Oe<wt&&we===tt)){if(Oe<Ve)do R(D,we,D.bl_tree);while(--Oe!=0);else we!==0?(we!==ye&&(R(D,we,D.bl_tree),Oe--),R(D,16,D.bl_tree),I(D,Oe-3,2)):Oe<=10?(R(D,17,D.bl_tree),I(D,Oe-3,3)):(R(D,18,D.bl_tree),I(D,Oe-11,7));Oe=0,ye=we,tt===0?(wt=138,Ve=3):we===tt?(wt=6,Ve=3):(wt=7,Ve=4)}};let Ee=!1;const Be=(D,Y,O,xe)=>{I(D,0+(xe?1:0),3),N(D),S(D,O),S(D,~O),O&&D.pending_buf.set(D.window.subarray(Y,Y+O),D.pending),D.pending+=O};var ze=(D,Y,O,xe)=>{let we,ye,tt=0;D.level>0?(D.strm.data_type===2&&(D.strm.data_type=(Oe=>{let wt,Ve=4093624447;for(wt=0;wt<=31;wt++,Ve>>>=1)if(1&Ve&&Oe.dyn_ltree[2*wt]!==0)return 0;if(Oe.dyn_ltree[18]!==0||Oe.dyn_ltree[20]!==0||Oe.dyn_ltree[26]!==0)return 1;for(wt=32;wt<o;wt++)if(Oe.dyn_ltree[2*wt]!==0)return 1;return 0})(D)),J(D,D.l_desc),J(D,D.d_desc),tt=(Oe=>{let wt;for($(Oe,Oe.dyn_ltree,Oe.l_desc.max_code),$(Oe,Oe.dyn_dtree,Oe.d_desc.max_code),J(Oe,Oe.bl_desc),wt=18;wt>=3&&Oe.bl_tree[2*d[wt]+1]===0;wt--);return Oe.opt_len+=3*(wt+1)+5+5+4,wt})(D),we=D.opt_len+3+7>>>3,ye=D.static_len+3+7>>>3,ye<=we&&(we=ye)):we=ye=O+5,O+4<=we&&Y!==-1?Be(D,Y,O,xe):D.strategy===4||ye===we?(I(D,2+(xe?1:0),3),W(D,h,p)):(I(D,4+(xe?1:0),3),((Oe,wt,Ve,et)=>{let si;for(I(Oe,wt-257,5),I(Oe,Ve-1,5),I(Oe,et-4,4),si=0;si<et;si++)I(Oe,Oe.bl_tree[2*d[si]+1],3);ue(Oe,Oe.dyn_ltree,wt-1),ue(Oe,Oe.dyn_dtree,Ve-1)})(D,D.l_desc.max_code+1,D.d_desc.max_code+1,tt+1),W(D,D.dyn_ltree,D.dyn_dtree)),F(D),xe&&N(D)},Qe={_tr_init:D=>{Ee||((()=>{let Y,O,xe,we,ye;const tt=new Array(16);for(xe=0,we=0;we<28;we++)for(g[we]=xe,Y=0;Y<1<<l[we];Y++)f[xe++]=we;for(f[xe-1]=we,ye=0,we=0;we<16;we++)for(m[we]=ye,Y=0;Y<1<<c[we];Y++)A[ye++]=we;for(ye>>=7;we<s;we++)for(m[we]=ye<<7,Y=0;Y<1<<c[we]-7;Y++)A[256+ye++]=we;for(O=0;O<=a;O++)tt[O]=0;for(Y=0;Y<=143;)h[2*Y+1]=8,Y++,tt[8]++;for(;Y<=255;)h[2*Y+1]=9,Y++,tt[9]++;for(;Y<=279;)h[2*Y+1]=7,Y++,tt[7]++;for(;Y<=287;)h[2*Y+1]=8,Y++,tt[8]++;for(_(h,287,tt),Y=0;Y<s;Y++)p[2*Y+1]=5,p[2*Y]=T(Y,5);y=new v(h,l,257,r,a),w=new v(p,c,0,s,a),x=new v(new Array(0),u,0,19,7)})(),Ee=!0),D.l_desc=new M(D.dyn_ltree,y),D.d_desc=new M(D.dyn_dtree,w),D.bl_desc=new M(D.bl_tree,x),D.bi_buf=0,D.bi_valid=0,F(D)},_tr_stored_block:Be,_tr_flush_block:ze,_tr_tally:(D,Y,O)=>(D.pending_buf[D.sym_buf+D.sym_next++]=Y,D.pending_buf[D.sym_buf+D.sym_next++]=Y>>8,D.pending_buf[D.sym_buf+D.sym_next++]=O,Y===0?D.dyn_ltree[2*O]++:(D.matches++,Y--,D.dyn_ltree[2*(f[O]+o+1)]++,D.dyn_dtree[2*B(Y)]++),D.sym_next===D.sym_end),_tr_align:D=>{I(D,2,3),R(D,256,h),(Y=>{Y.bi_valid===16?(S(Y,Y.bi_buf),Y.bi_buf=0,Y.bi_valid=0):Y.bi_valid>=8&&(Y.pending_buf[Y.pending++]=255&Y.bi_buf,Y.bi_buf>>=8,Y.bi_valid-=8)})(D)}},me=(D,Y,O,xe)=>{let we=65535&D|0,ye=D>>>16&65535|0,tt=0;for(;O!==0;){tt=O>2e3?2e3:O,O-=tt;do we=we+Y[xe++]|0,ye=ye+we|0;while(--tt);we%=65521,ye%=65521}return we|ye<<16|0};const _e=new Uint32Array((()=>{let D,Y=[];for(var O=0;O<256;O++){D=O;for(var xe=0;xe<8;xe++)D=1&D?3988292384^D>>>1:D>>>1;Y[O]=D}return Y})());var De=(D,Y,O,xe)=>{const we=_e,ye=xe+O;D^=-1;for(let tt=xe;tt<ye;tt++)D=D>>>8^we[255&(D^Y[tt])];return-1^D},ve={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},ge={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8};const{_tr_init:Ie,_tr_stored_block:Ne,_tr_flush_block:qe,_tr_tally:Q,_tr_align:ne}=Qe,{Z_NO_FLUSH:ie,Z_PARTIAL_FLUSH:Me,Z_FULL_FLUSH:Ae,Z_FINISH:q,Z_BLOCK:Z,Z_OK:oe,Z_STREAM_END:fe,Z_STREAM_ERROR:Se,Z_DATA_ERROR:X,Z_BUF_ERROR:H,Z_DEFAULT_COMPRESSION:ee,Z_FILTERED:be,Z_HUFFMAN_ONLY:re,Z_RLE:he,Z_FIXED:je,Z_DEFAULT_STRATEGY:de,Z_UNKNOWN:Fe,Z_DEFLATED:ut}=ge,Ce=258,Xe=262,ht=42,lt=113,dt=666,bt=(D,Y)=>(D.msg=ve[Y],Y),ke=D=>2*D-(D>4?9:0),Je=D=>{let Y=D.length;for(;--Y>=0;)D[Y]=0},ft=D=>{let Y,O,xe,we=D.w_size;Y=D.hash_size,xe=Y;do O=D.head[--xe],D.head[xe]=O>=we?O-we:0;while(--Y);Y=we,xe=Y;do O=D.prev[--xe],D.prev[xe]=O>=we?O-we:0;while(--Y)};let it=(D,Y,O)=>(Y<<D.hash_shift^O)&D.hash_mask;const Ge=D=>{const Y=D.state;let O=Y.pending;O>D.avail_out&&(O=D.avail_out),O!==0&&(D.output.set(Y.pending_buf.subarray(Y.pending_out,Y.pending_out+O),D.next_out),D.next_out+=O,Y.pending_out+=O,D.total_out+=O,D.avail_out-=O,Y.pending-=O,Y.pending===0&&(Y.pending_out=0))},pe=(D,Y)=>{qe(D,D.block_start>=0?D.block_start:-1,D.strstart-D.block_start,Y),D.block_start=D.strstart,Ge(D.strm)},Te=(D,Y)=>{D.pending_buf[D.pending++]=Y},mt=(D,Y)=>{D.pending_buf[D.pending++]=Y>>>8&255,D.pending_buf[D.pending++]=255&Y},vt=(D,Y,O,xe)=>{let we=D.avail_in;return we>xe&&(we=xe),we===0?0:(D.avail_in-=we,Y.set(D.input.subarray(D.next_in,D.next_in+we),O),D.state.wrap===1?D.adler=me(D.adler,Y,we,O):D.state.wrap===2&&(D.adler=De(D.adler,Y,we,O)),D.next_in+=we,D.total_in+=we,we)},It=(D,Y)=>{let O,xe,we=D.max_chain_length,ye=D.strstart,tt=D.prev_length,Oe=D.nice_match;const wt=D.strstart>D.w_size-Xe?D.strstart-(D.w_size-Xe):0,Ve=D.window,et=D.w_mask,si=D.prev,Gt=D.strstart+Ce;let Ct=Ve[ye+tt-1],ho=Ve[ye+tt];D.prev_length>=D.good_match&&(we>>=2),Oe>D.lookahead&&(Oe=D.lookahead);do if(O=Y,Ve[O+tt]===ho&&Ve[O+tt-1]===Ct&&Ve[O]===Ve[ye]&&Ve[++O]===Ve[ye+1]){ye+=2,O++;do;while(Ve[++ye]===Ve[++O]&&Ve[++ye]===Ve[++O]&&Ve[++ye]===Ve[++O]&&Ve[++ye]===Ve[++O]&&Ve[++ye]===Ve[++O]&&Ve[++ye]===Ve[++O]&&Ve[++ye]===Ve[++O]&&Ve[++ye]===Ve[++O]&&ye<Gt);if(xe=Ce-(Gt-ye),ye=Gt-Ce,xe>tt){if(D.match_start=Y,tt=xe,xe>=Oe)break;Ct=Ve[ye+tt-1],ho=Ve[ye+tt]}}while((Y=si[Y&et])>wt&&--we!=0);return tt<=D.lookahead?tt:D.lookahead},kt=D=>{const Y=D.w_size;let O,xe,we;do{if(xe=D.window_size-D.lookahead-D.strstart,D.strstart>=Y+(Y-Xe)&&(D.window.set(D.window.subarray(Y,Y+Y-xe),0),D.match_start-=Y,D.strstart-=Y,D.block_start-=Y,D.insert>D.strstart&&(D.insert=D.strstart),ft(D),xe+=Y),D.strm.avail_in===0)break;if(O=vt(D.strm,D.window,D.strstart+D.lookahead,xe),D.lookahead+=O,D.lookahead+D.insert>=3)for(we=D.strstart-D.insert,D.ins_h=D.window[we],D.ins_h=it(D,D.ins_h,D.window[we+1]);D.insert&&(D.ins_h=it(D,D.ins_h,D.window[we+3-1]),D.prev[we&D.w_mask]=D.head[D.ins_h],D.head[D.ins_h]=we,we++,D.insert--,!(D.lookahead+D.insert<3)););}while(D.lookahead<Xe&&D.strm.avail_in!==0)},Wi=(D,Y)=>{let O,xe,we,ye=D.pending_buf_size-5>D.w_size?D.w_size:D.pending_buf_size-5,tt=0,Oe=D.strm.avail_in;do{if(O=65535,we=D.bi_valid+42>>3,D.strm.avail_out<we||(we=D.strm.avail_out-we,xe=D.strstart-D.block_start,O>xe+D.strm.avail_in&&(O=xe+D.strm.avail_in),O>we&&(O=we),O<ye&&(O===0&&Y!==q||Y===ie||O!==xe+D.strm.avail_in)))break;tt=Y===q&&O===xe+D.strm.avail_in?1:0,Ne(D,0,0,tt),D.pending_buf[D.pending-4]=O,D.pending_buf[D.pending-3]=O>>8,D.pending_buf[D.pending-2]=~O,D.pending_buf[D.pending-1]=~O>>8,Ge(D.strm),xe&&(xe>O&&(xe=O),D.strm.output.set(D.window.subarray(D.block_start,D.block_start+xe),D.strm.next_out),D.strm.next_out+=xe,D.strm.avail_out-=xe,D.strm.total_out+=xe,D.block_start+=xe,O-=xe),O&&(vt(D.strm,D.strm.output,D.strm.next_out,O),D.strm.next_out+=O,D.strm.avail_out-=O,D.strm.total_out+=O)}while(tt===0);return Oe-=D.strm.avail_in,Oe&&(Oe>=D.w_size?(D.matches=2,D.window.set(D.strm.input.subarray(D.strm.next_in-D.w_size,D.strm.next_in),0),D.strstart=D.w_size,D.insert=D.strstart):(D.window_size-D.strstart<=Oe&&(D.strstart-=D.w_size,D.window.set(D.window.subarray(D.w_size,D.w_size+D.strstart),0),D.matches<2&&D.matches++,D.insert>D.strstart&&(D.insert=D.strstart)),D.window.set(D.strm.input.subarray(D.strm.next_in-Oe,D.strm.next_in),D.strstart),D.strstart+=Oe,D.insert+=Oe>D.w_size-D.insert?D.w_size-D.insert:Oe),D.block_start=D.strstart),D.high_water<D.strstart&&(D.high_water=D.strstart),tt?4:Y!==ie&&Y!==q&&D.strm.avail_in===0&&D.strstart===D.block_start?2:(we=D.window_size-D.strstart,D.strm.avail_in>we&&D.block_start>=D.w_size&&(D.block_start-=D.w_size,D.strstart-=D.w_size,D.window.set(D.window.subarray(D.w_size,D.w_size+D.strstart),0),D.matches<2&&D.matches++,we+=D.w_size,D.insert>D.strstart&&(D.insert=D.strstart)),we>D.strm.avail_in&&(we=D.strm.avail_in),we&&(vt(D.strm,D.window,D.strstart,we),D.strstart+=we,D.insert+=we>D.w_size-D.insert?D.w_size-D.insert:we),D.high_water<D.strstart&&(D.high_water=D.strstart),we=D.bi_valid+42>>3,we=D.pending_buf_size-we>65535?65535:D.pending_buf_size-we,ye=we>D.w_size?D.w_size:we,xe=D.strstart-D.block_start,(xe>=ye||(xe||Y===q)&&Y!==ie&&D.strm.avail_in===0&&xe<=we)&&(O=xe>we?we:xe,tt=Y===q&&D.strm.avail_in===0&&O===xe?1:0,Ne(D,D.block_start,O,tt),D.block_start+=O,Ge(D.strm)),tt?3:1)},Qn=(D,Y)=>{let O,xe;for(;;){if(D.lookahead<Xe){if(kt(D),D.lookahead<Xe&&Y===ie)return 1;if(D.lookahead===0)break}if(O=0,D.lookahead>=3&&(D.ins_h=it(D,D.ins_h,D.window[D.strstart+3-1]),O=D.prev[D.strstart&D.w_mask]=D.head[D.ins_h],D.head[D.ins_h]=D.strstart),O!==0&&D.strstart-O<=D.w_size-Xe&&(D.match_length=It(D,O)),D.match_length>=3)if(xe=Q(D,D.strstart-D.match_start,D.match_length-3),D.lookahead-=D.match_length,D.match_length<=D.max_lazy_match&&D.lookahead>=3){D.match_length--;do D.strstart++,D.ins_h=it(D,D.ins_h,D.window[D.strstart+3-1]),O=D.prev[D.strstart&D.w_mask]=D.head[D.ins_h],D.head[D.ins_h]=D.strstart;while(--D.match_length!=0);D.strstart++}else D.strstart+=D.match_length,D.match_length=0,D.ins_h=D.window[D.strstart],D.ins_h=it(D,D.ins_h,D.window[D.strstart+1]);else xe=Q(D,0,D.window[D.strstart]),D.lookahead--,D.strstart++;if(xe&&(pe(D,!1),D.strm.avail_out===0))return 1}return D.insert=D.strstart<2?D.strstart:2,Y===q?(pe(D,!0),D.strm.avail_out===0?3:4):D.sym_next&&(pe(D,!1),D.strm.avail_out===0)?1:2},Ui=(D,Y)=>{let O,xe,we;for(;;){if(D.lookahead<Xe){if(kt(D),D.lookahead<Xe&&Y===ie)return 1;if(D.lookahead===0)break}if(O=0,D.lookahead>=3&&(D.ins_h=it(D,D.ins_h,D.window[D.strstart+3-1]),O=D.prev[D.strstart&D.w_mask]=D.head[D.ins_h],D.head[D.ins_h]=D.strstart),D.prev_length=D.match_length,D.prev_match=D.match_start,D.match_length=2,O!==0&&D.prev_length<D.max_lazy_match&&D.strstart-O<=D.w_size-Xe&&(D.match_length=It(D,O),D.match_length<=5&&(D.strategy===be||D.match_length===3&&D.strstart-D.match_start>4096)&&(D.match_length=2)),D.prev_length>=3&&D.match_length<=D.prev_length){we=D.strstart+D.lookahead-3,xe=Q(D,D.strstart-1-D.prev_match,D.prev_length-3),D.lookahead-=D.prev_length-1,D.prev_length-=2;do++D.strstart<=we&&(D.ins_h=it(D,D.ins_h,D.window[D.strstart+3-1]),O=D.prev[D.strstart&D.w_mask]=D.head[D.ins_h],D.head[D.ins_h]=D.strstart);while(--D.prev_length!=0);if(D.match_available=0,D.match_length=2,D.strstart++,xe&&(pe(D,!1),D.strm.avail_out===0))return 1}else if(D.match_available){if(xe=Q(D,0,D.window[D.strstart-1]),xe&&pe(D,!1),D.strstart++,D.lookahead--,D.strm.avail_out===0)return 1}else D.match_available=1,D.strstart++,D.lookahead--}return D.match_available&&(xe=Q(D,0,D.window[D.strstart-1]),D.match_available=0),D.insert=D.strstart<2?D.strstart:2,Y===q?(pe(D,!0),D.strm.avail_out===0?3:4):D.sym_next&&(pe(D,!1),D.strm.avail_out===0)?1:2};function wn(D,Y,O,xe,we){this.good_length=D,this.max_lazy=Y,this.nice_length=O,this.max_chain=xe,this.func=we}const on=[new wn(0,0,0,0,Wi),new wn(4,4,8,4,Qn),new wn(4,5,16,8,Qn),new wn(4,6,32,32,Qn),new wn(4,4,16,16,Ui),new wn(8,16,32,32,Ui),new wn(8,16,128,128,Ui),new wn(8,32,128,256,Ui),new wn(32,128,258,1024,Ui),new wn(32,258,258,4096,Ui)];function Ag(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=ut,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),Je(this.dyn_ltree),Je(this.dyn_dtree),Je(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),Je(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),Je(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}const Ll=D=>{if(!D)return 1;const Y=D.state;return!Y||Y.strm!==D||Y.status!==ht&&Y.status!==57&&Y.status!==69&&Y.status!==73&&Y.status!==91&&Y.status!==103&&Y.status!==lt&&Y.status!==dt?1:0},uy=D=>{if(Ll(D))return bt(D,Se);D.total_in=D.total_out=0,D.data_type=Fe;const Y=D.state;return Y.pending=0,Y.pending_out=0,Y.wrap<0&&(Y.wrap=-Y.wrap),Y.status=Y.wrap===2?57:Y.wrap?ht:lt,D.adler=Y.wrap===2?0:1,Y.last_flush=-2,Ie(Y),oe},tp=D=>{const Y=uy(D);var O;return Y===oe&&((O=D.state).window_size=2*O.w_size,Je(O.head),O.max_lazy_match=on[O.level].max_lazy,O.good_match=on[O.level].good_length,O.nice_match=on[O.level].nice_length,O.max_chain_length=on[O.level].max_chain,O.strstart=0,O.block_start=0,O.lookahead=0,O.insert=0,O.match_length=O.prev_length=2,O.match_available=0,O.ins_h=0),Y},dy=(D,Y,O,xe,we,ye)=>{if(!D)return Se;let tt=1;if(Y===ee&&(Y=6),xe<0?(tt=0,xe=-xe):xe>15&&(tt=2,xe-=16),we<1||we>9||O!==ut||xe<8||xe>15||Y<0||Y>9||ye<0||ye>je||xe===8&&tt!==1)return bt(D,Se);xe===8&&(xe=9);const Oe=new Ag;return D.state=Oe,Oe.strm=D,Oe.status=ht,Oe.wrap=tt,Oe.gzhead=null,Oe.w_bits=xe,Oe.w_size=1<<Oe.w_bits,Oe.w_mask=Oe.w_size-1,Oe.hash_bits=we+7,Oe.hash_size=1<<Oe.hash_bits,Oe.hash_mask=Oe.hash_size-1,Oe.hash_shift=~~((Oe.hash_bits+3-1)/3),Oe.window=new Uint8Array(2*Oe.w_size),Oe.head=new Uint16Array(Oe.hash_size),Oe.prev=new Uint16Array(Oe.w_size),Oe.lit_bufsize=1<<we+6,Oe.pending_buf_size=4*Oe.lit_bufsize,Oe.pending_buf=new Uint8Array(Oe.pending_buf_size),Oe.sym_buf=Oe.lit_bufsize,Oe.sym_end=3*(Oe.lit_bufsize-1),Oe.level=Y,Oe.strategy=ye,Oe.method=O,tp(D)};var gd={deflateInit:(D,Y)=>dy(D,Y,ut,15,8,de),deflateInit2:dy,deflateReset:tp,deflateResetKeep:uy,deflateSetHeader:(D,Y)=>Ll(D)||D.state.wrap!==2?Se:(D.state.gzhead=Y,oe),deflate:(D,Y)=>{if(Ll(D)||Y>Z||Y<0)return D?bt(D,Se):Se;const O=D.state;if(!D.output||D.avail_in!==0&&!D.input||O.status===dt&&Y!==q)return bt(D,D.avail_out===0?H:Se);const xe=O.last_flush;if(O.last_flush=Y,O.pending!==0){if(Ge(D),D.avail_out===0)return O.last_flush=-1,oe}else if(D.avail_in===0&&ke(Y)<=ke(xe)&&Y!==q)return bt(D,H);if(O.status===dt&&D.avail_in!==0)return bt(D,H);if(O.status===ht&&O.wrap===0&&(O.status=lt),O.status===ht){let we=ut+(O.w_bits-8<<4)<<8,ye=-1;if(ye=O.strategy>=re||O.level<2?0:O.level<6?1:O.level===6?2:3,we|=ye<<6,O.strstart!==0&&(we|=32),we+=31-we%31,mt(O,we),O.strstart!==0&&(mt(O,D.adler>>>16),mt(O,65535&D.adler)),D.adler=1,O.status=lt,Ge(D),O.pending!==0)return O.last_flush=-1,oe}if(O.status===57){if(D.adler=0,Te(O,31),Te(O,139),Te(O,8),O.gzhead)Te(O,(O.gzhead.text?1:0)+(O.gzhead.hcrc?2:0)+(O.gzhead.extra?4:0)+(O.gzhead.name?8:0)+(O.gzhead.comment?16:0)),Te(O,255&O.gzhead.time),Te(O,O.gzhead.time>>8&255),Te(O,O.gzhead.time>>16&255),Te(O,O.gzhead.time>>24&255),Te(O,O.level===9?2:O.strategy>=re||O.level<2?4:0),Te(O,255&O.gzhead.os),O.gzhead.extra&&O.gzhead.extra.length&&(Te(O,255&O.gzhead.extra.length),Te(O,O.gzhead.extra.length>>8&255)),O.gzhead.hcrc&&(D.adler=De(D.adler,O.pending_buf,O.pending,0)),O.gzindex=0,O.status=69;else if(Te(O,0),Te(O,0),Te(O,0),Te(O,0),Te(O,0),Te(O,O.level===9?2:O.strategy>=re||O.level<2?4:0),Te(O,3),O.status=lt,Ge(D),O.pending!==0)return O.last_flush=-1,oe}if(O.status===69){if(O.gzhead.extra){let we=O.pending,ye=(65535&O.gzhead.extra.length)-O.gzindex;for(;O.pending+ye>O.pending_buf_size;){let Oe=O.pending_buf_size-O.pending;if(O.pending_buf.set(O.gzhead.extra.subarray(O.gzindex,O.gzindex+Oe),O.pending),O.pending=O.pending_buf_size,O.gzhead.hcrc&&O.pending>we&&(D.adler=De(D.adler,O.pending_buf,O.pending-we,we)),O.gzindex+=Oe,Ge(D),O.pending!==0)return O.last_flush=-1,oe;we=0,ye-=Oe}let tt=new Uint8Array(O.gzhead.extra);O.pending_buf.set(tt.subarray(O.gzindex,O.gzindex+ye),O.pending),O.pending+=ye,O.gzhead.hcrc&&O.pending>we&&(D.adler=De(D.adler,O.pending_buf,O.pending-we,we)),O.gzindex=0}O.status=73}if(O.status===73){if(O.gzhead.name){let we,ye=O.pending;do{if(O.pending===O.pending_buf_size){if(O.gzhead.hcrc&&O.pending>ye&&(D.adler=De(D.adler,O.pending_buf,O.pending-ye,ye)),Ge(D),O.pending!==0)return O.last_flush=-1,oe;ye=0}we=O.gzindex<O.gzhead.name.length?255&O.gzhead.name.charCodeAt(O.gzindex++):0,Te(O,we)}while(we!==0);O.gzhead.hcrc&&O.pending>ye&&(D.adler=De(D.adler,O.pending_buf,O.pending-ye,ye)),O.gzindex=0}O.status=91}if(O.status===91){if(O.gzhead.comment){let we,ye=O.pending;do{if(O.pending===O.pending_buf_size){if(O.gzhead.hcrc&&O.pending>ye&&(D.adler=De(D.adler,O.pending_buf,O.pending-ye,ye)),Ge(D),O.pending!==0)return O.last_flush=-1,oe;ye=0}we=O.gzindex<O.gzhead.comment.length?255&O.gzhead.comment.charCodeAt(O.gzindex++):0,Te(O,we)}while(we!==0);O.gzhead.hcrc&&O.pending>ye&&(D.adler=De(D.adler,O.pending_buf,O.pending-ye,ye))}O.status=103}if(O.status===103){if(O.gzhead.hcrc){if(O.pending+2>O.pending_buf_size&&(Ge(D),O.pending!==0))return O.last_flush=-1,oe;Te(O,255&D.adler),Te(O,D.adler>>8&255),D.adler=0}if(O.status=lt,Ge(D),O.pending!==0)return O.last_flush=-1,oe}if(D.avail_in!==0||O.lookahead!==0||Y!==ie&&O.status!==dt){let we=O.level===0?Wi(O,Y):O.strategy===re?((ye,tt)=>{let Oe;for(;;){if(ye.lookahead===0&&(kt(ye),ye.lookahead===0)){if(tt===ie)return 1;break}if(ye.match_length=0,Oe=Q(ye,0,ye.window[ye.strstart]),ye.lookahead--,ye.strstart++,Oe&&(pe(ye,!1),ye.strm.avail_out===0))return 1}return ye.insert=0,tt===q?(pe(ye,!0),ye.strm.avail_out===0?3:4):ye.sym_next&&(pe(ye,!1),ye.strm.avail_out===0)?1:2})(O,Y):O.strategy===he?((ye,tt)=>{let Oe,wt,Ve,et;const si=ye.window;for(;;){if(ye.lookahead<=Ce){if(kt(ye),ye.lookahead<=Ce&&tt===ie)return 1;if(ye.lookahead===0)break}if(ye.match_length=0,ye.lookahead>=3&&ye.strstart>0&&(Ve=ye.strstart-1,wt=si[Ve],wt===si[++Ve]&&wt===si[++Ve]&&wt===si[++Ve])){et=ye.strstart+Ce;do;while(wt===si[++Ve]&&wt===si[++Ve]&&wt===si[++Ve]&&wt===si[++Ve]&&wt===si[++Ve]&&wt===si[++Ve]&&wt===si[++Ve]&&wt===si[++Ve]&&Ve<et);ye.match_length=Ce-(et-Ve),ye.match_length>ye.lookahead&&(ye.match_length=ye.lookahead)}if(ye.match_length>=3?(Oe=Q(ye,1,ye.match_length-3),ye.lookahead-=ye.match_length,ye.strstart+=ye.match_length,ye.match_length=0):(Oe=Q(ye,0,ye.window[ye.strstart]),ye.lookahead--,ye.strstart++),Oe&&(pe(ye,!1),ye.strm.avail_out===0))return 1}return ye.insert=0,tt===q?(pe(ye,!0),ye.strm.avail_out===0?3:4):ye.sym_next&&(pe(ye,!1),ye.strm.avail_out===0)?1:2})(O,Y):on[O.level].func(O,Y);if(we!==3&&we!==4||(O.status=dt),we===1||we===3)return D.avail_out===0&&(O.last_flush=-1),oe;if(we===2&&(Y===Me?ne(O):Y!==Z&&(Ne(O,0,0,!1),Y===Ae&&(Je(O.head),O.lookahead===0&&(O.strstart=0,O.block_start=0,O.insert=0))),Ge(D),D.avail_out===0))return O.last_flush=-1,oe}return Y!==q?oe:O.wrap<=0?fe:(O.wrap===2?(Te(O,255&D.adler),Te(O,D.adler>>8&255),Te(O,D.adler>>16&255),Te(O,D.adler>>24&255),Te(O,255&D.total_in),Te(O,D.total_in>>8&255),Te(O,D.total_in>>16&255),Te(O,D.total_in>>24&255)):(mt(O,D.adler>>>16),mt(O,65535&D.adler)),Ge(D),O.wrap>0&&(O.wrap=-O.wrap),O.pending!==0?oe:fe)},deflateEnd:D=>{if(Ll(D))return Se;const Y=D.state.status;return D.state=null,Y===lt?bt(D,X):oe},deflateSetDictionary:(D,Y)=>{let O=Y.length;if(Ll(D))return Se;const xe=D.state,we=xe.wrap;if(we===2||we===1&&xe.status!==ht||xe.lookahead)return Se;if(we===1&&(D.adler=me(D.adler,Y,O,0)),xe.wrap=0,O>=xe.w_size){we===0&&(Je(xe.head),xe.strstart=0,xe.block_start=0,xe.insert=0);let wt=new Uint8Array(xe.w_size);wt.set(Y.subarray(O-xe.w_size,O),0),Y=wt,O=xe.w_size}const ye=D.avail_in,tt=D.next_in,Oe=D.input;for(D.avail_in=O,D.next_in=0,D.input=Y,kt(xe);xe.lookahead>=3;){let wt=xe.strstart,Ve=xe.lookahead-2;do xe.ins_h=it(xe,xe.ins_h,xe.window[wt+3-1]),xe.prev[wt&xe.w_mask]=xe.head[xe.ins_h],xe.head[xe.ins_h]=wt,wt++;while(--Ve);xe.strstart=wt,xe.lookahead=2,kt(xe)}return xe.strstart+=xe.lookahead,xe.block_start=xe.strstart,xe.insert=xe.lookahead,xe.lookahead=0,xe.match_length=xe.prev_length=2,xe.match_available=0,D.next_in=tt,D.input=Oe,D.avail_in=ye,xe.wrap=we,oe},deflateInfo:"pako deflate (from Nodeca project)"};const CO=(D,Y)=>Object.prototype.hasOwnProperty.call(D,Y);var ZC=function(D){const Y=Array.prototype.slice.call(arguments,1);for(;Y.length;){const O=Y.shift();if(O){if(typeof O!="object")throw new TypeError(O+"must be non-object");for(const xe in O)CO(O,xe)&&(D[xe]=O[xe])}}return D},YC=D=>{let Y=0;for(let xe=0,we=D.length;xe<we;xe++)Y+=D[xe].length;const O=new Uint8Array(Y);for(let xe=0,we=0,ye=D.length;xe<ye;xe++){let tt=D[xe];O.set(tt,we),we+=tt.length}return O};let XC=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{XC=!1}const ip=new Uint8Array(256);for(let D=0;D<256;D++)ip[D]=D>=252?6:D>=248?5:D>=240?4:D>=224?3:D>=192?2:1;ip[254]=ip[254]=1;var hy=D=>{if(typeof TextEncoder=="function"&&TextEncoder.prototype.encode)return new TextEncoder().encode(D);let Y,O,xe,we,ye,tt=D.length,Oe=0;for(we=0;we<tt;we++)O=D.charCodeAt(we),(64512&O)==55296&&we+1<tt&&(xe=D.charCodeAt(we+1),(64512&xe)==56320&&(O=65536+(O-55296<<10)+(xe-56320),we++)),Oe+=O<128?1:O<2048?2:O<65536?3:4;for(Y=new Uint8Array(Oe),ye=0,we=0;ye<Oe;we++)O=D.charCodeAt(we),(64512&O)==55296&&we+1<tt&&(xe=D.charCodeAt(we+1),(64512&xe)==56320&&(O=65536+(O-55296<<10)+(xe-56320),we++)),O<128?Y[ye++]=O:O<2048?(Y[ye++]=192|O>>>6,Y[ye++]=128|63&O):O<65536?(Y[ye++]=224|O>>>12,Y[ye++]=128|O>>>6&63,Y[ye++]=128|63&O):(Y[ye++]=240|O>>>18,Y[ye++]=128|O>>>12&63,Y[ye++]=128|O>>>6&63,Y[ye++]=128|63&O);return Y},se=(D,Y)=>{const O=Y||D.length;if(typeof TextDecoder=="function"&&TextDecoder.prototype.decode)return new TextDecoder().decode(D.subarray(0,Y));let xe,we;const ye=new Array(2*O);for(we=0,xe=0;xe<O;){let tt=D[xe++];if(tt<128){ye[we++]=tt;continue}let Oe=ip[tt];if(Oe>4)ye[we++]=65533,xe+=Oe-1;else{for(tt&=Oe===2?31:Oe===3?15:7;Oe>1&&xe<O;)tt=tt<<6|63&D[xe++],Oe--;Oe>1?ye[we++]=65533:tt<65536?ye[we++]=tt:(tt-=65536,ye[we++]=55296|tt>>10&1023,ye[we++]=56320|1023&tt)}}return((tt,Oe)=>{if(Oe<65534&&tt.subarray&&XC)return String.fromCharCode.apply(null,tt.length===Oe?tt:tt.subarray(0,Oe));let wt="";for(let Ve=0;Ve<Oe;Ve++)wt+=String.fromCharCode(tt[Ve]);return wt})(ye,we)},Ke=(D,Y)=>{(Y=Y||D.length)>D.length&&(Y=D.length);let O=Y-1;for(;O>=0&&(192&D[O])==128;)O--;return O<0||O===0?Y:O+ip[D[O]]>Y?O:Y},st=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0};const rt=Object.prototype.toString,{Z_NO_FLUSH:Ye,Z_SYNC_FLUSH:xt,Z_FULL_FLUSH:Rt,Z_FINISH:zt,Z_OK:Ft,Z_STREAM_END:Xt,Z_DEFAULT_COMPRESSION:ei,Z_DEFAULT_STRATEGY:Qt,Z_DEFLATED:vi}=ge;function Ri(D){this.options=ZC({level:ei,method:vi,chunkSize:16384,windowBits:15,memLevel:8,strategy:Qt},D||{});let Y=this.options;Y.raw&&Y.windowBits>0?Y.windowBits=-Y.windowBits:Y.gzip&&Y.windowBits>0&&Y.windowBits<16&&(Y.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new st,this.strm.avail_out=0;let O=gd.deflateInit2(this.strm,Y.level,Y.method,Y.windowBits,Y.memLevel,Y.strategy);if(O!==Ft)throw new Error(ve[O]);if(Y.header&&gd.deflateSetHeader(this.strm,Y.header),Y.dictionary){let xe;if(xe=typeof Y.dictionary=="string"?hy(Y.dictionary):rt.call(Y.dictionary)==="[object ArrayBuffer]"?new Uint8Array(Y.dictionary):Y.dictionary,O=gd.deflateSetDictionary(this.strm,xe),O!==Ft)throw new Error(ve[O]);this._dict_set=!0}}function Bn(D,Y){const O=new Ri(Y);if(O.push(D,!0),O.err)throw O.msg||ve[O.err];return O.result}Ri.prototype.push=function(D,Y){const O=this.strm,xe=this.options.chunkSize;let we,ye;if(this.ended)return!1;for(ye=Y===~~Y?Y:Y===!0?zt:Ye,typeof D=="string"?O.input=hy(D):rt.call(D)==="[object ArrayBuffer]"?O.input=new Uint8Array(D):O.input=D,O.next_in=0,O.avail_in=O.input.length;;)if(O.avail_out===0&&(O.output=new Uint8Array(xe),O.next_out=0,O.avail_out=xe),(ye===xt||ye===Rt)&&O.avail_out<=6)this.onData(O.output.subarray(0,O.next_out)),O.avail_out=0;else{if(we=gd.deflate(O,ye),we===Xt)return O.next_out>0&&this.onData(O.output.subarray(0,O.next_out)),we=gd.deflateEnd(this.strm),this.onEnd(we),this.ended=!0,we===Ft;if(O.avail_out!==0){if(ye>0&&O.next_out>0)this.onData(O.output.subarray(0,O.next_out)),O.avail_out=0;else if(O.avail_in===0)break}else this.onData(O.output)}return!0},Ri.prototype.onData=function(D){this.chunks.push(D)},Ri.prototype.onEnd=function(D){D===Ft&&(this.result=YC(this.chunks)),this.chunks=[],this.err=D,this.msg=this.strm.msg};var Cn={Deflate:Ri,deflate:Bn,deflateRaw:function(D,Y){return(Y=Y||{}).raw=!0,Bn(D,Y)},gzip:function(D,Y){return(Y=Y||{}).gzip=!0,Bn(D,Y)}};const Hi=16209;var qt=function(D,Y){let O,xe,we,ye,tt,Oe,wt,Ve,et,si,Gt,Ct,ho,Di,Kt,zi,ni,Bt,ti,ji,Pt,Ti,ri,Jt;const wi=D.state;O=D.next_in,ri=D.input,xe=O+(D.avail_in-5),we=D.next_out,Jt=D.output,ye=we-(Y-D.avail_out),tt=we+(D.avail_out-257),Oe=wi.dmax,wt=wi.wsize,Ve=wi.whave,et=wi.wnext,si=wi.window,Gt=wi.hold,Ct=wi.bits,ho=wi.lencode,Di=wi.distcode,Kt=(1<<wi.lenbits)-1,zi=(1<<wi.distbits)-1;e:do{Ct<15&&(Gt+=ri[O++]<<Ct,Ct+=8,Gt+=ri[O++]<<Ct,Ct+=8),ni=ho[Gt&Kt];t:for(;;){if(Bt=ni>>>24,Gt>>>=Bt,Ct-=Bt,Bt=ni>>>16&255,Bt===0)Jt[we++]=65535∋else{if(!(16&Bt)){if((64&Bt)==0){ni=ho[(65535&ni)+(Gt&(1<<Bt)-1)];continue t}if(32&Bt){wi.mode=16191;break e}D.msg="invalid literal/length code",wi.mode=Hi;break e}ti=65535&ni,Bt&=15,Bt&&(Ct<Bt&&(Gt+=ri[O++]<<Ct,Ct+=8),ti+=Gt&(1<<Bt)-1,Gt>>>=Bt,Ct-=Bt),Ct<15&&(Gt+=ri[O++]<<Ct,Ct+=8,Gt+=ri[O++]<<Ct,Ct+=8),ni=Di[Gt&zi];i:for(;;){if(Bt=ni>>>24,Gt>>>=Bt,Ct-=Bt,Bt=ni>>>16&255,!(16&Bt)){if((64&Bt)==0){ni=Di[(65535&ni)+(Gt&(1<<Bt)-1)];continue i}D.msg="invalid distance code",wi.mode=Hi;break e}if(ji=65535&ni,Bt&=15,Ct<Bt&&(Gt+=ri[O++]<<Ct,Ct+=8,Ct<Bt&&(Gt+=ri[O++]<<Ct,Ct+=8)),ji+=Gt&(1<<Bt)-1,ji>Oe){D.msg="invalid distance too far back",wi.mode=Hi;break e}if(Gt>>>=Bt,Ct-=Bt,Bt=we-ye,ji>Bt){if(Bt=ji-Bt,Bt>Ve&&wi.sane){D.msg="invalid distance too far back",wi.mode=Hi;break e}if(Pt=0,Ti=si,et===0){if(Pt+=wt-Bt,Bt<ti){ti-=Bt;do Jt[we++]=si[Pt++];while(--Bt);Pt=we-ji,Ti=Jt}}else if(et<Bt){if(Pt+=wt+et-Bt,Bt-=et,Bt<ti){ti-=Bt;do Jt[we++]=si[Pt++];while(--Bt);if(Pt=0,et<ti){Bt=et,ti-=Bt;do Jt[we++]=si[Pt++];while(--Bt);Pt=we-ji,Ti=Jt}}}else if(Pt+=et-Bt,Bt<ti){ti-=Bt;do Jt[we++]=si[Pt++];while(--Bt);Pt=we-ji,Ti=Jt}for(;ti>2;)Jt[we++]=Ti[Pt++],Jt[we++]=Ti[Pt++],Jt[we++]=Ti[Pt++],ti-=3;ti&&(Jt[we++]=Ti[Pt++],ti>1&&(Jt[we++]=Ti[Pt++]))}else{Pt=we-ji;do Jt[we++]=Jt[Pt++],Jt[we++]=Jt[Pt++],Jt[we++]=Jt[Pt++],ti-=3;while(ti>2);ti&&(Jt[we++]=Jt[Pt++],ti>1&&(Jt[we++]=Jt[Pt++]))}break}}break}}while(O<xe&&we<tt);ti=Ct>>3,O-=ti,Ct-=ti<<3,Gt&=(1<<Ct)-1,D.next_in=O,D.next_out=we,D.avail_in=O<xe?xe-O+5:5-(O-xe),D.avail_out=we<tt?tt-we+257:257-(we-tt),wi.hold=Gt,wi.bits=Ct};const mn=15,_i=new Uint16Array([3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0]),Vs=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78]),yd=new Uint16Array([1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0]),Hs=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]);var Na=(D,Y,O,xe,we,ye,tt,Oe)=>{const wt=Oe.bits;let Ve,et,si,Gt,Ct,ho,Di=0,Kt=0,zi=0,ni=0,Bt=0,ti=0,ji=0,Pt=0,Ti=0,ri=0,Jt=null;const wi=new Uint16Array(16),zs=new Uint16Array(16);let my,nb,ob,sb=null;for(Di=0;Di<=mn;Di++)wi[Di]=0;for(Kt=0;Kt<xe;Kt++)wi[Y[O+Kt]]++;for(Bt=wt,ni=mn;ni>=1&&wi[ni]===0;ni--);if(Bt>ni&&(Bt=ni),ni===0)return we[ye++]=20971520,we[ye++]=20971520,Oe.bits=1,0;for(zi=1;zi<ni&&wi[zi]===0;zi++);for(Bt<zi&&(Bt=zi),Pt=1,Di=1;Di<=mn;Di++)if(Pt<<=1,Pt-=wi[Di],Pt<0)return-1;if(Pt>0&&(D===0||ni!==1))return-1;for(zs[1]=0,Di=1;Di<mn;Di++)zs[Di+1]=zs[Di]+wi[Di];for(Kt=0;Kt<xe;Kt++)Y[O+Kt]!==0&&(tt[zs[Y[O+Kt]]++]=Kt);if(D===0?(Jt=sb=tt,ho=20):D===1?(Jt=_i,sb=Vs,ho=257):(Jt=yd,sb=Hs,ho=0),ri=0,Kt=0,Di=zi,Ct=ye,ti=Bt,ji=0,si=-1,Ti=1<<Bt,Gt=Ti-1,D===1&&Ti>852||D===2&&Ti>592)return 1;for(;;){my=Di-ji,tt[Kt]+1<ho?(nb=0,ob=tt[Kt]):tt[Kt]>=ho?(nb=sb[tt[Kt]-ho],ob=Jt[tt[Kt]-ho]):(nb=96,ob=0),Ve=1<<Di-ji,et=1<<ti,zi=et;do et-=Ve,we[Ct+(ri>>ji)+et]=my<<24|nb<<16|ob|0;while(et!==0);for(Ve=1<<Di-1;ri&Ve;)Ve>>=1;if(Ve!==0?(ri&=Ve-1,ri+=Ve):ri=0,Kt++,--wi[Di]==0){if(Di===ni)break;Di=Y[O+tt[Kt]]}if(Di>Bt&&(ri&Gt)!==si){for(ji===0&&(ji=Bt),Ct+=zi,ti=Di-ji,Pt=1<<ti;ti+ji<ni&&(Pt-=wi[ti+ji],!(Pt<=0));)ti++,Pt<<=1;if(Ti+=1<<ti,D===1&&Ti>852||D===2&&Ti>592)return 1;si=ri&Gt,we[si]=Bt<<24|ti<<16|Ct-ye|0}}return ri!==0&&(we[Ct+ri]=Di-ji<<24|64<<16|0),Oe.bits=Bt,0};const{Z_FINISH:In,Z_BLOCK:ar,Z_TREES:$o,Z_OK:qn,Z_STREAM_END:ws,Z_NEED_DICT:py,Z_STREAM_ERROR:wo,Z_DATA_ERROR:w2e,Z_MEM_ERROR:C2e,Z_BUF_ERROR:oni,Z_DEFLATED:b2e}=ge,$C=16180,eb=16190,zc=16191,bO=16192,xO=16194,tb=16199,ib=16200,MO=16206,Un=16209,x2e=D=>(D>>>24&255)+(D>>>8&65280)+((65280&D)<<8)+((255&D)<<24);function sni(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const np=D=>{if(!D)return 1;const Y=D.state;return!Y||Y.strm!==D||Y.mode<$C||Y.mode>16211?1:0},M2e=D=>{if(np(D))return wo;const Y=D.state;return D.total_in=D.total_out=Y.total=0,D.msg="",Y.wrap&&(D.adler=1&Y.wrap),Y.mode=$C,Y.last=0,Y.havedict=0,Y.flags=-1,Y.dmax=32768,Y.head=null,Y.hold=0,Y.bits=0,Y.lencode=Y.lendyn=new Int32Array(852),Y.distcode=Y.distdyn=new Int32Array(592),Y.sane=1,Y.back=-1,qn},E2e=D=>{if(np(D))return wo;const Y=D.state;return Y.wsize=0,Y.whave=0,Y.wnext=0,M2e(D)},B2e=(D,Y)=>{let O;if(np(D))return wo;const xe=D.state;return Y<0?(O=0,Y=-Y):(O=5+(Y>>4),Y<48&&(Y&=15)),Y&&(Y<8||Y>15)?wo:(xe.window!==null&&xe.wbits!==Y&&(xe.window=null),xe.wrap=O,xe.wbits=Y,E2e(D))},I2e=(D,Y)=>{if(!D)return wo;const O=new sni;D.state=O,O.strm=D,O.window=null,O.mode=$C;const xe=B2e(D,Y);return xe!==qn&&(D.state=null),xe};let EO,BO,S2e=!0;const rni=D=>{if(S2e){EO=new Int32Array(512),BO=new Int32Array(32);let Y=0;for(;Y<144;)D.lens[Y++]=8;for(;Y<256;)D.lens[Y++]=9;for(;Y<280;)D.lens[Y++]=7;for(;Y<288;)D.lens[Y++]=8;for(Na(1,D.lens,0,288,EO,0,D.work,{bits:9}),Y=0;Y<32;)D.lens[Y++]=5;Na(2,D.lens,0,32,BO,0,D.work,{bits:5}),S2e=!1}D.lencode=EO,D.lenbits=9,D.distcode=BO,D.distbits=5},P2e=(D,Y,O,xe)=>{let we;const ye=D.state;return ye.window===null&&(ye.wsize=1<<ye.wbits,ye.wnext=0,ye.whave=0,ye.window=new Uint8Array(ye.wsize)),xe>=ye.wsize?(ye.window.set(Y.subarray(O-ye.wsize,O),0),ye.wnext=0,ye.whave=ye.wsize):(we=ye.wsize-ye.wnext,we>xe&&(we=xe),ye.window.set(Y.subarray(O-xe,O-xe+we),ye.wnext),(xe-=we)?(ye.window.set(Y.subarray(O-xe,O),0),ye.wnext=xe,ye.whave=ye.wsize):(ye.wnext+=we,ye.wnext===ye.wsize&&(ye.wnext=0),ye.whave<ye.wsize&&(ye.whave+=we))),0};var jc={inflateReset:E2e,inflateReset2:B2e,inflateResetKeep:M2e,inflateInit:D=>I2e(D,15),inflateInit2:I2e,inflate:(D,Y)=>{let O,xe,we,ye,tt,Oe,wt,Ve,et,si,Gt,Ct,ho,Di,Kt,zi,ni,Bt,ti,ji,Pt,Ti,ri=0;const Jt=new Uint8Array(4);let wi,zs;const my=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(np(D)||!D.output||!D.input&&D.avail_in!==0)return wo;O=D.state,O.mode===zc&&(O.mode=bO),tt=D.next_out,we=D.output,wt=D.avail_out,ye=D.next_in,xe=D.input,Oe=D.avail_in,Ve=O.hold,et=O.bits,si=Oe,Gt=wt,Ti=qn;e:for(;;)switch(O.mode){case $C:if(O.wrap===0){O.mode=bO;break}for(;et<16;){if(Oe===0)break e;Oe--,Ve+=xe[ye++]<<et,et+=8}if(2&O.wrap&&Ve===35615){O.wbits===0&&(O.wbits=15),O.check=0,Jt[0]=255&Ve,Jt[1]=Ve>>>8&255,O.check=De(O.check,Jt,2,0),Ve=0,et=0,O.mode=16181;break}if(O.head&&(O.head.done=!1),!(1&O.wrap)||(((255&Ve)<<8)+(Ve>>8))%31){D.msg="incorrect header check",O.mode=Un;break}if((15&Ve)!==b2e){D.msg="unknown compression method",O.mode=Un;break}if(Ve>>>=4,et-=4,Pt=8+(15&Ve),O.wbits===0&&(O.wbits=Pt),Pt>15||Pt>O.wbits){D.msg="invalid window size",O.mode=Un;break}O.dmax=1<<O.wbits,O.flags=0,D.adler=O.check=1,O.mode=512&Ve?16189:zc,Ve=0,et=0;break;case 16181:for(;et<16;){if(Oe===0)break e;Oe--,Ve+=xe[ye++]<<et,et+=8}if(O.flags=Ve,(255&O.flags)!==b2e){D.msg="unknown compression method",O.mode=Un;break}if(57344&O.flags){D.msg="unknown header flags set",O.mode=Un;break}O.head&&(O.head.text=Ve>>8&1),512&O.flags&&4&O.wrap&&(Jt[0]=255&Ve,Jt[1]=Ve>>>8&255,O.check=De(O.check,Jt,2,0)),Ve=0,et=0,O.mode=16182;case 16182:for(;et<32;){if(Oe===0)break e;Oe--,Ve+=xe[ye++]<<et,et+=8}O.head&&(O.head.time=Ve),512&O.flags&&4&O.wrap&&(Jt[0]=255&Ve,Jt[1]=Ve>>>8&255,Jt[2]=Ve>>>16&255,Jt[3]=Ve>>>24&255,O.check=De(O.check,Jt,4,0)),Ve=0,et=0,O.mode=16183;case 16183:for(;et<16;){if(Oe===0)break e;Oe--,Ve+=xe[ye++]<<et,et+=8}O.head&&(O.head.xflags=255&Ve,O.head.os=Ve>>8),512&O.flags&&4&O.wrap&&(Jt[0]=255&Ve,Jt[1]=Ve>>>8&255,O.check=De(O.check,Jt,2,0)),Ve=0,et=0,O.mode=16184;case 16184:if(1024&O.flags){for(;et<16;){if(Oe===0)break e;Oe--,Ve+=xe[ye++]<<et,et+=8}O.length=Ve,O.head&&(O.head.extra_len=Ve),512&O.flags&&4&O.wrap&&(Jt[0]=255&Ve,Jt[1]=Ve>>>8&255,O.check=De(O.check,Jt,2,0)),Ve=0,et=0}else O.head&&(O.head.extra=null);O.mode=16185;case 16185:if(1024&O.flags&&(Ct=O.length,Ct>Oe&&(Ct=Oe),Ct&&(O.head&&(Pt=O.head.extra_len-O.length,O.head.extra||(O.head.extra=new Uint8Array(O.head.extra_len)),O.head.extra.set(xe.subarray(ye,ye+Ct),Pt)),512&O.flags&&4&O.wrap&&(O.check=De(O.check,xe,Ct,ye)),Oe-=Ct,ye+=Ct,O.length-=Ct),O.length))break e;O.length=0,O.mode=16186;case 16186:if(2048&O.flags){if(Oe===0)break e;Ct=0;do Pt=xe[ye+Ct++],O.head&&Pt&&O.length<65536&&(O.head.name+=String.fromCharCode(Pt));while(Pt&&Ct<Oe);if(512&O.flags&&4&O.wrap&&(O.check=De(O.check,xe,Ct,ye)),Oe-=Ct,ye+=Ct,Pt)break e}else O.head&&(O.head.name=null);O.length=0,O.mode=16187;case 16187:if(4096&O.flags){if(Oe===0)break e;Ct=0;do Pt=xe[ye+Ct++],O.head&&Pt&&O.length<65536&&(O.head.comment+=String.fromCharCode(Pt));while(Pt&&Ct<Oe);if(512&O.flags&&4&O.wrap&&(O.check=De(O.check,xe,Ct,ye)),Oe-=Ct,ye+=Ct,Pt)break e}else O.head&&(O.head.comment=null);O.mode=16188;case 16188:if(512&O.flags){for(;et<16;){if(Oe===0)break e;Oe--,Ve+=xe[ye++]<<et,et+=8}if(4&O.wrap&&Ve!==(65535&O.check)){D.msg="header crc mismatch",O.mode=Un;break}Ve=0,et=0}O.head&&(O.head.hcrc=O.flags>>9&1,O.head.done=!0),D.adler=O.check=0,O.mode=zc;break;case 16189:for(;et<32;){if(Oe===0)break e;Oe--,Ve+=xe[ye++]<<et,et+=8}D.adler=O.check=x2e(Ve),Ve=0,et=0,O.mode=eb;case eb:if(O.havedict===0)return D.next_out=tt,D.avail_out=wt,D.next_in=ye,D.avail_in=Oe,O.hold=Ve,O.bits=et,py;D.adler=O.check=1,O.mode=zc;case zc:if(Y===ar||Y===$o)break e;case bO:if(O.last){Ve>>>=7&et,et-=7&et,O.mode=MO;break}for(;et<3;){if(Oe===0)break e;Oe--,Ve+=xe[ye++]<<et,et+=8}switch(O.last=1&Ve,Ve>>>=1,et-=1,3&Ve){case 0:O.mode=16193;break;case 1:if(rni(O),O.mode=tb,Y===$o){Ve>>>=2,et-=2;break e}break;case 2:O.mode=16196;break;case 3:D.msg="invalid block type",O.mode=Un}Ve>>>=2,et-=2;break;case 16193:for(Ve>>>=7&et,et-=7&et;et<32;){if(Oe===0)break e;Oe--,Ve+=xe[ye++]<<et,et+=8}if((65535&Ve)!=(Ve>>>16^65535)){D.msg="invalid stored block lengths",O.mode=Un;break}if(O.length=65535&Ve,Ve=0,et=0,O.mode=xO,Y===$o)break e;case xO:O.mode=16195;case 16195:if(Ct=O.length,Ct){if(Ct>Oe&&(Ct=Oe),Ct>wt&&(Ct=wt),Ct===0)break e;we.set(xe.subarray(ye,ye+Ct),tt),Oe-=Ct,ye+=Ct,wt-=Ct,tt+=Ct,O.length-=Ct;break}O.mode=zc;break;case 16196:for(;et<14;){if(Oe===0)break e;Oe--,Ve+=xe[ye++]<<et,et+=8}if(O.nlen=257+(31&Ve),Ve>>>=5,et-=5,O.ndist=1+(31&Ve),Ve>>>=5,et-=5,O.ncode=4+(15&Ve),Ve>>>=4,et-=4,O.nlen>286||O.ndist>30){D.msg="too many length or distance symbols",O.mode=Un;break}O.have=0,O.mode=16197;case 16197:for(;O.have<O.ncode;){for(;et<3;){if(Oe===0)break e;Oe--,Ve+=xe[ye++]<<et,et+=8}O.lens[my[O.have++]]=7&Ve,Ve>>>=3,et-=3}for(;O.have<19;)O.lens[my[O.have++]]=0;if(O.lencode=O.lendyn,O.lenbits=7,wi={bits:O.lenbits},Ti=Na(0,O.lens,0,19,O.lencode,0,O.work,wi),O.lenbits=wi.bits,Ti){D.msg="invalid code lengths set",O.mode=Un;break}O.have=0,O.mode=16198;case 16198:for(;O.have<O.nlen+O.ndist;){for(;ri=O.lencode[Ve&(1<<O.lenbits)-1],Kt=ri>>>24,zi=ri>>>16&255,ni=65535&ri,!(Kt<=et);){if(Oe===0)break e;Oe--,Ve+=xe[ye++]<<et,et+=8}if(ni<16)Ve>>>=Kt,et-=Kt,O.lens[O.have++]=ni;else{if(ni===16){for(zs=Kt+2;et<zs;){if(Oe===0)break e;Oe--,Ve+=xe[ye++]<<et,et+=8}if(Ve>>>=Kt,et-=Kt,O.have===0){D.msg="invalid bit length repeat",O.mode=Un;break}Pt=O.lens[O.have-1],Ct=3+(3&Ve),Ve>>>=2,et-=2}else if(ni===17){for(zs=Kt+3;et<zs;){if(Oe===0)break e;Oe--,Ve+=xe[ye++]<<et,et+=8}Ve>>>=Kt,et-=Kt,Pt=0,Ct=3+(7&Ve),Ve>>>=3,et-=3}else{for(zs=Kt+7;et<zs;){if(Oe===0)break e;Oe--,Ve+=xe[ye++]<<et,et+=8}Ve>>>=Kt,et-=Kt,Pt=0,Ct=11+(127&Ve),Ve>>>=7,et-=7}if(O.have+Ct>O.nlen+O.ndist){D.msg="invalid bit length repeat",O.mode=Un;break}for(;Ct--;)O.lens[O.have++]=Pt}}if(O.mode===Un)break;if(O.lens[256]===0){D.msg="invalid code -- missing end-of-block",O.mode=Un;break}if(O.lenbits=9,wi={bits:O.lenbits},Ti=Na(1,O.lens,0,O.nlen,O.lencode,0,O.work,wi),O.lenbits=wi.bits,Ti){D.msg="invalid literal/lengths set",O.mode=Un;break}if(O.distbits=6,O.distcode=O.distdyn,wi={bits:O.distbits},Ti=Na(2,O.lens,O.nlen,O.ndist,O.distcode,0,O.work,wi),O.distbits=wi.bits,Ti){D.msg="invalid distances set",O.mode=Un;break}if(O.mode=tb,Y===$o)break e;case tb:O.mode=ib;case ib:if(Oe>=6&&wt>=258){D.next_out=tt,D.avail_out=wt,D.next_in=ye,D.avail_in=Oe,O.hold=Ve,O.bits=et,qt(D,Gt),tt=D.next_out,we=D.output,wt=D.avail_out,ye=D.next_in,xe=D.input,Oe=D.avail_in,Ve=O.hold,et=O.bits,O.mode===zc&&(O.back=-1);break}for(O.back=0;ri=O.lencode[Ve&(1<<O.lenbits)-1],Kt=ri>>>24,zi=ri>>>16&255,ni=65535&ri,!(Kt<=et);){if(Oe===0)break e;Oe--,Ve+=xe[ye++]<<et,et+=8}if(zi&&(240&zi)==0){for(Bt=Kt,ti=zi,ji=ni;ri=O.lencode[ji+((Ve&(1<<Bt+ti)-1)>>Bt)],Kt=ri>>>24,zi=ri>>>16&255,ni=65535&ri,!(Bt+Kt<=et);){if(Oe===0)break e;Oe--,Ve+=xe[ye++]<<et,et+=8}Ve>>>=Bt,et-=Bt,O.back+=Bt}if(Ve>>>=Kt,et-=Kt,O.back+=Kt,O.length=ni,zi===0){O.mode=16205;break}if(32&zi){O.back=-1,O.mode=zc;break}if(64&zi){D.msg="invalid literal/length code",O.mode=Un;break}O.extra=15&zi,O.mode=16201;case 16201:if(O.extra){for(zs=O.extra;et<zs;){if(Oe===0)break e;Oe--,Ve+=xe[ye++]<<et,et+=8}O.length+=Ve&(1<<O.extra)-1,Ve>>>=O.extra,et-=O.extra,O.back+=O.extra}O.was=O.length,O.mode=16202;case 16202:for(;ri=O.distcode[Ve&(1<<O.distbits)-1],Kt=ri>>>24,zi=ri>>>16&255,ni=65535&ri,!(Kt<=et);){if(Oe===0)break e;Oe--,Ve+=xe[ye++]<<et,et+=8}if((240&zi)==0){for(Bt=Kt,ti=zi,ji=ni;ri=O.distcode[ji+((Ve&(1<<Bt+ti)-1)>>Bt)],Kt=ri>>>24,zi=ri>>>16&255,ni=65535&ri,!(Bt+Kt<=et);){if(Oe===0)break e;Oe--,Ve+=xe[ye++]<<et,et+=8}Ve>>>=Bt,et-=Bt,O.back+=Bt}if(Ve>>>=Kt,et-=Kt,O.back+=Kt,64&zi){D.msg="invalid distance code",O.mode=Un;break}O.offset=ni,O.extra=15&zi,O.mode=16203;case 16203:if(O.extra){for(zs=O.extra;et<zs;){if(Oe===0)break e;Oe--,Ve+=xe[ye++]<<et,et+=8}O.offset+=Ve&(1<<O.extra)-1,Ve>>>=O.extra,et-=O.extra,O.back+=O.extra}if(O.offset>O.dmax){D.msg="invalid distance too far back",O.mode=Un;break}O.mode=16204;case 16204:if(wt===0)break e;if(Ct=Gt-wt,O.offset>Ct){if(Ct=O.offset-Ct,Ct>O.whave&&O.sane){D.msg="invalid distance too far back",O.mode=Un;break}Ct>O.wnext?(Ct-=O.wnext,ho=O.wsize-Ct):ho=O.wnext-Ct,Ct>O.length&&(Ct=O.length),Di=O.window}else Di=we,ho=tt-O.offset,Ct=O.length;Ct>wt&&(Ct=wt),wt-=Ct,O.length-=Ct;do we[tt++]=Di[ho++];while(--Ct);O.length===0&&(O.mode=ib);break;case 16205:if(wt===0)break e;we[tt++]=O.length,wt--,O.mode=ib;break;case MO:if(O.wrap){for(;et<32;){if(Oe===0)break e;Oe--,Ve|=xe[ye++]<<et,et+=8}if(Gt-=wt,D.total_out+=Gt,O.total+=Gt,4&O.wrap&&Gt&&(D.adler=O.check=O.flags?De(O.check,we,Gt,tt-Gt):me(O.check,we,Gt,tt-Gt)),Gt=wt,4&O.wrap&&(O.flags?Ve:x2e(Ve))!==O.check){D.msg="incorrect data check",O.mode=Un;break}Ve=0,et=0}O.mode=16207;case 16207:if(O.wrap&&O.flags){for(;et<32;){if(Oe===0)break e;Oe--,Ve+=xe[ye++]<<et,et+=8}if(4&O.wrap&&Ve!==(4294967295&O.total)){D.msg="incorrect length check",O.mode=Un;break}Ve=0,et=0}O.mode=16208;case 16208:Ti=ws;break e;case Un:Ti=w2e;break e;case 16210:return C2e;default:return wo}return D.next_out=tt,D.avail_out=wt,D.next_in=ye,D.avail_in=Oe,O.hold=Ve,O.bits=et,(O.wsize||Gt!==D.avail_out&&O.mode<Un&&(O.mode<MO||Y!==In))&&P2e(D,D.output,D.next_out,Gt-D.avail_out),si-=D.avail_in,Gt-=D.avail_out,D.total_in+=si,D.total_out+=Gt,O.total+=Gt,4&O.wrap&&Gt&&(D.adler=O.check=O.flags?De(O.check,we,Gt,D.next_out-Gt):me(O.check,we,Gt,D.next_out-Gt)),D.data_type=O.bits+(O.last?64:0)+(O.mode===zc?128:0)+(O.mode===tb||O.mode===xO?256:0),(si===0&&Gt===0||Y===In)&&Ti===qn&&(Ti=oni),Ti},inflateEnd:D=>{if(np(D))return wo;let Y=D.state;return Y.window&&(Y.window=null),D.state=null,qn},inflateGetHeader:(D,Y)=>{if(np(D))return wo;const O=D.state;return(2&O.wrap)==0?wo:(O.head=Y,Y.done=!1,qn)},inflateSetDictionary:(D,Y)=>{const O=Y.length;let xe,we,ye;return np(D)?wo:(xe=D.state,xe.wrap!==0&&xe.mode!==eb?wo:xe.mode===eb&&(we=1,we=me(we,Y,O,0),we!==xe.check)?w2e:(ye=P2e(D,Y,O,O),ye?(xe.mode=16210,C2e):(xe.havedict=1,qn)))},inflateInfo:"pako inflate (from Nodeca project)"},ani=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1};const T2e=Object.prototype.toString,{Z_NO_FLUSH:lni,Z_FINISH:cni,Z_OK:fy,Z_STREAM_END:IO,Z_NEED_DICT:SO,Z_STREAM_ERROR:uni,Z_DATA_ERROR:k2e,Z_MEM_ERROR:dni}=ge;function Ay(D){this.options=ZC({chunkSize:65536,windowBits:15,to:""},D||{});const Y=this.options;Y.raw&&Y.windowBits>=0&&Y.windowBits<16&&(Y.windowBits=-Y.windowBits,Y.windowBits===0&&(Y.windowBits=-15)),!(Y.windowBits>=0&&Y.windowBits<16)||D&&D.windowBits||(Y.windowBits+=32),Y.windowBits>15&&Y.windowBits<48&&(15&Y.windowBits)==0&&(Y.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new st,this.strm.avail_out=0;let O=jc.inflateInit2(this.strm,Y.windowBits);if(O!==fy)throw new Error(ve[O]);if(this.header=new ani,jc.inflateGetHeader(this.strm,this.header),Y.dictionary&&(typeof Y.dictionary=="string"?Y.dictionary=hy(Y.dictionary):T2e.call(Y.dictionary)==="[object ArrayBuffer]"&&(Y.dictionary=new Uint8Array(Y.dictionary)),Y.raw&&(O=jc.inflateSetDictionary(this.strm,Y.dictionary),O!==fy)))throw new Error(ve[O])}function PO(D,Y){const O=new Ay(Y);if(O.push(D),O.err)throw O.msg||ve[O.err];return O.result}Ay.prototype.push=function(D,Y){const O=this.strm,xe=this.options.chunkSize,we=this.options.dictionary;let ye,tt,Oe;if(this.ended)return!1;for(tt=Y===~~Y?Y:Y===!0?cni:lni,T2e.call(D)==="[object ArrayBuffer]"?O.input=new Uint8Array(D):O.input=D,O.next_in=0,O.avail_in=O.input.length;;){for(O.avail_out===0&&(O.output=new Uint8Array(xe),O.next_out=0,O.avail_out=xe),ye=jc.inflate(O,tt),ye===SO&&we&&(ye=jc.inflateSetDictionary(O,we),ye===fy?ye=jc.inflate(O,tt):ye===k2e&&(ye=SO));O.avail_in>0&&ye===IO&&O.state.wrap>0&&D[O.next_in]!==0;)jc.inflateReset(O),ye=jc.inflate(O,tt);switch(ye){case uni:case k2e:case SO:case dni:return this.onEnd(ye),this.ended=!0,!1}if(Oe=O.avail_out,O.next_out&&(O.avail_out===0||ye===IO))if(this.options.to==="string"){let wt=Ke(O.output,O.next_out),Ve=O.next_out-wt,et=se(O.output,wt);O.next_out=Ve,O.avail_out=xe-Ve,Ve&&O.output.set(O.output.subarray(wt,wt+Ve),0),this.onData(et)}else this.onData(O.output.length===O.next_out?O.output:O.output.subarray(0,O.next_out));if(ye!==fy||Oe!==0){if(ye===IO)return ye=jc.inflateEnd(this.strm),this.onEnd(ye),this.ended=!0,!0;if(O.avail_in===0)break}}return!0},Ay.prototype.onData=function(D){this.chunks.push(D)},Ay.prototype.onEnd=function(D){D===fy&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=YC(this.chunks)),this.chunks=[],this.err=D,this.msg=this.strm.msg};var hni={Inflate:Ay,inflate:PO,inflateRaw:function(D,Y){return(Y=Y||{}).raw=!0,PO(D,Y)},ungzip:PO};const{Deflate:pni,deflate:fni,deflateRaw:Ani,gzip:mni}=Cn,{Inflate:gni,inflate:yni,inflateRaw:vni,ungzip:wni}=hni;var R2e=pni,_2e=fni,D2e=Ani,L2e=mni,F2e=gni,O2e=yni,N2e=vni,U2e=wni,V2e=ge,Cni={Deflate:R2e,deflate:_2e,deflateRaw:D2e,gzip:L2e,Inflate:F2e,inflate:O2e,inflateRaw:N2e,ungzip:U2e,constants:V2e};t.Deflate=R2e,t.Inflate=F2e,t.constants=V2e,t.default=Cni,t.deflate=_2e,t.deflateRaw=D2e,t.gzip=L2e,t.inflate=O2e,t.inflateRaw=N2e,t.ungzip=U2e,Object.defineProperty(t,"__esModule",{value:!0})}))})(J4,J4.exports)),J4.exports}var tie=s7t();const Ia=mg({__proto__:null,default:n3(tie)},[tie]);let _s=window.pako||Ia;_s.inflate||(_s=_s.default);const r7t=(function(){const i=new Float32Array(3);return function(e){return i[0]=e[0]/255,i[1]=e[1]/255,i[2]=e[2]/255,i}})();function a7t(i){return{positions:i[0],normals:i[1],indices:i[2],edgeIndices:i[3],meshPositions:i[4],meshIndices:i[5],meshEdgesIndices:i[6],meshColors:i[7],entityIDs:i[8],entityMeshes:i[9],entityIsObjects:i[10],positionsDecodeMatrix:i[11]}}function l7t(i){return{positions:new Uint16Array(_s.inflate(i.positions).buffer),normals:new Int8Array(_s.inflate(i.normals).buffer),indices:new Uint32Array(_s.inflate(i.indices).buffer),edgeIndices:new Uint32Array(_s.inflate(i.edgeIndices).buffer),meshPositions:new Uint32Array(_s.inflate(i.meshPositions).buffer),meshIndices:new Uint32Array(_s.inflate(i.meshIndices).buffer),meshEdgesIndices:new Uint32Array(_s.inflate(i.meshEdgesIndices).buffer),meshColors:new Uint8Array(_s.inflate(i.meshColors).buffer),entityIDs:_s.inflate(i.entityIDs,{to:"string"}),entityMeshes:new Uint32Array(_s.inflate(i.entityMeshes).buffer),entityIsObjects:new Uint8Array(_s.inflate(i.entityIsObjects).buffer),positionsDecodeMatrix:new Float32Array(_s.inflate(i.positionsDecodeMatrix).buffer)}}function c7t(i,e,t,n,o,r){r.getNextId(),n.positionsCompression="precompressed",n.normalsCompression="precompressed";const s=t.positions,a=t.normals,l=t.indices,c=t.edgeIndices,u=t.meshPositions,d=t.meshIndices,h=t.meshEdgesIndices,p=t.meshColors,A=JSON.parse(t.entityIDs),f=t.entityMeshes,g=t.entityIsObjects,m=u.length,v=f.length;for(let y=0;y<v;y++){const w=A[y],x=e.globalizeObjectIds?b.globalizeObjectId(n.id,w):w,M=i.metaScene.metaObjects[x],B={},S={};if(M){if(e.excludeTypesMap&&M.type&&e.excludeTypesMap[M.type]||e.includeTypesMap&&M.type&&!e.includeTypesMap[M.type])continue;const T=e.objectDefaults?e.objectDefaults[M.type]||e.objectDefaults.DEFAULT:null;T&&(T.visible===!1&&(B.visible=!1),T.pickable===!1&&(B.pickable=!1),T.colorize&&(S.color=T.colorize),T.opacity!==void 0&&T.opacity!==null&&(S.opacity=T.opacity))}else if(e.excludeUnclassifiedObjects)continue;const I=y===v-1,R=[];for(let T=f[y],_=I?f.length:f[y+1];T<_;T++){const F=T===m-1,N=x+".mesh."+T,z=r7t(p.subarray(T*4,T*4+3)),j=p[T*4+3]/255;n.createMesh(At.apply(S,{id:N,primitive:"triangles",positionsCompressed:s.subarray(u[T],F?s.length:u[T+1]),normalsCompressed:a.subarray(u[T],F?s.length:u[T+1]),indices:l.subarray(d[T],F?l.length:d[T+1]),edgeIndices:c.subarray(h[T],F?c.length:h[T+1]),positionsDecodeMatrix:t.positionsDecodeMatrix,color:z,opacity:j})),R.push(N)}n.createEntity(At.apply(B,{id:x,isObject:g[y]===1,meshIds:R}))}}const iie={version:1,parse:function(i,e,t,n,o,r){const s=a7t(t),a=l7t(s);c7t(i,e,a,n,o,r)}};let Do=window.pako||Ia;Do.inflate||(Do=Do.default);function u7t(i){return{positions:i[0],normals:i[1],indices:i[2],edgeIndices:i[3],meshPositions:i[4],meshIndices:i[5],meshEdgesIndices:i[6],meshColors:i[7],entityIDs:i[8],entityMeshes:i[9],entityIsObjects:i[10],positionsDecodeMatrix:i[11],entityMeshIds:i[12],entityMatrices:i[13],entityUsesInstancing:i[14]}}function d7t(i){return{positions:new Uint16Array(Do.inflate(i.positions).buffer),normals:new Int8Array(Do.inflate(i.normals).buffer),indices:new Uint32Array(Do.inflate(i.indices).buffer),edgeIndices:new Uint32Array(Do.inflate(i.edgeIndices).buffer),meshPositions:new Uint32Array(Do.inflate(i.meshPositions).buffer),meshIndices:new Uint32Array(Do.inflate(i.meshIndices).buffer),meshEdgesIndices:new Uint32Array(Do.inflate(i.meshEdgesIndices).buffer),meshColors:new Uint8Array(Do.inflate(i.meshColors).buffer),entityIDs:Do.inflate(i.entityIDs,{to:"string"}),entityMeshes:new Uint32Array(Do.inflate(i.entityMeshes).buffer),entityIsObjects:new Uint8Array(Do.inflate(i.entityIsObjects).buffer),positionsDecodeMatrix:new Float32Array(Do.inflate(i.positionsDecodeMatrix).buffer),entityMeshIds:new Uint32Array(Do.inflate(i.entityMeshIds).buffer),entityMatrices:new Float32Array(Do.inflate(i.entityMatrices).buffer),entityUsesInstancing:new Uint8Array(Do.inflate(i.entityUsesInstancing).buffer)}}const h7t=(function(){const i=new Float32Array(3);return function(e){return i[0]=e[0]/255,i[1]=e[1]/255,i[2]=e[2]/255,i}})();function p7t(i,e,t,n,o,r){const s=r.getNextId();n.positionsCompression="precompressed",n.normalsCompression="precompressed";const a=t.positions,l=t.normals,c=t.indices,u=t.edgeIndices,d=t.meshPositions,h=t.meshIndices,p=t.meshEdgesIndices,A=t.meshColors,f=JSON.parse(t.entityIDs),g=t.entityMeshes,m=t.entityIsObjects,v=t.entityMeshIds,y=t.entityMatrices,w=t.entityUsesInstancing,x=d.length,M=g.length,B={};for(let S=0;S<M;S++){const I=f[S],R=e.globalizeObjectIds?b.globalizeObjectId(n.id,I):I,T=i.metaScene.metaObjects[R],_={},F={},N=y.subarray(S*16,S*16+16);if(T){if(e.excludeTypesMap&&T.type&&e.excludeTypesMap[T.type]||e.includeTypesMap&&T.type&&!e.includeTypesMap[T.type])continue;const W=e.objectDefaults?e.objectDefaults[T.type]||e.objectDefaults.DEFAULT:null;W&&(W.visible===!1&&(_.visible=!1),W.pickable===!1&&(_.pickable=!1),W.colorize&&(F.color=W.colorize),W.opacity!==void 0&&W.opacity!==null&&(F.opacity=W.opacity))}else if(e.excludeUnclassifiedObjects)continue;const z=S===M-1,j=[];for(let W=g[S],J=z?v.length:g[S+1];W<J;W++){const $=v[W],ue=$===x-1,Ee=r.getNextId(),Be=h7t(A.subarray($*4,$*4+3)),ze=A[$*4+3]/255,Qe=a.subarray(d[$],ue?a.length:d[$+1]),me=l.subarray(d[$],ue?a.length:d[$+1]),_e=c.subarray(h[$],ue?c.length:h[$+1]),De=u.subarray(p[$],ue?u.length:p[$+1]);if(w[S]===1){const ve=`${s}.geometry.${Ee}.${$}`;ve in B||(n.createGeometry({id:ve,positionsCompressed:Qe,normalsCompressed:me,indices:_e,edgeIndices:De,primitive:"triangles",positionsDecodeMatrix:t.positionsDecodeMatrix}),B[ve]=!0),n.createMesh(At.apply(F,{id:Ee,color:Be,opacity:ze,matrix:N,geometryId:ve})),j.push(Ee)}else n.createMesh(At.apply(F,{id:Ee,primitive:"triangles",positionsCompressed:Qe,normalsCompressed:me,indices:_e,edgeIndices:De,positionsDecodeMatrix:t.positionsDecodeMatrix,color:Be,opacity:ze})),j.push(Ee)}j.length&&n.createEntity(At.apply(_,{id:R,isObject:m[S]===1,meshIds:j}))}}const nie={version:2,parse:function(i,e,t,n,o,r){const s=u7t(t),a=d7t(s);p7t(i,e,a,n,o,r)}};let xo=window.pako||Ia;xo.inflate||(xo=xo.default);function f7t(i){return{positions:i[0],normals:i[1],indices:i[2],edgeIndices:i[3],meshPositions:i[4],meshIndices:i[5],meshEdgesIndices:i[6],meshColors:i[7],entityIDs:i[8],entityMeshes:i[9],entityIsObjects:i[10],instancedPositionsDecodeMatrix:i[11],batchedPositionsDecodeMatrix:i[12],entityMeshIds:i[13],entityMatrices:i[14],entityUsesInstancing:i[15]}}function A7t(i){return{positions:new Uint16Array(xo.inflate(i.positions).buffer),normals:new Int8Array(xo.inflate(i.normals).buffer),indices:new Uint32Array(xo.inflate(i.indices).buffer),edgeIndices:new Uint32Array(xo.inflate(i.edgeIndices).buffer),meshPositions:new Uint32Array(xo.inflate(i.meshPositions).buffer),meshIndices:new Uint32Array(xo.inflate(i.meshIndices).buffer),meshEdgesIndices:new Uint32Array(xo.inflate(i.meshEdgesIndices).buffer),meshColors:new Uint8Array(xo.inflate(i.meshColors).buffer),entityIDs:xo.inflate(i.entityIDs,{to:"string"}),entityMeshes:new Uint32Array(xo.inflate(i.entityMeshes).buffer),entityIsObjects:new Uint8Array(xo.inflate(i.entityIsObjects).buffer),instancedPositionsDecodeMatrix:new Float32Array(xo.inflate(i.instancedPositionsDecodeMatrix).buffer),batchedPositionsDecodeMatrix:new Float32Array(xo.inflate(i.batchedPositionsDecodeMatrix).buffer),entityMeshIds:new Uint32Array(xo.inflate(i.entityMeshIds).buffer),entityMatrices:new Float32Array(xo.inflate(i.entityMatrices).buffer),entityUsesInstancing:new Uint8Array(xo.inflate(i.entityUsesInstancing).buffer)}}const m7t=(function(){const i=new Float32Array(3);return function(e){return i[0]=e[0]/255,i[1]=e[1]/255,i[2]=e[2]/255,i}})();function g7t(i,e,t,n,o,r){const s=r.getNextId();n.positionsCompression="precompressed",n.normalsCompression="precompressed";const a=t.positions,l=t.normals,c=t.indices,u=t.edgeIndices,d=t.meshPositions,h=t.meshIndices,p=t.meshEdgesIndices,A=t.meshColors,f=JSON.parse(t.entityIDs),g=t.entityMeshes,m=t.entityIsObjects,v=t.entityMeshIds,y=t.entityMatrices,w=t.entityUsesInstancing,x=d.length,M=g.length,B={};for(let F=0;F<M;F++){const N=f[F],z=e.globalizeObjectIds?b.globalizeObjectId(n.id,N):N,j=i.metaScene.metaObjects[z],W={},J={},$=y.subarray(F*16,F*16+16);if(j){if(e.excludeTypesMap&&j.type&&e.excludeTypesMap[j.type]||e.includeTypesMap&&j.type&&!e.includeTypesMap[j.type])continue;const Be=e.objectDefaults?e.objectDefaults[j.type]||e.objectDefaults.DEFAULT:null;Be&&(Be.visible===!1&&(W.visible=!1),Be.pickable===!1&&(W.pickable=!1),Be.colorize&&(J.color=Be.colorize),Be.opacity!==void 0&&Be.opacity!==null&&(J.opacity=Be.opacity))}else if(e.excludeUnclassifiedObjects)continue;const ue=F===M-1,Ee=[];for(let Be=g[F],ze=ue?v.length:g[F+1];Be<ze;Be++){var S=v[Be];const Qe=S===x-1,me=`${s}.${z}.mesh.${S}`,_e=m7t(A.subarray(S*4,S*4+3)),De=A[S*4+3]/255;var I=a.subarray(d[S],Qe?a.length:d[S+1]),R=l.subarray(d[S],Qe?a.length:d[S+1]),T=c.subarray(h[S],Qe?c.length:h[S+1]),_=u.subarray(p[S],Qe?u.length:p[S+1]);if(w[F]===1){const ve=`${s}.geometry.${me}.${S}`;ve in B||(n.createGeometry({id:ve,positionsCompressed:I,normalsCompressed:R,indices:T,edgeIndices:_,primitive:"triangles",positionsDecodeMatrix:t.instancedPositionsDecodeMatrix}),B[ve]=!0),n.createMesh(At.apply(J,{id:me,color:_e,opacity:De,matrix:$,geometryId:ve})),Ee.push(me)}else n.createMesh(At.apply(J,{id:me,primitive:"triangles",positionsCompressed:I,normalsCompressed:R,indices:T,edgeIndices:_,positionsDecodeMatrix:t.batchedPositionsDecodeMatrix,color:_e,opacity:De})),Ee.push(me)}Ee.length&&n.createEntity(At.apply(W,{id:z,isObject:m[F]===1,meshIds:Ee}))}}const oie={version:3,parse:function(i,e,t,n,o,r){const s=f7t(t),a=A7t(s);g7t(i,e,a,n,o,r)}};let Lo=window.pako||Ia;Lo.inflate||(Lo=Lo.default);function y7t(i){return{positions:i[0],normals:i[1],indices:i[2],edgeIndices:i[3],decodeMatrices:i[4],matrices:i[5],eachPrimitivePositionsAndNormalsPortion:i[6],eachPrimitiveIndicesPortion:i[7],eachPrimitiveEdgeIndicesPortion:i[8],eachPrimitiveDecodeMatricesPortion:i[9],eachPrimitiveColor:i[10],primitiveInstances:i[11],eachEntityId:i[12],eachEntityPrimitiveInstancesPortion:i[13],eachEntityMatricesPortion:i[14],eachEntityMatrix:i[15]}}function v7t(i){return{positions:new Uint16Array(Lo.inflate(i.positions).buffer),normals:new Int8Array(Lo.inflate(i.normals).buffer),indices:new Uint32Array(Lo.inflate(i.indices).buffer),edgeIndices:new Uint32Array(Lo.inflate(i.edgeIndices).buffer),decodeMatrices:new Float32Array(Lo.inflate(i.decodeMatrices).buffer),matrices:new Float32Array(Lo.inflate(i.matrices).buffer),eachPrimitivePositionsAndNormalsPortion:new Uint32Array(Lo.inflate(i.eachPrimitivePositionsAndNormalsPortion).buffer),eachPrimitiveIndicesPortion:new Uint32Array(Lo.inflate(i.eachPrimitiveIndicesPortion).buffer),eachPrimitiveEdgeIndicesPortion:new Uint32Array(Lo.inflate(i.eachPrimitiveEdgeIndicesPortion).buffer),eachPrimitiveDecodeMatricesPortion:new Uint32Array(Lo.inflate(i.eachPrimitiveDecodeMatricesPortion).buffer),eachPrimitiveColor:new Uint8Array(Lo.inflate(i.eachPrimitiveColor).buffer),primitiveInstances:new Uint32Array(Lo.inflate(i.primitiveInstances).buffer),eachEntityId:Lo.inflate(i.eachEntityId,{to:"string"}),eachEntityPrimitiveInstancesPortion:new Uint32Array(Lo.inflate(i.eachEntityPrimitiveInstancesPortion).buffer),eachEntityMatricesPortion:new Uint32Array(Lo.inflate(i.eachEntityMatricesPortion).buffer)}}const w7t=(function(){const i=new Float32Array(3);return function(e){return i[0]=e[0]/255,i[1]=e[1]/255,i[2]=e[2]/255,i}})();function C7t(i,e,t,n,o,r){const s=r.getNextId();n.positionsCompression="precompressed",n.normalsCompression="precompressed";const a=t.positions,l=t.normals,c=t.indices,u=t.edgeIndices,d=t.decodeMatrices,h=t.matrices,p=t.eachPrimitivePositionsAndNormalsPortion,A=t.eachPrimitiveIndicesPortion,f=t.eachPrimitiveEdgeIndicesPortion,g=t.eachPrimitiveDecodeMatricesPortion,m=t.eachPrimitiveColor,v=t.primitiveInstances,y=JSON.parse(t.eachEntityId),w=t.eachEntityPrimitiveInstancesPortion,x=t.eachEntityMatricesPortion,M=p.length,B=v.length,S=new Uint8Array(M),I=new Uint32Array(M),R=y.length;for(let F=0;F<M;F++)I[F]=F;I.sort((F,N)=>g[F]<g[N]?-1:g[F]>g[N]?1:0);for(let F=0;F<B;F++){const N=v[F];S[N]++}const T={};for(let F=0;F<R;F++){const N=R-1,z=F===N,j=w[F],W=z?w[N]:w[F+1];for(let J=j;J<W;J++){const $=v[J];S[$]>1||(T[$]=F)}}for(let F=0;F<M;F++){const N=I[F],z=N===M-1,W=S[N]>1,J=w7t(m.subarray(N*4,N*4+3)),$=m[N*4+3]/255,ue=a.subarray(p[N],z?a.length:p[N+1]),Ee=l.subarray(p[N],z?l.length:p[N+1]),Be=c.subarray(A[N],z?c.length:A[N+1]),ze=u.subarray(f[N],z?u.length:f[N+1]),Qe=d.subarray(g[N],g[N]+16);if(W){const me=`${s}-geometry.${N}`;n.createGeometry({id:me,primitive:"triangles",positionsCompressed:ue,normalsCompressed:Ee,indices:Be,edgeIndices:ze,positionsDecodeMatrix:Qe})}else{const me=`${s}-${N}`,_e=T[N];y[_e];const De={};n.createMesh(At.apply(De,{id:me,primitive:"triangles",positionsCompressed:ue,normalsCompressed:Ee,indices:Be,edgeIndices:ze,positionsDecodeMatrix:Qe,color:J,opacity:$}))}}let _=0;for(let F=0;F<R;F++){const N=R-1,z=F===N,j=y[F],W=w[F],J=z?w[N]:w[F+1],$=[];for(let ue=W;ue<J;ue++){const Ee=v[ue];if(S[Ee]>1){const Qe={},me=`${s}-instance.${_++}`,_e=`${s}-geometry.${Ee}`,De=x[F]*16,ve=h.subarray(De,De+16);n.createMesh(At.apply(Qe,{id:me,geometryId:_e,matrix:ve})),$.push(me)}else $.push(Ee)}if($.length>0){const ue={};n.createEntity(At.apply(ue,{id:j,isObject:!0,meshIds:$}))}}}const sie={version:4,parse:function(i,e,t,n,o,r){const s=y7t(t),a=v7t(s);C7t(i,e,a,n,o,r)}};let gs=window.pako||Ia;gs.inflate||(gs=gs.default);function b7t(i){return{positions:i[0],normals:i[1],indices:i[2],edgeIndices:i[3],matrices:i[4],eachPrimitivePositionsAndNormalsPortion:i[5],eachPrimitiveIndicesPortion:i[6],eachPrimitiveEdgeIndicesPortion:i[7],eachPrimitiveColor:i[8],primitiveInstances:i[9],eachEntityId:i[10],eachEntityPrimitiveInstancesPortion:i[11],eachEntityMatricesPortion:i[12]}}function x7t(i){return{positions:new Float32Array(gs.inflate(i.positions).buffer),normals:new Int8Array(gs.inflate(i.normals).buffer),indices:new Uint32Array(gs.inflate(i.indices).buffer),edgeIndices:new Uint32Array(gs.inflate(i.edgeIndices).buffer),matrices:new Float32Array(gs.inflate(i.matrices).buffer),eachPrimitivePositionsAndNormalsPortion:new Uint32Array(gs.inflate(i.eachPrimitivePositionsAndNormalsPortion).buffer),eachPrimitiveIndicesPortion:new Uint32Array(gs.inflate(i.eachPrimitiveIndicesPortion).buffer),eachPrimitiveEdgeIndicesPortion:new Uint32Array(gs.inflate(i.eachPrimitiveEdgeIndicesPortion).buffer),eachPrimitiveColor:new Uint8Array(gs.inflate(i.eachPrimitiveColor).buffer),primitiveInstances:new Uint32Array(gs.inflate(i.primitiveInstances).buffer),eachEntityId:gs.inflate(i.eachEntityId,{to:"string"}),eachEntityPrimitiveInstancesPortion:new Uint32Array(gs.inflate(i.eachEntityPrimitiveInstancesPortion).buffer),eachEntityMatricesPortion:new Uint32Array(gs.inflate(i.eachEntityMatricesPortion).buffer)}}const M7t=(function(){const i=new Float32Array(3);return function(e){return i[0]=e[0]/255,i[1]=e[1]/255,i[2]=e[2]/255,i}})();function E7t(i,e,t,n,o,r){const s=r.getNextId();n.positionsCompression="disabled",n.normalsCompression="precompressed";const a=t.positions,l=t.normals,c=t.indices,u=t.edgeIndices,d=t.matrices,h=t.eachPrimitivePositionsAndNormalsPortion,p=t.eachPrimitiveIndicesPortion,A=t.eachPrimitiveEdgeIndicesPortion,f=t.eachPrimitiveColor,g=t.primitiveInstances,m=JSON.parse(t.eachEntityId),v=t.eachEntityPrimitiveInstancesPortion,y=t.eachEntityMatricesPortion,w=h.length,x=g.length,M=new Uint8Array(w),B=m.length;for(let R=0;R<x;R++){const T=g[R];M[T]++}const S={};for(let R=0;R<B;R++){const T=B-1,_=R===T,F=v[R],N=_?v[T]:v[R+1];for(let z=F;z<N;z++){const j=g[z];M[j]>1||(S[j]=R)}}for(let R=0;R<w;R++){const T=R===w-1,F=M[R]>1,N=M7t(f.subarray(R*4,R*4+3)),z=f[R*4+3]/255,j=a.subarray(h[R],T?a.length:h[R+1]),W=l.subarray(h[R],T?l.length:h[R+1]),J=c.subarray(p[R],T?c.length:p[R+1]),$=u.subarray(A[R],T?u.length:A[R+1]);if(F){const ue=`${s}-geometry.${R}`;n.createGeometry({id:ue,primitive:"triangles",positionsCompressed:j,normalsCompressed:W,indices:J,edgeIndices:$})}else{const ue=R,Ee=S[R];m[Ee];const Be={};n.createMesh(At.apply(Be,{id:ue,primitive:"triangles",positionsCompressed:j,normalsCompressed:W,indices:J,edgeIndices:$,color:N,opacity:z}))}}let I=0;for(let R=0;R<B;R++){const T=B-1,_=R===T,F=m[R],N=v[R],z=_?v[T]:v[R+1],j=[];for(let W=N;W<z;W++){const J=g[W];if(M[J]>1){const Ee={},Be="instance."+I++,ze="geometry"+J,Qe=y[R]*16,me=d.subarray(Qe,Qe+16);n.createMesh(At.apply(Ee,{id:Be,geometryId:ze,matrix:me})),j.push(Be)}else j.push(J)}if(j.length>0){const W={};n.createEntity(At.apply(W,{id:F,isObject:!0,meshIds:j}))}}}const rie={version:5,parse:function(i,e,t,n,o,r){const s=b7t(t),a=x7t(s);E7t(i,e,a,n,o,r)}};let W4=window.pako||Ia;W4.inflate||(W4=W4.default);function B7t(i){return{positions:i[0],normals:i[1],indices:i[2],edgeIndices:i[3],matrices:i[4],reusedPrimitivesDecodeMatrix:i[5],eachPrimitivePositionsAndNormalsPortion:i[6],eachPrimitiveIndicesPortion:i[7],eachPrimitiveEdgeIndicesPortion:i[8],eachPrimitiveColorAndOpacity:i[9],primitiveInstances:i[10],eachEntityId:i[11],eachEntityPrimitiveInstancesPortion:i[12],eachEntityMatricesPortion:i[13],eachTileAABB:i[14],eachTileEntitiesPortion:i[15]}}function I7t(i){function e(t,n){return t.length===0?[]:W4.inflate(t,n).buffer}return{positions:new Uint16Array(e(i.positions)),normals:new Int8Array(e(i.normals)),indices:new Uint32Array(e(i.indices)),edgeIndices:new Uint32Array(e(i.edgeIndices)),matrices:new Float32Array(e(i.matrices)),reusedPrimitivesDecodeMatrix:new Float32Array(e(i.reusedPrimitivesDecodeMatrix)),eachPrimitivePositionsAndNormalsPortion:new Uint32Array(e(i.eachPrimitivePositionsAndNormalsPortion)),eachPrimitiveIndicesPortion:new Uint32Array(e(i.eachPrimitiveIndicesPortion)),eachPrimitiveEdgeIndicesPortion:new Uint32Array(e(i.eachPrimitiveEdgeIndicesPortion)),eachPrimitiveColorAndOpacity:new Uint8Array(e(i.eachPrimitiveColorAndOpacity)),primitiveInstances:new Uint32Array(e(i.primitiveInstances)),eachEntityId:W4.inflate(i.eachEntityId,{to:"string"}),eachEntityPrimitiveInstancesPortion:new Uint32Array(e(i.eachEntityPrimitiveInstancesPortion)),eachEntityMatricesPortion:new Uint32Array(e(i.eachEntityMatricesPortion)),eachTileAABB:new Float64Array(e(i.eachTileAABB)),eachTileEntitiesPortion:new Uint32Array(e(i.eachTileEntitiesPortion))}}const S7t=(function(){const i=new Float32Array(3);return function(e){return i[0]=e[0]/255,i[1]=e[1]/255,i[2]=e[2]/255,i}})();function P7t(i,e,t,n,o,r){const s=r.getNextId(),a=t.positions,l=t.normals,c=t.indices,u=t.edgeIndices,d=t.matrices,h=t.reusedPrimitivesDecodeMatrix,p=t.eachPrimitivePositionsAndNormalsPortion,A=t.eachPrimitiveIndicesPortion,f=t.eachPrimitiveEdgeIndicesPortion,g=t.eachPrimitiveColorAndOpacity,m=t.primitiveInstances,v=JSON.parse(t.eachEntityId),y=t.eachEntityPrimitiveInstancesPortion,w=t.eachEntityMatricesPortion,x=t.eachTileAABB,M=t.eachTileEntitiesPortion,B=p.length,S=m.length,I=v.length,R=M.length,T=new Uint32Array(B);for(let N=0;N<S;N++){const z=m[N];T[z]!==void 0?T[z]++:T[z]=1}const _=b.vec3(),F=b.AABB3();for(let N=0;N<R;N++){const z=R-1,j=N===z,W=M[N],J=j?I:M[N+1],$=N*6,ue=x.subarray($,$+6);b.getAABB3Center(ue,_),F[0]=ue[0]-_[0],F[1]=ue[1]-_[1],F[2]=ue[2]-_[2],F[3]=ue[3]-_[0],F[4]=ue[4]-_[1],F[5]=ue[5]-_[2];const Ee=Yt.createPositionsDecodeMatrix(F),Be={};for(let ze=W;ze<J;ze++){const Qe=v[ze],me=e.globalizeObjectIds?b.globalizeObjectId(n.id,Qe):Qe,_e=w[ze],De=d.slice(_e,_e+16),ve=I-1,ge=ze===ve,Ie=y[ze],Ne=ge?m.length:y[ze+1],qe=[],Q=i.metaScene.metaObjects[me],ne={},ie={};if(Q){if(e.excludeTypesMap&&Q.type&&e.excludeTypesMap[Q.type]||e.includeTypesMap&&Q.type&&!e.includeTypesMap[Q.type]||e.includeIdsMap&&Q.id&&!e.includeIdsMap[Q.id])continue;const Me=e.objectDefaults?e.objectDefaults[Q.type]||e.objectDefaults.DEFAULT:null;Me&&(Me.visible===!1&&(ne.visible=!1),Me.pickable===!1&&(ne.pickable=!1),Me.colorize&&(ie.color=Me.colorize),Me.opacity!==void 0&&Me.opacity!==null&&(ie.opacity=Me.opacity))}else if(e.excludeUnclassifiedObjects)continue;for(let Me=Ie;Me<Ne;Me++){const Ae=m[Me],Z=T[Ae]>1,oe=Ae===B-1,fe=a.subarray(p[Ae],oe?a.length:p[Ae+1]),Se=l.subarray(p[Ae],oe?l.length:p[Ae+1]),X=c.subarray(A[Ae],oe?c.length:A[Ae+1]),H=u.subarray(f[Ae],oe?u.length:f[Ae+1]),ee=S7t(g.subarray(Ae*4,Ae*4+3)),be=g[Ae*4+3]/255,re=r.getNextId();if(Z){const he=`${s}-geometry.${N}.${Ae}`;Be[he]||(n.createGeometry({id:he,primitive:"triangles",positionsCompressed:fe,indices:X,edgeIndices:H,positionsDecodeMatrix:h}),Be[he]=!0),n.createMesh(At.apply(ie,{id:re,geometryId:he,origin:_,matrix:De,color:ee,opacity:be})),qe.push(re)}else n.createMesh(At.apply(ie,{id:re,origin:_,primitive:"triangles",positionsCompressed:fe,normalsCompressed:Se,indices:X,edgeIndices:H,positionsDecodeMatrix:Ee,color:ee,opacity:be})),qe.push(re)}qe.length>0&&n.createEntity(At.apply(ne,{id:me,isObject:!0,meshIds:qe}))}}}const aie={version:6,parse:function(i,e,t,n,o,r){const s=B7t(t),a=I7t(s);P7t(i,e,a,n,o,r)}};let Z4=window.pako||Ia;Z4.inflate||(Z4=Z4.default);function T7t(i){return{positions:i[0],normals:i[1],colors:i[2],indices:i[3],edgeIndices:i[4],matrices:i[5],reusedGeometriesDecodeMatrix:i[6],eachGeometryPrimitiveType:i[7],eachGeometryPositionsPortion:i[8],eachGeometryNormalsPortion:i[9],eachGeometryColorsPortion:i[10],eachGeometryIndicesPortion:i[11],eachGeometryEdgeIndicesPortion:i[12],eachMeshGeometriesPortion:i[13],eachMeshMatricesPortion:i[14],eachMeshMaterial:i[15],eachEntityId:i[16],eachEntityMeshesPortion:i[17],eachTileAABB:i[18],eachTileEntitiesPortion:i[19]}}function k7t(i){function e(t,n){return t.length===0?[]:Z4.inflate(t,n).buffer}return{positions:new Uint16Array(e(i.positions)),normals:new Int8Array(e(i.normals)),colors:new Uint8Array(e(i.colors)),indices:new Uint32Array(e(i.indices)),edgeIndices:new Uint32Array(e(i.edgeIndices)),matrices:new Float32Array(e(i.matrices)),reusedGeometriesDecodeMatrix:new Float32Array(e(i.reusedGeometriesDecodeMatrix)),eachGeometryPrimitiveType:new Uint8Array(e(i.eachGeometryPrimitiveType)),eachGeometryPositionsPortion:new Uint32Array(e(i.eachGeometryPositionsPortion)),eachGeometryNormalsPortion:new Uint32Array(e(i.eachGeometryNormalsPortion)),eachGeometryColorsPortion:new Uint32Array(e(i.eachGeometryColorsPortion)),eachGeometryIndicesPortion:new Uint32Array(e(i.eachGeometryIndicesPortion)),eachGeometryEdgeIndicesPortion:new Uint32Array(e(i.eachGeometryEdgeIndicesPortion)),eachMeshGeometriesPortion:new Uint32Array(e(i.eachMeshGeometriesPortion)),eachMeshMatricesPortion:new Uint32Array(e(i.eachMeshMatricesPortion)),eachMeshMaterial:new Uint8Array(e(i.eachMeshMaterial)),eachEntityId:Z4.inflate(i.eachEntityId,{to:"string"}),eachEntityMeshesPortion:new Uint32Array(e(i.eachEntityMeshesPortion)),eachTileAABB:new Float64Array(e(i.eachTileAABB)),eachTileEntitiesPortion:new Uint32Array(e(i.eachTileEntitiesPortion))}}const R7t=(function(){const i=new Float32Array(3);return function(e){return i[0]=e[0]/255,i[1]=e[1]/255,i[2]=e[2]/255,i}})();function lie(i){const e=[];for(let t=0,n=i.length;t<n;t+=3)e.push(i[t]),e.push(i[t+1]),e.push(i[t+2]),e.push(1);return e}function _7t(i,e,t,n,o,r){const s=r.getNextId(),a=t.positions,l=t.normals,c=t.colors,u=t.indices,d=t.edgeIndices,h=t.matrices,p=t.reusedGeometriesDecodeMatrix,A=t.eachGeometryPrimitiveType,f=t.eachGeometryPositionsPortion,g=t.eachGeometryNormalsPortion,m=t.eachGeometryColorsPortion,v=t.eachGeometryIndicesPortion,y=t.eachGeometryEdgeIndicesPortion,w=t.eachMeshGeometriesPortion,x=t.eachMeshMatricesPortion,M=t.eachMeshMaterial,B=JSON.parse(t.eachEntityId),S=t.eachEntityMeshesPortion,I=t.eachTileAABB,R=t.eachTileEntitiesPortion,T=f.length,_=w.length,F=B.length,N=R.length,z=new Uint32Array(T);for(let J=0;J<_;J++){const $=w[J];z[$]!==void 0?z[$]++:z[$]=1}const j=b.vec3(),W=b.AABB3();for(let J=0;J<N;J++){const $=N-1,ue=J===$,Ee=R[J],Be=ue?F:R[J+1],ze=J*6,Qe=I.subarray(ze,ze+6);b.getAABB3Center(Qe,j),W[0]=Qe[0]-j[0],W[1]=Qe[1]-j[1],W[2]=Qe[2]-j[2],W[3]=Qe[3]-j[0],W[4]=Qe[4]-j[1],W[5]=Qe[5]-j[2];const me=Yt.createPositionsDecodeMatrix(W),_e={};for(let De=Ee;De<Be;De++){const ve=B[De],ge=e.globalizeObjectIds?b.globalizeObjectId(n.id,ve):ve,Ie=F-1,Ne=De===Ie,qe=S[De],Q=Ne?w.length:S[De+1],ne=[],ie=i.metaScene.metaObjects[ge],Me={},Ae={};if(ie){if(e.excludeTypesMap&&ie.type&&e.excludeTypesMap[ie.type]||e.includeTypesMap&&ie.type&&!e.includeTypesMap[ie.type]||e.includeIdsMap&&ie.id&&!e.includeIdsMap[ie.id])continue;const q=e.objectDefaults?e.objectDefaults[ie.type]||e.objectDefaults.DEFAULT:null;q&&(q.visible===!1&&(Me.visible=!1),q.pickable===!1&&(Me.pickable=!1),q.colorize&&(Ae.color=q.colorize),q.opacity!==void 0&&q.opacity!==null&&(Ae.opacity=q.opacity),q.metallic!==void 0&&q.metallic!==null&&(Ae.metallic=q.metallic),q.roughness!==void 0&&q.roughness!==null&&(Ae.roughness=q.roughness))}else if(e.excludeUnclassifiedObjects)continue;for(let q=qe;q<Q;q++){const Z=w[q],fe=z[Z]>1,Se=Z===T-1,X=R7t(M.subarray(q*6,q*6+3)),H=M[q*6+3]/255,ee=M[q*6+4]/255,be=M[q*6+5]/255,re=r.getNextId();if(fe){const he=x[q],je=h.slice(he,he+16),de=`${s}-geometry.${J}.${Z}`;if(!_e[de]){const Fe=A[Z];let ut,Ce,Xe,ht,lt,dt;switch(Fe){case 0:ut="solid",Ce=a.subarray(f[Z],Se?a.length:f[Z+1]),Xe=l.subarray(g[Z],Se?l.length:g[Z+1]),lt=u.subarray(v[Z],Se?u.length:v[Z+1]),dt=d.subarray(y[Z],Se?d.length:y[Z+1]);break;case 1:ut="surface",Ce=a.subarray(f[Z],Se?a.length:f[Z+1]),Xe=l.subarray(g[Z],Se?l.length:g[Z+1]),lt=u.subarray(v[Z],Se?u.length:v[Z+1]),dt=d.subarray(y[Z],Se?d.length:y[Z+1]);break;case 2:ut="points",Ce=a.subarray(f[Z],Se?a.length:f[Z+1]),ht=lie(c.subarray(m[Z],Se?c.length:m[Z+1]));break;case 3:ut="lines",Ce=a.subarray(f[Z],Se?a.length:f[Z+1]),lt=u.subarray(v[Z],Se?u.length:v[Z+1]);break;default:continue}n.createGeometry({id:de,primitive:ut,positionsCompressed:Ce,normalsCompressed:Xe,colors:ht,indices:lt,edgeIndices:dt,positionsDecodeMatrix:p}),_e[de]=!0}n.createMesh(At.apply(Ae,{id:re,geometryId:de,origin:j,matrix:je,color:X,metallic:ee,roughness:be,opacity:H})),ne.push(re)}else{const he=A[Z];let je,de,Fe,ut,Ce,Xe;switch(he){case 0:je="solid",de=a.subarray(f[Z],Se?a.length:f[Z+1]),Fe=l.subarray(g[Z],Se?l.length:g[Z+1]),Ce=u.subarray(v[Z],Se?u.length:v[Z+1]),Xe=d.subarray(y[Z],Se?d.length:y[Z+1]);break;case 1:je="surface",de=a.subarray(f[Z],Se?a.length:f[Z+1]),Fe=l.subarray(g[Z],Se?l.length:g[Z+1]),Ce=u.subarray(v[Z],Se?u.length:v[Z+1]),Xe=d.subarray(y[Z],Se?d.length:y[Z+1]);break;case 2:je="points",de=a.subarray(f[Z],Se?a.length:f[Z+1]),ut=lie(c.subarray(m[Z],Se?c.length:m[Z+1]));break;case 3:je="lines",de=a.subarray(f[Z],Se?a.length:f[Z+1]),Ce=u.subarray(v[Z],Se?u.length:v[Z+1]);break;default:continue}n.createMesh(At.apply(Ae,{id:re,origin:j,primitive:je,positionsCompressed:de,normalsCompressed:Fe,colors:ut,indices:Ce,edgeIndices:Xe,positionsDecodeMatrix:me,color:X,metallic:ee,roughness:be,opacity:H})),ne.push(re)}}ne.length>0&&n.createEntity(At.apply(Me,{id:ge,isObject:!0,meshIds:ne}))}}}const cie={version:7,parse:function(i,e,t,n,o,r){const s=T7t(t),a=k7t(s);_7t(i,e,a,n,o,r)}};let Sh=window.pako||Ia;Sh.inflate||(Sh=Sh.default);const bc=b.vec4(),uie=b.vec4();function D7t(i){return{types:i[0],eachMetaObjectId:i[1],eachMetaObjectType:i[2],eachMetaObjectName:i[3],eachMetaObjectParent:i[4],positions:i[5],normals:i[6],colors:i[7],indices:i[8],edgeIndices:i[9],matrices:i[10],reusedGeometriesDecodeMatrix:i[11],eachGeometryPrimitiveType:i[12],eachGeometryPositionsPortion:i[13],eachGeometryNormalsPortion:i[14],eachGeometryColorsPortion:i[15],eachGeometryIndicesPortion:i[16],eachGeometryEdgeIndicesPortion:i[17],eachMeshGeometriesPortion:i[18],eachMeshMatricesPortion:i[19],eachMeshMaterial:i[20],eachEntityMetaObject:i[21],eachEntityMeshesPortion:i[22],eachTileAABB:i[23],eachTileEntitiesPortion:i[24]}}function L7t(i){function e(t,n){return t.length===0?[]:Sh.inflate(t,n).buffer}return{types:Sh.inflate(i.types,{to:"string"}),eachMetaObjectId:Sh.inflate(i.eachMetaObjectId,{to:"string"}),eachMetaObjectType:new Uint32Array(e(i.eachMetaObjectType)),eachMetaObjectName:Sh.inflate(i.eachMetaObjectName,{to:"string"}),eachMetaObjectParent:new Uint32Array(e(i.eachMetaObjectParent)),positions:new Uint16Array(e(i.positions)),normals:new Int8Array(e(i.normals)),colors:new Uint8Array(e(i.colors)),indices:new Uint32Array(e(i.indices)),edgeIndices:new Uint32Array(e(i.edgeIndices)),matrices:new Float32Array(e(i.matrices)),reusedGeometriesDecodeMatrix:new Float32Array(e(i.reusedGeometriesDecodeMatrix)),eachGeometryPrimitiveType:new Uint8Array(e(i.eachGeometryPrimitiveType)),eachGeometryPositionsPortion:new Uint32Array(e(i.eachGeometryPositionsPortion)),eachGeometryNormalsPortion:new Uint32Array(e(i.eachGeometryNormalsPortion)),eachGeometryColorsPortion:new Uint32Array(e(i.eachGeometryColorsPortion)),eachGeometryIndicesPortion:new Uint32Array(e(i.eachGeometryIndicesPortion)),eachGeometryEdgeIndicesPortion:new Uint32Array(e(i.eachGeometryEdgeIndicesPortion)),eachMeshGeometriesPortion:new Uint32Array(e(i.eachMeshGeometriesPortion)),eachMeshMatricesPortion:new Uint32Array(e(i.eachMeshMatricesPortion)),eachMeshMaterial:new Uint8Array(e(i.eachMeshMaterial)),eachEntityMetaObject:new Uint32Array(e(i.eachEntityMetaObject)),eachEntityMeshesPortion:new Uint32Array(e(i.eachEntityMeshesPortion)),eachTileAABB:new Float64Array(e(i.eachTileAABB)),eachTileEntitiesPortion:new Uint32Array(e(i.eachTileEntitiesPortion))}}const F7t=(function(){const i=new Float32Array(3);return function(e){return i[0]=e[0]/255,i[1]=e[1]/255,i[2]=e[2]/255,i}})();function die(i){const e=[];for(let t=0,n=i.length;t<n;t+=3)e.push(i[t]),e.push(i[t+1]),e.push(i[t+2]),e.push(1);return e}function O7t(i,e,t,n,o,r){const s=r.getNextId(),a=JSON.parse(t.types),l=JSON.parse(t.eachMetaObjectId),c=t.eachMetaObjectType,u=JSON.parse(t.eachMetaObjectName),d=t.eachMetaObjectParent,h=t.positions,p=t.normals,A=t.colors,f=t.indices,g=t.edgeIndices,m=t.matrices,v=t.reusedGeometriesDecodeMatrix,y=t.eachGeometryPrimitiveType,w=t.eachGeometryPositionsPortion,x=t.eachGeometryNormalsPortion,M=t.eachGeometryColorsPortion,B=t.eachGeometryIndicesPortion,S=t.eachGeometryEdgeIndicesPortion,I=t.eachMeshGeometriesPortion,R=t.eachMeshMatricesPortion,T=t.eachMeshMaterial,_=t.eachEntityMetaObject,F=t.eachEntityMeshesPortion,N=t.eachTileAABB,z=t.eachTileEntitiesPortion,j=l.length,W=w.length,J=I.length,$=_.length,ue=z.length;if(o){const me={metaObjects:[]};for(let _e=0;_e<j;_e++){const De=l[_e],ve=c[_e],ge=a[ve]||"default",Ie=u[_e],Ne=d[_e],qe=Ne!==_e?l[Ne]:null;me.metaObjects.push({id:De,type:ge,name:Ie,parent:qe})}o.loadData(me,{includeTypes:e.includeTypes,excludeTypes:e.excludeTypes,globalizeObjectIds:e.globalizeObjectIds})}const Ee=new Uint32Array(W);for(let me=0;me<J;me++){const _e=I[me];Ee[_e]!==void 0?Ee[_e]++:Ee[_e]=1}const Be=b.vec3(),ze=b.AABB3(),Qe={};for(let me=0;me<ue;me++){const _e=ue-1,De=me===_e,ve=z[me],ge=De?$:z[me+1],Ie=me*6,Ne=N.subarray(Ie,Ie+6);b.getAABB3Center(Ne,Be),ze[0]=Ne[0]-Be[0],ze[1]=Ne[1]-Be[1],ze[2]=Ne[2]-Be[2],ze[3]=Ne[3]-Be[0],ze[4]=Ne[4]-Be[1],ze[5]=Ne[5]-Be[2];const qe=Yt.createPositionsDecodeMatrix(ze),Q={};for(let ne=ve;ne<ge;ne++){const ie=_[ne],Ae=l[ie],q=e.globalizeObjectIds?b.globalizeObjectId(n.id,Ae):Ae,Z=$-1,oe=ne===Z,fe=F[ne],Se=oe?I.length:F[ne+1],X=[],H=i.metaScene.metaObjects[q],ee={},be={};if(H){if(e.excludeTypesMap&&H.type&&e.excludeTypesMap[H.type]||e.includeTypesMap&&H.type&&!e.includeTypesMap[H.type]||e.includeIdsMap&&H.id&&!e.includeIdsMap[H.id])continue;const re=e.objectDefaults?e.objectDefaults[H.type]||e.objectDefaults.DEFAULT:null;re&&(re.visible===!1&&(ee.visible=!1),re.pickable===!1&&(ee.pickable=!1),re.colorize&&(be.color=re.colorize),re.opacity!==void 0&&re.opacity!==null&&(be.opacity=re.opacity),re.metallic!==void 0&&re.metallic!==null&&(be.metallic=re.metallic),re.roughness!==void 0&&re.roughness!==null&&(be.roughness=re.roughness))}else if(e.excludeUnclassifiedObjects)continue;for(let re=fe;re<Se;re++){const he=I[re],de=Ee[he]>1,Fe=he===W-1,ut=F7t(T.subarray(re*6,re*6+3)),Ce=T[re*6+3]/255,Xe=T[re*6+4]/255,ht=T[re*6+5]/255,lt=r.getNextId();if(de){const dt=R[re],bt=m.slice(dt,dt+16),ke=`${s}-geometry.${me}.${he}`;let Je=Qe[ke];if(!Je){Je={batchThisMesh:!e.reuseGeometries};const ft=y[he];let it=!1;switch(ft){case 0:Je.primitiveName="solid",Je.geometryPositions=h.subarray(w[he],Fe?h.length:w[he+1]),Je.geometryNormals=p.subarray(x[he],Fe?p.length:x[he+1]),Je.geometryIndices=f.subarray(B[he],Fe?f.length:B[he+1]),Je.geometryEdgeIndices=g.subarray(S[he],Fe?g.length:S[he+1]),it=Je.geometryPositions.length>0&&Je.geometryIndices.length>0;break;case 1:Je.primitiveName="surface",Je.geometryPositions=h.subarray(w[he],Fe?h.length:w[he+1]),Je.geometryNormals=p.subarray(x[he],Fe?p.length:x[he+1]),Je.geometryIndices=f.subarray(B[he],Fe?f.length:B[he+1]),Je.geometryEdgeIndices=g.subarray(S[he],Fe?g.length:S[he+1]),it=Je.geometryPositions.length>0&&Je.geometryIndices.length>0;break;case 2:Je.primitiveName="points",Je.geometryPositions=h.subarray(w[he],Fe?h.length:w[he+1]),Je.geometryColors=die(A.subarray(M[he],Fe?A.length:M[he+1])),it=Je.geometryPositions.length>0;break;case 3:Je.primitiveName="lines",Je.geometryPositions=h.subarray(w[he],Fe?h.length:w[he+1]),Je.geometryIndices=f.subarray(B[he],Fe?f.length:B[he+1]),it=Je.geometryPositions.length>0&&Je.geometryIndices.length>0;break;default:continue}if(it||(Je=null),Je&&(Je.geometryPositions.length>1e3,Je.batchThisMesh)){Je.decompressedPositions=new Float32Array(Je.geometryPositions.length);const Ge=Je.geometryPositions,pe=Je.decompressedPositions;for(let Te=0,mt=Ge.length;Te<mt;Te+=3)pe[Te+0]=Ge[Te+0]*v[0]+v[12],pe[Te+1]=Ge[Te+1]*v[5]+v[13],pe[Te+2]=Ge[Te+2]*v[10]+v[14];Je.geometryPositions=null,Qe[ke]=Je}}if(Je)if(Je.batchThisMesh){const ft=Je.decompressedPositions,it=new Uint16Array(ft.length);for(let Ge=0,pe=ft.length;Ge<pe;Ge+=3)bc[0]=ft[Ge+0],bc[1]=ft[Ge+1],bc[2]=ft[Ge+2],bc[3]=1,b.transformVec4(bt,bc,uie),Yt.compressPosition(uie,ze,bc),it[Ge+0]=bc[0],it[Ge+1]=bc[1],it[Ge+2]=bc[2];n.createMesh(At.apply(be,{id:lt,origin:Be,primitive:Je.primitiveName,positionsCompressed:it,normalsCompressed:Je.geometryNormals,colorsCompressed:Je.geometryColors,indices:Je.geometryIndices,edgeIndices:Je.geometryEdgeIndices,positionsDecodeMatrix:qe,color:ut,metallic:Xe,roughness:ht,opacity:Ce})),X.push(lt)}else Q[ke]||(n.createGeometry({id:ke,primitive:Je.primitiveName,positionsCompressed:Je.geometryPositions,normalsCompressed:Je.geometryNormals,colorsCompressed:Je.geometryColors,indices:Je.geometryIndices,edgeIndices:Je.geometryEdgeIndices,positionsDecodeMatrix:v}),Q[ke]=!0),n.createMesh(At.apply(be,{id:lt,geometryId:ke,origin:Be,matrix:bt,color:ut,metallic:Xe,roughness:ht,opacity:Ce})),X.push(lt)}else{const dt=y[he];let bt,ke,Je,ft,it,Ge,pe=!1;switch(dt){case 0:bt="solid",ke=h.subarray(w[he],Fe?h.length:w[he+1]),Je=p.subarray(x[he],Fe?p.length:x[he+1]),it=f.subarray(B[he],Fe?f.length:B[he+1]),Ge=g.subarray(S[he],Fe?g.length:S[he+1]),pe=ke.length>0&&it.length>0;break;case 1:bt="surface",ke=h.subarray(w[he],Fe?h.length:w[he+1]),Je=p.subarray(x[he],Fe?p.length:x[he+1]),it=f.subarray(B[he],Fe?f.length:B[he+1]),Ge=g.subarray(S[he],Fe?g.length:S[he+1]),pe=ke.length>0&&it.length>0;break;case 2:bt="points",ke=h.subarray(w[he],Fe?h.length:w[he+1]),ft=die(A.subarray(M[he],Fe?A.length:M[he+1])),pe=ke.length>0;break;case 3:bt="lines",ke=h.subarray(w[he],Fe?h.length:w[he+1]),it=f.subarray(B[he],Fe?f.length:B[he+1]),pe=ke.length>0&&it.length>0;break;default:continue}pe&&(n.createMesh(At.apply(be,{id:lt,origin:Be,primitive:bt,positionsCompressed:ke,normalsCompressed:Je,colorsCompressed:ft,indices:it,edgeIndices:Ge,positionsDecodeMatrix:qe,color:ut,metallic:Xe,roughness:ht,opacity:Ce})),X.push(lt))}}X.length>0&&n.createEntity(At.apply(ee,{id:q,isObject:!0,meshIds:X}))}}}const hie={version:8,parse:function(i,e,t,n,o,r){const s=D7t(t),a=L7t(s);O7t(i,e,a,n,o,r)}};let t1=window.pako||Ia;t1.inflate||(t1=t1.default);const xc=b.vec4(),pie=b.vec4();function N7t(i){return{metadata:i[0],positions:i[1],normals:i[2],colors:i[3],indices:i[4],edgeIndices:i[5],matrices:i[6],reusedGeometriesDecodeMatrix:i[7],eachGeometryPrimitiveType:i[8],eachGeometryPositionsPortion:i[9],eachGeometryNormalsPortion:i[10],eachGeometryColorsPortion:i[11],eachGeometryIndicesPortion:i[12],eachGeometryEdgeIndicesPortion:i[13],eachMeshGeometriesPortion:i[14],eachMeshMatricesPortion:i[15],eachMeshMaterial:i[16],eachEntityId:i[17],eachEntityMeshesPortion:i[18],eachTileAABB:i[19],eachTileEntitiesPortion:i[20]}}function U7t(i){function e(t,n){return t.length===0?[]:t1.inflate(t,n).buffer}return{metadata:JSON.parse(t1.inflate(i.metadata,{to:"string"})),positions:new Uint16Array(e(i.positions)),normals:new Int8Array(e(i.normals)),colors:new Uint8Array(e(i.colors)),indices:new Uint32Array(e(i.indices)),edgeIndices:new Uint32Array(e(i.edgeIndices)),matrices:new Float32Array(e(i.matrices)),reusedGeometriesDecodeMatrix:new Float32Array(e(i.reusedGeometriesDecodeMatrix)),eachGeometryPrimitiveType:new Uint8Array(e(i.eachGeometryPrimitiveType)),eachGeometryPositionsPortion:new Uint32Array(e(i.eachGeometryPositionsPortion)),eachGeometryNormalsPortion:new Uint32Array(e(i.eachGeometryNormalsPortion)),eachGeometryColorsPortion:new Uint32Array(e(i.eachGeometryColorsPortion)),eachGeometryIndicesPortion:new Uint32Array(e(i.eachGeometryIndicesPortion)),eachGeometryEdgeIndicesPortion:new Uint32Array(e(i.eachGeometryEdgeIndicesPortion)),eachMeshGeometriesPortion:new Uint32Array(e(i.eachMeshGeometriesPortion)),eachMeshMatricesPortion:new Uint32Array(e(i.eachMeshMatricesPortion)),eachMeshMaterial:new Uint8Array(e(i.eachMeshMaterial)),eachEntityId:JSON.parse(t1.inflate(i.eachEntityId,{to:"string"})),eachEntityMeshesPortion:new Uint32Array(e(i.eachEntityMeshesPortion)),eachTileAABB:new Float64Array(e(i.eachTileAABB)),eachTileEntitiesPortion:new Uint32Array(e(i.eachTileEntitiesPortion))}}const V7t=(function(){const i=new Float32Array(3);return function(e){return i[0]=e[0]/255,i[1]=e[1]/255,i[2]=e[2]/255,i}})();function H7t(i,e,t,n,o,r){const s=r.getNextId(),a=t.metadata,l=t.positions,c=t.normals,u=t.colors,d=t.indices,h=t.edgeIndices,p=t.matrices,A=t.reusedGeometriesDecodeMatrix,f=t.eachGeometryPrimitiveType,g=t.eachGeometryPositionsPortion,m=t.eachGeometryNormalsPortion,v=t.eachGeometryColorsPortion,y=t.eachGeometryIndicesPortion,w=t.eachGeometryEdgeIndicesPortion,x=t.eachMeshGeometriesPortion,M=t.eachMeshMatricesPortion,B=t.eachMeshMaterial,S=t.eachEntityId,I=t.eachEntityMeshesPortion,R=t.eachTileAABB,T=t.eachTileEntitiesPortion,_=g.length,F=x.length,N=I.length,z=T.length;o&&o.loadData(a,{includeTypes:e.includeTypes,excludeTypes:e.excludeTypes,globalizeObjectIds:e.globalizeObjectIds});const j=new Uint32Array(_);for(let ue=0;ue<F;ue++){const Ee=x[ue];j[Ee]!==void 0?j[Ee]++:j[Ee]=1}const W=b.vec3(),J=b.AABB3(),$={};for(let ue=0;ue<z;ue++){const Ee=z-1,Be=ue===Ee,ze=T[ue],Qe=Be?N-1:T[ue+1]-1,me=ue*6,_e=R.subarray(me,me+6);b.getAABB3Center(_e,W),J[0]=_e[0]-W[0],J[1]=_e[1]-W[1],J[2]=_e[2]-W[2],J[3]=_e[3]-W[0],J[4]=_e[4]-W[1],J[5]=_e[5]-W[2];const De=Yt.createPositionsDecodeMatrix(J),ve={};for(let ge=ze;ge<=Qe;ge++){const Ie=S[ge],Ne=e.globalizeObjectIds?b.globalizeObjectId(n.id,Ie):Ie,qe=N-1,Q=ge===qe,ne=I[ge],ie=Q?x.length-1:I[ge+1]-1,Me=[],Ae=i.metaScene.metaObjects[Ne],q={},Z={};if(!(e.includeIdsMap&&Ie&&!e.includeIdsMap[Ie])){if(Ae){if(e.excludeTypesMap&&Ae.type&&e.excludeTypesMap[Ae.type]||e.includeTypesMap&&Ae.type&&!e.includeTypesMap[Ae.type]||e.includeIdsMap&&Ae.id&&!e.includeIdsMap[Ae.id])continue;const oe=e.objectDefaults?e.objectDefaults[Ae.type]||e.objectDefaults.DEFAULT:null;oe&&(oe.visible===!1&&(q.visible=!1),oe.pickable===!1&&(q.pickable=!1),oe.colorize&&(Z.color=oe.colorize),oe.opacity!==void 0&&oe.opacity!==null&&(Z.opacity=oe.opacity),oe.metallic!==void 0&&oe.metallic!==null&&(Z.metallic=oe.metallic),oe.roughness!==void 0&&oe.roughness!==null&&(Z.roughness=oe.roughness))}else if(e.excludeUnclassifiedObjects)continue;for(let oe=ne;oe<=ie;oe++){const fe=x[oe],X=j[fe]>1,H=fe===_-1,ee=V7t(B.subarray(oe*6,oe*6+3)),be=B[oe*6+3]/255,re=B[oe*6+4]/255,he=B[oe*6+5]/255,je=r.getNextId();if(X){const de=M[oe],Fe=p.slice(de,de+16),ut=`${s}-geometry.${ue}.${fe}`;let Ce=$[ut];if(!Ce){Ce={batchThisMesh:!e.reuseGeometries};const Xe=f[fe];let ht=!1;switch(Xe){case 0:Ce.primitiveName="solid",Ce.geometryPositions=l.subarray(g[fe],H?l.length:g[fe+1]),Ce.geometryNormals=c.subarray(m[fe],H?c.length:m[fe+1]),Ce.geometryIndices=d.subarray(y[fe],H?d.length:y[fe+1]),Ce.geometryEdgeIndices=h.subarray(w[fe],H?h.length:w[fe+1]),ht=Ce.geometryPositions.length>0&&Ce.geometryIndices.length>0;break;case 1:Ce.primitiveName="surface",Ce.geometryPositions=l.subarray(g[fe],H?l.length:g[fe+1]),Ce.geometryNormals=c.subarray(m[fe],H?c.length:m[fe+1]),Ce.geometryIndices=d.subarray(y[fe],H?d.length:y[fe+1]),Ce.geometryEdgeIndices=h.subarray(w[fe],H?h.length:w[fe+1]),ht=Ce.geometryPositions.length>0&&Ce.geometryIndices.length>0;break;case 2:Ce.primitiveName="points",Ce.geometryPositions=l.subarray(g[fe],H?l.length:g[fe+1]),Ce.geometryColors=u.subarray(v[fe],H?u.length:v[fe+1]),ht=Ce.geometryPositions.length>0;break;case 3:Ce.primitiveName="lines",Ce.geometryPositions=l.subarray(g[fe],H?l.length:g[fe+1]),Ce.geometryIndices=d.subarray(y[fe],H?d.length:y[fe+1]),ht=Ce.geometryPositions.length>0&&Ce.geometryIndices.length>0;break;default:continue}if(ht||(Ce=null),Ce&&(Ce.geometryPositions.length>1e3,Ce.batchThisMesh)){Ce.decompressedPositions=new Float32Array(Ce.geometryPositions.length),Ce.transformedAndRecompressedPositions=new Uint16Array(Ce.geometryPositions.length);const lt=Ce.geometryPositions,dt=Ce.decompressedPositions;for(let bt=0,ke=lt.length;bt<ke;bt+=3)dt[bt+0]=lt[bt+0]*A[0]+A[12],dt[bt+1]=lt[bt+1]*A[5]+A[13],dt[bt+2]=lt[bt+2]*A[10]+A[14];Ce.geometryPositions=null,$[ut]=Ce}}if(Ce)if(Ce.batchThisMesh){const Xe=Ce.decompressedPositions,ht=Ce.transformedAndRecompressedPositions;for(let lt=0,dt=Xe.length;lt<dt;lt+=3)xc[0]=Xe[lt+0],xc[1]=Xe[lt+1],xc[2]=Xe[lt+2],xc[3]=1,b.transformVec4(Fe,xc,pie),Yt.compressPosition(pie,J,xc),ht[lt+0]=xc[0],ht[lt+1]=xc[1],ht[lt+2]=xc[2];n.createMesh(At.apply(Z,{id:je,origin:W,primitive:Ce.primitiveName,positionsCompressed:ht,normalsCompressed:Ce.geometryNormals,colorsCompressed:Ce.geometryColors,indices:Ce.geometryIndices,edgeIndices:Ce.geometryEdgeIndices,positionsDecodeMatrix:De,color:ee,metallic:re,roughness:he,opacity:be})),Me.push(je)}else ve[ut]||(n.createGeometry({id:ut,primitive:Ce.primitiveName,positionsCompressed:Ce.geometryPositions,normalsCompressed:Ce.geometryNormals,colorsCompressed:Ce.geometryColors,indices:Ce.geometryIndices,edgeIndices:Ce.geometryEdgeIndices,positionsDecodeMatrix:A}),ve[ut]=!0),n.createMesh(At.apply(Z,{id:je,geometryId:ut,origin:W,matrix:Fe,color:ee,metallic:re,roughness:he,opacity:be})),Me.push(je)}else{const de=f[fe];let Fe,ut,Ce,Xe,ht,lt,dt=!1;switch(de){case 0:Fe="solid",ut=l.subarray(g[fe],H?l.length:g[fe+1]),Ce=c.subarray(m[fe],H?c.length:m[fe+1]),ht=d.subarray(y[fe],H?d.length:y[fe+1]),lt=h.subarray(w[fe],H?h.length:w[fe+1]),dt=ut.length>0&&ht.length>0;break;case 1:Fe="surface",ut=l.subarray(g[fe],H?l.length:g[fe+1]),Ce=c.subarray(m[fe],H?c.length:m[fe+1]),ht=d.subarray(y[fe],H?d.length:y[fe+1]),lt=h.subarray(w[fe],H?h.length:w[fe+1]),dt=ut.length>0&&ht.length>0;break;case 2:Fe="points",ut=l.subarray(g[fe],H?l.length:g[fe+1]),Xe=u.subarray(v[fe],H?u.length:v[fe+1]),dt=ut.length>0;break;case 3:Fe="lines",ut=l.subarray(g[fe],H?l.length:g[fe+1]),ht=d.subarray(y[fe],H?d.length:y[fe+1]),dt=ut.length>0&&ht.length>0;break;default:continue}dt&&(n.createMesh(At.apply(Z,{id:je,origin:W,primitive:Fe,positionsCompressed:ut,normalsCompressed:Ce,colorsCompressed:Xe,indices:ht,edgeIndices:lt,positionsDecodeMatrix:De,color:ee,metallic:re,roughness:he,opacity:be})),Me.push(je))}}Me.length>0&&n.createEntity(At.apply(q,{id:Ne,isObject:!0,meshIds:Me}))}}}}const fie={version:9,parse:function(i,e,t,n,o,r){const s=N7t(t),a=U7t(s);H7t(i,e,a,n,o,r)}};let i1=window.pako||Ia;i1.inflate||(i1=i1.default);const Mc=b.vec4(),Aie=b.vec4(),z7t=9;function j7t(i){let e=0;return{metadata:i[e++],textureData:i[e++],eachTextureDataPortion:i[e++],eachTextureAttributes:i[e++],positions:i[e++],normals:i[e++],colors:i[e++],uvs:i[e++],indices:i[e++],edgeIndices:i[e++],eachTextureSetTextures:i[e++],matrices:i[e++],reusedGeometriesDecodeMatrix:i[e++],eachGeometryPrimitiveType:i[e++],eachGeometryPositionsPortion:i[e++],eachGeometryNormalsPortion:i[e++],eachGeometryColorsPortion:i[e++],eachGeometryUVsPortion:i[e++],eachGeometryIndicesPortion:i[e++],eachGeometryEdgeIndicesPortion:i[e++],eachMeshGeometriesPortion:i[e++],eachMeshMatricesPortion:i[e++],eachMeshTextureSet:i[e++],eachMeshMaterialAttributes:i[e++],eachEntityId:i[e++],eachEntityMeshesPortion:i[e++],eachTileAABB:i[e++],eachTileEntitiesPortion:i[e++]}}function G7t(i){function e(t,n){return t.length===0?[]:i1.inflate(t,n).buffer}return{metadata:JSON.parse(i1.inflate(i.metadata,{to:"string"})),textureData:new Uint8Array(e(i.textureData)),eachTextureDataPortion:new Uint32Array(e(i.eachTextureDataPortion)),eachTextureAttributes:new Uint16Array(e(i.eachTextureAttributes)),positions:new Uint16Array(e(i.positions)),normals:new Int8Array(e(i.normals)),colors:new Uint8Array(e(i.colors)),uvs:new Float32Array(e(i.uvs)),indices:new Uint32Array(e(i.indices)),edgeIndices:new Uint32Array(e(i.edgeIndices)),eachTextureSetTextures:new Int32Array(e(i.eachTextureSetTextures)),matrices:new Float32Array(e(i.matrices)),reusedGeometriesDecodeMatrix:new Float32Array(e(i.reusedGeometriesDecodeMatrix)),eachGeometryPrimitiveType:new Uint8Array(e(i.eachGeometryPrimitiveType)),eachGeometryPositionsPortion:new Uint32Array(e(i.eachGeometryPositionsPortion)),eachGeometryNormalsPortion:new Uint32Array(e(i.eachGeometryNormalsPortion)),eachGeometryColorsPortion:new Uint32Array(e(i.eachGeometryColorsPortion)),eachGeometryUVsPortion:new Uint32Array(e(i.eachGeometryUVsPortion)),eachGeometryIndicesPortion:new Uint32Array(e(i.eachGeometryIndicesPortion)),eachGeometryEdgeIndicesPortion:new Uint32Array(e(i.eachGeometryEdgeIndicesPortion)),eachMeshGeometriesPortion:new Uint32Array(e(i.eachMeshGeometriesPortion)),eachMeshMatricesPortion:new Uint32Array(e(i.eachMeshMatricesPortion)),eachMeshTextureSet:new Int32Array(e(i.eachMeshTextureSet)),eachMeshMaterialAttributes:new Uint8Array(e(i.eachMeshMaterialAttributes)),eachEntityId:JSON.parse(i1.inflate(i.eachEntityId,{to:"string"})),eachEntityMeshesPortion:new Uint32Array(e(i.eachEntityMeshesPortion)),eachTileAABB:new Float64Array(e(i.eachTileAABB)),eachTileEntitiesPortion:new Uint32Array(e(i.eachTileEntitiesPortion))}}const Q7t=(function(){const i=new Float32Array(3);return function(e){return i[0]=e[0]/255,i[1]=e[1]/255,i[2]=e[2]/255,i}})();(function(){const i=document.createElement("canvas"),e=i.getContext("2d");return function(t){return i.width=t.width,i.height=t.height,e.putImageData(t,0,0),i.toDataURL()}})();function q7t(i,e,t,n,o,r){const s=r.getNextId(),a=t.metadata,l=t.textureData,c=t.eachTextureDataPortion,u=t.eachTextureAttributes,d=t.positions,h=t.normals,p=t.colors,A=t.uvs,f=t.indices,g=t.edgeIndices,m=t.eachTextureSetTextures,v=t.matrices,y=t.reusedGeometriesDecodeMatrix,w=t.eachGeometryPrimitiveType,x=t.eachGeometryPositionsPortion,M=t.eachGeometryNormalsPortion,B=t.eachGeometryColorsPortion,S=t.eachGeometryUVsPortion,I=t.eachGeometryIndicesPortion,R=t.eachGeometryEdgeIndicesPortion,T=t.eachMeshGeometriesPortion,_=t.eachMeshMatricesPortion,F=t.eachMeshTextureSet,N=t.eachMeshMaterialAttributes,z=t.eachEntityId,j=t.eachEntityMeshesPortion,W=t.eachTileAABB,J=t.eachTileEntitiesPortion,$=c.length,ue=m.length/5,Ee=x.length,Be=T.length,ze=j.length,Qe=J.length;o&&o.loadData(a,{includeTypes:e.includeTypes,excludeTypes:e.excludeTypes,globalizeObjectIds:e.globalizeObjectIds});for(let ge=0;ge<$;ge++){const Ie=ge===$-1,Ne=c[ge],qe=Ie?l.length:c[ge+1],ne=qe-Ne>0,ie=ge*z7t,Me=u[ie+0]===1,Ae=u[ie+1];u[ie+2],u[ie+3];const q=u[ie+4],Z=u[ie+5],oe=u[ie+6],fe=u[ie+7],Se=u[ie+8];if(ne){const H=new Uint8Array(l.subarray(Ne,qe)).buffer,ee=`${s}-texture-${ge}`;if(Me)n.createTexture({id:ee,buffers:[H],minFilter:q,magFilter:Z,wrapS:oe,wrapT:fe,wrapR:Se});else{const be=Ae===qw?"image/jpeg":Ae===Kw?"image/png":"image/gif",re=new Blob([H],{type:be}),je=(window.URL||window.webkitURL).createObjectURL(re),de=document.createElement("img");de.src=je,n.createTexture({id:ee,image:de,minFilter:q,magFilter:Z,wrapS:oe,wrapT:fe,wrapR:Se})}}}for(let ge=0;ge<ue;ge++){const Ie=ge*5,Ne=`${s}-textureSet-${ge}`,qe=m[Ie+0],Q=m[Ie+1],ne=m[Ie+2],ie=m[Ie+3],Me=m[Ie+4];n.createTextureSet({id:Ne,colorTextureId:qe>=0?`${s}-texture-${qe}`:null,normalsTextureId:ne>=0?`${s}-texture-${ne}`:null,metallicRoughnessTextureId:Q>=0?`${s}-texture-${Q}`:null,emissiveTextureId:ie>=0?`${s}-texture-${ie}`:null,occlusionTextureId:Me>=0?`${s}-texture-${Me}`:null})}const me=new Uint32Array(Ee);for(let ge=0;ge<Be;ge++){const Ie=T[ge];me[Ie]!==void 0?me[Ie]++:me[Ie]=1}const _e=b.vec3(),De=b.AABB3(),ve={};for(let ge=0;ge<Qe;ge++){const Ie=Qe-1,Ne=ge===Ie,qe=J[ge],Q=Ne?ze-1:J[ge+1]-1,ne=ge*6,ie=W.subarray(ne,ne+6);b.getAABB3Center(ie,_e),De[0]=ie[0]-_e[0],De[1]=ie[1]-_e[1],De[2]=ie[2]-_e[2],De[3]=ie[3]-_e[0],De[4]=ie[4]-_e[1],De[5]=ie[5]-_e[2];const Me=Yt.createPositionsDecodeMatrix(De),Ae={};for(let q=qe;q<=Q;q++){const Z=z[q],oe=e.globalizeObjectIds?b.globalizeObjectId(n.id,Z):Z,fe=ze-1,Se=q===fe,X=j[q],H=Se?T.length-1:j[q+1]-1,ee=[],be=i.metaScene.metaObjects[oe],re={},he={};if(!(e.includeIdsMap&&Z&&!e.includeIdsMap[Z])){if(be){if(e.excludeTypesMap&&be.type&&e.excludeTypesMap[be.type]||e.includeTypesMap&&be.type&&!e.includeTypesMap[be.type]||e.includeIdsMap&&be.id&&!e.includeIdsMap[be.id])continue;const je=e.objectDefaults?e.objectDefaults[be.type]||e.objectDefaults.DEFAULT:null;je&&(je.visible===!1&&(re.visible=!1),je.pickable===!1&&(re.pickable=!1),je.colorize&&(he.color=je.colorize),je.opacity!==void 0&&je.opacity!==null&&(he.opacity=je.opacity),je.metallic!==void 0&&je.metallic!==null&&(he.metallic=je.metallic),je.roughness!==void 0&&je.roughness!==null&&(he.roughness=je.roughness))}else if(e.excludeUnclassifiedObjects)continue;for(let je=X;je<=H;je++){const de=T[je],ut=me[de]>1,Ce=de===Ee-1,Xe=F[je],ht=Xe>=0?`${s}-textureSet-${Xe}`:null,lt=Q7t(N.subarray(je*6,je*6+3)),dt=N[je*6+3]/255,bt=N[je*6+4]/255,ke=N[je*6+5]/255,Je=r.getNextId();if(ut){const ft=_[je],it=v.slice(ft,ft+16),Ge=`${s}-geometry.${ge}.${de}`;let pe=ve[Ge];if(!pe){pe={batchThisMesh:!e.reuseGeometries};const Te=w[de];let mt=!1;switch(Te){case 0:pe.primitiveName="solid",pe.geometryPositions=d.subarray(x[de],Ce?d.length:x[de+1]),pe.geometryNormals=h.subarray(M[de],Ce?h.length:M[de+1]),pe.geometryUVs=A.subarray(S[de],Ce?A.length:S[de+1]),pe.geometryIndices=f.subarray(I[de],Ce?f.length:I[de+1]),pe.geometryEdgeIndices=g.subarray(R[de],Ce?g.length:R[de+1]),mt=pe.geometryPositions.length>0&&pe.geometryIndices.length>0;break;case 1:pe.primitiveName="surface",pe.geometryPositions=d.subarray(x[de],Ce?d.length:x[de+1]),pe.geometryNormals=h.subarray(M[de],Ce?h.length:M[de+1]),pe.geometryUVs=A.subarray(S[de],Ce?A.length:S[de+1]),pe.geometryIndices=f.subarray(I[de],Ce?f.length:I[de+1]),pe.geometryEdgeIndices=g.subarray(R[de],Ce?g.length:R[de+1]),mt=pe.geometryPositions.length>0&&pe.geometryIndices.length>0;break;case 2:pe.primitiveName="points",pe.geometryPositions=d.subarray(x[de],Ce?d.length:x[de+1]),pe.geometryColors=p.subarray(B[de],Ce?p.length:B[de+1]),mt=pe.geometryPositions.length>0;break;case 3:pe.primitiveName="lines",pe.geometryPositions=d.subarray(x[de],Ce?d.length:x[de+1]),pe.geometryIndices=f.subarray(I[de],Ce?f.length:I[de+1]),mt=pe.geometryPositions.length>0&&pe.geometryIndices.length>0;break;case 4:pe.primitiveName="lines",pe.geometryPositions=d.subarray(x[de],Ce?d.length:x[de+1]),pe.geometryIndices=mie(pe.geometryPositions,f.subarray(I[de],Ce?f.length:I[de+1])),mt=pe.geometryPositions.length>0&&pe.geometryIndices.length>0;break;default:continue}if(mt||(pe=null),pe&&(pe.geometryPositions.length>1e3,pe.batchThisMesh)){pe.decompressedPositions=new Float32Array(pe.geometryPositions.length),pe.transformedAndRecompressedPositions=new Uint16Array(pe.geometryPositions.length);const vt=pe.geometryPositions,It=pe.decompressedPositions;for(let kt=0,Wi=vt.length;kt<Wi;kt+=3)It[kt+0]=vt[kt+0]*y[0]+y[12],It[kt+1]=vt[kt+1]*y[5]+y[13],It[kt+2]=vt[kt+2]*y[10]+y[14];pe.geometryPositions=null,ve[Ge]=pe}}if(pe)if(pe.batchThisMesh){const Te=pe.decompressedPositions,mt=pe.transformedAndRecompressedPositions;for(let vt=0,It=Te.length;vt<It;vt+=3)Mc[0]=Te[vt+0],Mc[1]=Te[vt+1],Mc[2]=Te[vt+2],Mc[3]=1,b.transformVec4(it,Mc,Aie),Yt.compressPosition(Aie,De,Mc),mt[vt+0]=Mc[0],mt[vt+1]=Mc[1],mt[vt+2]=Mc[2];n.createMesh(At.apply(he,{id:Je,textureSetId:ht,origin:_e,primitive:pe.primitiveName,positionsCompressed:mt,normalsCompressed:pe.geometryNormals,uv:pe.geometryUVs,colorsCompressed:pe.geometryColors,indices:pe.geometryIndices,edgeIndices:pe.geometryEdgeIndices,positionsDecodeMatrix:Me,color:lt,metallic:bt,roughness:ke,opacity:dt})),ee.push(Je)}else Ae[Ge]||(n.createGeometry({id:Ge,primitive:pe.primitiveName,positionsCompressed:pe.geometryPositions,normalsCompressed:pe.geometryNormals,uv:pe.geometryUVs,colorsCompressed:pe.geometryColors,indices:pe.geometryIndices,edgeIndices:pe.geometryEdgeIndices,positionsDecodeMatrix:y}),Ae[Ge]=!0),n.createMesh(At.apply(he,{id:Je,geometryId:Ge,textureSetId:ht,matrix:it,color:lt,metallic:bt,roughness:ke,opacity:dt,origin:_e})),ee.push(Je)}else{const ft=w[de];let it,Ge,pe,Te,mt,vt,It,kt=!1;switch(ft){case 0:it="solid",Ge=d.subarray(x[de],Ce?d.length:x[de+1]),pe=h.subarray(M[de],Ce?h.length:M[de+1]),Te=A.subarray(S[de],Ce?A.length:S[de+1]),vt=f.subarray(I[de],Ce?f.length:I[de+1]),It=g.subarray(R[de],Ce?g.length:R[de+1]),kt=Ge.length>0&&vt.length>0;break;case 1:it="surface",Ge=d.subarray(x[de],Ce?d.length:x[de+1]),pe=h.subarray(M[de],Ce?h.length:M[de+1]),Te=A.subarray(S[de],Ce?A.length:S[de+1]),vt=f.subarray(I[de],Ce?f.length:I[de+1]),It=g.subarray(R[de],Ce?g.length:R[de+1]),kt=Ge.length>0&&vt.length>0;break;case 2:it="points",Ge=d.subarray(x[de],Ce?d.length:x[de+1]),mt=p.subarray(B[de],Ce?p.length:B[de+1]),kt=Ge.length>0;break;case 3:it="lines",Ge=d.subarray(x[de],Ce?d.length:x[de+1]),vt=f.subarray(I[de],Ce?f.length:I[de+1]),kt=Ge.length>0&&vt.length>0;break;case 4:it="lines",Ge=d.subarray(x[de],Ce?d.length:x[de+1]),vt=mie(Ge,f.subarray(I[de],Ce?f.length:I[de+1])),kt=Ge.length>0&&vt.length>0;break;default:continue}kt&&(n.createMesh(At.apply(he,{id:Je,textureSetId:ht,origin:_e,primitive:it,positionsCompressed:Ge,normalsCompressed:pe,uv:Te&&Te.length>0?Te:null,colorsCompressed:mt,indices:vt,edgeIndices:It,positionsDecodeMatrix:Me,color:lt,metallic:bt,roughness:ke,opacity:dt})),ee.push(Je))}}ee.length>0&&n.createEntity(At.apply(re,{id:oe,isObject:!0,meshIds:ee}))}}}}function mie(i,e){const t=[];if(e.length>1)for(let n=0,o=e.length-1;n<o;n++)t.push(e[n]),t.push(e[n+1]);else if(i.length>1)for(let n=0,o=i.length/3-1;n<o;n++)t.push(n),t.push(n+1);return t}const gie={version:10,parse:function(i,e,t,n,o,r){const s=j7t(t),a=G7t(s);q7t(i,e,a,n,o,r)}},Ec=b.vec4(),yie=b.vec4(),K7t=9;function J7t(i){const e=(function(){const o=new ArrayBuffer(2);return new Uint16Array(o)[0]=1,new Uint8Array(o)[0]!==1})(),t=(function(){let o=0;const r=new DataView(i);return function(s){const a=1+2*o++,l=r.getUint32(a*4,!0),c=r.getUint32((a+1)*4,!0),u=s.BYTES_PER_ELEMENT;if(e&&u>1){const d=new Uint8Array(i,l,c),h=u/2,p=d.length/u;for(let A=0;A<p;A++){const f=A*u;for(let g=0;g<h;g++){const m=f+g,v=f-g+u-1,y=d[m];d[m]=d[v],d[v]=y}}}return new s(i,l,c/u)}})(),n=(function(){const o=new TextDecoder;return()=>JSON.parse(o.decode(t(Uint8Array)))})();return{metadata:n(),textureData:t(Uint8Array),eachTextureDataPortion:t(Uint32Array),eachTextureAttributes:t(Uint16Array),positions:t(Uint16Array),normals:t(Int8Array),colors:t(Uint8Array),uvs:t(Float32Array),indices:t(Uint32Array),edgeIndices:t(Uint32Array),eachTextureSetTextures:t(Int32Array),matrices:t(Float32Array),reusedGeometriesDecodeMatrix:t(Float32Array),eachGeometryPrimitiveType:t(Uint8Array),eachGeometryPositionsPortion:t(Uint32Array),eachGeometryNormalsPortion:t(Uint32Array),eachGeometryColorsPortion:t(Uint32Array),eachGeometryUVsPortion:t(Uint32Array),eachGeometryIndicesPortion:t(Uint32Array),eachGeometryEdgeIndicesPortion:t(Uint32Array),eachMeshGeometriesPortion:t(Uint32Array),eachMeshMatricesPortion:t(Uint32Array),eachMeshTextureSet:t(Int32Array),eachMeshMaterialAttributes:t(Uint8Array),eachEntityId:n(),eachEntityMeshesPortion:t(Uint32Array),eachTileAABB:t(Float64Array),eachTileEntitiesPortion:t(Uint32Array)}}const W7t=(function(){const i=new Float32Array(3);return function(e){return i[0]=e[0]/255,i[1]=e[1]/255,i[2]=e[2]/255,i}})();(function(){const i=document.createElement("canvas"),e=i.getContext("2d");return function(t){return i.width=t.width,i.height=t.height,e.putImageData(t,0,0),i.toDataURL()}})();function Z7t(i,e,t,n,o,r){const s=r.getNextId(),a=t.metadata,l=t.textureData,c=t.eachTextureDataPortion,u=t.eachTextureAttributes,d=t.positions,h=t.normals,p=t.colors,A=t.uvs,f=t.indices,g=t.edgeIndices,m=t.eachTextureSetTextures,v=t.matrices,y=t.reusedGeometriesDecodeMatrix,w=t.eachGeometryPrimitiveType,x=t.eachGeometryPositionsPortion,M=t.eachGeometryNormalsPortion,B=t.eachGeometryColorsPortion,S=t.eachGeometryUVsPortion,I=t.eachGeometryIndicesPortion,R=t.eachGeometryEdgeIndicesPortion,T=t.eachMeshGeometriesPortion,_=t.eachMeshMatricesPortion,F=t.eachMeshTextureSet,N=t.eachMeshMaterialAttributes,z=t.eachEntityId,j=t.eachEntityMeshesPortion,W=t.eachTileAABB,J=t.eachTileEntitiesPortion,$=c.length,ue=m.length/5,Ee=x.length,Be=T.length,ze=j.length,Qe=J.length;o&&o.loadData(a,{includeTypes:e.includeTypes,excludeTypes:e.excludeTypes,globalizeObjectIds:e.globalizeObjectIds});for(let ge=0;ge<$;ge++){const Ie=ge===$-1,Ne=c[ge],qe=Ie?l.length:c[ge+1],ne=qe-Ne>0,ie=ge*K7t,Me=u[ie+0]===1,Ae=u[ie+1];u[ie+2],u[ie+3];const q=u[ie+4],Z=u[ie+5],oe=u[ie+6],fe=u[ie+7],Se=u[ie+8];if(ne){const H=new Uint8Array(l.subarray(Ne,qe)).buffer,ee=`${s}-texture-${ge}`;if(Me)n.createTexture({id:ee,buffers:[H],minFilter:q,magFilter:Z,wrapS:oe,wrapT:fe,wrapR:Se});else{const be=Ae===qw?"image/jpeg":Ae===Kw?"image/png":"image/gif",re=new Blob([H],{type:be}),je=(window.URL||window.webkitURL).createObjectURL(re),de=document.createElement("img");de.src=je,n.createTexture({id:ee,image:de,minFilter:q,magFilter:Z,wrapS:oe,wrapT:fe,wrapR:Se})}}}for(let ge=0;ge<ue;ge++){const Ie=ge*5,Ne=`${s}-textureSet-${ge}`,qe=m[Ie+0],Q=m[Ie+1],ne=m[Ie+2],ie=m[Ie+3],Me=m[Ie+4];n.createTextureSet({id:Ne,colorTextureId:qe>=0?`${s}-texture-${qe}`:null,normalsTextureId:ne>=0?`${s}-texture-${ne}`:null,metallicRoughnessTextureId:Q>=0?`${s}-texture-${Q}`:null,emissiveTextureId:ie>=0?`${s}-texture-${ie}`:null,occlusionTextureId:Me>=0?`${s}-texture-${Me}`:null})}const me=new Uint32Array(Ee);for(let ge=0;ge<Be;ge++){const Ie=T[ge];me[Ie]!==void 0?me[Ie]++:me[Ie]=1}const _e=b.vec3(),De=b.AABB3(),ve={};for(let ge=0;ge<Qe;ge++){const Ie=Qe-1,Ne=ge===Ie,qe=J[ge],Q=Ne?ze-1:J[ge+1]-1,ne=ge*6,ie=W.subarray(ne,ne+6);b.getAABB3Center(ie,_e),De[0]=ie[0]-_e[0],De[1]=ie[1]-_e[1],De[2]=ie[2]-_e[2],De[3]=ie[3]-_e[0],De[4]=ie[4]-_e[1],De[5]=ie[5]-_e[2];const Me=Yt.createPositionsDecodeMatrix(De),Ae={};for(let q=qe;q<=Q;q++){const Z=z[q],oe=e.globalizeObjectIds?b.globalizeObjectId(n.id,Z):Z,fe=ze-1,Se=q===fe,X=j[q],H=Se?T.length-1:j[q+1]-1,ee=[],be=i.metaScene.metaObjects[oe],re={},he={};if(!(e.includeIdsMap&&Z&&!e.includeIdsMap[Z])){if(be){if(e.excludeTypesMap&&be.type&&e.excludeTypesMap[be.type]||e.includeTypesMap&&be.type&&!e.includeTypesMap[be.type]||e.includeIdsMap&&be.id&&!e.includeIdsMap[be.id])continue;const je=e.objectDefaults?e.objectDefaults[be.type]||e.objectDefaults.DEFAULT:null;je&&(je.visible===!1&&(re.visible=!1),je.pickable===!1&&(re.pickable=!1),je.colorize&&(he.color=je.colorize),je.opacity!==void 0&&je.opacity!==null&&(he.opacity=je.opacity),je.metallic!==void 0&&je.metallic!==null&&(he.metallic=je.metallic),je.roughness!==void 0&&je.roughness!==null&&(he.roughness=je.roughness))}else if(e.excludeUnclassifiedObjects)continue;for(let je=X;je<=H;je++){const de=T[je],ut=me[de]>1,Ce=de===Ee-1,Xe=F[je],ht=Xe>=0?`${s}-textureSet-${Xe}`:null,lt=W7t(N.subarray(je*6,je*6+3)),dt=N[je*6+3]/255,bt=N[je*6+4]/255,ke=N[je*6+5]/255,Je=r.getNextId();if(ut){const ft=_[je],it=v.slice(ft,ft+16),Ge=`${s}-geometry.${ge}.${de}`;let pe=ve[Ge];if(!pe){pe={batchThisMesh:!e.reuseGeometries};const Te=w[de];let mt=!1;switch(Te){case 0:pe.primitiveName="solid",pe.geometryPositions=d.subarray(x[de],Ce?d.length:x[de+1]),pe.geometryNormals=h.subarray(M[de],Ce?h.length:M[de+1]),pe.geometryUVs=A.subarray(S[de],Ce?A.length:S[de+1]),pe.geometryIndices=f.subarray(I[de],Ce?f.length:I[de+1]),pe.geometryEdgeIndices=g.subarray(R[de],Ce?g.length:R[de+1]),mt=pe.geometryPositions.length>0&&pe.geometryIndices.length>0;break;case 1:pe.primitiveName="surface",pe.geometryPositions=d.subarray(x[de],Ce?d.length:x[de+1]),pe.geometryNormals=h.subarray(M[de],Ce?h.length:M[de+1]),pe.geometryUVs=A.subarray(S[de],Ce?A.length:S[de+1]),pe.geometryIndices=f.subarray(I[de],Ce?f.length:I[de+1]),pe.geometryEdgeIndices=g.subarray(R[de],Ce?g.length:R[de+1]),mt=pe.geometryPositions.length>0&&pe.geometryIndices.length>0;break;case 2:pe.primitiveName="points",pe.geometryPositions=d.subarray(x[de],Ce?d.length:x[de+1]),pe.geometryColors=p.subarray(B[de],Ce?p.length:B[de+1]),mt=pe.geometryPositions.length>0;break;case 3:pe.primitiveName="lines",pe.geometryPositions=d.subarray(x[de],Ce?d.length:x[de+1]),pe.geometryIndices=f.subarray(I[de],Ce?f.length:I[de+1]),mt=pe.geometryPositions.length>0&&pe.geometryIndices.length>0;break;case 4:pe.primitiveName="lines",pe.geometryPositions=d.subarray(x[de],Ce?d.length:x[de+1]),pe.geometryIndices=vie(pe.geometryPositions,f.subarray(I[de],Ce?f.length:I[de+1])),mt=pe.geometryPositions.length>0&&pe.geometryIndices.length>0;break;default:continue}if(mt||(pe=null),pe&&(pe.geometryPositions.length>1e3,pe.batchThisMesh)){pe.decompressedPositions=new Float32Array(pe.geometryPositions.length),pe.transformedAndRecompressedPositions=new Uint16Array(pe.geometryPositions.length);const vt=pe.geometryPositions,It=pe.decompressedPositions;for(let kt=0,Wi=vt.length;kt<Wi;kt+=3)It[kt+0]=vt[kt+0]*y[0]+y[12],It[kt+1]=vt[kt+1]*y[5]+y[13],It[kt+2]=vt[kt+2]*y[10]+y[14];pe.geometryPositions=null,ve[Ge]=pe}}if(pe)if(pe.batchThisMesh){const Te=pe.decompressedPositions,mt=pe.transformedAndRecompressedPositions;for(let vt=0,It=Te.length;vt<It;vt+=3)Ec[0]=Te[vt+0],Ec[1]=Te[vt+1],Ec[2]=Te[vt+2],Ec[3]=1,b.transformVec4(it,Ec,yie),Yt.compressPosition(yie,De,Ec),mt[vt+0]=Ec[0],mt[vt+1]=Ec[1],mt[vt+2]=Ec[2];n.createMesh(At.apply(he,{id:Je,textureSetId:ht,origin:_e,primitive:pe.primitiveName,positionsCompressed:mt,normalsCompressed:pe.geometryNormals,uv:pe.geometryUVs,colorsCompressed:pe.geometryColors,indices:pe.geometryIndices,edgeIndices:pe.geometryEdgeIndices,positionsDecodeMatrix:Me,color:lt,metallic:bt,roughness:ke,opacity:dt})),ee.push(Je)}else Ae[Ge]||(n.createGeometry({id:Ge,primitive:pe.primitiveName,positionsCompressed:pe.geometryPositions,normalsCompressed:pe.geometryNormals,uv:pe.geometryUVs,colorsCompressed:pe.geometryColors,indices:pe.geometryIndices,edgeIndices:pe.geometryEdgeIndices,positionsDecodeMatrix:y}),Ae[Ge]=!0),n.createMesh(At.apply(he,{id:Je,geometryId:Ge,textureSetId:ht,matrix:it,color:lt,metallic:bt,roughness:ke,opacity:dt,origin:_e})),ee.push(Je)}else{const ft=w[de];let it,Ge,pe,Te,mt,vt,It,kt=!1;switch(ft){case 0:it="solid",Ge=d.subarray(x[de],Ce?d.length:x[de+1]),pe=h.subarray(M[de],Ce?h.length:M[de+1]),Te=A.subarray(S[de],Ce?A.length:S[de+1]),vt=f.subarray(I[de],Ce?f.length:I[de+1]),It=g.subarray(R[de],Ce?g.length:R[de+1]),kt=Ge.length>0&&vt.length>0;break;case 1:it="surface",Ge=d.subarray(x[de],Ce?d.length:x[de+1]),pe=h.subarray(M[de],Ce?h.length:M[de+1]),Te=A.subarray(S[de],Ce?A.length:S[de+1]),vt=f.subarray(I[de],Ce?f.length:I[de+1]),It=g.subarray(R[de],Ce?g.length:R[de+1]),kt=Ge.length>0&&vt.length>0;break;case 2:it="points",Ge=d.subarray(x[de],Ce?d.length:x[de+1]),mt=p.subarray(B[de],Ce?p.length:B[de+1]),kt=Ge.length>0;break;case 3:it="lines",Ge=d.subarray(x[de],Ce?d.length:x[de+1]),vt=f.subarray(I[de],Ce?f.length:I[de+1]),kt=Ge.length>0&&vt.length>0;break;case 4:it="lines",Ge=d.subarray(x[de],Ce?d.length:x[de+1]),vt=vie(Ge,f.subarray(I[de],Ce?f.length:I[de+1])),kt=Ge.length>0&&vt.length>0;break;default:continue}kt&&(n.createMesh(At.apply(he,{id:Je,textureSetId:ht,origin:_e,primitive:it,positionsCompressed:Ge,normalsCompressed:pe,uv:Te&&Te.length>0?Te:null,colorsCompressed:mt,indices:vt,edgeIndices:It,positionsDecodeMatrix:Me,color:lt,metallic:bt,roughness:ke,opacity:dt})),ee.push(Je))}}ee.length>0&&n.createEntity(At.apply(re,{id:oe,isObject:!0,meshIds:ee}))}}}}function vie(i,e){const t=[];if(e.length>1)for(let n=0,o=e.length-1;n<o;n++)t.push(e[n]),t.push(e[n+1]);else if(i.length>1)for(let n=0,o=i.length/3-1;n<o;n++)t.push(n),t.push(n+1);return t}const wie={version:11,parseArrayBuffer:function(i,e,t,n,o,r){const s=J7t(t);Z7t(i,e,s,n,o,r)}};let Ph=window.pako||Ia;Ph.inflate||(Ph=Ph.default);const Bc=b.vec4(),Cie=b.vec4(),Y7t=9;function X7t(i){const e=(function(){const o=new ArrayBuffer(2);return new Uint16Array(o)[0]=1,new Uint8Array(o)[0]!==1})(),t=(function(){let o=0;const r=new DataView(i);return function(s){const a=1+2*o++,l=r.getUint32(a*4,!0),c=r.getUint32((a+1)*4,!0),u=s.BYTES_PER_ELEMENT;if(e&&u>1){const d=new Uint8Array(i,l,c),h=u/2,p=d.length/u;for(let A=0;A<p;A++){const f=A*u;for(let g=0;g<h;g++){const m=f+g,v=f-g+u-1,y=d[m];d[m]=d[v],d[v]=y}}}return new s(i,l,c/u)}})(),n=(function(){const o=new TextDecoder;return()=>JSON.parse(o.decode(t(Uint8Array)))})();return{metadata:n(),textureData:t(Uint8Array),eachTextureDataPortion:t(Uint32Array),eachTextureAttributes:t(Uint16Array),positions:t(Uint16Array),normals:t(Int8Array),colors:t(Uint8Array),uvs:t(Float32Array),indices:t(Uint32Array),edgeIndices:t(Uint32Array),eachTextureSetTextures:t(Int32Array),matrices:t(Float32Array),reusedGeometriesDecodeMatrix:t(Float32Array),eachGeometryPrimitiveType:t(Uint8Array),eachGeometryAxisLabel:n(),eachGeometryPositionsPortion:t(Uint32Array),eachGeometryNormalsPortion:t(Uint32Array),eachGeometryColorsPortion:t(Uint32Array),eachGeometryUVsPortion:t(Uint32Array),eachGeometryIndicesPortion:t(Uint32Array),eachGeometryEdgeIndicesPortion:t(Uint32Array),eachMeshGeometriesPortion:t(Uint32Array),eachMeshMatricesPortion:t(Uint32Array),eachMeshTextureSet:t(Int32Array),eachMeshMaterialAttributes:t(Uint8Array),eachEntityId:n(),eachEntityMeshesPortion:t(Uint32Array),eachTileAABB:t(Float64Array),eachTileEntitiesPortion:t(Uint32Array)}}function $7t(i){let e=0;return{metadata:i[e++],textureData:i[e++],eachTextureDataPortion:i[e++],eachTextureAttributes:i[e++],positions:i[e++],normals:i[e++],colors:i[e++],uvs:i[e++],indices:i[e++],edgeIndices:i[e++],eachTextureSetTextures:i[e++],matrices:i[e++],reusedGeometriesDecodeMatrix:i[e++],eachGeometryPrimitiveType:i[e++],eachGeometryAxisLabel:i[e++],eachGeometryPositionsPortion:i[e++],eachGeometryNormalsPortion:i[e++],eachGeometryColorsPortion:i[e++],eachGeometryUVsPortion:i[e++],eachGeometryIndicesPortion:i[e++],eachGeometryEdgeIndicesPortion:i[e++],eachMeshGeometriesPortion:i[e++],eachMeshMatricesPortion:i[e++],eachMeshTextureSet:i[e++],eachMeshMaterialAttributes:i[e++],eachEntityId:i[e++],eachEntityMeshesPortion:i[e++],eachTileAABB:i[e++],eachTileEntitiesPortion:i[e++]}}function e9t(i){function e(t,n){return t.length===0?[]:Ph.inflate(t,n).buffer}return{metadata:JSON.parse(Ph.inflate(i.metadata,{to:"string"})),textureData:new Uint8Array(e(i.textureData)),eachTextureDataPortion:new Uint32Array(e(i.eachTextureDataPortion)),eachTextureAttributes:new Uint16Array(e(i.eachTextureAttributes)),positions:new Uint16Array(e(i.positions)),normals:new Int8Array(e(i.normals)),colors:new Uint8Array(e(i.colors)),uvs:new Float32Array(e(i.uvs)),indices:new Uint32Array(e(i.indices)),edgeIndices:new Uint32Array(e(i.edgeIndices)),eachTextureSetTextures:new Int32Array(e(i.eachTextureSetTextures)),matrices:new Float32Array(e(i.matrices)),reusedGeometriesDecodeMatrix:new Float32Array(e(i.reusedGeometriesDecodeMatrix)),eachGeometryPrimitiveType:new Uint8Array(e(i.eachGeometryPrimitiveType)),eachGeometryAxisLabel:JSON.parse(Ph.inflate(i.eachGeometryAxisLabel,{to:"string"})),eachGeometryPositionsPortion:new Uint32Array(e(i.eachGeometryPositionsPortion)),eachGeometryNormalsPortion:new Uint32Array(e(i.eachGeometryNormalsPortion)),eachGeometryColorsPortion:new Uint32Array(e(i.eachGeometryColorsPortion)),eachGeometryUVsPortion:new Uint32Array(e(i.eachGeometryUVsPortion)),eachGeometryIndicesPortion:new Uint32Array(e(i.eachGeometryIndicesPortion)),eachGeometryEdgeIndicesPortion:new Uint32Array(e(i.eachGeometryEdgeIndicesPortion)),eachMeshGeometriesPortion:new Uint32Array(e(i.eachMeshGeometriesPortion)),eachMeshMatricesPortion:new Uint32Array(e(i.eachMeshMatricesPortion)),eachMeshTextureSet:new Int32Array(e(i.eachMeshTextureSet)),eachMeshMaterialAttributes:new Uint8Array(e(i.eachMeshMaterialAttributes)),eachEntityId:JSON.parse(Ph.inflate(i.eachEntityId,{to:"string"})),eachEntityMeshesPortion:new Uint32Array(e(i.eachEntityMeshesPortion)),eachTileAABB:new Float64Array(e(i.eachTileAABB)),eachTileEntitiesPortion:new Uint32Array(e(i.eachTileEntitiesPortion))}}const t9t=(function(){const i=new Float32Array(3);return function(e){return i[0]=e[0]/255,i[1]=e[1]/255,i[2]=e[2]/255,i}})();(function(){const i=document.createElement("canvas"),e=i.getContext("2d");return function(t){return i.width=t.width,i.height=t.height,e.putImageData(t,0,0),i.toDataURL()}})();function bie(i,e,t,n,o,r){const s=r.getNextId(),a=t.metadata,l=t.textureData,c=t.eachTextureDataPortion,u=t.eachTextureAttributes,d=t.positions,h=t.normals,p=t.colors,A=t.uvs,f=t.indices,g=t.edgeIndices,m=t.eachTextureSetTextures,v=t.matrices,y=t.reusedGeometriesDecodeMatrix,w=t.eachGeometryPrimitiveType,x=t.eachGeometryAxisLabel,M=t.eachGeometryPositionsPortion,B=t.eachGeometryNormalsPortion,S=t.eachGeometryColorsPortion,I=t.eachGeometryUVsPortion,R=t.eachGeometryIndicesPortion,T=t.eachGeometryEdgeIndicesPortion,_=t.eachMeshGeometriesPortion,F=t.eachMeshMatricesPortion,N=t.eachMeshTextureSet,z=t.eachMeshMaterialAttributes,j=t.eachEntityId,W=t.eachEntityMeshesPortion,J=t.eachTileAABB,$=t.eachTileEntitiesPortion,ue=c.length,Ee=m.length/5,Be=M.length,ze=_.length,Qe=W.length,me=$.length;o&&o.loadData(a,{includeTypes:e.includeTypes,excludeTypes:e.excludeTypes,globalizeObjectIds:e.globalizeObjectIds});for(let Ie=0;Ie<ue;Ie++){const Ne=Ie===ue-1,qe=c[Ie],Q=Ne?l.length:c[Ie+1],ie=Q-qe>0,Me=Ie*Y7t,Ae=u[Me+0]===1,q=u[Me+1];u[Me+2],u[Me+3];const Z=u[Me+4],oe=u[Me+5],fe=u[Me+6],Se=u[Me+7],X=u[Me+8];if(ie){const ee=new Uint8Array(l.subarray(qe,Q)).buffer,be=`${s}-texture-${Ie}`;if(Ae)n.createTexture({id:be,buffers:[ee],minFilter:Z,magFilter:oe,wrapS:fe,wrapT:Se,wrapR:X});else{const re=q===qw?"image/jpeg":q===Kw?"image/png":"image/gif",he=new Blob([ee],{type:re}),de=(window.URL||window.webkitURL).createObjectURL(he),Fe=document.createElement("img");Fe.src=de,n.createTexture({id:be,image:Fe,minFilter:Z,magFilter:oe,wrapS:fe,wrapT:Se,wrapR:X})}}}for(let Ie=0;Ie<Ee;Ie++){const Ne=Ie*5,qe=`${s}-textureSet-${Ie}`,Q=m[Ne+0],ne=m[Ne+1],ie=m[Ne+2],Me=m[Ne+3],Ae=m[Ne+4];n.createTextureSet({id:qe,colorTextureId:Q>=0?`${s}-texture-${Q}`:null,normalsTextureId:ie>=0?`${s}-texture-${ie}`:null,metallicRoughnessTextureId:ne>=0?`${s}-texture-${ne}`:null,emissiveTextureId:Me>=0?`${s}-texture-${Me}`:null,occlusionTextureId:Ae>=0?`${s}-texture-${Ae}`:null})}const _e=new Uint32Array(Be);for(let Ie=0;Ie<ze;Ie++){const Ne=_[Ie];_e[Ne]!==void 0?_e[Ne]++:_e[Ne]=1}const De=b.vec3(),ve=b.AABB3(),ge={};for(let Ie=0;Ie<me;Ie++){const Ne=me-1,qe=Ie===Ne,Q=$[Ie],ne=qe?Qe-1:$[Ie+1]-1,ie=Ie*6,Me=J.subarray(ie,ie+6);b.getAABB3Center(Me,De),ve[0]=Me[0]-De[0],ve[1]=Me[1]-De[1],ve[2]=Me[2]-De[2],ve[3]=Me[3]-De[0],ve[4]=Me[4]-De[1],ve[5]=Me[5]-De[2];const Ae=Yt.createPositionsDecodeMatrix(ve),q={};for(let Z=Q;Z<=ne;Z++){const oe=j[Z],fe=e.globalizeObjectIds?b.globalizeObjectId(n.id,oe):oe,Se=Qe-1,X=Z===Se,H=W[Z],ee=X?_.length-1:W[Z+1]-1,be=[],re=i.metaScene.metaObjects[fe],he={},je={};if(!(e.includeIdsMap&&oe&&!e.includeIdsMap[oe])){if(re){if(e.excludeTypesMap&&re.type&&e.excludeTypesMap[re.type]||e.includeTypesMap&&re.type&&!e.includeTypesMap[re.type]||e.includeIdsMap&&re.id&&!e.includeIdsMap[re.id])continue;const de=e.objectDefaults?e.objectDefaults[re.type]||e.objectDefaults.DEFAULT:null;de&&(de.visible===!1&&(he.visible=!1),de.pickable===!1&&(he.pickable=!1),de.colorize&&(je.color=de.colorize),de.opacity!==void 0&&de.opacity!==null&&(je.opacity=de.opacity),de.metallic!==void 0&&de.metallic!==null&&(je.metallic=de.metallic),de.roughness!==void 0&&de.roughness!==null&&(je.roughness=de.roughness))}else if(e.excludeUnclassifiedObjects)continue;for(let de=H;de<=ee;de++){const Fe=_[de],Ce=_e[Fe]>1,Xe=Fe===Be-1,ht=N[de],lt=ht>=0?`${s}-textureSet-${ht}`:null,dt=t9t(z.subarray(de*6,de*6+3)),bt=z[de*6+3]/255,ke=z[de*6+4]/255,Je=z[de*6+5]/255,ft=r.getNextId();if(Ce){const it=F[de],Ge=v.slice(it,it+16),pe=`${s}-geometry.${Ie}.${Fe}`;let Te=ge[pe];if(!Te){Te={batchThisMesh:!e.reuseGeometries};const mt=w[Fe],vt=x[Fe];let It=!1,kt;switch(mt){case 0:Te.primitiveName="solid",Te.geometryPositions=d.subarray(M[Fe],Xe?d.length:M[Fe+1]),Te.geometryNormals=h.subarray(B[Fe],Xe?h.length:B[Fe+1]),Te.geometryUVs=A.subarray(I[Fe],Xe?A.length:I[Fe+1]),Te.geometryIndices=f.subarray(R[Fe],Xe?f.length:R[Fe+1]),Te.geometryEdgeIndices=g.subarray(T[Fe],Xe?g.length:T[Fe+1]),It=Te.geometryPositions.length>0&&Te.geometryIndices.length>0;break;case 1:Te.primitiveName="surface",Te.geometryPositions=d.subarray(M[Fe],Xe?d.length:M[Fe+1]),Te.geometryNormals=h.subarray(B[Fe],Xe?h.length:B[Fe+1]),Te.geometryUVs=A.subarray(I[Fe],Xe?A.length:I[Fe+1]),Te.geometryIndices=f.subarray(R[Fe],Xe?f.length:R[Fe+1]),Te.geometryEdgeIndices=g.subarray(T[Fe],Xe?g.length:T[Fe+1]),It=Te.geometryPositions.length>0&&Te.geometryIndices.length>0;break;case 2:Te.primitiveName="points",Te.geometryPositions=d.subarray(M[Fe],Xe?d.length:M[Fe+1]),Te.geometryColors=p.subarray(S[Fe],Xe?p.length:S[Fe+1]),It=Te.geometryPositions.length>0;break;case 3:Te.primitiveName="lines",Te.geometryPositions=d.subarray(M[Fe],Xe?d.length:M[Fe+1]),Te.geometryIndices=f.subarray(R[Fe],Xe?f.length:R[Fe+1]),It=Te.geometryPositions.length>0&&Te.geometryIndices.length>0;break;case 4:Te.primitiveName="lines",Te.geometryPositions=d.subarray(M[Fe],Xe?d.length:M[Fe+1]),Te.geometryIndices=xie(Te.geometryPositions,f.subarray(R[Fe],Xe?f.length:R[Fe+1])),It=Te.geometryPositions.length>0&&Te.geometryIndices.length>0;break;case 7:Te.primitiveName="lines",Te.geometryPositions=d.subarray(M[Fe],Xe?d.length:M[Fe+1]),Te.decompressedPositions=Yt.decompressPositions(Te.geometryPositions,y),kt=Mf({origin:Te.decompressedPositions,text:vt,size:2}),Te.decompressedPositions=kt.positions,Te.geometryIndices=kt.indices,Te.geometryPositions=null,It=Te.decompressedPositions.length>0&&Te.geometryIndices.length>0;break;default:continue}if(It||(Te=null),Te&&(Te.geometryPositions&&Te.geometryPositions.length>1e3,Te.batchThisMesh)){if(mt===7)Te.transformedAndRecompressedPositions=new Uint16Array(Te.decompressedPositions.length);else{Te.decompressedPositions=new Float32Array(Te.geometryPositions.length),Te.transformedAndRecompressedPositions=new Uint16Array(Te.geometryPositions.length);const Wi=Te.geometryPositions,Qn=Te.decompressedPositions;for(let Ui=0,wn=Wi.length;Ui<wn;Ui+=3)Qn[Ui+0]=Wi[Ui+0]*y[0]+y[12],Qn[Ui+1]=Wi[Ui+1]*y[5]+y[13],Qn[Ui+2]=Wi[Ui+2]*y[10]+y[14];Te.geometryPositions=null}ge[pe]=Te}}if(Te)if(Te.batchThisMesh){const mt=Te.decompressedPositions,vt=Te.transformedAndRecompressedPositions;for(let It=0,kt=mt.length;It<kt;It+=3)Bc[0]=mt[It+0],Bc[1]=mt[It+1],Bc[2]=mt[It+2],Bc[3]=1,b.transformVec4(Ge,Bc,Cie),Yt.compressPosition(Cie,ve,Bc),vt[It+0]=Bc[0],vt[It+1]=Bc[1],vt[It+2]=Bc[2];n.createMesh(At.apply(je,{id:ft,textureSetId:lt,origin:De,primitive:Te.primitiveName,positionsCompressed:vt,normalsCompressed:Te.geometryNormals,uv:Te.geometryUVs,colorsCompressed:Te.geometryColors,indices:Te.geometryIndices,edgeIndices:Te.geometryEdgeIndices,positionsDecodeMatrix:Ae,color:dt,metallic:ke,roughness:Je,opacity:bt})),be.push(ft)}else{if(!q[pe]){let mt={id:pe,primitive:Te.primitiveName,normalsCompressed:Te.geometryNormals,uv:Te.geometryUVs,colorsCompressed:Te.geometryColors,indices:Te.geometryIndices,edgeIndices:Te.geometryEdgeIndices};Te.geometryPositions?mt={...mt,positionsCompressed:Te.geometryPositions,positionsDecodeMatrix:y}:mt={...mt,positions:Te.decompressedPositions},n.createGeometry(mt),q[pe]=!0}n.createMesh(At.apply(je,{id:ft,geometryId:pe,textureSetId:lt,matrix:Ge,color:dt,metallic:ke,roughness:Je,opacity:bt,origin:De})),be.push(ft)}}else{const it=w[Fe],Ge=x[Fe];let pe,Te,mt,vt,It,kt,Wi,Qn=!1,Ui;switch(it){case 0:pe="solid",Te=d.subarray(M[Fe],Xe?d.length:M[Fe+1]),mt=h.subarray(B[Fe],Xe?h.length:B[Fe+1]),vt=A.subarray(I[Fe],Xe?A.length:I[Fe+1]),kt=f.subarray(R[Fe],Xe?f.length:R[Fe+1]),Wi=g.subarray(T[Fe],Xe?g.length:T[Fe+1]),Qn=Te.length>0&&kt.length>0;break;case 1:pe="surface",Te=d.subarray(M[Fe],Xe?d.length:M[Fe+1]),mt=h.subarray(B[Fe],Xe?h.length:B[Fe+1]),vt=A.subarray(I[Fe],Xe?A.length:I[Fe+1]),kt=f.subarray(R[Fe],Xe?f.length:R[Fe+1]),Wi=g.subarray(T[Fe],Xe?g.length:T[Fe+1]),Qn=Te.length>0&&kt.length>0;break;case 2:pe="points",Te=d.subarray(M[Fe],Xe?d.length:M[Fe+1]),It=p.subarray(S[Fe],Xe?p.length:S[Fe+1]),Qn=Te.length>0;break;case 3:pe="lines",Te=d.subarray(M[Fe],Xe?d.length:M[Fe+1]),kt=f.subarray(R[Fe],Xe?f.length:R[Fe+1]),Qn=Te.length>0&&kt.length>0;break;case 4:pe="lines",Te=d.subarray(M[Fe],Xe?d.length:M[Fe+1]),kt=xie(Te,f.subarray(R[Fe],Xe?f.length:R[Fe+1])),Qn=Te.length>0&&kt.length>0;break;case 7:pe="lines",Te=d.subarray(M[Fe],Xe?d.length:M[Fe+1]),Te=Yt.decompressPositions(Te,Ae),Ui=Mf({origin:Te,text:Ge,size:2}),Te=Ui.positions,kt=Ui.indices,Qn=Te.length>0&&kt.length>0;break;default:continue}if(Qn){let wn=At.apply(je,{id:ft,textureSetId:lt,origin:De,primitive:pe,normalsCompressed:mt,uv:vt&&vt.length>0?vt:null,colorsCompressed:It,indices:kt,edgeIndices:Wi,color:dt,metallic:ke,roughness:Je,opacity:bt});it!==7?wn={...wn,positionsCompressed:Te,positionsDecodeMatrix:Ae}:wn={...wn,positions:Te},n.createMesh(wn),be.push(ft)}}}be.length>0&&n.createEntity(At.apply(he,{id:fe,isObject:!0,meshIds:be}))}}}}function xie(i,e){const t=[];if(e.length>1)for(let n=0,o=e.length-1;n<o;n++)t.push(e[n]),t.push(e[n+1]);else if(i.length>1)for(let n=0,o=i.length/3-1;n<o;n++)t.push(n),t.push(n+1);return t}const Mie={version:12,parseArrayBuffer:function(i,e,t,n,o,r){const s=X7t(t);bie(i,e,s,n,o,r)},parse:function(i,e,t,n,o,r){const s=$7t(t),a=e9t(s);bie(i,e,a,n,o,r)}},Ds={};Ds[iie.version]=iie,Ds[nie.version]=nie,Ds[oie.version]=oie,Ds[sie.version]=sie,Ds[rie.version]=rie,Ds[aie.version]=aie,Ds[cie.version]=cie,Ds[hie.version]=hie,Ds[fie.version]=fie,Ds[gie.version]=gie,Ds[wie.version]=wie,Ds[Mie.version]=Mie;class u9 extends qr{constructor(e,t={}){super("XKTLoader",e,t),this._maxGeometryBatchSize=t.maxGeometryBatchSize,this.textureTranscoder=t.textureTranscoder,this.dataSource=t.dataSource,this.objectDefaults=t.objectDefaults,this.includeTypes=t.includeTypes,this.excludeTypes=t.excludeTypes,this.excludeUnclassifiedObjects=t.excludeUnclassifiedObjects,this.reuseGeometries=t.reuseGeometries}get supportedVersions(){return Object.keys(Ds)}get textureTranscoder(){return this._textureTranscoder}set textureTranscoder(e){this._textureTranscoder=e}get dataSource(){return this._dataSource}set dataSource(e){this._dataSource=e||new $te}get objectDefaults(){return this._objectDefaults}set objectDefaults(e){this._objectDefaults=e||Zte}get includeTypes(){return this._includeTypes}set includeTypes(e){this._includeTypes=e}get excludeTypes(){return this._excludeTypes}set excludeTypes(e){this._excludeTypes=e}get includeIds(){return this._includeIds}set includeIds(e){this._includeIds=e}get excludeUnclassifiedObjects(){return this._excludeUnclassifiedObjects}set excludeUnclassifiedObjects(e){this._excludeUnclassifiedObjects=!!e}get globalizeObjectIds(){return this._globalizeObjectIds}set globalizeObjectIds(e){this._globalizeObjectIds=!!e}get reuseGeometries(){return this._reuseGeometries}set reuseGeometries(e){this._reuseGeometries=e!==!1}load(e={}){if(e.id&&this.viewer.scene.components[e.id]&&(this.error("Component with this ID already exists in viewer: "+e.id+" - will autogenerate this ID"),delete e.id),!e.src&&!e.xkt&&!e.manifestSrc&&!e.manifest)throw new Error("XKTLoaderPlugin: load() param expected: src, xkt, manifestSrc or manifestData");const t={},n=e.includeTypes||this._includeTypes,o=e.excludeTypes||this._excludeTypes,r=e.includeIds||this._includeIds,s=e.objectDefaults||this._objectDefaults;if(t.reuseGeometries=e.reuseGeometries!==null&&e.reuseGeometries!==void 0?e.reuseGeometries:this._reuseGeometries!==!1,n){t.includeTypesMap={};for(let A=0,f=n.length;A<f;A++)t.includeTypesMap[n[A]]=!0}if(o){t.excludeTypesMap={};for(let A=0,f=o.length;A<f;A++)t.excludeTypesMap[o[A]]=!0}if(r){t.includeIdsMap={};for(let A=0,f=r.length;A<f;A++)t.includeIdsMap[r[A]]=!0}s&&(t.objectDefaults=s),t.excludeUnclassifiedObjects=e.excludeUnclassifiedObjects!==void 0?!!e.excludeUnclassifiedObjects:this._excludeUnclassifiedObjects,t.globalizeObjectIds=e.globalizeObjectIds!==void 0&&e.globalizeObjectIds!==null?!!e.globalizeObjectIds:this._globalizeObjectIds;const a=new I4(this.viewer.scene,At.apply(e,{isModel:!0,textureTranscoder:this._textureTranscoder,maxGeometryBatchSize:this._maxGeometryBatchSize,origin:e.origin,disableVertexWelding:e.disableVertexWelding||!1,disableIndexRebucketing:e.disableIndexRebucketing||!1,dtxEnabled:e.dtxEnabled,renderOrder:e.renderOrder})),l=a.id,c=new $$({metaScene:this.viewer.metaScene,id:l});this.viewer.scene.canvas.spinner.processes++;const u=()=>{a.destroyed||(a.finalize(),c.finalize(),this.viewer.scene.canvas.spinner.processes--,a.once("destroyed",()=>{this.viewer.metaScene.destroyMetaModel(c.id)}),this.scheduleTask(()=>{a.destroyed||(a.scene.fire("modelLoaded",a.id),a.fire("loaded",!0,!1))}))},d=A=>{this.viewer.scene.canvas.spinner.processes--,this.error(A),a.fire("error",A)};let h=0;const p={getNextId:()=>`${l}.${h++}`};if(e.metaModelSrc||e.metaModelData)if(e.metaModelSrc){const A=e.metaModelSrc;this._dataSource.getMetaModel(A,f=>{a.destroyed||(c.loadData(f,{includeTypes:n,excludeTypes:o,globalizeObjectIds:t.globalizeObjectIds}),e.src?this._loadModel(e.src,t,a,null,p,u,d):(this._parseModel(e.xkt,t,a,null,p),u()))},f=>{d(`load(): Failed to load model metadata for model '${l} from '${A}' - ${f}`)})}else e.metaModelData&&(c.loadData(e.metaModelData,{includeTypes:n,excludeTypes:o,globalizeObjectIds:t.globalizeObjectIds}),e.src?this._loadModel(e.src,t,a,null,p,u,d):(this._parseModel(e.xkt,t,a,null,p),u()));else if(e.src)this._loadModel(e.src,t,a,c,p,u,d);else if(e.xkt)this._parseModel(e.xkt,t,a,c,p),u();else if(e.manifestSrc||e.manifest){const A=e.manifestSrc?i9t(e.manifestSrc):"",f=(v,y,w)=>{let x=0;const M=()=>{a.destroyed||x>=v.length?y():this._dataSource.getMetaModel(`${A}${v[x]}`,B=>{c.loadData(B,{includeTypes:n,excludeTypes:o,globalizeObjectIds:t.globalizeObjectIds}),x++,this.scheduleTask(M,200)},w)};M()},g=(v,y,w)=>{let x=0;const M=()=>{a.destroyed||x>=v.length?y():this._dataSource.getXKT(`${A}${v[x]}`,B=>{this._parseModel(B,t,a,null,p),a.preFinalize(),x++,this.scheduleTask(M,200)},w)};M()},m=(v,y,w)=>{let x=0;const M=()=>{a.destroyed||x>=v.length?y():this._dataSource.getXKT(`${A}${v[x]}`,B=>{this._parseModel(B,t,a,c,p),a.preFinalize(),x++,this.scheduleTask(M,200)},w)};M()};if(e.manifest){const v=e.manifest,y=v.xktFiles;if(!y||y.length===0){d("load(): Failed to load model manifest - manifest not valid");return}const w=v.metaModelFiles;w?f(w,()=>{g(y,u,d)},d):m(y,u,d)}else this._dataSource.getManifest(e.manifestSrc,v=>{if(a.destroyed)return;const y=v.xktFiles;if(!y||y.length===0){d("load(): Failed to load model manifest - manifest not valid");return}const w=v.metaModelFiles;w?f(w,()=>{g(y,u,d)},d):m(y,u,d)},d)}return a}_loadModel(e,t,n,o,r,s,a){this._dataSource.getXKT(e,l=>{this._parseModel(l,t,n,o,r),n.preFinalize(),s()},a)}async _parseModel(e,t,n,o,r){if(n.destroyed)return;const s=new DataView(e),a=new Uint8Array(e),l=s.getUint32(0,!0),c=l&2147483647,u=c<11||c>=12&&l>>>31,d=Ds[c];if(!d){this.error("Unsupported .XKT file version: "+c+" - this XKTLoaderPlugin supports versions "+Object.keys(Ds));return}if(!u){d.parseArrayBuffer(this.viewer,t,e,n,o,r);return}const h=s.getUint32(4,!0),p=[];let A=(h+2)*4;for(let f=0;f<h;f++){const g=s.getUint32((f+2)*4,!0);p.push(a.subarray(A,A+g)),A+=g}d.parse(this.viewer,t,p,n,o,r)}}function i9t(i){i.indexOf("?")>-1&&(i=i.split("?")[0]);const e=i.split("/");return e.pop(),e.join("/")+"/"}let n9t=1;class QT{constructor(e,t,n=null){this.tileset=e,this.computePriority=e.plugin.computePriority,this.distanceFactorToFreeData=e.plugin.distanceFactorToFreeData,this.src=t.content?.uri??null;const o=this.src?new URL(this.src).pathname:null;this.name=`${e.name}_${o?o.substring(o.lastIndexOf("/")+1):`tileWithNoContent_${n9t++}`}`,this.parent=n,this.refine=t.refine,this.data=null,this.fetching=null,this.depth=n?n.depth+1:1,this.model=null,this.loadProcess=null,this.loading=!1,this.currentDistanceFromCamera=null,this._visible=!n,this.priority=1,this.geometricError=t.geometricError;const[r,s,a,l,c,u,d,h,p,A,f,g]=t.boundingVolume.box,m=[r,a,-s];e.rootTransform&&(m[0]+=e.rootTransform[12],m[1]+=e.rootTransform[14],m[2]-=e.rootTransform[13]),this.center=Object.freeze(m);const v=[l,c,u],y=[-d,-h,-p],w=[A,f,g];this.xSize=b.lenVec3(v),this.ySize=b.lenVec3(w),this.zSize=b.lenVec3(y),this.volume=this.xSize*2*this.ySize*2*this.zSize*2,this.children=t.children?.map(x=>new QT(e,x,this))??[],e.tiles.add(this)}get visible(){return this._visible}set visible(e){this._visible!==e&&(this._visible=e,e?this.tileset.visibleTiles.add(this):this.tileset.visibleTiles.delete(this))}get loaded(){return!!this.model}get viewDistance(){return this.tileset.sensitivity*this.geometricError}get isWithinCameraVisibleRange(){return this.currentDistanceFromCamera<=this.viewDistance}updateVisibility(e){this.currentDistanceFromCamera=b.distVec3(this.center,e),this.parent&&(this.visible=this.isWithinCameraVisibleRange,this.currentDistanceFromCamera>this.viewDistance*this.distanceFactorToFreeData&&(this.data=null)),this.visible&&this.children.forEach(n=>n.updateVisibility(e)),this.priority=this.computePriority(this)}fetchData(){return this.data?this.data:this.src?(this.fetching||(this.fetching=new Promise((e,t)=>{fetch(this.src).then(n=>{n.ok?n.arrayBuffer().then(o=>{this.data=o,this.fetching=null,e(this.data)}):t(n)})})),this.fetching):null}showBoundingBox(){const{viewer:e}=this.tileset.plugin,{xSize:t,ySize:n,zSize:o,center:r}=this,s=1/this.depth;this.boxLines=new yi(e.scene,{geometry:new yn(e.scene,wS({center:r,xSize:t,ySize:n,zSize:o})),material:new vn(e.scene,{emissive:[1-s,s,(1-s)/2]})})}async load(){if(this.loading)return this.loadProcess;if(this.loaded)return this.model;if(this.loading=!0,!this.data)try{await this.fetchData()}catch(e){return console.warn(`[Xeokit - TilesetLoaderPlugin] Impossible to fetch data of tile "${this.name}".`,e),this.loading=!1,null}if(!this.visible)return this.loading=!1,null;this.tileset.plugin.debugMode&&this.showBoundingBox();try{const e=new Promise(t=>{const n=this.tileset.plugin.loader.load({id:this.name,xkt:this.data,metaModelData:{metaObjects:[{id:"metaModelRoot"}]}});n.once("loaded",()=>{this.loading=!1,this.loadProcess=null,this.model=n,this.tileset.destroyed||!this.visible?(this.unload(),t(null)):(this.tileset.loadedTiles.add(this),t(n))}),n.once("destroyed",()=>{this.loading=!1,this.loadProcess=null,t(null)})});return this.loadProcess=e,this.loadProcess}catch(e){return console.warn(`[Xeokit - TilesetLoaderPlugin] Impossible to load tile "${this.name}".`,e),null}}unload(){this.boxLines&&(this.boxLines.destroy(),this.boxLines=null),this.model&&(this.model.destroy(),this.model=null),this.tileset.loadedTiles.delete(this),this.children.forEach(e=>{e.loaded&&e.unload()})}}function o9t(i,e,t){const n=Array.from(i),o=n.splice(0,e),r=async s=>{if(await t(s),n.length>0){const a=n.shift();r(a)}};o.forEach(r)}function s9t(i){let e=!1;return{cancel(){e=!0},async run(n){for(let o of i){if(e)break;await new Promise(r=>setTimeout(()=>(n(o)||Promise.resolve()).then(r)))}}}}let r9t=0;class a9t{constructor(e,t){this.plugin=e,this.name=t.name||`tileset-${r9t++}`,this.tiles=new Set,this.visibleTiles=new Set,this.loadedTiles=new Set,this.queue=null,this.renderNeeded=!0,this.destroyed=!1,this._sensitivity=e.sensitivity,t.root.transform&&(this.rootTransform=t.root.transform),this.root=new QT(this,t.root),this.root.load().then(n=>e.viewer.cameraFlight.flyTo(n))}get sensitivity(){return this._sensitivity}set sensitivity(e){this._sensitivity=e,this.updateVisibility()}updateVisibility(){this.tiles.forEach(e=>{e!==this.root&&(e.visible=!1)}),this.root.updateVisibility(this.plugin.viewer.camera.eye),this.renderNeeded=!0}render(){if(!this.renderNeeded)return;this.queue&&this.queue.cancel(),this.loadedTiles.forEach(t=>{t.visible||t.unload()});const e=Array.from(this.visibleTiles).filter(t=>!t.loaded).sort((t,n)=>t.priority-n.priority);o9t(e,40,t=>t.fetchData()),this.queue=s9t(e),this.queue.run(t=>t.load()),this.renderNeeded=!1}destroy(){this.queue&&this.queue.cancel(),this.loadedTiles.forEach(e=>e.unload()),this.destroyed=!0,this.plugin.tilesets.delete(this)}}function l9t(i){return i.depth}class Eie extends qr{constructor(e,t={}){super("TilesetLoader",e);const{computePriority:n=l9t,sensitivity:o=50,distanceFactorToFreeData:r=3,debugMode:s=!1}=t;this._sensitivity=o,this.distanceFactorToFreeData=r,this.computePriority=n,this.debugMode=s,this.tilesets=new Set,e.camera.on("matrix",this.updateTilesetsVisibilityCallback=()=>this.updateTilesetsVisibility()),e.scene.on("tick",this.renderTilesetsCallback=()=>this.renderTilesets()),this.loader=new u9(e)}load(e){const t=new a9t(this,e);return this.tilesets.add(t),t}updateTilesetsVisibility(){this.tilesets.forEach(e=>e.updateVisibility())}renderTilesets(){this.tilesets.forEach(e=>e.render())}get sensitivity(){return this._sensitivity}set sensitivity(e){this._sensitivity=e,this.tilesets.forEach(t=>t.sensitivity=this._sensitivity)}destroy(){this.viewer.camera.off(this.updateTilesetsVisibilityCallback),this.viewer.scene.off(this.renderTilesetsCallback),this.tilesets.forEach(e=>e.destroy()),super.destroy()}}const c9t="2.6.90";typeof window<"u"&&(window.__XEOKIT__?console.warn("WARNING: Multiple instances of xeokit-sdk being imported."):window.__XEOKIT__=c9t);const Ic=Object.freeze(Object.defineProperty({__proto__:null,AlphaFormat:rY,AmbientLight:MP,AngleMeasurementEditMouseControl:Q3t,AngleMeasurementEditTouchControl:q3t,AngleMeasurementsControl:XP,AngleMeasurementsMouseControl:cee,AngleMeasurementsPlugin:D7,AngleMeasurementsTouchControl:G3t,AnnotationsPlugin:eT,AxisGizmoPlugin:Y3t,BCFViewpointsPlugin:V7,Bitmap:HY,ByteType:ZZ,CameraMemento:Fmt,CameraPath:lft,CameraPathAnimation:To,ClampToEdgeWrapping:fs,Component:li,CompressedMediaType:Rft,Configs:t7,ContextMenu:Ept,CubicBezierCurve:Umt,Curve:t4,DefaultLoadingManager:KX,DepthFormat:uY,DepthStencilFormat:dY,DirLight:Ma,DistanceMeasurementEditControl:iT,DistanceMeasurementEditMouseControl:s4t,DistanceMeasurementEditTouchControl:r4t,DistanceMeasurementsControl:tT,DistanceMeasurementsMouseControl:fee,DistanceMeasurementsPlugin:Aee,DistanceMeasurementsTouchControl:o4t,EdgeMaterial:ZS,EmphasisMaterial:fc,FastNavPlugin:vee,FloatType:tY,Fresnel:E1t,Frustum:vr,FrustumPlane:dh,GIFMediaType:kft,GLTFDefaultDataSource:wee,GLTFLoaderPlugin:jT,HalfFloatType:iY,ImagePlane:g1t,IntType:$Z,JPEGMediaType:qw,KTX2TextureTranscoder:xa,LOD:p$,LambertMaterial:y1t,LightMap:Dmt,LineSet:a$,LinearEncoding:Ys,LinearFilter:As,LinearMipMapLinearFilter:Bf,LinearMipMapNearestFilter:s4,LinearMipmapLinearFilter:gh,LinearMipmapNearestFilter:Tft,Loader:JX,LoadingManager:qX,LocaleService:TZ,LuminanceAlphaFormat:cY,LuminanceFormat:lY,Map:Qr,Marker:P4,MarqueePicker:dl,MarqueePickerMouseControl:aft,Mesh:yi,MeshSurfaceArea:qY,MeshVolume:jY,MetallicMaterial:C1t,MirroredRepeatWrapping:uc,ModelMemento:Omt,NavCubePlugin:GT,NearestFilter:mh,NearestMipMapLinearFilter:Ef,NearestMipMapNearestFilter:o4,NearestMipmapLinearFilter:WZ,NearestMipmapNearestFilter:JZ,Node:n4,ObjectsKdTree3:Ppt,ObjectsMemento:Nmt,PNGMediaType:Kw,Path:Vmt,PerformanceModel:zmt,PhongMaterial:vn,PickResult:y7,Plugin:qr,PointLight:kmt,PointerCircle:pS,PointerLens:Bpt,QuadraticBezierCurve:Hmt,Queue:wZ,RGBAFormat:r4,RGBAIntegerFormat:mY,RGBA_ASTC_10x10_Format:OS,RGBA_ASTC_10x5_Format:DS,RGBA_ASTC_10x6_Format:LS,RGBA_ASTC_10x8_Format:FS,RGBA_ASTC_12x10_Format:NS,RGBA_ASTC_12x12_Format:US,RGBA_ASTC_4x4_Format:Gw,RGBA_ASTC_5x4_Format:IS,RGBA_ASTC_5x5_Format:SS,RGBA_ASTC_6x5_Format:PS,RGBA_ASTC_6x6_Format:TS,RGBA_ASTC_8x5_Format:kS,RGBA_ASTC_8x6_Format:RS,RGBA_ASTC_8x8_Format:_S,RGBA_BPTC_Format:Qw,RGBA_ETC2_EAC_Format:jw,RGBA_PVRTC_2BPPV1_Format:ES,RGBA_PVRTC_4BPPV1_Format:Hw,RGBA_S3TC_DXT1_Format:Nw,RGBA_S3TC_DXT3_Format:Uw,RGBA_S3TC_DXT5_Format:l4,RGBFormat:aY,RGB_ETC1_Format:BS,RGB_ETC2_Format:zw,RGB_PVRTC_2BPPV1_Format:MS,RGB_PVRTC_4BPPV1_Format:Vw,RGB_S3TC_DXT1_Format:a4,RGFormat:fY,RGIntegerFormat:AY,ReadableGeometry:yn,RedFormat:hY,RedIntegerFormat:pY,ReflectionMap:_mt,RepeatWrapping:En,SceneModel:I4,SceneModelMesh:JY,SceneModelTransform:e$,SectionPlane:SP,SectionPlanesPlugin:n7t,ShortType:YZ,SpecularMaterial:M1t,SplineCurve:Rw,SpriteMarker:Lmt,Texture:If,TextureTranscoder:Qmt,TilesetLoaderPlugin:Eie,UnsignedByteType:xS,UnsignedInt248Type:sY,UnsignedIntType:eY,UnsignedShort4444Type:nY,UnsignedShort5551Type:oY,UnsignedShortType:XZ,VBOGeometry:OZ,VFC:B$,Viewer:lee,WorkerPool:ZX,XKTDefaultDataSource:$te,XKTLoaderPlugin:u9,buildBoxGeometry:vS,buildBoxLinesGeometry:wS,buildBoxLinesGeometryFromAABB:Eft,buildCylinderGeometry:bf,buildGridGeometry:NZ,buildLineGeometry:VZ,buildPlaneGeometry:CS,buildPolylineGeometry:UZ,buildPolylineGeometryFromCurve:Ift,buildSphereGeometry:xf,buildTorusGeometry:bS,buildVectorTextGeometry:Mf,createCombinedTexture:V3t,createRTCViewMat:Vi,createSkyboxMesh:H3t,createSphereMapMesh:z3t,frustumIntersectsAABB3:kw,getKTX2TextureTranscoder:YX,getPlaneRTCPos:$n,isTriangleMeshSolid:zY,load3DSGeometry:xft,loadOBJGeometry:Mft,math:b,meshSurfaceArea:h4,meshVolume:Pf,os:_P,rtcToWorldPos:Pft,sRGBEncoding:pn,setFrustum:PZ,stats:Pi,utils:At,worldToRTCPos:Ah,worldToRTCPositions:Ow},Symbol.toStringTag,{value:"Module"}));function n1(i){let e=i.substring(1);const t=[];let n=null;for(;e.length>0;)n=e.substring(0,2),e=e.substring(2),t.push(parseInt(n,16)/255);return t}function Bie(i){let e="";return e+=Math.round(i[0]*255).toString(16).padStart(2,"0"),e+=Math.round(i[1]*255).toString(16).padStart(2,"0"),e+=Math.round(i[2]*255).toString(16).padStart(2,"0"),`#${e}`}const u9t={class:"annotations-3d"},Iie=V({__name:"Annotations3D",setup(i){const e=at("$viewer"),{localContext:t}=e,{xeokit:n}=t.viewer,o=n.scene.canvas.canvas,r=xw(),s=Bo(new WeakSet),a=Re(()=>r.value.filter(d=>s.has(d))),l=new Map;ct(r,()=>{r.value.forEach(d=>{if(!l.has(d.id)){const{x:h,y:p,z:A}=d,f=new P4(n.scene,{worldPos:[h,A,p]});l.set(d.id,f);const[g,m]=f.canvasPos;f.style=ae(`left: ${g}px; top: ${m}px;`),f.on("canvasPos",([w,x])=>{f.style.value=`left: ${w}px; top: ${x}px;`}),f.on("visible",w=>w?s.add(d):s.delete(d)),f.on("destroyed",()=>{e.state.hub.off(y),e.state.hub.off(v)});const v=e.state.hub.on("annotation-updated",({annotation:w})=>{if(w.id===d.id){const{x,y:M,z:B}=w;f.worldPos=[x,B,M],f._update(),n.scene._renderer._occlusionTester._occlusionTestListDirty=!0}}),y=e.state.hub.on("annotation-removed",({annotation:w})=>{w.id===d.id&&(l.delete(d.id),f.destroy())})}})},{flush:"sync"});const c=(d,h)=>{const{clientX:p,clientY:A}=h,{x:f,y:g}=o.getBoundingClientRect(),m=n.scene.pick({pickSurface:!0,canvasPos:[p-f,A-g]});if(m){const[v,y,w]=m.worldPos;Object.assign(d,{x:v,y:w,z:y})}},u=d=>l.get(d.id).style.value;return(d,h)=>(E(),L("div",u9t,[(E(!0),L($e,null,Mt(a.value,p=>(E(),K(Mw,{key:p.instanceId,annotation:p,canvas:nt(o),style:ce(u(p)),onAnnotationDrag:A=>c(p,A)},null,8,["annotation","canvas","style","onAnnotationDrag"]))),128))]))}},[["__scopeId","data-v-10ceb001"]]),d9t={setup(){const i=at("$viewer"),e=i.localContext.pluginComponentInstances.get("viewer3d"),{math:t}=e.xeokitSdk,n=()=>{const s=e.xeokit,a=[0,0,-1],l=s.scene.aabb,c=t.getAABB3Diag(l),u=t.vec3();t.getAABB3Center(l,u);const d=45,h=Math.abs(c/Math.tan(d*t.DEGTORAD));s.cameraControl.pivotPos=u,s.cameraFlight.jumpTo({look:u,eye:[u[0]-h*a[0],u[1]-h*a[1],u[2]-h*a[2]],up:[0,1,0],orthoScale:c*1.1,fitFOV:d})},o=()=>{const s=i.localContext.loadedModels.flatMap(a=>a.objects.filter(l=>l.visible===!1).map(l=>l.id));i.state.showObjects(s)};return{onClick:()=>{n(),o(),e.reintegrateObjects()}}}};function h9t(i,e,t,n,o,r){const s=P("BIMDataIconHome"),a=P("BIMDataButton");return E(),K(a,{color:"default",ghost:"",rounded:"",icon:"",onClick:n.onClick},{default:U(()=>[k(s,{size:"xs"})]),_:1},8,["onClick"])}const p9t=V(d9t,[["render",h9t]]),f9t={computed:{active(){return this.$viewer.localContext.pluginComponentInstances.has("navigationVersionsModel")?this.$viewer.localContext.pluginComponentInstances.get("navigationVersionsModel").isOpen.value:!1}},methods:{onClick(){this.$viewer.localContext.pluginComponentInstances.get("navigationVersionsModel").toggle()}}};function A9t(i,e,t,n,o,r){const s=P("BIMDataIcon"),a=P("BIMDataButton"),l=P("BIMDataTooltip");return E(),K(l,{text:i.$t("navigationVersionsModel.tooltip")},{default:U(()=>[k(a,{class:le(["bimdata-navigation-versions-model",{active:r.active}]),color:"primary",ghost:"",rounded:"",icon:"",onClick:r.onClick},{default:U(()=>[k(s,{name:"versioning",fill:"",color:"primary",size:"xxs"})]),_:1},8,["class","onClick"])]),_:1},8,["text"])}const m9t=V(f9t,[["render",A9t],["__scopeId","data-v-ced27a96"]]),g9t={key:0,width:"159",height:"116",viewBox:"0 0 159 116",fill:"none",xmlns:"http://www.w3.org/2000/svg"},y9t={key:1,width:"159",height:"116",viewBox:"0 0 159 116",fill:"none",xmlns:"http://www.w3.org/2000/svg"},v9t={__name:"KeyboardNavigate",setup(i){const t=at("$viewer").i18n.locale==="fr";return(n,o)=>t?(E(),L("svg",g9t,[...o[0]||(o[0]=[ss('<path d="M79 0L87 11H71L79 0Z" fill="#2F374A"></path><path d="M159 79.1111L148 87.1111L148 71.1111L159 79.1111Z" fill="#2F374A"></path><path d="M9.5399e-08 79.1111L11 71.1111L11 87.1111L9.5399e-08 79.1111Z" fill="#2F374A"></path><path d="M79 115.222L71 104.222L87 104.222L79 115.222Z" fill="#2F374A"></path><rect x="61.3333" y="18" width="36.1112" height="36.1112" rx="5" fill="#D8D8D8"></rect><path d="M82.5998 38.834V40H76.6759V38.834H82.5998ZM82.465 32.377L77.2209 40H76.2365V39.0684L81.4982 31.4688H82.465V32.377ZM81.9201 31.4688V32.6406H76.2716V31.4688H81.9201Z" fill="#6B6B6B"></path><rect x="104.667" y="61" width="36.1112" height="36.1112" rx="5" fill="#D8D8D8"></rect><path d="M122.148 83.1111H120.326L120.338 81.9451H122.148C122.676 81.9451 123.117 81.8298 123.473 81.5994C123.832 81.3689 124.101 81.0388 124.281 80.6091C124.465 80.1794 124.557 79.6677 124.557 79.074V78.6111C124.557 78.1501 124.504 77.7419 124.398 77.3865C124.297 77.031 124.144 76.7322 123.941 76.49C123.742 76.2478 123.496 76.0642 123.203 75.9392C122.914 75.8142 122.58 75.7517 122.201 75.7517H120.291V74.5798H122.201C122.767 74.5798 123.285 74.6755 123.754 74.8669C124.223 75.0544 124.627 75.3259 124.967 75.6814C125.31 76.0369 125.574 76.4626 125.758 76.9587C125.941 77.4548 126.033 78.0095 126.033 78.6228V79.074C126.033 79.6873 125.941 80.2419 125.758 80.738C125.574 81.2341 125.31 81.6599 124.967 82.0154C124.623 82.3669 124.213 82.6384 123.736 82.8298C123.264 83.0173 122.734 83.1111 122.148 83.1111ZM121.141 74.5798V83.1111H119.67V74.5798H121.141Z" fill="#6B6B6B"></path><rect x="18" y="61" width="36.1112" height="36.1112" rx="5" fill="#D8D8D8"></rect><path d="M37.3036 81.9744L39.5478 83.7556L38.5927 84.5935L36.3896 82.8298L37.3036 81.9744ZM39.5653 78.6111V79.0798C39.5653 79.7244 39.4814 80.3025 39.3134 80.8142C39.1454 81.3259 38.9052 81.7615 38.5927 82.1208C38.2802 82.4802 37.9071 82.7556 37.4735 82.947C37.04 83.1345 36.5595 83.2283 36.0321 83.2283C35.5087 83.2283 35.0302 83.1345 34.5966 82.947C34.1669 82.7556 33.7939 82.4802 33.4775 82.1208C33.161 81.7615 32.915 81.3259 32.7392 80.8142C32.5673 80.3025 32.4814 79.7244 32.4814 79.0798V78.6111C32.4814 77.9666 32.5673 77.3904 32.7392 76.8826C32.911 76.3708 33.1532 75.9353 33.4657 75.5759C33.7821 75.2126 34.1552 74.9373 34.5849 74.7498C35.0185 74.5583 35.497 74.4626 36.0204 74.4626C36.5478 74.4626 37.0282 74.5583 37.4618 74.7498C37.8993 74.9373 38.2743 75.2126 38.5868 75.5759C38.8993 75.9353 39.1396 76.3708 39.3075 76.8826C39.4794 77.3904 39.5653 77.9666 39.5653 78.6111ZM38.0888 79.0798V78.5994C38.0888 78.1228 38.0419 77.7029 37.9482 77.3396C37.8583 76.9724 37.7235 76.6658 37.5439 76.4197C37.3681 76.1697 37.1513 75.9822 36.8935 75.8572C36.6396 75.7283 36.3485 75.6638 36.0204 75.6638C35.7001 75.6638 35.413 75.7283 35.1591 75.8572C34.9052 75.9822 34.6884 76.1697 34.5087 76.4197C34.329 76.6658 34.1923 76.9724 34.0985 77.3396C34.0048 77.7029 33.9579 78.1228 33.9579 78.5994V79.0798C33.9579 79.5564 34.0048 79.9783 34.0985 80.3455C34.1923 80.7126 34.329 81.0232 34.5087 81.2771C34.6923 81.5271 34.911 81.7166 35.165 81.8455C35.4228 81.9705 35.7118 82.033 36.0321 82.033C36.3603 82.033 36.6513 81.9705 36.9052 81.8455C37.1591 81.7166 37.3739 81.5271 37.5497 81.2771C37.7255 81.0232 37.8583 80.7126 37.9482 80.3455C38.0419 79.9783 38.0888 79.5564 38.0888 79.0798Z" fill="#6B6B6B"></path><rect x="61.3333" y="61.1112" width="36.1112" height="36.1112" rx="5" fill="#D8D8D8"></rect><path d="M81.1115 81.025C81.1115 80.8492 81.0841 80.693 81.0295 80.5563C80.9787 80.4196 80.8869 80.2946 80.7541 80.1813C80.6213 80.068 80.4338 79.9586 80.1916 79.8531C79.9533 79.7438 79.6486 79.6324 79.2775 79.5192C78.8713 79.3942 78.4963 79.2555 78.1525 79.1031C77.8127 78.9469 77.5158 78.7672 77.2619 78.5641C77.008 78.3571 76.8107 78.1207 76.6701 77.8551C76.5295 77.5856 76.4591 77.275 76.4591 76.9235C76.4591 76.5758 76.5314 76.2594 76.6759 75.9742C76.8244 75.6891 77.0334 75.443 77.3029 75.236C77.5763 75.025 77.8986 74.8629 78.2697 74.7496C78.6408 74.6324 79.0509 74.5739 79.5002 74.5739C80.133 74.5739 80.6779 74.691 81.1349 74.9254C81.5959 75.1598 81.9494 75.4742 82.1955 75.8688C82.4455 76.2633 82.5705 76.6989 82.5705 77.1754H81.1115C81.1115 76.8942 81.0509 76.6461 80.9298 76.4313C80.8127 76.2125 80.633 76.0406 80.3908 75.9156C80.1525 75.7906 79.8498 75.7281 79.4826 75.7281C79.1349 75.7281 78.8459 75.7809 78.6154 75.8864C78.3849 75.9918 78.213 76.1344 78.0998 76.3141C77.9865 76.4938 77.9298 76.6969 77.9298 76.9235C77.9298 77.0836 77.967 77.2301 78.0412 77.3629C78.1154 77.4918 78.2287 77.6129 78.381 77.7262C78.5334 77.8356 78.7248 77.9391 78.9552 78.0367C79.1857 78.1344 79.4572 78.2281 79.7697 78.318C80.2423 78.4586 80.6545 78.6149 81.006 78.7867C81.3576 78.9547 81.6505 79.1461 81.8849 79.361C82.1193 79.5758 82.2951 79.8199 82.4123 80.0934C82.5295 80.3629 82.588 80.6696 82.588 81.0133C82.588 81.3727 82.5158 81.6969 82.3713 81.986C82.2267 82.2711 82.0197 82.5153 81.7502 82.7184C81.4845 82.9176 81.1642 83.0719 80.7892 83.1813C80.4181 83.2867 80.0041 83.3395 79.547 83.3395C79.1369 83.3395 78.7326 83.2848 78.3341 83.1754C77.9396 83.066 77.5802 82.9 77.256 82.6774C76.9318 82.4508 76.674 82.1696 76.4826 81.8336C76.2912 81.4938 76.1955 81.0973 76.1955 80.6442H77.6662C77.6662 80.9215 77.713 81.1578 77.8068 81.3531C77.9045 81.5485 78.0392 81.7086 78.2111 81.8336C78.383 81.9547 78.5822 82.0446 78.8088 82.1031C79.0392 82.1617 79.2853 82.191 79.547 82.191C79.8908 82.191 80.1779 82.1422 80.4084 82.0446C80.6427 81.9469 80.8185 81.8102 80.9357 81.6344C81.0529 81.4586 81.1115 81.2555 81.1115 81.025Z" fill="#6B6B6B"></path>',12)])])):(E(),L("svg",y9t,[...o[1]||(o[1]=[ss('<path d="M79 0L87 11H71L79 0Z" fill="#2F374A"></path><path d="M159 79.1111L148 87.1111L148 71.1111L159 79.1111Z" fill="#2F374A"></path><path d="M9.5399e-08 79.1111L11 71.1111L11 87.1111L9.5399e-08 79.1111Z" fill="#2F374A"></path><path d="M79 115.222L71 104.222L87 104.222L79 115.222Z" fill="#2F374A"></path><rect x="61.3333" y="18" width="36.1112" height="36.1112" rx="5" fill="#D8D8D8"></rect><path d="M77.1095 38.084L78.8088 31.4688H79.6994L79.5998 33.1738L77.7834 40H76.8576L77.1095 38.084ZM75.838 31.4688L77.215 38.0312L77.338 40H76.3537L74.3791 31.4688H75.838ZM81.6271 38.0137L82.9865 31.4688H84.4513L82.4767 40H81.4923L81.6271 38.0137ZM80.0451 31.4688L81.7267 38.1016L81.9728 40H81.047L79.2599 33.1738L79.1662 31.4688H80.0451Z" fill="#6B6B6B"></path><rect x="104.667" y="61" width="36.1112" height="36.1112" rx="5" fill="#D8D8D8"></rect><path d="M122.148 83.1111H120.326L120.338 81.9451H122.148C122.676 81.9451 123.117 81.8298 123.473 81.5994C123.832 81.3689 124.101 81.0388 124.281 80.6091C124.465 80.1794 124.557 79.6677 124.557 79.074V78.6111C124.557 78.1501 124.504 77.7419 124.398 77.3865C124.297 77.031 124.144 76.7322 123.941 76.49C123.742 76.2478 123.496 76.0642 123.203 75.9392C122.914 75.8142 122.58 75.7517 122.201 75.7517H120.291V74.5798H122.201C122.767 74.5798 123.285 74.6755 123.754 74.8669C124.223 75.0544 124.627 75.3259 124.967 75.6814C125.31 76.0369 125.574 76.4626 125.758 76.9587C125.941 77.4548 126.033 78.0095 126.033 78.6228V79.074C126.033 79.6873 125.941 80.2419 125.758 80.738C125.574 81.2341 125.31 81.6599 124.967 82.0154C124.623 82.3669 124.213 82.6384 123.736 82.8298C123.264 83.0173 122.734 83.1111 122.148 83.1111ZM121.141 74.5798V83.1111H119.67V74.5798H121.141Z" fill="#6B6B6B"></path><rect x="18" y="61" width="36.1112" height="36.1112" rx="5" fill="#D8D8D8"></rect><path d="M36.2665 75.7166L33.7177 83.1111H32.1767L35.3876 74.5798H36.372L36.2665 75.7166ZM38.3993 83.1111L35.8446 75.7166L35.7333 74.5798H36.7235L39.9462 83.1111H38.3993ZM38.2763 79.947V81.113H33.6357V79.947H38.2763Z" fill="#6B6B6B"></path><rect x="61.3333" y="61.1112" width="36.1112" height="36.1112" rx="5" fill="#D8D8D8"></rect><path d="M81.1115 81.025C81.1115 80.8492 81.0841 80.693 81.0295 80.5563C80.9787 80.4196 80.8869 80.2946 80.7541 80.1813C80.6213 80.068 80.4338 79.9586 80.1916 79.8531C79.9533 79.7438 79.6486 79.6324 79.2775 79.5192C78.8713 79.3942 78.4963 79.2555 78.1525 79.1031C77.8127 78.9469 77.5158 78.7672 77.2619 78.5641C77.008 78.3571 76.8107 78.1207 76.6701 77.8551C76.5295 77.5856 76.4591 77.275 76.4591 76.9235C76.4591 76.5758 76.5314 76.2594 76.6759 75.9742C76.8244 75.6891 77.0334 75.443 77.3029 75.236C77.5763 75.025 77.8986 74.8629 78.2697 74.7496C78.6408 74.6324 79.0509 74.5739 79.5002 74.5739C80.133 74.5739 80.6779 74.691 81.1349 74.9254C81.5959 75.1598 81.9494 75.4742 82.1955 75.8688C82.4455 76.2633 82.5705 76.6989 82.5705 77.1754H81.1115C81.1115 76.8942 81.0509 76.6461 80.9298 76.4313C80.8127 76.2125 80.633 76.0406 80.3908 75.9156C80.1525 75.7906 79.8498 75.7281 79.4826 75.7281C79.1349 75.7281 78.8459 75.7809 78.6154 75.8864C78.3849 75.9918 78.213 76.1344 78.0998 76.3141C77.9865 76.4938 77.9298 76.6969 77.9298 76.9235C77.9298 77.0836 77.967 77.2301 78.0412 77.3629C78.1154 77.4918 78.2287 77.6129 78.381 77.7262C78.5334 77.8356 78.7248 77.9391 78.9552 78.0367C79.1857 78.1344 79.4572 78.2281 79.7697 78.318C80.2423 78.4586 80.6545 78.6149 81.006 78.7867C81.3576 78.9547 81.6505 79.1461 81.8849 79.361C82.1193 79.5758 82.2951 79.8199 82.4123 80.0934C82.5295 80.3629 82.588 80.6696 82.588 81.0133C82.588 81.3727 82.5158 81.6969 82.3713 81.986C82.2267 82.2711 82.0197 82.5153 81.7502 82.7184C81.4845 82.9176 81.1642 83.0719 80.7892 83.1813C80.4181 83.2867 80.0041 83.3395 79.547 83.3395C79.1369 83.3395 78.7326 83.2848 78.3341 83.1754C77.9396 83.066 77.5802 82.9 77.256 82.6774C76.9318 82.4508 76.674 82.1696 76.4826 81.8336C76.2912 81.4938 76.1955 81.0973 76.1955 80.6442H77.6662C77.6662 80.9215 77.713 81.1578 77.8068 81.3531C77.9045 81.5485 78.0392 81.7086 78.2111 81.8336C78.383 81.9547 78.5822 82.0446 78.8088 82.1031C79.0392 82.1617 79.2853 82.191 79.547 82.191C79.8908 82.191 80.1779 82.1422 80.4084 82.0446C80.6427 81.9469 80.8185 81.8102 80.9357 81.6344C81.0529 81.4586 81.1115 81.2555 81.1115 81.025Z" fill="#6B6B6B"></path>',12)])]))}},w9t={key:0,width:"37",height:"129",viewBox:"0 0 37 129",fill:"none",xmlns:"http://www.w3.org/2000/svg"},C9t={key:1,width:"37",height:"129",viewBox:"0 0 37 129",fill:"none",xmlns:"http://www.w3.org/2000/svg"},b9t={__name:"KeyboardStorey",setup(i){const e=at("$viewer"),t=Re(()=>e.i18n.locale==="fr");return(n,o)=>t.value?(E(),L("svg",w9t,[...o[0]||(o[0]=[ss('<rect y="25" width="36.1112" height="36.1112" rx="5" fill="#D8D8D8"></rect><path d="M16.2509 38.4688L18.0614 41.5801L19.872 38.4688H21.5653L18.9872 42.6934L21.6298 47H19.9189L18.0614 43.8301L16.204 47H14.4872L17.1357 42.6934L14.5517 38.4688H16.2509Z" fill="#6B6B6B"></path><rect y="68.1112" width="36.1112" height="36.1112" rx="5" fill="#D8D8D8"></rect><path d="M15.7763 88.3063L17.4755 81.691H18.3661L18.2665 83.3961L16.4501 90.2223H15.5243L15.7763 88.3063ZM14.5048 81.691L15.8817 88.2535L16.0048 90.2223H15.0204L13.0458 81.691H14.5048ZM20.2939 88.236L21.6532 81.691H23.1181L21.1435 90.2223H20.1591L20.2939 88.236ZM18.7118 81.691L20.3935 88.3239L20.6396 90.2223H19.7138L17.9267 83.3961L17.8329 81.691H18.7118Z" fill="#6B6B6B"></path><path d="M18 0L26 11H10L18 0Z" fill="#2F374A"></path><rect x="14" y="13" width="8" height="2" fill="#2F374A"></rect><rect x="14" y="17" width="8" height="4" fill="#2F374A"></rect><path d="M18 129L10 118L26 118L18 129Z" fill="#2F374A"></path><rect x="22" y="116" width="8" height="2" transform="rotate(-180 22 116)" fill="#2F374A"></rect><rect x="22" y="112" width="8" height="4" transform="rotate(-180 22 112)" fill="#2F374A"></rect>',10)])])):(E(),L("svg",C9t,[...o[1]||(o[1]=[ss('<rect y="25" width="36.1112" height="36.1112" rx="5" fill="#D8D8D8"></rect><path d="M16.2509 38.4688L18.0614 41.5801L19.872 38.4688H21.5653L18.9872 42.6934L21.6298 47H19.9189L18.0614 43.8301L16.204 47H14.4872L17.1357 42.6934L14.5517 38.4688H16.2509Z" fill="#6B6B6B"></path><rect y="68.1112" width="36.1112" height="36.1112" rx="5" fill="#D8D8D8"></rect><path d="M21.2665 89.0563V90.2223H15.3427V89.0563H21.2665ZM21.1317 82.5992L15.8876 90.2223H14.9032V89.2906L20.165 81.691H21.1317V82.5992ZM20.5868 81.691V82.8629H14.9384V81.691H20.5868Z" fill="#6B6B6B"></path><path d="M18 0L26 11H10L18 0Z" fill="#2F374A"></path><rect x="14" y="13" width="8" height="2" fill="#2F374A"></rect><rect x="14" y="17" width="8" height="4" fill="#2F374A"></rect><path d="M18 129L10 118L26 118L18 129Z" fill="#2F374A"></path><rect x="22" y="116" width="8" height="2" transform="rotate(-180 22 116)" fill="#2F374A"></rect><rect x="22" y="112" width="8" height="4" transform="rotate(-180 22 112)" fill="#2F374A"></rect>',10)])]))}},x9t={},M9t={width:"174",height:"130",viewBox:"0 0 174 130",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function E9t(i,e){return E(),L("svg",M9t,[...e[0]||(e[0]=[ss('<path d="M33.1118 0.382324H131.606L141.853 99.4882H23.4L33.1118 0.382324Z" fill="#F2F2F2"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M22.9412 99.8706H142.235L131.988 0.305882V0H32.8059L23.0176 99.4882L22.9412 99.8706ZM141.394 99.1059H23.7823L33.4941 0.764706H131.3L141.394 99.1059Z" fill="#9E9E9E"></path><path d="M62.1705 9.86475L60.7941 46.953H103.771V9.86475H62.1705Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M60.4117 47.3354H104.153H104.229V9.48242H61.8647L60.4117 47.3354ZM103.388 46.5707H61.1764L62.5529 10.2471H103.388V46.5707Z" fill="#9E9E9E"></path><path d="M60.7942 46.9529L64.5412 61.7882H100.1L103.771 46.9529H60.7942Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M64.2353 62.1706H100.406L104.306 46.5706H60.3353L64.2353 62.1706ZM99.7942 61.4059H64.8471L61.3294 47.3353H103.312L99.7942 61.4059Z" fill="#9E9E9E"></path><path d="M85.2648 34.7939L85.0354 53.8351L90.0825 49.0175L97.806 49.5528L85.2648 34.7939Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M83.8118 57.5823L83.7354 31.5823L100.406 51.4646L90.3883 49.9352L83.8118 57.5823ZM85.8765 37.3176L85.953 51.9235L89.6236 47.6411L95.2824 48.4823L85.8765 37.3176Z" fill="black"></path><path d="M26.3059 128.241H25.9236C17.5883 128.241 10.7059 121.359 10.7059 113.024V100.253C10.7059 91.9178 17.5883 85.0354 25.9236 85.0354H26.3059C34.6412 85.0354 41.5236 91.9178 41.5236 100.253V113.024C41.5236 121.359 34.6412 128.241 26.3059 128.241Z" fill="white"></path><path d="M137.188 128.241H136.806C128.471 128.241 121.588 121.359 121.588 113.024V100.253C121.588 91.9178 128.471 85.0354 136.806 85.0354H137.188C145.524 85.0354 152.406 91.9178 152.406 100.253V113.024C152.406 121.359 145.524 128.241 137.188 128.241Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M25.4647 129.159H26.9942C35.6353 129.159 42.6706 122.2 42.5942 113.559V99.6413C42.5942 91.0766 35.6353 84.0413 26.9942 84.0413H25.4647C16.9 84.0413 9.86475 91.0001 9.86475 99.6413V113.559C9.86475 122.124 16.8236 129.159 25.4647 129.159ZM12.1589 99.5648C12.1589 92.2236 18.1236 86.2589 25.4647 86.2589H26.9942C34.3353 86.2589 40.3 92.2236 40.3 99.5648V113.482C40.3 120.824 34.3353 126.788 26.9942 126.788H25.4647C18.1236 126.788 12.1589 120.824 12.1589 113.482V99.5648Z" fill="#30374B"></path><path d="M26.3823 104.459C25.5411 104.459 24.8529 103.771 24.8529 102.929V98.4176C24.8529 97.5764 25.5411 96.8882 26.3823 96.8882C27.2235 96.8882 27.9117 97.5764 27.9117 98.4176V102.929C27.9117 103.771 27.2235 104.459 26.3823 104.459Z" fill="#30374B"></path><path d="M15.3706 84.1177C14.8353 84.1177 14.3765 83.6589 14.3765 83.1236V75.4765C14.3765 74.9412 14.8353 74.4824 15.3706 74.4824C15.9059 74.4824 16.3647 74.9412 16.3647 75.4765V83.1236C16.3647 83.6589 15.9059 84.1177 15.3706 84.1177Z" fill="#F8C62C"></path><path d="M9.63529 90.3884C9.63529 90.9237 9.17647 91.3825 8.64118 91.3825H0.994118C0.458824 91.3825 0 90.9237 0 90.3884C0 89.8531 0.458824 89.3943 0.994118 89.3943H8.64118C9.17647 89.3943 9.63529 89.8531 9.63529 90.3884Z" fill="#F8C62C"></path><path d="M11.9294 86.4117C11.5471 86.7941 10.8589 86.7941 10.4765 86.4117L3.74709 79.6823C3.36474 79.3 3.36474 78.6117 3.74709 78.2294C4.12944 77.847 4.81768 77.847 5.20003 78.2294L11.9294 84.9588C12.3118 85.3412 12.3118 86.0294 11.9294 86.4117Z" fill="#F8C62C"></path><path d="M87.7117 105.682H82.9706V100.941H80.8294V105.682H76.1647V107.747H80.8294V112.488H82.9706V107.747H87.7117V105.682Z" fill="#F8C62C"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M136.194 129.159H137.724C146.365 129.159 153.4 122.2 153.324 113.559V99.6413C153.324 91.0766 146.365 84.0413 137.724 84.0413H136.194C127.629 84.0413 120.594 91.0001 120.594 99.6413V113.559C120.594 122.124 127.553 129.159 136.194 129.159ZM122.888 99.5648C122.888 92.2236 128.853 86.2589 136.194 86.2589H137.724C145.065 86.2589 151.029 92.2236 151.029 99.5648V113.482C151.029 120.824 145.065 126.788 137.724 126.788H136.194C128.853 126.788 122.888 120.824 122.888 113.482V99.5648Z" fill="#30374B"></path><path d="M137.112 104.459C136.271 104.459 135.582 103.771 135.582 102.929V98.4176C135.582 97.5764 136.271 96.8882 137.112 96.8882C137.953 96.8882 138.641 97.5764 138.641 98.4176V102.929C138.641 103.771 137.953 104.459 137.112 104.459Z" fill="#30374B"></path><path d="M102.776 106.753L108.129 101.4C108.588 100.941 108.588 100.253 108.129 99.7941C107.671 99.3352 106.982 99.3352 106.524 99.7941L100.406 105.912C100.176 106.141 100.1 106.447 100.1 106.753C100.1 107.059 100.176 107.365 100.406 107.594L106.524 113.712C106.982 114.171 107.671 114.171 108.129 113.712C108.588 113.253 108.588 112.565 108.129 112.106L102.776 106.753Z" fill="#F8C62C"></path><path d="M171.218 106.753L165.865 101.4C165.406 100.941 165.406 100.253 165.865 99.7941C166.324 99.3352 167.012 99.3352 167.471 99.7941L173.588 105.912C173.818 106.141 173.894 106.447 173.894 106.753C173.894 107.059 173.818 107.365 173.588 107.594L167.471 113.712C167.012 114.171 166.324 114.171 165.865 113.712C165.406 113.253 165.406 112.565 165.865 112.106L171.218 106.753Z" fill="#F8C62C"></path>',20)])])}const B9t=V(x9t,[["render",E9t]]),I9t={},S9t={width:"42",height:"55",viewBox:"0 0 42 55",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function P9t(i,e){return E(),L("svg",S9t,[...e[0]||(e[0]=[ss('<path d="M1.7192 47.4914L0.501465 10.6013H40.8298L40.3284 47.4914H1.7192Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M1.36104 47.8495H40.6866L41.188 10.2432H0.143311L1.36104 47.8495ZM39.9703 47.1332H2.07735L0.859623 10.9595H40.4717L39.9703 47.1332Z" fill="#9E9E9E"></path><path d="M4.29792 0.429688L0.501465 10.6013H40.8298L37.5348 0.429688H4.29792Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M0 10.9596H41.3312L37.7496 0H4.01135L0 10.9596ZM40.3284 10.2433H1.00284L4.51277 0.716312H37.2482L40.3284 10.2433Z" fill="#9E9E9E"></path><path d="M18.9312 23.0255C19.4326 23.0255 19.8624 22.5957 19.8624 22.0943V14.9312C19.8624 14.4298 19.4326 14 18.9312 14C18.4298 14 18 14.4298 18 14.9312V22.0943C18 22.5957 18.4298 23.0255 18.9312 23.0255Z" fill="#F8C62C"></path><path d="M24.3035 28.9708C24.3035 29.4722 24.7333 29.902 25.2347 29.902H32.3978C32.8992 29.902 33.329 29.4722 33.329 28.9708C33.329 28.4693 32.8992 28.0395 32.3978 28.0395H25.2347C24.7333 27.9679 24.3035 28.3977 24.3035 28.9708Z" fill="#F8C62C"></path><path d="M22.1546 25.2461C22.5128 25.6043 23.1575 25.6043 23.5156 25.2461L29.8192 18.9426C30.1773 18.5844 30.1773 17.9398 29.8192 17.5816C29.461 17.2234 28.8163 17.2234 28.4582 17.5816L22.1546 23.8852C21.7248 24.2433 21.7248 24.8164 22.1546 25.2461Z" fill="#F8C62C"></path><path d="M21.5855 31.4087L21.3477 51.0688L26.5798 46.0745L34.5865 46.6294L21.5855 31.4087Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M20.0793 54.9534L20 28L37.2819 48.6114L26.8969 47.0259L20.0793 54.9534ZM22.2197 33.9456L22.299 49.087L26.1041 44.6477L31.9705 45.5197L22.2197 33.9456Z" fill="black"></path>',9)])])}const T9t=V(I9t,[["render",P9t]]),k9t={},R9t={width:"124",height:"152",viewBox:"0 0 124 152",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function _9t(i,e){return E(),L("svg",R9t,[...e[0]||(e[0]=[ss('<path d="M10.5436 0.396484H112.649L123.272 103.216H0.475708L10.5436 0.396484Z" fill="#F2F2F2"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M0 103.612H123.668L113.046 0.317098V0H10.2264L0.0792746 103.216L0 103.612ZM122.876 102.819H0.951324L10.9399 0.792766H112.332L122.876 102.819Z" fill="#9E9E9E"></path><path d="M40.7472 10.2266L39.241 48.6747H83.7933V10.2266H40.7472Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M38.8446 49.071H84.1897H84.269V9.83008H40.3508L38.8446 49.071ZM83.4762 48.2783H39.7166L41.0643 10.6228H83.4762V48.2783Z" fill="#9E9E9E"></path><path d="M39.2408 48.6748L43.1253 64.0541H79.988L83.7932 48.6748H39.2408Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M42.8083 64.4503H80.3052L84.3482 48.2783H38.7653L42.8083 64.4503ZM79.671 63.6576H43.4425L39.7958 49.0711H83.3176L79.671 63.6576Z" fill="#9E9E9E"></path><path d="M64.6088 36.1494L64.371 55.8095L69.6031 50.8152L77.6098 51.3701L64.6088 36.1494Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M63.1026 59.6938L63.0233 32.7405L80.3052 53.3519L69.9202 51.7664L63.1026 59.6938ZM65.243 38.6861L65.3223 53.8275L69.1275 49.3881L74.9938 50.2602L65.243 38.6861Z" fill="black"></path><path d="M61.7549 130.724H61.3585C52.7176 130.724 45.5829 123.589 45.5829 114.948V101.709C45.5829 93.0686 52.7176 85.9338 61.3585 85.9338H61.7549C70.3958 85.9338 77.5306 93.0686 77.5306 101.709V114.948C77.5306 123.589 70.4751 130.724 61.7549 130.724Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M44.7902 114.79C44.7902 124.144 52.4005 131.754 61.7549 131.754C71.1093 131.754 78.7197 124.065 78.7197 114.79V101.947C78.7197 92.5928 71.1093 84.9824 61.7549 84.9824C52.4005 84.9824 44.7902 92.5928 44.7902 101.947V114.79ZM47.1684 101.868C47.1684 93.8612 53.6689 87.2814 61.7549 87.2814C69.7617 87.2814 76.3415 93.7819 76.3415 101.868V114.71C76.3415 122.717 69.8409 129.297 61.7549 129.297C53.7482 129.297 47.1684 122.796 47.1684 114.71V101.868Z" fill="#30374B"></path><path d="M61.8341 106.069C60.9621 106.069 60.2487 105.356 60.2487 104.484V100.996C60.2487 100.124 60.9621 99.4104 61.8341 99.4104C62.7062 99.4104 63.4196 100.124 63.4196 100.996V104.484C63.4196 105.356 62.7062 106.069 61.8341 106.069Z" fill="#30374B"></path><path d="M61.8341 97.7457C60.9621 97.7457 60.2487 97.0322 60.2487 96.1602C60.2487 95.2882 60.9621 94.5747 61.8341 94.5747C62.7062 94.5747 63.4196 95.2882 63.4196 96.1602C63.4196 97.0322 62.7062 97.7457 61.8341 97.7457Z" fill="#30374B"></path><path d="M61.8341 110.826C60.9621 110.826 60.2487 110.113 60.2487 109.241C60.2487 108.369 60.9621 107.655 61.8341 107.655C62.7062 107.655 63.4196 108.369 63.4196 109.241C63.4196 110.113 62.7062 110.826 61.8341 110.826Z" fill="#30374B"></path><path d="M61.8342 142.298L67.3834 136.749C67.859 136.273 68.5725 136.273 69.0481 136.749C69.5238 137.224 69.5238 137.938 69.0481 138.414L62.7062 144.756C62.4684 144.993 62.1513 145.073 61.8342 145.073C61.5171 145.073 61.2 144.993 60.9621 144.756L54.6202 138.414C54.1445 137.938 54.1445 137.224 54.6202 136.749C55.0958 136.273 55.8093 136.273 56.2849 136.749L61.8342 142.298Z" fill="#F8C62C"></path><path d="M61.8342 149.195L67.3834 143.646C67.859 143.17 68.5725 143.17 69.0481 143.646C69.5238 144.121 69.5238 144.835 69.0481 145.311L62.7062 151.653C62.4684 151.89 62.1513 151.97 61.8342 151.97C61.5171 151.97 61.2 151.89 60.9621 151.653L54.6202 145.311C54.1445 144.835 54.1445 144.121 54.6202 143.646C55.0958 143.17 55.8093 143.17 56.2849 143.646L61.8342 149.195Z" fill="#F8C62C"></path>',15)])])}const D9t={name:"FirstPersonViewHelper",components:{KeyboardNavigate:v9t,KeyboardStorey:b9t,MouseMove:B9t,MouseStorey:T9t,MouseZoom:V(k9t,[["render",_9t]])},emits:["close"],methods:{close(){this.$emit("close")},clear(){localStorage.setItem("firstPersonViewHelper","false"),this.close()}}},L9t={class:"bimdata-first-person-view-helper"},F9t={class:"bimdata-first-person-view-helper__header"},O9t={class:"bimdata-first-person-view-helper__content"},N9t={class:"bimdata-first-person-view-helper__content__main"},U9t={class:"bimdata-first-person-view-helper__content__main__left"},V9t={class:"bimdata-first-person-view-helper__content__main__left__element"},H9t={class:"bimdata-first-person-view-helper__content__main__left__element__picture"},z9t={class:"bimdata-first-person-view-helper__content__main__left__element__text"},j9t={class:"bimdata-first-person-view-helper__content__main__left__element__text__tilte"},G9t={class:"bimdata-first-person-view-helper__content__main__left__element__text__list"},Q9t={class:"bimdata-first-person-view-helper__content__main__left__element"},q9t={class:"bimdata-first-person-view-helper__content__main__left__element__picture"},K9t={class:"bimdata-first-person-view-helper__content__main__left__element__text"},J9t={class:"bimdata-first-person-view-helper__content__main__left__element__text__tilte"},W9t={class:"bimdata-first-person-view-helper__content__main__left__element__text__list"},Z9t={class:"bimdata-first-person-view-helper__content__main__left__element"},Y9t={class:"bimdata-first-person-view-helper__content__main__left__element__picture"},X9t={class:"bimdata-first-person-view-helper__content__main__left__element__text"},$9t={class:"bimdata-first-person-view-helper__content__main__left__element__text__tilte"},eCt={class:"bimdata-first-person-view-helper__content__main__left__element__text__list"},tCt={class:"bimdata-first-person-view-helper__content__main__right"},iCt={class:"bimdata-first-person-view-helper__content__main__right__title"},nCt={class:"bimdata-first-person-view-helper__content__main__right__content"},oCt={class:"bimdata-first-person-view-helper__content__main__right__content__picture"},sCt={class:"bimdata-first-person-view-helper__content__main__right__content__picture__element"},rCt={class:"bimdata-first-person-view-helper__content__main__right__content__picture__element"},aCt={class:"bimdata-first-person-view-helper__content__main__right__content__text"},lCt={class:"bimdata-first-person-view-helper__content__footer"},cCt={class:"bimdata-first-person-view-helper__footer-buttons"};function uCt(i,e,t,n,o,r){const s=P("KeyboardNavigate"),a=P("MouseMove"),l=P("MouseZoom"),c=P("MouseStorey"),u=P("KeyboardStorey"),d=P("BIMDataButton");return E(),L("div",L9t,[C("h1",F9t,G(i.$t("viewer3d.firstPersonViewHelper.title")),1),C("div",O9t,[C("div",N9t,[C("div",U9t,[C("div",V9t,[C("div",H9t,[k(s)]),C("div",z9t,[C("h4",j9t,G(i.$t("viewer3d.firstPersonViewHelper.keyboardUsage")),1),C("ul",G9t,[C("li",null,G(i.$t("viewer3d.firstPersonViewHelper.forward")),1),C("li",null,G(i.$t("viewer3d.firstPersonViewHelper.backward")),1),C("li",null,G(i.$t("viewer3d.firstPersonViewHelper.left")),1),C("li",null,G(i.$t("viewer3d.firstPersonViewHelper.right")),1)])])]),C("div",Q9t,[C("div",q9t,[k(a)]),C("div",K9t,[C("h4",J9t,G(i.$t("viewer3d.firstPersonViewHelper.mouseOrientation")),1),C("ul",W9t,[C("li",null,G(i.$t("viewer3d.firstPersonViewHelper.pressLeft")),1),C("li",null,G(i.$t("viewer3d.firstPersonViewHelper.mouseMove")),1),C("li",null,G(i.$t("viewer3d.firstPersonViewHelper.mouseVertical")),1)])])]),C("div",Z9t,[C("div",Y9t,[k(l)]),C("div",X9t,[C("h4",$9t,G(i.$t("viewer3d.firstPersonViewHelper.mouseZoom")),1),C("ul",eCt,[C("li",null,G(i.$t("viewer3d.firstPersonViewHelper.mouseWheelForward")),1),C("li",null,G(i.$t("viewer3d.firstPersonViewHelper.mouseWheelBackward")),1)])])])]),C("div",tCt,[C("h4",iCt,G(i.$t("viewer3d.firstPersonViewHelper.changeStorey")),1),C("div",nCt,[C("div",oCt,[C("div",sCt,[k(c)]),C("div",rCt,[k(u)])]),C("div",aCt,[C("ul",null,[C("li",null,G(i.$t("viewer3d.firstPersonViewHelper.storeyClick")),1),C("li",null,G(i.$t("viewer3d.firstPersonViewHelper.moveCameraToObject")),1)]),C("ul",null,[C("li",null,G(i.$t("viewer3d.firstPersonViewHelper.keyboardStoreyChange")),1)])])])])]),C("div",lCt,G(i.$t("viewer3d.firstPersonViewHelper.contentFooter")),1)]),C("div",cCt,[k(d,{color:"primary",fill:"",radius:"",width:"200px",onClick:r.close},{default:U(()=>[We(G(i.$t("viewer3d.firstPersonViewHelper.understand")),1)]),_:1},8,["onClick"]),k(d,{color:"primary",outline:"",radius:"",width:"200px",onClick:r.clear},{default:U(()=>[We(G(i.$t("viewer3d.firstPersonViewHelper.noRecall")),1)]),_:1},8,["onClick"])])])}const Sie=V(D9t,[["render",uCt],["__scopeId","data-v-77cce9d5"]]),dCt={components:{ShortcutsModal:bw,FirstPersonViewHelper:Sie},data(){const i=this.$t;return{tabs:[{id:0,get label(){return i("viewer3d.modals.3d")}},{id:1,get label(){return i("viewer3d.modals.firstPerson")}}],activeTab:0,elements:[{image:"shortcutRotate",title:this.$t("shortcuts-helper.title_rotate"),text:this.$t("shortcuts-helper.text_rotate")},{image:"shortcutZoom",title:this.$t("shortcuts-helper.title_zoom"),text:this.$t("shortcuts-helper.text_zoom")},{image:"shortcutOpen",title:this.$t("shortcuts-helper.title_open"),text:this.$t("shortcuts-helper.text_open")}],shortcuts:[{letter:"F",text:this.$t("context_menu.fit_view")},{letter:"C",text:this.$t("context_menu.select_all")},{letter:"V",text:this.$t("context_menu.deselect_all")},{letter:"H",text:this.$t("context_menu.hide")},{letter:"Y",text:this.$t("context_menu.select_similar")},{letter:"I",text:this.$t("context_menu.isolate")},{letter:"U",text:this.$t("context_menu.reintegrate")},{letter:"R",text:this.$t("context_menu.show_all")},{letter:"1",text:this.$t("shortcuts-helper.shortcut_1")},{letter:"2",text:this.$t("shortcuts-helper.shortcut_2")},{letter:"3",text:this.$t("shortcuts-helper.shortcut_3")},{letter:"4",text:this.$t("shortcuts-helper.shortcut_4")},{letter:"5",text:this.$t("shortcuts-helper.shortcut_5")},{letter:"6",text:this.$t("shortcuts-helper.shortcut_6")},{maj:!0,text:this.$t("shortcuts-helper.shortcut_pan"),illustration:"click"},{alt:!0,text:this.$t("shortcuts-helper.shortcut_open"),illustration:"click"},{shift:!0,text:this.$t("shortcuts-helper.shortcut_multiselect"),illustration:"click"}]}}},hCt={class:"bimdata-shortcuts-helper__header"};function pCt(i,e,t,n,o,r){const s=P("BIMDataTabs"),a=P("ShortcutsModal"),l=P("FirstPersonViewHelper");return E(),L("div",null,[C("div",hCt,[k(s,{tabs:o.tabs,width:"490px",height:"44px",tabSize:"245",onTabSelected:e[0]||(e[0]=c=>o.activeTab=o.tabs.indexOf(c)),selected:o.activeTab},null,8,["tabs","selected"])]),o.activeTab===0?(E(),K(a,{key:0,elements:o.elements,shortcuts:o.shortcuts,onClose:e[1]||(e[1]=c=>i.$emit("close"))},{title:U(()=>[We(G(i.$t("shortcuts-helper.title_modal")),1)]),_:1},8,["elements","shortcuts"])):(E(),K(l,{key:1,onClose:e[2]||(e[2]=c=>i.$emit("close"))}))])}const fCt=V(dCt,[["render",pCt],["__scopeId","data-v-a26872a0"]]),ACt="data:image/svg+xml,%3csvg%20width='44'%20height='44'%20viewBox='0%200%2044%2044'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3ccircle%20cx='22'%20cy='22'%20r='2'%20fill='%232F374A'/%3e%3cpath%20d='M1.20102%2023.5V24.5H2.20102H10.261C11.4116%2029.9278%2016.2295%2034%2022%2034C27.7705%2034%2032.5884%2029.9278%2033.739%2024.5H41.799H42.799V23.5V20.5V19.5H41.799H33.739C32.5884%2014.0722%2027.7705%2010%2022%2010C16.2295%2010%2011.4116%2014.0722%2010.261%2019.5H2.20102H1.20102V20.5V23.5ZM14.619%2022C14.619%2017.9236%2017.9236%2014.619%2022%2014.619C26.0764%2014.619%2029.381%2017.9236%2029.381%2022C29.381%2026.0764%2026.0764%2029.381%2022%2029.381C17.9236%2029.381%2014.619%2026.0764%2014.619%2022Z'%20fill='%232F374A'%20stroke='white'%20stroke-width='2'/%3e%3c/svg%3e",mCt="data:image/svg+xml,%3csvg%20width='44'%20height='44'%20viewBox='0%200%2044%2044'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3ccircle%20cx='22'%20cy='22'%20r='2'%20fill='%232F374A'/%3e%3cpath%20d='M6.23222%2034.2322L5.52512%2034.9393L6.23222%2035.6464L8.35354%2037.7678L9.06065%2038.4749L9.76776%2037.7678L15.4677%2032.0678C17.3477%2033.2898%2019.592%2034%2022%2034C24.408%2034%2026.6523%2033.2898%2028.5323%2032.0678L34.2322%2037.7678L34.9393%2038.4749L35.6464%2037.7678L37.7678%2035.6465L38.4749%2034.9393L37.7678%2034.2322L32.0678%2028.5323C33.2898%2026.6523%2034%2024.408%2034%2022C34%2019.592%2033.2898%2017.3477%2032.0678%2015.4677L37.7678%209.76776L38.4749%209.06065L37.7678%208.35354L35.6464%206.23222L34.9393%205.52512L34.2322%206.23222L28.5322%2011.9322C26.6523%2010.7102%2024.408%2010%2022%2010C19.592%2010%2017.3477%2010.7102%2015.4677%2011.9322L9.76776%206.23224L9.06065%205.52513L8.35354%206.23224L6.23222%208.35356L5.52512%209.06066L6.23222%209.76777L11.9322%2015.4678C10.7102%2017.3477%2010%2019.592%2010%2022C10%2024.408%2010.7102%2026.6523%2011.9322%2028.5323L6.23222%2034.2322ZM14.619%2022C14.619%2017.9236%2017.9236%2014.6191%2022%2014.6191C26.0764%2014.6191%2029.381%2017.9236%2029.381%2022C29.381%2026.0764%2026.0764%2029.381%2022%2029.381C17.9236%2029.381%2014.619%2026.0764%2014.619%2022Z'%20fill='%232F374A'%20stroke='white'%20stroke-width='2'/%3e%3c/svg%3e",gCt="data:image/svg+xml,%3csvg%20width='44'%20height='44'%20viewBox='0%200%2044%2044'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3ccircle%20cx='22'%20cy='22'%20r='2'%20fill='%232F374A'/%3e%3cpath%20d='M14.619%2022C14.619%2017.9236%2017.9236%2014.619%2022%2014.619C26.0764%2014.619%2029.381%2017.9236%2029.381%2022C29.381%2026.0764%2026.0764%2029.381%2022%2029.381C17.9236%2029.381%2014.619%2026.0764%2014.619%2022ZM22%2010C15.3726%2010%2010%2015.3726%2010%2022C10%2028.6274%2015.3726%2034%2022%2034C28.6274%2034%2034%2028.6274%2034%2022C34%2015.3726%2028.6274%2010%2022%2010Z'%20fill='%232F374A'%20stroke='white'%20stroke-width='2'/%3e%3c/svg%3e",yCt="data:image/svg+xml,%3csvg%20width='44'%20height='44'%20viewBox='0%200%2044%2044'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M14.619%2022C14.619%2017.9236%2017.9236%2014.619%2022%2014.619C23.8642%2014.619%2025.5667%2015.3094%2026.8665%2016.4504L14.7593%2023.4405C14.6673%2022.9751%2014.619%2022.4935%2014.619%2022ZM29.381%2022C29.381%2026.0764%2026.0764%2029.381%2022%2029.381C20.0879%2029.381%2018.3459%2028.6547%2017.0341%2027.4608L29.2136%2020.4289C29.3232%2020.9347%2029.381%2021.4602%2029.381%2022ZM22%2010C15.3726%2010%2010%2015.3726%2010%2022C10%2028.6274%2015.3726%2034%2022%2034C28.6274%2034%2034%2028.6274%2034%2022C34%2015.3726%2028.6274%2010%2022%2010Z'%20fill='%232F374A'%20stroke='white'%20stroke-width='2'/%3e%3c/svg%3e",vCt="data:image/svg+xml,%3csvg%20width='33'%20height='33'%20viewBox='0%200%2033%2033'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M1.70001%2016.8667V17.3667H2.20001H7.33335H7.83335V16.8667V16.1333V15.6333H7.33335L2.20001%2015.6333H1.70001V16.1333L1.70001%2016.8667ZM30.8%2017.3667H31.3V16.8667V16.1333V15.6333H30.8L25.6667%2015.6333H25.1667V16.1333V16.8667V17.3667H25.6667H30.8Z'%20fill='%232F374A'%20stroke='white'/%3e%3cpath%20d='M16.1333%201.70001L15.6333%201.70001L15.6333%202.20001L15.6333%207.33335L15.6333%207.83335L16.1333%207.83335L16.8667%207.83335L17.3667%207.83335L17.3667%207.33335L17.3667%202.20001L17.3667%201.70001L16.8667%201.70001L16.1333%201.70001ZM15.6333%2030.8L15.6333%2031.3L16.1333%2031.3L16.8667%2031.3L17.3667%2031.3L17.3667%2030.8L17.3667%2025.6667L17.3667%2025.1667L16.8667%2025.1667L16.1333%2025.1667L15.6333%2025.1667L15.6333%2025.6667L15.6333%2030.8Z'%20fill='%232F374A'%20stroke='white'/%3e%3c/svg%3e",wCt={0:{positions:[36.5625,31.640625,36.5625,19.51171875,36.42067337036133,16.11605453491211,35.99519348144531,13.020120620727539,35.28605651855469,10.223917961120605,34.293270111083984,7.727446556091309,33.01683044433594,5.530706882476807,30.959993362426758,3.3593661785125732,28.725576400756836,1.6479235887527466,26.31357765197754,.39637935161590576,23.723995208740234,-.39526674151420593,20.956830978393555,-.7270146012306213,20.3203125,-.73828125,17.307449340820312,-.5108020901679993,14.569392204284668,.17163534462451935,12.106142044067383,1.3090311288833618,9.917699813842773,2.9013850688934326,8.174575805664062,5.153988838195801,6.733142375946045,7.555612087249756,5.593398094177246,10.106253623962402,4.755343437194824,12.805914878845215,4.218978404998779,15.654594421386719,3.9843032360076904,18.652292251586914,3.97265625,19.51171875,3.97265625,31.640625,4.115384578704834,35.0230827331543,4.543569564819336,38.11090850830078,5.257210731506348,40.904109954833984,6.256308555603027,43.40268325805664,7.540863037109375,45.606624603271484,9.608292579650879,47.79111099243164,11.846480369567871,49.51402282714844,14.255425453186035,50.775352478027344,16.835128784179688,51.57510757446289,19.585588455200195,51.91328811645508,20.25,51.92578125,23.26165771484375,51.697608947753906,25.997068405151367,51.013092041015625,28.456228256225586,49.872230529785156,30.639141082763672,48.2750244140625,32.375572204589844,46.0158576965332,33.81153869628906,43.60895538330078,34.947044372558594,41.0543212890625,35.78208923339844,38.35194778442383,36.31666946411133,35.5018424987793,36.55078887939453,32.50400161743164,36.5625,31.640625,29.63671875,18.10546875,29.63671875,33.1171875,29.450082778930664,36.561954498291016,28.89017677307129,39.497215270996094,27.956998825073242,41.92298126220703,25.967069625854492,44.22639083862305,23.724157333374023,45.72625732421875,21.228260040283203,46.422576904296875,20.25,46.4765625,17.354780197143555,46.07659912109375,14.97888469696045,44.876708984375,13.33356761932373,42.470394134521484,12.110569953918457,39.9057731628418,11.309891700744629,37.1828498840332,10.931534767150879,34.30161666870117,10.8984375,33.1171875,10.8984375,18.10546875,11.085087776184082,14.669450759887695,11.645040512084961,11.733874320983887,12.578293800354004,9.298736572265625,14.569818496704102,6.974865436553955,16.804428100585938,5.454482555389404,19.282119750976562,4.737586975097656,20.3203125,4.67578125,23.212167739868164,5.077450752258301,25.581016540527344,6.282459735870361,27.21183204650879,8.69408893585205,28.425546646118164,11.263723373413086,29.2221622467041,13.991360664367676,29.6016788482666,16.877002716064453],indices:[0,2,1,2,4,3,4,6,5,6,8,7,8,10,9,10,12,11,12,14,13,14,16,15,16,18,17,18,20,19,20,22,21,22,24,23,24,63,62,61,24,62,24,26,25,26,28,27,28,30,29,30,32,31,32,34,33,34,36,35,36,38,37,38,40,39,40,42,41,42,44,43,44,0,45,0,4,2,4,8,6,8,12,10,12,16,14,16,20,18,20,24,22,24,64,63,60,24,61,24,28,26,28,32,30,32,36,34,36,40,38,40,44,42,44,4,0,4,12,8,12,20,16,20,64,24,59,24,60,24,32,28,32,40,36,40,4,44,20,65,64,58,24,59,20,66,65,57,24,58,12,66,20,57,32,24,12,67,66,56,32,57,12,68,67,55,32,56,12,69,68,54,32,55,12,70,69,53,32,54,12,71,70,53,40,32,4,71,12,52,40,53,4,72,71,51,40,52,4,73,72,50,40,51,4,74,73,49,40,50,4,75,74,48,40,49,4,76,75,47,40,48,40,76,4,76,40,47],width:32.58984375},1:{positions:[23.94140625,51.1875,23.94140625,0,17.015625,0,17.015625,44.4375,6.5390625,44.296875,6.5390625,49.2890625],indices:[0,2,1,3,5,4,0,3,2,3,0,5],width:17.40234375},2:{positions:[37.3359375,5.4140625,37.3359375,0,4.1484375,0,4.1484375,4.74609375,20.91796875,23.37890625,23.33412742614746,26.180971145629883,25.239078521728516,28.61744499206543,26.632823944091797,30.68832778930664,27.938528060913086,33.606327056884766,28.560094833374023,36.34145736694336,28.6171875,37.40625,28.23740577697754,40.36100769042969,27.09806251525879,42.90309143066406,24.87748908996582,45.0150146484375,22.4631290435791,46.19827651977539,20.4609375,46.4765625,17.237478256225586,46.17487716674805,14.632962226867676,45.26981735229492,12.647390365600586,43.76138687133789,11.200069427490234,41.599464416503906,10.360716819763184,38.91020965576172,10.125,36.10546875,3.48046875,36.10546875,3.41015625,36.31640625,3.580944538116455,39.24900436401367,4.255249977111816,41.95781326293945,5.433072566986084,44.442840576171875,7.114412784576416,46.704078674316406,9.256887435913086,48.52997589111328,11.61109447479248,49.96455383300781,14.177034378051758,51.007816314697266,16.954708099365234,51.659759521484375,19.944114685058594,51.920387268066406,20.4609375,51.92578125,23.575925827026367,51.698787689208984,26.37569808959961,51.01780319213867,28.86025619506836,49.88283157348633,31.029598236083984,48.29386901855469,32.93091583251953,46.07616424560547,34.31552505493164,43.65195846557617,35.18342971801758,41.0212516784668,35.53462600708008,38.18403625488281,35.54296875,37.65234375,35.271297454833984,34.8802490234375,34.45627975463867,32.10430145263672,33.097923278808594,29.324501037597656,31.655981063842773,27.067161560058594,29.948768615722656,24.73398208618164,27.976285934448242,22.324962615966797,26.12109375,20.25,12.65625,5.58984375,12.7265625,5.4140625],indices:[51,1,0,1,3,2,20,22,21,22,24,23,24,26,25,26,28,27,28,30,29,30,32,31,32,34,33,34,36,35,36,38,37,38,40,39,40,42,41,42,44,43,44,46,45,46,48,47,48,50,49,51,3,1,19,22,20,22,26,24,26,30,28,30,34,32,34,38,36,38,42,40,42,46,44,46,50,48,50,3,51,18,22,19,22,30,26,30,38,34,38,46,42,46,3,50,18,30,22,46,4,3,17,30,18,46,5,4,16,30,17,46,6,5,15,30,16,46,7,6,14,30,15,46,8,7,13,30,14,38,8,46,13,38,30,38,9,8,12,38,13,38,10,9,11,38,12,38,11,10],width:33.92578125},3:{positions:[13.640625,23.37890625,13.640625,28.79296875,19.6875,28.79296875,22.903934478759766,29.15167236328125,25.282482147216797,30.227783203125,26.954715728759766,32.621280670166016,27.896883010864258,35.25688171386719,28.125,37.51171875,27.781084060668945,40.67007064819336,26.749338150024414,43.162776947021484,24.544097900390625,45.051876068115234,22.03769302368164,46.1552734375,19.51171875,46.4765625,16.51466941833496,46.0916633605957,14.03652286529541,44.93696212768555,12.056009292602539,42.62509536743164,10.906388282775879,40.13740539550781,10.58203125,37.79296875,3.9375,37.79296875,3.8671875,38.00390625,4.073190689086914,40.847023010253906,4.870357036590576,43.464176177978516,6.258687496185303,45.85536193847656,8.649903297424316,47.949581146240234,11.105090141296387,49.6024169921875,13.624245643615723,50.81385803222656,16.207372665405273,51.58391189575195,18.854469299316406,51.912574768066406,19.51171875,51.92578125,22.69034194946289,51.71705627441406,25.550539016723633,51.090885162353516,28.09231185913086,50.04726028442383,30.315656661987305,48.58618927001953,32.206153869628906,46.54783248901367,33.6175651550293,44.22849655151367,34.54988479614258,41.62818145751953,35.00312423706055,38.74688720703125,35.05078125,37.37109375,34.68306350708008,34.60222244262695,33.579917907714844,31.84009552001953,31.788928985595703,29.416330337524414,29.652488708496094,27.526569366455078,27.38671875,26.26171875,30.2706241607666,24.998523712158203,32.5009765625,23.31671142578125,34.190120697021484,20.399517059326172,35.28596115112305,17.665790557861328,35.78849792480469,15.115530967712402,35.82421875,14.2734375,35.583168029785156,11.223187446594238,34.860015869140625,8.486950874328613,33.65475845336914,6.064727306365967,31.9674015045166,3.9565165042877197,29.64410972595215,2.185784339904785,27.159265518188477,.8323085308074951,24.512863159179688,-.10391119122505188,21.704906463623047,-.6228747963905334,19.51171875,-.73828125,16.397254943847656,-.535150945186615,13.541664123535156,.07424008101224899,10.9449462890625,1.089891791343689,8.607102394104004,2.5118041038513184,6.504549980163574,4.569301605224609,4.957869052886963,6.847413539886475,3.9670591354370117,9.34614086151123,3.5321204662323,12.065483093261719,3.515625,13.2890625,3.62109375,13.5,10.23046875,13.5,10.628458976745605,10.52513313293457,11.822431564331055,8.080921173095703,14.14232063293457,6.207763671875,16.670166015625,5.072887420654297,19.405969619750977,4.6762919425964355,19.51171875,4.67578125,22.593053817749023,5.02486515045166,25.119962692260742,6.072116374969482,27.08766746520996,8.277663230895996,28.33972930908203,10.727699279785156,28.876150131225586,13.422224998474121,28.8984375,14.1328125,28.579307556152344,17.37627601623535,27.621917724609375,19.90043067932129,25.462261199951172,21.754257202148438,22.976253509521484,22.91082000732422,20.163896560668945,23.3701229095459,19.6875,23.37890625],indices:[86,1,0,16,18,17,18,20,19,20,22,21,22,24,23,24,26,25,26,28,27,28,30,29,30,32,31,32,34,33,34,36,35,36,38,37,38,40,39,40,42,41,42,44,43,44,46,45,46,48,47,48,50,49,50,52,51,52,54,53,54,56,55,56,58,57,58,60,59,60,62,61,62,64,63,64,66,65,66,68,67,85,1,86,15,18,16,18,22,20,22,26,24,26,30,28,30,34,32,34,38,36,38,42,40,42,46,44,46,50,48,50,54,52,54,58,56,58,62,60,62,66,64,66,69,68,84,1,85,14,18,15,18,26,22,26,34,30,34,42,38,42,50,46,50,58,54,58,66,62,66,70,69,83,1,84,14,26,18,58,70,66,83,2,1,13,26,14,58,71,70,82,2,83,12,26,13,58,72,71,82,3,2,11,26,12,58,73,72,82,4,3,10,26,11,58,74,73,81,4,82,10,34,26,58,75,74,9,34,10,50,75,58,8,34,9,50,76,75,7,34,8,50,77,76,6,34,7,50,78,77,5,34,6,50,79,78,5,42,34,50,80,79,4,42,5,50,81,80,81,42,4,42,81,50],width:32.30859375},4:{positions:[31.81640625,51.1875,31.81640625,17.2265625,38.8828125,17.2265625,38.8828125,11.8125,31.81640625,11.8125,31.81640625,0,24.92578125,0,24.92578125,11.8125,1.93359375,11.8125,1.93359375,15.71484375,24.50390625,51.1875,31.81640625,51.1875,24.046875,39.515625,9.31640625,17.2265625,24.92578125,17.2265625,24.92578125,41.23828125,24.71484375,41.2734375],indices:[1,3,2,4,6,5,7,9,8,9,14,13,16,13,12,13,10,9,10,1,0,1,4,3,4,7,6,7,14,9,16,10,13,10,4,1,4,14,7,15,10,16,4,15,14,15,4,10],width:36.94921875},5:{positions:[11.91796875,22.5,6.15234375,23.09765625,9.10546875,51.1875,34.734375,51.1875,34.734375,45.03515625,14.9765625,45.03515625,13.2890625,30.65625,14.99853515625,31.75048828125,16.892578125,32.642578125,19.03271484375,33.25341796875,21.48046875,33.50390625,21.48046875,33.50390625,24.524171829223633,33.29277038574219,27.260135650634766,32.595733642578125,29.6883602142334,31.412792205810547,31.808847427368164,29.743946075439453,33.53106689453125,27.481525421142578,34.8779411315918,25.034576416015625,35.84947204589844,22.40309715270996,36.44565963745117,19.58709144592285,36.66650390625,16.586557388305664,36.66796875,16.3125,36.47660446166992,13.1383056640625,35.90251541137695,10.244234085083008,34.94569778442383,7.630287170410156,33.60615158081055,5.296463966369629,31.54420280456543,3.2312631607055664,29.28870391845703,1.597025990486145,26.839656829833984,.3937528729438782,24.197057723999023,-.3785564601421356,21.360912322998047,-.7199019193649292,20.49609375,-.73828125,17.404800415039062,-.5199803113937378,14.58151912689209,.13492262363433838,12.026251792907715,1.226427435874939,9.738997459411621,2.7545342445373535,7.902623653411865,4.662389278411865,6.586172580718994,6.943535327911377,5.78964376449585,9.59797191619873,5.513038158416748,12.625699043273926,5.51953125,13.25390625,5.58984375,13.46484375,11.84765625,13.46484375,12.231374740600586,10.424592018127441,13.382529258728027,7.983725547790527,15.769926071166992,6.059262275695801,18.29474449157715,4.960567474365234,20.49609375,4.67578125,23.407373428344727,5.077446937561035,25.80744171142578,6.282444000244141,27.603513717651367,8.744783401489258,28.85628890991211,11.317317962646484,29.565767288208008,14.000046730041504,29.7421875,16.2421875,29.464466094970703,19.35067367553711,28.631298065185547,22.06241226196289,26.50613021850586,24.628503799438477,24.30402374267578,26.380647659301758,22.024982452392578,27.31884002685547,20.49609375,27.4921875,17.11406707763672,27.2115478515625,14.758378028869629,26.369632720947266,13.049945831298828,24.7330322265625],indices:[2,4,3,6,8,7,12,14,13,14,16,15,16,18,17,18,20,19,20,22,21,22,24,23,24,26,25,26,28,27,28,30,29,30,32,31,32,34,33,34,36,35,36,38,37,38,40,39,40,42,41,2,5,4,6,9,8,12,16,14,16,20,18,20,24,22,24,28,26,28,32,30,32,36,34,36,40,38,40,43,42,1,5,2,12,20,16,20,28,24,28,36,32,36,43,40,1,6,5,36,44,43,1,9,6,36,45,44,28,45,36,28,46,45,28,47,46,28,48,47,28,49,48,20,49,28,20,50,49,20,51,50,20,52,51,20,53,52,20,54,53,20,55,54,12,55,20,12,56,55,12,57,56,12,58,57,12,59,58,12,60,59,12,61,60,1,11,9,11,61,12,62,1,0,1,61,11,61,1,62],width:31.154930591583252},6:{positions:[23.73046875,51.92578125,23.73046875,51.92578125,26.35400390625,51.7763671875,28.951171875,51.328125,31.31103515625,50.6513671875,33.22265625,49.81640625,33.22265625,49.81640625,31.74609375,44.5078125,29.98388671875,45.30322265625,28.142578125,45.931640625,26.09912109375,46.34033203125,23.73046875,46.4765625,23.73046875,46.4765625,20.900758743286133,46.15056610107422,18.386611938476562,45.17258071899414,16.18802833557129,43.5426025390625,14.465424537658691,41.076210021972656,13.138894081115723,38.50679397583008,12.208439826965332,35.8343505859375,11.67405891418457,33.05888366699219,11.53125,30.62109375,11.53125,29.8125,13.904020309448242,31.542055130004883,16.591995239257812,32.85417938232422,19.408527374267578,33.66147994995117,22.372249603271484,33.98829650878906,22.921875,33.99609375,25.913307189941406,33.7476806640625,28.614002227783203,33.002437591552734,31.023962020874023,31.7603702545166,33.143184661865234,30.021472930908203,34.91127014160156,27.67707633972168,36.273963928222656,25.183759689331055,37.23126983642578,22.541519165039062,37.783180236816406,19.750356674194336,37.93359375,17.2265625,37.749637603759766,14.08007526397705,37.19777297973633,11.182336807250977,36.27799606323242,8.533347129821777,34.99031066894531,6.1331071853637695,32.81218719482422,3.8232548236846924,30.5310001373291,1.9849358797073364,28.146751403808594,.6181499361991882,25.65943717956543,-.2771027684211731,23.069063186645508,-.7008222937583923,22.0078125,-.73828125,19.07733154296875,-.5163767337799072,16.358732223510742,.14933684468269348,13.852017402648926,1.2588595151901245,11.557185173034668,2.8121912479400635,9.638298988342285,5.0737128257751465,8.030496597290039,7.450648784637451,6.733777046203613,9.942998886108398,5.748140335083008,12.550763130187988,5.073586463928223,15.273941993713379,4.710115432739258,18.112533569335938,4.640625,20.07421875,4.640625,29.84765625,4.791966915130615,33.015262603759766,5.245992183685303,35.97719955444336,6.0027008056640625,38.73346710205078,7.062093257904053,41.28406524658203,8.424168586730957,43.62899398803711,10.08892822265625,45.768253326416016,12.196839332580566,47.81597900390625,14.478988647460938,49.4511604309082,16.93537712097168,50.673797607421875,19.56600570678711,51.483890533447266,22.370872497558594,51.881439208984375,21.375,28.828125,21.375,28.828125,18.29266357421875,28.514667510986328,15.669046401977539,27.57429313659668,13.216089248657227,25.754901885986328,11.53125,23.5546875,11.53125,23.5546875,11.53125,19.40625,11.72034740447998,16.05575180053711,12.287637710571289,13.114592552185059,13.233122825622559,10.582772254943848,15.422850608825684,7.959404945373535,17.641748428344727,6.1007585525512695,19.889812469482422,5.006833076477051,22.0078125,4.67578125,24.755970001220703,5.117502212524414,27.043012619018555,6.4426655769348145,28.768321990966797,9.139809608459473,30.00419807434082,11.825053215026855,30.75064468383789,14.498397827148438,31.007658004760742,17.15984344482422,31.0078125,17.2265625,30.737268447875977,20.334959030151367,29.925634384155273,23.062726974487305,28.57291030883789,25.409866333007812,26.557069778442383,27.331403732299805,24.112672805786133,28.470571517944336],indices:[2,4,3,21,23,22,23,25,24,25,27,26,27,29,28,29,31,30,31,33,32,33,35,34,35,37,36,37,39,38,39,41,40,41,43,42,43,45,44,45,47,46,47,49,48,49,51,50,51,53,52,53,55,54,55,57,56,57,59,58,59,61,60,61,63,62,63,65,64,65,67,66,21,25,23,25,29,27,29,33,31,33,37,35,37,41,39,41,45,43,45,49,47,49,53,51,53,57,55,57,61,59,61,65,63,65,68,67,21,29,25,29,37,33,37,45,41,45,53,49,57,65,61,57,68,65,73,57,74,68,2,1,2,6,4,6,8,7,53,75,57,72,57,73,68,6,2,6,9,8,53,76,75,71,57,72,68,9,6,53,77,76,70,57,71,68,10,9,53,78,77,68,12,10,53,79,78,68,13,12,45,79,53,68,14,13,45,80,79,68,15,14,45,81,80,57,15,68,45,82,81,57,16,15,45,83,82,57,17,16,45,84,83,57,18,17,37,84,45,57,19,18,37,85,84,57,20,19,37,86,85,57,21,20,37,87,86,70,21,57,37,88,87,70,29,21,37,89,88,95,29,70,37,90,89,94,29,95,29,90,37,93,29,94,29,91,90,92,29,93,29,92,91],width:33.29296875},7:{positions:[37.3359375,51.1875,37.3359375,45.73828125,35.06884002685547,42.96620559692383,32.99747848510742,40.27573776245117,31.121856689453125,37.666873931884766,29.441970825195312,35.13961410522461,27.957822799682617,32.6939582824707,26.669410705566406,30.329906463623047,25.576738357543945,28.047460556030273,24.585519790649414,25.34857940673828,23.679515838623047,22.592660903930664,22.85872459411621,19.779708862304688,22.123149871826172,16.909719467163086,21.47278594970703,13.982696533203125,20.907638549804688,10.998638153076172,20.427703857421875,7.957544803619385,20.109375,5.51953125,19.546875,0,12.62109375,0,13.18359375,5.51953125,13.624162673950195,8.682632446289062,14.162458419799805,11.7554292678833,14.798481941223145,14.737921714782715,15.532232284545898,17.630107879638672,16.363710403442383,20.431991577148438,17.29291534423828,23.14356803894043,18.319847106933594,25.764841079711914,19.59184455871582,28.50404167175293,20.94556999206543,31.184146881103516,22.381019592285156,33.80515670776367,23.898197174072266,36.367069244384766,25.497098922729492,38.86988830566406,27.17772674560547,41.31361389160156,28.940080642700195,43.6982421875,30.55078125,45.73828125,2.70703125,45.73828125,2.70703125,51.1875],indices:[36,1,0,16,18,17,18,20,19,20,22,21,22,24,23,24,26,25,26,28,27,28,30,29,30,32,31,32,34,33,34,36,35,15,18,16,18,22,20,22,26,24,26,30,28,30,34,32,34,1,36,14,18,15,18,26,22,26,34,30,34,2,1,13,18,14,18,34,26,34,3,2,12,18,13,34,4,3,11,18,12,34,5,4,10,18,11,34,6,5,9,18,10,34,7,6,8,18,9,34,8,7,8,34,18],width:34.62890625},8:{positions:[35.5078125,37.828125,35.5078125,37.828125,35.171749114990234,34.87995147705078,34.16355895996094,32.23108673095703,32.111854553222656,29.74087905883789,29.926387786865234,27.833354949951172,27.60715675354004,26.50851058959961,27.17578125,26.33203125,29.95149040222168,25.094419479370117,32.32651901245117,23.460092544555664,34.43555450439453,20.72713279724121,35.900413513183594,18.128986358642578,36.721099853515625,15.665656089782715,36.9140625,13.8515625,36.669769287109375,10.764041900634766,35.936893463134766,8.031349182128906,34.71543502807617,5.653482913970947,33.00539016723633,3.630444288253784,30.672534942626953,1.9876797199249268,28.159135818481445,.7305349111557007,25.465194702148438,-.14099019765853882,22.590709686279297,-.6268956065177917,20.28515625,-.73828125,17.073928833007812,-.5518752932548523,14.154998779296875,.007342617027461529,11.52836799621582,.9393724799156189,9.194035530090332,2.2442142963409424,7.087226867675781,4.249664306640625,5.474374294281006,6.483748912811279,4.355478763580322,8.946466445922852,3.730539560317993,11.637818336486816,3.5859375,13.8515625,3.9077277183532715,16.76708984375,4.873098373413086,19.430402755737305,6.983664512634277,21.999971389770508,9.1663179397583,24.03520965576172,11.421058654785156,25.536113739013672,13.21875,26.33203125,10.521642684936523,27.690086364746094,8.310940742492676,29.498327255249023,6.554880142211914,32.2148551940918,5.462681293487549,34.86786651611328,5.034343719482422,37.45735549926758,5.02734375,37.828125,5.274991512298584,40.936737060546875,6.0179338455200195,43.679622650146484,7.256171703338623,46.056785583496094,8.989704132080078,48.0682258605957,11.195730209350586,49.67716598510742,13.679861068725586,50.85453796386719,16.442096710205078,51.60033416748047,19.482437133789062,51.914554595947266,20.21484375,51.92578125,23.33972930908203,51.71018600463867,26.17371940612793,51.06340789794922,28.716812133789062,49.98543930053711,30.96900749206543,48.476287841796875,32.855812072753906,46.481101989746094,34.23870849609375,44.16929626464844,35.11769485473633,41.54087829589844,35.49277114868164,38.5958366394043,30.0234375,13.9921875,30.0234375,13.9921875,29.64218521118164,16.91078758239746,28.498428344726562,19.414352416992188,26.08045768737793,21.54735565185547,23.622779846191406,22.934738159179688,21.125396728515625,23.576496124267578,20.21484375,23.625,17.24955177307129,23.25731658935547,14.728343963623047,22.15427017211914,12.576437950134277,19.76153564453125,11.184748649597168,17.31914710998535,10.553275108337402,14.827102661132812,10.51171875,13.9921875,10.887092590332031,10.988458633422852,12.013215065002441,8.51321792602539,14.405669212341309,6.533318519592285,16.906885147094727,5.263905048370361,19.516860961914062,4.704977512359619,20.28515625,4.67578125,23.29867172241211,5.026233196258545,25.858081817626953,6.077588081359863,28.013742446899414,8.338984489440918,29.392438888549805,10.737264633178711,29.994173049926758,13.27242660522461,28.58203125,37.6875,28.58203125,37.6875,28.174694061279297,40.610374450683594,26.952680587768555,43.08668899536133,24.61227035522461,45.108375549316406,22.137697219848633,46.228328704833984,20.21484375,46.4765625,17.313322067260742,46.03565979003906,14.926724433898926,44.71294403076172,13.154691696166992,42.36640930175781,12.172061920166016,39.77567672729492,11.953125,37.6875,12.353304862976074,34.70274353027344,13.553845405578613,32.25563430786133,15.877814292907715,30.335918426513672,18.399682998657227,29.288454055786133,20.28515625,29.07421875,23.187891006469727,29.511512756347656,25.59459114074707,30.82339859008789,27.39614486694336,33.1435661315918,28.379940032958984,35.7212028503418],indices:[96,43,97,43,45,44,45,47,46,47,49,48,49,51,50,51,53,52,53,55,54,55,57,56,57,59,58,59,1,60,1,3,2,3,5,4,5,7,6,7,9,8,9,11,10,11,13,12,13,15,14,15,17,16,17,19,18,19,21,20,21,23,22,23,25,24,25,27,26,27,29,28,29,31,30,31,75,74,73,31,74,31,33,32,33,35,34,35,37,36,37,39,38,39,41,40,41,43,42,43,98,97,95,43,96,43,47,45,47,51,49,51,55,53,55,59,57,59,3,1,3,7,5,7,11,9,11,15,13,15,19,17,19,23,21,23,27,25,27,31,29,31,76,75,72,31,73,31,35,33,37,41,39,41,98,43,94,43,95,43,51,47,51,59,55,59,7,3,7,15,11,15,23,19,23,31,27,31,77,76,71,31,72,31,37,35,37,98,41,94,51,43,23,77,31,70,31,71,37,99,98,93,51,94,23,78,77,70,37,31,37,100,99,92,51,93,23,79,78,69,37,70,37,101,100,91,51,92,23,80,79,68,37,69,37,102,101,90,51,91,23,81,80,67,37,68,37,103,102,89,51,90,15,81,23,66,37,67,89,59,51,15,82,81,66,103,37,88,59,89,15,83,82,65,103,66,87,59,88,15,84,83,64,103,65,106,59,87,15,85,84,64,104,103,105,59,106,15,62,85,63,104,64,104,59,105,15,63,62,104,7,59,7,63,15,63,7,104],width:33.328125},9:{positions:[17.96484375,4.67578125,17.96484375,4.67578125,20.832611083984375,5.023819923400879,23.333181381225586,6.067935943603516,25.466554641723633,7.80812931060791,26.91764259338379,9.993691444396973,28.0020751953125,12.483912467956543,28.7198543548584,15.278792381286621,29.070980072021484,18.378332138061523,29.109375,19.8984375,29.109375,22.21875,27.17138671875,20.02587890625,24.802734375,18.439453125,22.097061157226562,17.482282638549805,19.10603904724121,17.156333923339844,19.0546875,17.15625,15.962648391723633,17.374753952026367,13.161947250366211,18.030263900756836,10.65258502960205,19.12278175354004,8.43455982208252,20.652305603027344,6.556478023529053,22.870075225830078,5.067807197570801,25.25521469116211,3.968548536300659,27.80772590637207,3.2587015628814697,30.527606964111328,2.9382660388946533,33.414859771728516,2.91796875,34.3828125,3.1171858310699463,37.45964050292969,3.7148373126983643,40.29710006713867,4.710922718048096,42.89520263671875,6.105442523956299,45.253936767578125,8.45276927947998,47.5704231262207,10.840720176696777,49.39479446411133,13.269293785095215,50.72705078125,15.738492012023926,51.56719207763672,18.248313903808594,51.915218353271484,18.7734375,51.92578125,21.87710189819336,51.72084045410156,24.703197479248047,51.10601806640625,27.25172233581543,50.0813102722168,29.52267837524414,48.646724700927734,31.40683364868164,46.456634521484375,32.97002410888672,44.11880111694336,34.212249755859375,41.63322067260742,35.133514404296875,38.99989700317383,35.73381423950195,36.21882629394531,36.01314926147461,33.29001235961914,36.03515625,32.16796875,36.03515625,19.96875,35.885276794433594,16.642547607421875,35.435638427734375,13.59611988067627,34.686241149902344,10.8294677734375,33.6370849609375,8.34259033203125,32.28816604614258,6.135488033294678,30.066654205322266,3.964623212814331,27.738887786865234,2.2044835090637207,25.30486488342285,.8550683259963989,22.764589309692383,-.08362190425395966,20.118059158325195,-.6115872859954834,17.96484375,-.73828125,15.23583984375,-.61083984375,12.462890625,-.228515625,9.81298828125,.41748046875,7.453125,1.3359375,7.453125,1.3359375,8.5078125,6.64453125,10.62158203125,5.71728515625,12.814453125,5.115234375,15.21826171875,4.78564453125,17.96484375,4.67578125,19.0546875,22.5703125,19.0546875,22.5703125,22.15691566467285,22.88543701171875,24.769695281982422,23.830808639526367,27.256725311279297,25.793380737304688,28.883312225341797,27.970977783203125,29.109375,28.44140625,29.109375,32.87109375,28.917926788330078,36.28435516357422,28.34358024597168,39.213134765625,27.386337280273438,41.657432556152344,25.37175941467285,43.94849395751953,23.127288818359375,45.50687026977539,20.652921676635742,46.33256530761719,18.984375,46.4765625,16.33090591430664,46.012935638427734,13.984920501708984,44.62206268310547,12.139910697937012,42.07911682128906,10.835031509399414,39.48687744140625,10.070281982421875,36.84534454345703,9.84375,34.3828125,10.09748363494873,31.21339988708496,10.858684539794922,28.454280853271484,12.127352714538574,26.105453491210938,14.162574768066406,24.085222244262695,16.57485580444336,22.90838050842285],indices:[60,63,61,63,65,64,10,12,11,12,14,13,14,16,15,16,18,17,18,20,19,20,22,21,22,24,23,24,89,25,88,25,89,25,27,26,27,29,28,29,31,30,31,33,32,33,35,34,35,37,36,37,39,38,39,41,40,41,43,42,43,45,44,45,47,46,47,49,48,49,51,50,51,53,52,53,55,54,55,57,56,57,59,58,59,63,60,63,66,65,10,14,12,14,18,16,18,22,20,22,89,24,87,25,88,25,29,27,29,33,31,33,37,35,37,41,39,41,45,43,45,49,47,49,53,51,53,57,55,57,63,59,63,67,66,10,18,14,18,89,22,86,25,87,25,33,29,33,41,37,41,49,45,49,57,53,57,67,63,18,90,89,85,25,86,57,1,67,18,91,90,85,33,25,57,2,1,18,92,91,84,33,85,57,3,2,18,93,92,83,33,84,49,3,57,18,94,93,82,33,83,49,4,3,18,70,94,81,33,82,49,5,4,10,70,18,80,33,81,49,6,5,10,71,70,80,41,33,49,7,6,10,72,71,79,41,80,41,7,49,10,73,72,78,41,79,41,8,7,10,74,73,77,41,78,41,9,8,10,75,74,76,41,77,41,10,9,75,41,76,41,75,10],width:33.1171875},".":{positions:[12.5859375,7.1015625,12.5859375,0,5.66015625,0,5.66015625,7.1015625],indices:[3,1,0,1,3,2],width:6.92578125},m:{positions:[5.02734375,38.0390625,11.21484375,38.0390625,11.70703125,33.046875,13.634581565856934,35.28191375732422,15.986680030822754,37.00302505493164,18.700471878051758,38.111698150634766,21.567134857177734,38.6696662902832,23.09765625,38.7421875,26.139192581176758,38.42292022705078,28.791221618652344,37.465118408203125,31.15591812133789,35.599586486816406,32.90284729003906,33.37240219116211,33.71484375,31.7109375,35.408084869384766,34.171592712402344,37.503177642822266,36.16951370239258,40.22900390625,37.6488037109375,42.961280822753906,38.50468063354492,45.3515625,38.7421875,48.32835006713867,38.446842193603516,50.9460334777832,37.5608024597168,53.204620361328125,36.084068298339844,54.8843879699707,33.86517333984375,56.19401931762695,31.434070587158203,57.133506774902344,28.79076385498047,57.70286178588867,25.93524932861328,57.90207290649414,22.867528915405273,57.90234375,22.74609375,57.90234375,0,50.9765625,0,50.9765625,22.81640625,50.74445724487305,26.319555282592773,50.04814529418945,29.033550262451172,47.956382751464844,31.33014678955078,45.659942626953125,32.691036224365234,43.27734375,33.1171875,40.4267463684082,32.6451530456543,38.09538650512695,31.229045867919922,36.33670425415039,28.815231323242188,35.26606750488281,26.190664291381836,34.9453125,24.43359375,34.9453125,24.15234375,34.9453125,0,27.984375,0,27.984375,22.81640625,27.73810386657715,26.2243709564209,26.99928855895996,28.921852111816406,24.89556121826172,31.278352737426758,22.623031616210938,32.67652893066406,20.28515625,33.1171875,17.40234375,32.7919921875,15.08203125,31.81640625,13.2802734375,30.251953125,11.953125,28.16015625,11.953125,28.16015625,11.953125,0,5.02734375,0],indices:[55,1,0,2,4,3,4,6,5,6,8,7,8,10,9,10,12,11,12,14,13,14,16,15,16,18,17,18,20,19,20,22,21,22,24,23,24,26,25,26,28,27,40,42,41,54,1,55,2,6,4,6,10,8,12,16,14,16,20,18,20,24,22,24,28,26,39,42,40,54,2,1,2,10,6,12,20,16,20,28,24,38,42,39,20,29,28,38,43,42,20,30,29,37,43,38,20,31,30,36,43,37,20,32,31,36,44,43,20,33,32,35,44,36,20,34,33,35,45,44,12,34,20,12,35,34,12,45,35,10,45,12,10,46,45,10,47,46,10,48,47,2,48,10,2,49,48,2,50,49,2,51,50,2,53,51,53,2,54],width:52.875},c:{positions:[20.49609375,4.67578125,20.49609375,4.67578125,23.36757469177246,5.087423801422119,25.919267654418945,6.322350978851318,28.055252075195312,8.557517051696777,29.08038330078125,10.95840835571289,29.1796875,12.0234375,35.40234375,12.0234375,35.47265625,11.8125,35.209197998046875,9.178794860839844,34.224666595458984,6.713964939117432,32.519065856933594,4.418010711669922,29.943574905395508,2.4374680519104004,27.361528396606445,.9345490336418152,24.772926330566406,-.0907462015748024,22.177766799926758,-.6384177803993225,20.49609375,-.73828125,17.386640548706055,-.5293084979057312,14.578433990478516,.09760986268520355,12.071474075317383,1.142473816871643,9.86575984954834,2.605283260345459,7.9612932205200195,4.4860382080078125,6.3618083000183105,6.765913009643555,5.107275009155273,9.241913795471191,4.197693824768066,11.914040565490723,3.633063793182373,14.782294273376465,3.4133858680725098,17.8466739654541,3.41015625,18.28125,3.41015625,19.7578125,3.5838754177093506,22.87480926513672,4.105032920837402,25.780019760131836,4.973628997802734,28.473445892333984,6.189663410186768,30.95508575439453,7.753136157989502,33.22494125366211,9.646564483642578,35.16857147216797,11.828062057495117,36.69178771972656,14.297628402709961,37.79460144042969,17.05526351928711,38.47700500488281,20.100967407226562,38.73899841308594,20.49609375,38.7421875,23.570213317871094,38.5140495300293,26.36119842529297,37.82963943481445,28.869049072265625,36.6889533996582,31.093765258789062,35.09199523925781,33.085479736328125,32.87481689453125,34.484825134277344,30.467679977416992,35.29180145263672,27.87058448791504,35.5078125,25.13671875,35.4375,24.92578125,29.1796875,24.92578125,28.72093391418457,27.737882614135742,27.34467315673828,30.163320541381836,24.98297119140625,32.04195022583008,22.43872833251953,33.074039459228516,20.49609375,33.29296875,17.510202407836914,32.94111633300781,15.082853317260742,31.88556480407715,13.214049339294434,30.12630844116211,11.89155101776123,27.541250228881836,10.979540824890137,24.808610916137695,10.478017807006836,21.928388595581055,10.37109375,19.7578125,10.37109375,18.28125,10.565627098083496,15.065240859985352,11.149227142333984,12.176401138305664,12.121894836425781,9.614731788635254,13.855029106140137,7.324370861053467,15.960027694702148,5.741883754730225,18.4368896484375,4.867271423339844],indices:[5,7,6,7,9,8,9,11,10,11,13,12,13,15,14,15,17,16,17,19,18,19,21,20,21,23,22,23,25,24,25,27,26,27,29,28,29,31,30,31,33,32,33,35,34,35,37,36,37,39,38,39,41,40,41,43,42,43,45,44,45,47,46,47,49,48,4,7,5,7,11,9,11,15,13,15,19,17,19,23,21,23,27,25,27,31,29,31,35,33,35,39,37,39,43,41,43,47,45,47,50,49,3,7,4,7,15,11,15,23,19,23,31,27,31,39,35,39,47,43,47,51,50,3,15,7,39,51,47,2,15,3,39,52,51,39,53,52,39,54,53,39,55,54,31,55,39,31,56,55,31,57,56,31,58,57,23,58,31,23,59,58,23,60,59,23,61,60,23,62,61,23,63,62,23,64,63,23,65,64,23,66,65,15,66,23,15,67,66,15,68,67,15,1,68,1,15,2],width:32.09765625},k:{positions:[28.828125,0,16.48828125,17.54296875,11.98828125,17.54296875,11.98828125,0,5.0625,0,5.0625,54.84375,11.98828125,54.84375,11.98828125,23.0625,16.41796875,23.0625,26.82421875,38.0390625,35.12109375,38.0390625,22.11328125,20.7421875,36.984375,0],indices:[12,1,0,2,4,3,4,6,5,8,10,9,11,1,12,4,7,6,8,11,10,11,2,1,2,7,4,7,11,8,11,7,2],width:31.921875},t:{positions:[0,0,30,0],indices:[0,2,1],width:30}," ":{width:16,positions:[],indices:[]}};function CCt({text:i,size:e=1,zOffset:t=0}){const n=[],o=[];let r=0,s=0;const a=10;e/=100;for(const l of i){const c=wCt[l];if(!c)throw new Error("Unknown character: "+l);const u=s;for(let h=0;h<c.positions.length;h+=2)n.push(c.positions[h]*e+u,c.positions[h+1]*e,t);const d=r===0?0:r+1;for(const h of c.indices)o.push(h+d),r=Math.max(r,h+d);s+=(c.width+a)*e}return{positions:n,indices:o,primitive:"triangles"}}function Pie(i,{content:e,size:t,matrix:n,offset:o=0}){const{material:r,origin:s,plugin:a}=i,{textSizeRatio:l,textBottomMarginRatio:c,xeokitSdk:u,viewer:d}=a,{Mesh:h,VBOGeometry:p,math:A}=u,{scene:f}=d,{primitive:g,positions:m,indices:v}=CCt({text:e,size:t*l,zOffset:o});let y=m[0],w=m[0];for(let R=0;R<m.length;R+=3){const T=m[R];T<y&&(y=T),T>w&&(w=T)}const M=-(w-y)/2,B=A.mat4(),S=A.translationMat4v([M,t*c,0]);A.mulMat4(n,A.rotationMat4v(Math.PI,[0,1,0],A.mat4()),B),A.mulMat4(n,S),A.mulMat4(B,S);const I=new p(f,{primitive:g,positions:m,indices:v});return[new h(f,{geometry:I,material:r,pickable:!1,origin:s,matrix:n}),new h(f,{geometry:I,material:r,pickable:!1,origin:s,matrix:B})]}class bCt{constructor(e,t,n){this.plugin=e;const{viewer:o}=e;this.line=null,this.texts=null,this.length=0;const{math:r,worldToRTCPos:s,Node:a,PhongMaterial:l}=e.xeokitSdk,c=r.vec3(),u=r.vec3();s(t,u,c),this.material=new l(o.scene,{emissive:n1(e.defaultColor)}),this.node=new a(o.scene,{pickable:!1,origin:u,children:[]}),this.origin=u,this.p1=c,this.normal=n}move(e,t){const{arrowSizeRatio:n,offsetRatio:o,xeokitSdk:r,viewer:s}=this.plugin,{math:a,Mesh:l,VBOGeometry:c}=r,{scene:u}=s,d=this.p1;this.p2=a.subVec3(e,this.origin),this.node.removeChildren(),this.line?.destroy();const h=a.subVec3(e,d,a.vec3());if(h.every(me=>me===0))return;const p=a.normalizeVec3(h,a.vec3()),A=a.mulVec3Scalar(p,-1,a.vec3()),f=a.lenVec3(h);this.length=f;const g=o*f;let m=0;const v=a.mulVec3Scalar(h,.5,a.vec3()),y=a.addVec3(d,v,a.vec3());let w=a.normalizeVec3(a.cross3Vec3(t,a.normalizeVec3(h,a.vec3()),a.vec3()));const x=a.dotVec3(t,this.normal)>.999,M=a.vec3([0,1,0]),B=a.dotVec3(p,M);if(x){const me=Math.abs(B)<.01;m=g;let _e=null;if(me){const{look:De,up:ve,eye:ge}=u.camera,Ie=a.normalizeVec3(a.subVec3(De,ge,a.vec3())),Ne=a.cross3Vec3(Ie,ve);_e=a.dotVec3(p,Ne)}else{const De=a.cross3Vec3(M,t,a.vec3());_e=a.dotVec3(p,De)}_e<0&&(w=a.negateVec3(w),m=-m)}else if(Math.abs(B)>.99){const{look:_e,eye:De}=u.camera,ve=a.normalizeVec3(a.subVec3(_e,De,a.vec3()));w=a.normalizeVec3(a.cross3Vec3(p,ve,a.vec3())),t=a.normalizeVec3(a.cross3Vec3(w,p,a.vec3()))}else t=a.normalizeVec3(a.cross3Vec3(M,p,a.vec3())),w=a.normalizeVec3(a.cross3Vec3(p,t,a.vec3())),a.dotVec3(w,M)<0&&(w=a.negateVec3(w));const S=a.negateVec3(w,a.vec3()),I=a.mulVec3Scalar(w,f*n,a.vec3()),R=a.mulVec3Scalar(S,f*n,a.vec3()),T=a.addVec3(d,I,a.vec3()),_=a.addVec3(d,R,a.vec3()),F=a.addVec3(e,I,a.vec3()),N=a.addVec3(e,R,a.vec3()),z=a.mulVec3Scalar(a.normalizeVec3(a.addVec3(w,p,a.vec3())),f*n*Math.SQRT2),j=a.addVec3(d,z,a.vec3()),W=a.mulVec3Scalar(a.normalizeVec3(a.addVec3(S,p,a.vec3())),f*n*Math.SQRT2),J=a.addVec3(d,W,a.vec3()),$=a.mulVec3Scalar(a.normalizeVec3(a.addVec3(w,A,a.vec3())),f*n*Math.SQRT2),ue=a.addVec3(e,$,a.vec3()),Ee=a.mulVec3Scalar(a.normalizeVec3(a.addVec3(S,A,a.vec3())),f*n*Math.SQRT2),Be=a.addVec3(e,Ee,a.vec3()),ze=a.translationMat4v(a.mulVec3Scalar(t,g,a.vec3()));this.line=new l(s.scene,{geometry:new c(s.scene,{primitive:"lines",positions:[...d,...e,...T,..._,...F,...N,...j,...J,...ue,...Be],indices:[0,1,0,2,0,3,0,6,0,7,1,4,1,5,1,8,1,9]}),material:this.material,matrix:ze,pickable:!1,origin:this.origin}),this.node.addChild(this.line),this.texts?.forEach(me=>me.destroy());const Qe=a.mat4([...p,0,...w,0,...t,0,...y,1]);this.texts=this._makeTexts(f.toFixed(2)+" m",f,Qe,m),this.texts.forEach(me=>this.node.addChild(me))}_makeTexts(e,t,n,o=0){return Pie(this,{content:e,size:t,matrix:n,offset:o})}destroy(){this.node.destroy(),this.line?.destroy(),this.texts?.forEach(e=>e.destroy()),this.plugin.measurements=this.plugin.measurements.filter(e=>e!==this)}get visible(){return this.node.visible}set visible(e){this.node.visible=e}get color(){return Bie(this.material.emissive)}set color(e=this.plugin.defaultColor){this.material.emissive=n1(e)}}class Tie{constructor(e,t,n={}){this.viewer=e,this.xeokitSdk=t,this.arrowSizeRatio=n.arrowSizeRatio??.04,this.textSizeRatio=n.textSizeRatio??.1,this.textBottomMarginRatio=n.textBottomMarginRatio??.02,this.offsetRatio=n.offsetRatio??.003,this.snapPickRadius=n.snapPickRadius??15,this.defaultColor=n.defaultColor??"#ffffff";const o=document.createElement("img"),r=e.scene.canvas.canvas;r.parentNode.insertBefore(o,r),o.style.width="28px",o.style.height="28px",o.style.position="absolute",o.style.pointerEvents="none",o.style.transform="translate(-50%, -50%)",o.style.display="none",this.imgElement=o,this.measurements=[],this.measurementEndCallbackId=0,this.measurementEndCallbacks={},this.control=new xCt(this)}on(e,t){if(e==="measurementEnd")return this.measurementEndCallbacks[this.measurementEndCallbackId++]=t,this.measurementEndCallbackId}off(e){this.measurementEndCallbacks[e]=null}}class xCt{constructor(e){this.plugin=e,this.currentMeasurement=null,this.lastPosition=null,this.mouseDown=!1,this.dragging=!1,this.activated=!1}_updateCursor(e){const{imgElement:t,viewer:n}=this.plugin,{scene:o}=n;o.canvas.canvas.style.cursor=`url("${vCt}") 16 16, auto`;const r=o.pick({canvasPos:e,snapRadius:this.plugin.snapPickRadius,snapToEdge:!0,snapToVertex:!0});if(r?.snappedWorldPos||r?.worldPos){if(r.snappedCanvasPos)t.style.left=`${r.snappedCanvasPos[0]}px`,t.style.top=`${r.snappedCanvasPos[1]}px`,t.src=r.snapType==="vertex"?mCt:ACt;else{const s=r.canvasPos;t.style.left=`${s[0]}px`,t.style.top=`${s[1]}px`,t.src=gCt}this.lastPosition=r.snappedWorldPos??r.worldPos,this.lastPosition.worldNormal=r.snappedWorldNormal??r.worldNormal}else t.style.left=`${e[0]}px`,t.style.top=`${e[1]}px`,t.src=yCt,this.lastPosition=null}_onMouseMove(e){this.mouseDown&&(this.dragging=!0),e.preventDefault(),this._updateCursor([e.offsetX,e.offsetY]),this.lastPosition&&this.currentMeasurement?.move(this.lastPosition,this.lastPosition.worldNormal)}_onMouseDown(){this.mouseDown=!0}_onMouseUp(){this.mouseDown=!1;const e=this.dragging;this.dragging=!1,!e&&this.lastPosition&&(this.currentMeasurement?(this.plugin.measurements.push(this.currentMeasurement),Object.values(this.plugin.measurementEndCallbacks).forEach(t=>t?.(this.currentMeasurement)),this.currentMeasurement=null):this.currentMeasurement=new bCt(this.plugin,this.lastPosition,this.lastPosition.worldNormal))}activate(){if(this.activated)return;const{canvas:e}=this.plugin.viewer.scene.canvas;this.plugin.imgElement.style.display="block";const t=this._onMouseMove.bind(this),n=this._onMouseDown.bind(this),o=this._onMouseUp.bind(this);e.addEventListener("mousemove",t),e.addEventListener("mousedown",n),document.addEventListener("mouseup",o),this._unsubscribe=()=>{e.removeEventListener("mousemove",t),e.removeEventListener("mousedown",n),document.removeEventListener("mouseup",o)},this.activated=!0}deactivate(){this.activated&&(this._unsubscribe?.(),this.currentMeasurement?.destroy(),this.currentMeasurement=null,this.lastPosition=null,this.plugin.imgElement.style.display="none",this.activated=!1)}}class MCt{constructor(e,t){this.plugin=e;const{xeokitSdk:n,viewer:o}=e,{Mesh:r,ReadableGeometry:s,buildSphereGeometry:a,PhongMaterial:l,Node:c,math:u,worldToRTCPos:d}=n,h=u.vec3(),p=u.vec3();this._length=0;const{entity:A,worldPos:f}=t;d(f,p,h);const g=new l(o.scene,{emissive:n1(e.defaultColor),diffuse:[0,0,0]}),m=(M=!0)=>new r(o.scene,{geometry:new s(o.scene,a({radius:.03})),material:g,pickable:!1,visible:M,origin:p}),v=m(),y=m(!1),w=new r(o.scene,{geometry:new s(o.scene,{primitive:"lines",positions:[0,0,0,0,0,0],indices:[0,1]}),material:g,pickable:!1,visible:!1,origin:p}),x=new c(o.scene,{pickable:!1,visible:!0,position:h,origin:p,children:[v,w,y]});this.origin=p,this.modelId=A.model.id,this.node=x,this.toSphere=y,this.fromSphere=v,this.line=w,this.material=g}show(e){const{node:t,fromSphere:n,toSphere:o,line:r,texts:s,plugin:a}=this,{math:l}=a.xeokitSdk;t.position=l.subVec3(e.worldPos,t.origin,l.vec3()),t.visible=!0;const{viewer:c}=a,u=c.scene.pick({pickSurface:!0,origin:e.worldPos,direction:e.worldNormal});if(s&&(s.forEach(d=>d.destroy()),this.texts=null),u){o.visible=!0,r.visible=!0,o.position=l.subVec3(u.worldPos,o.origin,l.vec3()),o.position=l.subVec3(o.position,t.position,l.vec3()),r.position=l.vec3().set(t.position),r.geometry.positions=[0,0,0,...o.position];const d=l.lenVec3(o.position);this._length=d;const h=n.position,p=o.position,A=l.subVec3(p,h,l.vec3()),f=l.normalizeVec3(A,l.vec3()),g=l.mulVec3Scalar(A,.5,l.vec3()),m=l.addVec3(h,g,l.vec3()),v=[0,1,0],y=l.dotVec3(f,v),w=Math.abs(y)>.9;let x;if(w){const M=l.normalizeVec3(l.subVec3(c.scene.camera.eye,c.scene.camera.look,l.vec3()),l.vec3()),B=l.normalizeVec3(l.cross3Vec3(M,f,l.vec3()),l.vec3()),S=l.normalizeVec3(l.cross3Vec3(B,f,l.vec3()),l.vec3());x=l.mat4([...f,0,...B,0,...S,0,...m,1])}else{const M=l.normalizeVec3(l.cross3Vec3(v,f,l.vec3()),l.vec3()),B=l.normalizeVec3(l.cross3Vec3(f,M,l.vec3()),l.vec3());x=l.mat4([...f,0,...B,0,...M,0,...m,1])}this.texts=this._makeTexts(d.toFixed(2)+" m",d,x),this.texts.forEach(M=>t.addChild(M))}else o.visible=!1,r.visible=!1,this._length=0}hide(){this.node.visible=!1}destroy(){this.node.destroy(),this.line.destroy(),this.fromSphere.destroy(),this.toSphere.destroy(),this.texts?.forEach(e=>e.destroy())}set length(e){this._length=e}get length(){return this.visible?this._length:0}get visible(){return this.node.visible===!0}set visible(e){this.node.visible=!!e}get color(){return Bie(this.material.emissive)}set color(e=this.plugin.defaultColor){this.material.emissive=n1(e)}_makeTexts(e,t,n){return Pie(this,{content:e,size:t,matrix:n})}}class kie{constructor(e,t,n={}){this.viewer=e,this.xeokitSdk=t,this.textSizeRatio=n.textSizeRatio??.1,this.textBottomMarginRatio=n.textBottomMarginRatio??.01,this.defaultColor=n.defaultColor??"#ffffff",this.measurements=[],this.measurementEndCallbackId=0,this.measurementEndCallbacks={},this.control=new ECt(this)}on(e,t){if(e==="measurementEnd")return this.measurementEndCallbacks[this.measurementEndCallbackId++]=t,this.measurementEndCallbackId}off(e){this.measurementEndCallbacks[e]=null}}class ECt{constructor(e){this.plugin=e,this.currentMeasure=null,this.pickedSpaceMeasureSubscription=null,this.hitHelperMouseMoveSubscription=null}activate(){const{plugin:e}=this,{viewer:t}=e;this.pickedSpaceMeasureSubscription=t.scene.input.on("mouseclicked",()=>{if(!this.currentMeasure?.length)return;const n=this.currentMeasure;this.currentMeasure=null,Object.values(this.plugin.measurementEndCallbacks).forEach(o=>o(n))}),this.hitHelperMouseMoveSubscription=t.scene.input.on("mousemove",n=>{const o=t.scene.pick({canvasPos:n,pickSurface:!0});o?.entity?.model&&(o?((!this.currentMeasure||this.currentMeasure.modelId!==o.entity.model.id)&&(this.currentMeasure?.destroy(),this.currentMeasure=new MCt(this.plugin,o)),this.currentMeasure.show(o)):this.currentMeasure?.hide())})}deactivate(){const{viewer:e}=this.plugin;this.currentMeasure?.destroy(),this.currentMeasure=null,e.scene.input.off(this.pickedSpaceMeasureSubscription),e.scene.input.off(this.hitHelperMouseMoveSubscription)}}const BCt=`onmessage = async event => {
|
|
1388
|
+
}`}function Lee(i,e=!0,t){const n=t||new Set;if(i){if(Fee(i))n.add(i);else if(Fee(i.buffer))n.add(i.buffer);else if(!ArrayBuffer.isView(i)){if(e&&typeof i=="object")for(const o in i)Lee(i[o],e,n)}}return t===void 0?Array.from(n):[]}function Fee(i){return i?i instanceof ArrayBuffer||typeof MessagePort<"u"&&i instanceof MessagePort||typeof ImageBitmap<"u"&&i instanceof ImageBitmap||typeof OffscreenCanvas<"u"&&i instanceof OffscreenCanvas:!1}const uT=()=>{};class dT{name;source;url;terminated=!1;worker;onMessage;onError;_loadableURL="";static isSupported(){return typeof Worker<"u"&&Jr||typeof lT<"u"&&!Jr}constructor(e){const{name:t,source:n,url:o}=e;wc(n||o),this.name=t,this.source=n,this.url=o,this.onMessage=uT,this.onError=r=>console.log(r),this.worker=Jr?this._createBrowserWorker():this._createNodeWorker()}destroy(){this.onMessage=uT,this.onError=uT,this.worker.terminate(),this.terminated=!0}get isRunning(){return!!this.onMessage}postMessage(e,t){t=t||Lee(e),this.worker.postMessage(e,t)}_getErrorFromErrorEvent(e){let t="Failed to load ";return t+=`worker ${this.name} from ${this.url}. `,e.message&&(t+=`${e.message} in `),e.lineno&&(t+=`:${e.lineno}:${e.colno}`),new Error(t)}_createBrowserWorker(){this._loadableURL=T4t({source:this.source,url:this.url});const e=new Worker(this._loadableURL,{name:this.name});return e.onmessage=t=>{t.data?this.onMessage(t.data):this.onError(new Error("No data received"))},e.onerror=t=>{this.onError(this._getErrorFromErrorEvent(t)),this.terminated=!0},e.onmessageerror=t=>console.error(t),e}_createNodeWorker(){let e;if(this.url){const n=this.url.includes(":/")||this.url.startsWith("/")?this.url:`./${this.url}`;e=new lT(n,{eval:!1})}else if(this.source)e=new lT(this.source,{eval:!0});else throw new Error("no worker");return e.on("message",t=>{this.onMessage(t)}),e.on("error",t=>{this.onError(t)}),e.on("exit",t=>{}),e}}class _4t{name="unnamed";source;url;maxConcurrency=1;maxMobileConcurrency=1;onDebug=()=>{};reuseWorkers=!0;props={};jobQueue=[];idleQueue=[];count=0;isDestroyed=!1;static isSupported(){return dT.isSupported()}constructor(e){this.source=e.source,this.url=e.url,this.setProps(e)}destroy(){this.idleQueue.forEach(e=>e.destroy()),this.isDestroyed=!0}setProps(e){this.props={...this.props,...e},e.name!==void 0&&(this.name=e.name),e.maxConcurrency!==void 0&&(this.maxConcurrency=e.maxConcurrency),e.maxMobileConcurrency!==void 0&&(this.maxMobileConcurrency=e.maxMobileConcurrency),e.reuseWorkers!==void 0&&(this.reuseWorkers=e.reuseWorkers),e.onDebug!==void 0&&(this.onDebug=e.onDebug)}async startJob(e,t=(o,r,s)=>o.done(s),n=(o,r)=>o.error(r)){const o=new Promise(r=>(this.jobQueue.push({name:e,onMessage:t,onError:n,onStart:r}),this));return this._startQueuedJob(),await o}async _startQueuedJob(){if(!this.jobQueue.length)return;const e=this._getAvailableWorker();if(!e)return;const t=this.jobQueue.shift();if(t){this.onDebug({message:"Starting job",name:t.name,workerThread:e,backlog:this.jobQueue.length});const n=new P4t(t.name,e);e.onMessage=o=>t.onMessage(n,o.type,o.payload),e.onError=o=>t.onError(n,o),t.onStart(n);try{await n.result}catch(o){console.error(`Worker exception: ${o}`)}finally{this.returnWorkerToQueue(e)}}}returnWorkerToQueue(e){!Jr||this.isDestroyed||!this.reuseWorkers||this.count>this._getMaxConcurrency()?(e.destroy(),this.count--):this.idleQueue.push(e),this.isDestroyed||this._startQueuedJob()}_getAvailableWorker(){if(this.idleQueue.length>0)return this.idleQueue.shift()||null;if(this.count<this._getMaxConcurrency()){this.count++;const e=`${this.name.toLowerCase()} (#${this.count} of ${this.maxConcurrency})`;return new dT({name:e,source:this.source,url:this.url})}return null}_getMaxConcurrency(){return S4t?this.maxMobileConcurrency:this.maxConcurrency}}const D4t={maxConcurrency:3,maxMobileConcurrency:1,reuseWorkers:!0,onDebug:()=>{}};class Hu{props;workerPools=new Map;static _workerFarm;static isSupported(){return dT.isSupported()}static getWorkerFarm(e={}){return Hu._workerFarm=Hu._workerFarm||new Hu({}),Hu._workerFarm.setProps(e),Hu._workerFarm}constructor(e){this.props={...D4t},this.setProps(e),this.workerPools=new Map}destroy(){for(const e of this.workerPools.values())e.destroy();this.workerPools=new Map}setProps(e){this.props={...this.props,...e};for(const t of this.workerPools.values())t.setProps(this._getWorkerPoolProps())}getWorkerPool(e){const{name:t,source:n,url:o}=e;let r=this.workerPools.get(t);return r||(r=new _4t({name:t,source:n,url:o}),r.setProps(this._getWorkerPoolProps()),this.workerPools.set(t,r)),r}_getWorkerPoolProps(){return{maxConcurrency:this.props.maxConcurrency,maxMobileConcurrency:this.props.maxMobileConcurrency,reuseWorkers:this.props.reuseWorkers,onDebug:this.props.onDebug}}}function L4t(i,e={}){const t=e[i.id]||{},n=Jr?`${i.id}-worker.js`:`${i.id}-worker-node.js`;let o=t.workerUrl;if(!o&&i.id==="compression"&&(o=e.workerUrl),e._workerType==="test"&&(Jr?o=`modules/${i.module}/dist/${n}`:o=`modules/${i.module}/src/workers/${i.id}-worker-node.ts`),!o){let r=i.version;r==="latest"&&(r=B4t);const s=r?`@${r}`:"";o=`https://unpkg.com/@loaders.gl/${i.module}${s}/dist/${n}`}return wc(o),o}function F4t(i,e=Ree){wc(i,"no worker provided");const t=i.version;return!(!e||!t)}const hT={};async function Mh(i,e=null,t={},n=null){return e&&(i=O4t(i,e,t,n)),hT[i]=hT[i]||N4t(i),await hT[i]}function O4t(i,e,t={},n=null){if(!t.useLocalLibraries&&i.startsWith("http"))return i;n=n||i;const o=t.modules||{};return o[n]?o[n]:Jr?t.CDN?(wc(t.CDN.startsWith("http")),`${t.CDN}/${e}@${Ree}/dist/libs/${n}`):aT?`../src/libs/${n}`:`modules/${e}/src/libs/${n}`:`modules/${e}/dist/libs/${n}`}async function N4t(i){if(i.endsWith("wasm"))return await V4t(i);if(!Jr)try{const{requireFromFile:t}=globalThis.loaders||{};return await t?.(i)}catch(t){return console.error(t),null}if(aT)return importScripts(i);const e=await H4t(i);return U4t(e,i)}function U4t(i,e){if(!Jr){const{requireFromString:n}=globalThis.loaders||{};return n?.(i,e)}if(aT)return eval.call(globalThis,i),null;const t=document.createElement("script");t.id=e;try{t.appendChild(document.createTextNode(i))}catch{t.text=i}return document.body.appendChild(t),null}async function V4t(i){const{readFileAsArrayBuffer:e}=globalThis.loaders||{};return Jr||!e||i.startsWith("http")?await(await fetch(i)).arrayBuffer():await e(i)}async function H4t(i){const{readFileAsText:e}=globalThis.loaders||{};return Jr||!e||i.startsWith("http")?await(await fetch(i)).text():await e(i)}function z4t(i,e){return!Hu.isSupported()||!Jr&&!e?._nodeWorkers?!1:i.worker&&e?.worker}async function j4t(i,e,t,n,o){const r=i.id,s=L4t(i,t),l=Hu.getWorkerFarm(t).getWorkerPool({name:r,url:s});t=JSON.parse(JSON.stringify(t)),n=JSON.parse(JSON.stringify(n||{}));const c=await l.startJob("process-on-worker",G4t.bind(null,o));return c.postMessage("process",{input:e,options:t,context:n}),await(await c.result).result}async function G4t(i,e,t,n){switch(t){case"done":e.done(n);break;case"error":e.error(new Error(n.error));break;case"process":const{id:o,input:r,options:s}=n;try{const a=await i(r,s);e.postMessage("done",{id:o,result:a})}catch(a){const l=a instanceof Error?a.message:"unknown error";e.postMessage("error",{id:o,error:l})}break;default:console.warn(`parse-with-worker unknown message ${t}`)}}function Q4t(i,e=5){return typeof i=="string"?i.slice(0,e):ArrayBuffer.isView(i)?Oee(i.buffer,i.byteOffset,e):i instanceof ArrayBuffer?Oee(i,0,e):""}function Oee(i,e,t){if(i.byteLength<=e+t)return"";const n=new DataView(i);let o="";for(let r=0;r<t;r++)o+=String.fromCharCode(n.getUint8(e+r));return o}function q4t(i){try{return JSON.parse(i)}catch{throw new Error(`Failed to parse JSON from data starting with "${Q4t(i)}"`)}}function K4t(i,e,t){if(t=t||i.byteLength,i.byteLength<t||e.byteLength<t)return!1;const n=new Uint8Array(i),o=new Uint8Array(e);for(let r=0;r<n.length;++r)if(n[r]!==o[r])return!1;return!0}function J4t(...i){return W4t(i)}function W4t(i){const e=i.map(r=>r instanceof ArrayBuffer?new Uint8Array(r):r),t=e.reduce((r,s)=>r+s.byteLength,0),n=new Uint8Array(t);let o=0;for(const r of e)n.set(r,o),o+=r.byteLength;return n.buffer}function Nee(i,e,t){const n=t!==void 0?new Uint8Array(i).subarray(e,e+t):new Uint8Array(i).subarray(e);return new Uint8Array(n).buffer}function V4(i,e){return vc(i>=0),vc(e>0),i+(e-1)&-4}function Z4t(i,e,t){let n;if(i instanceof ArrayBuffer)n=new Uint8Array(i);else{const o=i.byteOffset,r=i.byteLength;n=new Uint8Array(i.buffer||i.arrayBuffer,o,r)}return e.set(n,t),t+V4(n.byteLength,4)}async function Y4t(i){const e=[];for await(const t of i)e.push(t);return J4t(...e)}let X4t="";const Uee={};function $4t(i){for(const e in Uee)if(i.startsWith(e)){const t=Uee[e];i=i.replace(e,t)}return!i.startsWith("http://")&&!i.startsWith("https://")&&(i=`${X4t}${i}`),i}function h5i(i){return i}function e5t(i){return i&&typeof i=="object"&&i.isBuffer}function Vee(i){if(e5t(i))return i;if(i instanceof ArrayBuffer)return i;if(ArrayBuffer.isView(i))return i.byteOffset===0&&i.byteLength===i.buffer.byteLength?i.buffer:i.buffer.slice(i.byteOffset,i.byteOffset+i.byteLength);if(typeof i=="string"){const e=i;return new TextEncoder().encode(e).buffer}if(i&&typeof i=="object"&&i._toArrayBuffer)return i._toArrayBuffer();throw new Error("toArrayBuffer")}function Hee(i){const e=i?i.lastIndexOf("/"):-1;return e>=0?i.substr(e+1):""}function t5t(i){const e=i?i.lastIndexOf("/"):-1;return e>=0?i.substr(0,e):""}const i5t=i=>typeof i=="boolean",H4=i=>typeof i=="function",z4=i=>i!==null&&typeof i=="object",zee=i=>z4(i)&&i.constructor==={}.constructor,n5t=i=>!!i&&typeof i[Symbol.iterator]=="function",o5t=i=>i&&typeof i[Symbol.asyncIterator]=="function",Eh=i=>typeof Response<"u"&&i instanceof Response||i&&i.arrayBuffer&&i.text&&i.json,Wf=i=>typeof Blob<"u"&&i instanceof Blob,s5t=i=>i&&typeof i=="object"&&i.isBuffer,r5t=i=>typeof ReadableStream<"u"&&i instanceof ReadableStream||z4(i)&&H4(i.tee)&&H4(i.cancel)&&H4(i.getReader),a5t=i=>z4(i)&&H4(i.read)&&H4(i.pipe)&&i5t(i.readable),jee=i=>r5t(i)||a5t(i);class l5t extends Error{constructor(e,t){super(e),this.reason=t.reason,this.url=t.url,this.response=t.response}reason;url;response}const c5t=/^data:([-\w.]+\/[-\w.+]+)(;|,)/,u5t=/^([-\w.]+\/[-\w.+]+)/;function Gee(i,e){return i.toLowerCase()===e.toLowerCase()}function d5t(i){const e=u5t.exec(i);return e?e[1]:i}function Qee(i){const e=c5t.exec(i);return e?e[1]:""}const qee=/\?.*/;function h5t(i){const e=i.match(qee);return e&&e[0]}function pT(i){return i.replace(qee,"")}function p5t(i){if(i.length<50)return i;const e=i.slice(i.length-15);return`${i.substr(0,32)}...${e}`}function J7(i){return Eh(i)?i.url:Wf(i)?i.name||"":typeof i=="string"?i:""}function fT(i){if(Eh(i)){const e=i,t=e.headers.get("content-type")||"",n=pT(e.url);return d5t(t)||Qee(n)}return Wf(i)?i.type||"":typeof i=="string"?Qee(i):""}function f5t(i){return Eh(i)?i.headers["content-length"]||-1:Wf(i)?i.size:typeof i=="string"?i.length:i instanceof ArrayBuffer||ArrayBuffer.isView(i)?i.byteLength:-1}async function Kee(i){if(Eh(i))return i;const e={},t=f5t(i);t>=0&&(e["content-length"]=String(t));const n=J7(i),o=fT(i);o&&(e["content-type"]=o);const r=await g5t(i);r&&(e["x-first-bytes"]=r),typeof i=="string"&&(i=new TextEncoder().encode(i));const s=new Response(i,{headers:e});return Object.defineProperty(s,"url",{value:n}),s}async function A5t(i){if(!i.ok)throw await m5t(i)}async function m5t(i){const e=p5t(i.url);let t=`Failed to fetch resource (${i.status}) ${i.statusText}: ${e}`;t=t.length>100?`${t.slice(0,100)}...`:t;const n={reason:i.statusText,url:i.url,response:i};try{const o=i.headers.get("Content-Type");n.reason=!i.bodyUsed&&o?.includes("application/json")?await i.json():await i.text()}catch{}return new l5t(t,n)}async function g5t(i){if(typeof i=="string")return`data:,${i.slice(0,5)}`;if(i instanceof Blob){const t=i.slice(0,5);return await new Promise(n=>{const o=new FileReader;o.onload=r=>n(r?.target?.result),o.readAsDataURL(t)})}if(i instanceof ArrayBuffer){const t=i.slice(0,5);return`data:base64,${y5t(t)}`}return null}function y5t(i){let e="";const t=new Uint8Array(i);for(let n=0;n<t.byteLength;n++)e+=String.fromCharCode(t[n]);return btoa(e)}function v5t(i){return!w5t(i)&&!C5t(i)}function w5t(i){return i.startsWith("http:")||i.startsWith("https:")}function C5t(i){return i.startsWith("data:")}async function Jee(i,e){if(typeof i=="string"){const t=$4t(i);return v5t(t)&&globalThis.loaders?.fetchNode?globalThis.loaders?.fetchNode(t,e):await fetch(t,e)}return await Kee(i)}const Wee=new sT({id:"loaders.gl"});class b5t{log(){return()=>{}}info(){return()=>{}}warn(){return()=>{}}error(){return()=>{}}}class x5t{console;constructor(){this.console=console}log(...e){return this.console.log.bind(this.console,...e)}info(...e){return this.console.info.bind(this.console,...e)}warn(...e){return this.console.warn.bind(this.console,...e)}error(...e){return this.console.error.bind(this.console,...e)}}const Zee={fetch:null,mimeType:void 0,nothrow:!1,log:new x5t,useLocalLibraries:!1,CDN:"https://unpkg.com/@loaders.gl",worker:!0,maxConcurrency:3,maxMobileConcurrency:1,reuseWorkers:q7,_nodeWorkers:!1,_workerType:"",limit:0,_limitMB:0,batchSize:"auto",batchDebounceMs:0,metadata:!1,transforms:[]},M5t={throws:"nothrow",dataType:"(no longer used)",uri:"baseUri",method:"fetch.method",headers:"fetch.headers",body:"fetch.body",mode:"fetch.mode",credentials:"fetch.credentials",cache:"fetch.cache",redirect:"fetch.redirect",referrer:"fetch.referrer",referrerPolicy:"fetch.referrerPolicy",integrity:"fetch.integrity",keepalive:"fetch.keepalive",signal:"fetch.signal"};function Yee(){globalThis.loaders=globalThis.loaders||{};const{loaders:i}=globalThis;return i._state||(i._state={}),i._state}function Xee(){const i=Yee();return i.globalOptions=i.globalOptions||{...Zee},i.globalOptions}function E5t(i,e,t,n){return t=t||[],t=Array.isArray(t)?t:[t],B5t(i,t),S5t(e,i,n)}function B5t(i,e){$ee(i,null,Zee,M5t,e);for(const t of e){const n=i&&i[t.id]||{},o=t.options&&t.options[t.id]||{},r=t.deprecatedOptions&&t.deprecatedOptions[t.id]||{};$ee(n,t.id,o,r,e)}}function $ee(i,e,t,n,o){const r=e||"Top level",s=e?`${e}.`:"";for(const a in i){const l=!e&&z4(i[a]),c=a==="baseUri"&&!e,u=a==="workerUrl"&&e;if(!(a in t)&&!c&&!u){if(a in n)Wee.warn(`${r} loader option '${s}${a}' no longer supported, use '${n[a]}'`)();else if(!l){const d=I5t(a,o);Wee.warn(`${r} loader option '${s}${a}' not recognized. ${d}`)()}}}}function I5t(i,e){const t=i.toLowerCase();let n="";for(const o of e)for(const r in o.options){if(i===r)return`Did you mean '${o.id}.${r}'?`;const s=r.toLowerCase();(t.startsWith(s)||s.startsWith(t))&&(n=n||`Did you mean '${o.id}.${r}'?`)}return n}function S5t(i,e,t){const o={...i.options||{}};return P5t(o,t),o.log===null&&(o.log=new b5t),ete(o,Xee()),ete(o,e),o}function ete(i,e){for(const t in e)if(t in e){const n=e[t];zee(n)&&zee(i[t])?i[t]={...i[t],...e[t]}:i[t]=e[t]}}function P5t(i,e){e&&!("baseUri"in i)&&(i.baseUri=e)}function tte(i){return i?(Array.isArray(i)&&(i=i[0]),Array.isArray(i?.extensions)):!1}function ite(i){vc(i,"null loader"),vc(tte(i),"invalid loader");let e;return Array.isArray(i)&&(e=i[1],i=i[0],i={...i,options:{...i.options,...e}}),(i?.parseTextSync||i?.parseText)&&(i.text=!0),i.text||(i.binary=!0),i}const T5t=()=>{const i=Yee();return i.loaderRegistry=i.loaderRegistry||[],i.loaderRegistry};function k5t(){return T5t()}const R5t=/\.([^.]+)$/;async function _5t(i,e=[],t,n){if(!ote(i))return null;let o=nte(i,e,{...t,nothrow:!0},n);if(o)return o;if(Wf(i)&&(i=await i.slice(0,10).arrayBuffer(),o=nte(i,e,t,n)),!o&&!t?.nothrow)throw new Error(ste(i));return o}function nte(i,e=[],t,n){if(!ote(i))return null;if(e&&!Array.isArray(e))return ite(e);let o=[];e&&(o=o.concat(e)),t?.ignoreRegisteredLoaders||o.push(...k5t()),L5t(o);const r=D5t(i,o,t,n);if(!r&&!t?.nothrow)throw new Error(ste(i));return r}function D5t(i,e,t,n){const o=J7(i),r=fT(i),s=pT(o)||n?.url;let a=null,l="";return t?.mimeType&&(a=AT(e,t?.mimeType),l=`match forced by supplied MIME type ${t?.mimeType}`),a=a||F5t(e,s),l=l||(a?`matched url ${s}`:""),a=a||AT(e,r),l=l||(a?`matched MIME type ${r}`:""),a=a||N5t(e,i),l=l||(a?`matched initial data ${ate(i)}`:""),t?.fallbackMimeType&&(a=a||AT(e,t?.fallbackMimeType),l=l||(a?`matched fallback MIME type ${r}`:"")),l&&b4t.log(1,`selectLoader selected ${a?.name}: ${l}.`),a}function ote(i){return!(i instanceof Response&&i.status===204)}function ste(i){const e=J7(i),t=fT(i);let n="No valid loader found (";n+=e?`${Hee(e)}, `:"no url provided, ",n+=`MIME type: ${t?`"${t}"`:"not provided"}, `;const o=i?ate(i):"";return n+=o?` first bytes: "${o}"`:"first bytes: not available",n+=")",n}function L5t(i){for(const e of i)ite(e)}function F5t(i,e){const t=e&&R5t.exec(e),n=t&&t[1];return n?O5t(i,n):null}function O5t(i,e){e=e.toLowerCase();for(const t of i)for(const n of t.extensions)if(n.toLowerCase()===e)return t;return null}function AT(i,e){for(const t of i)if(t.mimeTypes?.some(n=>Gee(e,n))||Gee(e,`application/x.${t.id}`))return t;return null}function N5t(i,e){if(!e)return null;for(const t of i)if(typeof e=="string"){if(U5t(e,t))return t}else if(ArrayBuffer.isView(e)){if(rte(e.buffer,e.byteOffset,t))return t}else if(e instanceof ArrayBuffer&&rte(e,0,t))return t;return null}function U5t(i,e){return e.testText?e.testText(i):(Array.isArray(e.tests)?e.tests:[e.tests]).some(n=>i.startsWith(n))}function rte(i,e,t){return(Array.isArray(t.tests)?t.tests:[t.tests]).some(o=>V5t(i,e,t,o))}function V5t(i,e,t,n){if(n instanceof ArrayBuffer)return K4t(n,i,n.byteLength);switch(typeof n){case"function":return n(i);case"string":const o=mT(i,e,n.length);return n===o;default:return!1}}function ate(i,e=5){return typeof i=="string"?i.slice(0,e):ArrayBuffer.isView(i)?mT(i.buffer,i.byteOffset,e):i instanceof ArrayBuffer?mT(i,0,e):""}function mT(i,e,t){if(i.byteLength<e+t)return"";const n=new DataView(i);let o="";for(let r=0;r<t;r++)o+=String.fromCharCode(n.getUint8(e+r));return o}const H5t=256*1024;function*z5t(i,e){const t=e?.chunkSize||H5t;let n=0;const o=new TextEncoder;for(;n<i.length;){const r=Math.min(i.length-n,t),s=i.slice(n,n+r);n+=r,yield o.encode(s)}}const j5t=256*1024;function*G5t(i,e={}){const{chunkSize:t=j5t}=e;let n=0;for(;n<i.byteLength;){const o=Math.min(i.byteLength-n,t),r=new ArrayBuffer(o),s=new Uint8Array(i,n,o);new Uint8Array(r).set(s),n+=o,yield r}}const Q5t=1024*1024;async function*q5t(i,e){const t=e?.chunkSize||Q5t;let n=0;for(;n<i.size;){const o=n+t,r=await i.slice(n,o).arrayBuffer();n=o,yield r}}function lte(i,e){return q7?K5t(i,e):J5t(i)}async function*K5t(i,e){const t=i.getReader();let n;try{for(;;){const o=n||t.read();e?._streamReadAhead&&(n=t.read());const{done:r,value:s}=await o;if(r)return;yield Vee(s)}}catch{t.releaseLock()}}async function*J5t(i,e){for await(const t of i)yield Vee(t)}function W5t(i,e){if(typeof i=="string")return z5t(i,e);if(i instanceof ArrayBuffer)return G5t(i,e);if(Wf(i))return q5t(i,e);if(jee(i))return lte(i,e);if(Eh(i))return lte(i.body,e);throw new Error("makeIterator")}const cte="Cannot convert supplied data type";function Z5t(i,e,t){if(e.text&&typeof i=="string")return i;if(s5t(i)&&(i=i.buffer),i instanceof ArrayBuffer){const n=i;return e.text&&!e.binary?new TextDecoder("utf8").decode(n):n}if(ArrayBuffer.isView(i)){if(e.text&&!e.binary)return new TextDecoder("utf8").decode(i);let n=i.buffer;const o=i.byteLength||i.length;return(i.byteOffset!==0||o!==n.byteLength)&&(n=n.slice(i.byteOffset,i.byteOffset+o)),n}throw new Error(cte)}async function Y5t(i,e,t){const n=i instanceof ArrayBuffer||ArrayBuffer.isView(i);if(typeof i=="string"||n)return Z5t(i,e);if(Wf(i)&&(i=await Kee(i)),Eh(i)){const o=i;return await A5t(o),e.binary?await o.arrayBuffer():await o.text()}if(jee(i)&&(i=W5t(i,t)),n5t(i)||o5t(i))return Y4t(i);throw new Error(cte)}function X5t(i,e){const t=Xee(),n=i||t;return typeof n.fetch=="function"?n.fetch:z4(n.fetch)?o=>Jee(o,n.fetch):e?.fetch?e?.fetch:Jee}function $5t(i,e,t){if(t)return t;const n={fetch:X5t(e,i),...i};if(n.url){const o=pT(n.url);n.baseUrl=o,n.queryString=h5t(n.url),n.filename=Hee(o),n.baseUrl=t5t(o)}return Array.isArray(n.loaders)||(n.loaders=null),n}function eyt(i,e){if(i&&!Array.isArray(i))return i;let t;if(i&&(t=Array.isArray(i)?i:[i]),e&&e.loaders){const n=Array.isArray(e.loaders)?e.loaders:[e.loaders];t=t?[...t,...n]:n}return t&&t.length?t:void 0}async function gT(i,e,t,n){e&&!Array.isArray(e)&&!tte(e)&&(n=void 0,t=e,e=void 0),i=await i,t=t||{};const o=J7(i),s=eyt(e,n),a=await _5t(i,s,t);return a?(t=E5t(t,a,s,o),n=$5t({url:o,_parse:gT,loaders:s},t,n||null),await tyt(a,i,t,n)):null}async function tyt(i,e,t,n){if(F4t(i),t=x4t(i.options,t),Eh(e)){const r=e,{ok:s,redirected:a,status:l,statusText:c,type:u,url:d}=r,h=Object.fromEntries(r.headers.entries());n.response={headers:h,ok:s,redirected:a,status:l,statusText:c,type:u,url:d}}e=await Y5t(e,i,t);const o=i;if(o.parseTextSync&&typeof e=="string")return o.parseTextSync(e,t,n);if(z4t(i,t))return await j4t(i,e,t,n,gT);if(o.parseText&&typeof e=="string")return await o.parseText(e,t,n);if(o.parse)return await o.parse(e,t,n);throw wc(!o.parseSync),new Error(`${i.id} loader - no parser found and worker is disabled`)}function iyt(i){switch(i.constructor){case Int8Array:return"int8";case Uint8Array:case Uint8ClampedArray:return"uint8";case Int16Array:return"int16";case Uint16Array:return"uint16";case Int32Array:return"int32";case Uint32Array:return"uint32";case Float32Array:return"float32";case Float64Array:return"float64";default:return"null"}}function nyt(i){let e=1/0,t=1/0,n=1/0,o=-1/0,r=-1/0,s=-1/0;const a=i.POSITION?i.POSITION.value:[],l=a&&a.length;for(let c=0;c<l;c+=3){const u=a[c],d=a[c+1],h=a[c+2];e=u<e?u:e,t=d<t?d:t,n=h<n?h:n,o=u>o?u:o,r=d>r?d:r,s=h>s?h:s}return[[e,t,n],[o,r,s]]}function oyt(i,e,t){const n=iyt(e.value),o=t||syt(e);return{name:i,type:{type:"fixed-size-list",listSize:e.size,children:[{name:"value",type:n}]},nullable:!1,metadata:o}}function syt(i){const e={};return"byteOffset"in i&&(e.byteOffset=i.byteOffset.toString(10)),"byteStride"in i&&(e.byteStride=i.byteStride.toString(10)),"normalized"in i&&(e.normalized=i.normalized.toString()),e}const ryt="4.3.3",ayt=globalThis.loaders?.parseImageNode,yT=typeof Image<"u",vT=typeof ImageBitmap<"u",wT=q7?!0:!!ayt;function lyt(i){switch(i){case"auto":return vT||yT||wT;case"imagebitmap":return vT;case"image":return yT;case"data":return wT;default:throw new Error(`@loaders.gl/images: image ${i} not supported in this environment`)}}function cyt(){if(vT)return"imagebitmap";if(yT)return"image";if(wT)return"data";throw new Error("Install '@loaders.gl/polyfills' to parse images under Node.js")}function uyt(i){const e=dyt(i);if(!e)throw new Error("Not an image");return e}function ute(i){switch(uyt(i)){case"data":return i;case"image":case"imagebitmap":const e=document.createElement("canvas"),t=e.getContext("2d");if(!t)throw new Error("getImageData");return e.width=i.width,e.height=i.height,t.drawImage(i,0,0),t.getImageData(0,0,i.width,i.height);default:throw new Error("getImageData")}}function dyt(i){return typeof ImageBitmap<"u"&&i instanceof ImageBitmap?"imagebitmap":typeof Image<"u"&&i instanceof Image?"image":i&&typeof i=="object"&&i.data&&i.width&&i.height?"data":null}const hyt=/^data:image\/svg\+xml/,pyt=/\.svg((\?|#).*)?$/;function CT(i){return i&&(hyt.test(i)||pyt.test(i))}function fyt(i,e){if(CT(e)){let n=new TextDecoder().decode(i);try{typeof unescape=="function"&&typeof encodeURIComponent=="function"&&(n=unescape(encodeURIComponent(n)))}catch(r){throw new Error(r.message)}return`data:image/svg+xml;base64,${btoa(n)}`}return dte(i,e)}function dte(i,e){if(CT(e))throw new Error("SVG cannot be parsed directly to imagebitmap");return new Blob([new Uint8Array(i)])}async function hte(i,e,t){const n=fyt(i,t),o=self.URL||self.webkitURL,r=typeof n!="string"&&o.createObjectURL(n);try{return await Ayt(r||n,e)}finally{r&&o.revokeObjectURL(r)}}async function Ayt(i,e){const t=new Image;return t.src=i,e.image&&e.image.decode&&t.decode?(await t.decode(),t):await new Promise((n,o)=>{try{t.onload=()=>n(t),t.onerror=r=>{const s=r instanceof Error?r.message:"error";o(new Error(s))}}catch(r){o(r)}})}const myt={};let pte=!0;async function gyt(i,e,t){let n;CT(t)?n=await hte(i,e,t):n=dte(i,t);const o=e&&e.imagebitmap;return await yyt(n,o)}async function yyt(i,e=null){if((vyt(e)||!pte)&&(e=null),e)try{return await createImageBitmap(i,e)}catch(t){console.warn(t),pte=!1}return await createImageBitmap(i)}function vyt(i){for(const e in i||myt)return!1;return!0}function wyt(i){return!Myt(i,"ftyp",4)||(i[8]&96)===0?null:Cyt(i)}function Cyt(i){switch(byt(i,8,12).replace("\0"," ").trim()){case"avif":case"avis":return{extension:"avif",mimeType:"image/avif"};default:return null}}function byt(i,e,t){return String.fromCharCode(...i.slice(e,t))}function xyt(i){return[...i].map(e=>e.charCodeAt(0))}function Myt(i,e,t=0){const n=xyt(e);for(let o=0;o<n.length;++o)if(n[o]!==i[o+t])return!1;return!0}const bl=!1,j4=!0;function bT(i){const e=G4(i);return Byt(e)||Pyt(e)||Iyt(e)||Syt(e)||Eyt(e)}function Eyt(i){const e=new Uint8Array(i instanceof DataView?i.buffer:i),t=wyt(e);return t?{mimeType:t.mimeType,width:0,height:0}:null}function Byt(i){const e=G4(i);return e.byteLength>=24&&e.getUint32(0,bl)===2303741511?{mimeType:"image/png",width:e.getUint32(16,bl),height:e.getUint32(20,bl)}:null}function Iyt(i){const e=G4(i);return e.byteLength>=10&&e.getUint32(0,bl)===1195984440?{mimeType:"image/gif",width:e.getUint16(6,j4),height:e.getUint16(8,j4)}:null}function Syt(i){const e=G4(i);return e.byteLength>=14&&e.getUint16(0,bl)===16973&&e.getUint32(2,j4)===e.byteLength?{mimeType:"image/bmp",width:e.getUint32(18,j4),height:e.getUint32(22,j4)}:null}function Pyt(i){const e=G4(i);if(!(e.byteLength>=3&&e.getUint16(0,bl)===65496&&e.getUint8(2)===255))return null;const{tableMarkers:n,sofMarkers:o}=Tyt();let r=2;for(;r+9<e.byteLength;){const s=e.getUint16(r,bl);if(o.has(s))return{mimeType:"image/jpeg",height:e.getUint16(r+5,bl),width:e.getUint16(r+7,bl)};if(!n.has(s))return null;r+=2,r+=e.getUint16(r,bl)}return null}function Tyt(){const i=new Set([65499,65476,65484,65501,65534]);for(let t=65504;t<65520;++t)i.add(t);return{tableMarkers:i,sofMarkers:new Set([65472,65473,65474,65475,65477,65478,65479,65481,65482,65483,65485,65486,65487,65502])}}function G4(i){if(i instanceof DataView)return i;if(ArrayBuffer.isView(i))return new DataView(i.buffer);if(i instanceof ArrayBuffer)return new DataView(i);throw new Error("toDataView")}async function kyt(i,e){const{mimeType:t}=bT(i)||{},n=globalThis.loaders?.parseImageNode;return vc(n),await n(i,t)}async function Ryt(i,e,t){e=e||{};const o=(e.image||{}).type||"auto",{url:r}=t||{},s=_yt(o);let a;switch(s){case"imagebitmap":a=await gyt(i,e,r);break;case"image":a=await hte(i,e,r);break;case"data":a=await kyt(i);break;default:vc(!1)}return o==="data"&&(a=ute(a)),a}function _yt(i){switch(i){case"auto":case"data":return cyt();default:return lyt(i),i}}const Dyt={dataType:null,batchType:null,id:"image",module:"images",name:"Images",version:ryt,mimeTypes:["image/png","image/jpeg","image/gif","image/webp","image/avif","image/bmp","image/vnd.microsoft.icon","image/svg+xml"],extensions:["png","jpg","jpeg","gif","webp","bmp","ico","svg","avif"],parse:Ryt,tests:[i=>!!bT(new DataView(i))],options:{image:{type:"auto",decode:!0}}},xT={};function Lyt(i){if(xT[i]===void 0){const e=q7?Oyt(i):Fyt(i);xT[i]=e}return xT[i]}function Fyt(i){const e=["image/png","image/jpeg","image/gif"],t=globalThis.loaders?.imageFormatsNode||e;return!!globalThis.loaders?.parseImageNode&&t.includes(i)}function Oyt(i){switch(i){case"image/avif":case"image/webp":return Nyt(i);default:return!0}}function Nyt(i){try{return document.createElement("canvas").toDataURL(i).indexOf(`data:${i}`)===0}catch{return!1}}function br(i,e){if(!i)throw new Error(e||"assert failed: gltf")}const fte={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},Ate={5120:1,5121:1,5122:2,5123:2,5125:4,5126:4},mte=["SCALAR","VEC2","VEC3","VEC4"],Uyt=[[Int8Array,5120],[Uint8Array,5121],[Int16Array,5122],[Uint16Array,5123],[Uint32Array,5125],[Float32Array,5126],[Float64Array,5130]],Vyt=new Map(Uyt),Hyt={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},zyt={5120:1,5121:1,5122:2,5123:2,5125:4,5126:4},jyt={5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5126:Float32Array};function gte(i){return mte[i-1]||mte[0]}function W7(i){const e=Vyt.get(i.constructor);if(!e)throw new Error("Illegal typed array");return e}function MT(i,e){const t=jyt[i.componentType],n=Hyt[i.type],o=zyt[i.componentType],r=i.count*n,s=i.count*n*o;br(s>=0&&s<=e.byteLength);const a=Ate[i.componentType],l=fte[i.type];return{ArrayType:t,length:r,byteLength:s,componentByteSize:a,numberOfComponentsInElement:l}}function Gyt(i,e,t){const n=i.bufferViews[t];br(n);const o=n.buffer,r=e[o];br(r);const s=(n.byteOffset||0)+r.byteOffset;return new Uint8Array(r.arrayBuffer,s,n.byteLength)}function Qyt(i,e,t){const n=typeof t=="number"?i.accessors?.[t]:t;if(!n)throw new Error(`No gltf accessor ${JSON.stringify(t)}`);const o=i.bufferViews?.[n.bufferView||0];if(!o)throw new Error(`No gltf buffer view for accessor ${o}`);const{arrayBuffer:r,byteOffset:s}=e[o.buffer],a=(s||0)+(n.byteOffset||0)+(o.byteOffset||0),{ArrayType:l,length:c,componentByteSize:u,numberOfComponentsInElement:d}=MT(n,o),h=u*d,p=o.byteStride||h;if(typeof o.byteStride>"u"||o.byteStride===h)return new l(r,a,c);const A=new l(c);for(let f=0;f<n.count;f++){const g=new l(r,a+f*p,d);A.set(g,f*d)}return A}function qyt(){return{asset:{version:"2.0",generator:"loaders.gl"},buffers:[],extensions:{},extensionsRequired:[],extensionsUsed:[]}}class _o{gltf;sourceBuffers;byteLength;constructor(e){this.gltf={json:e?.json||qyt(),buffers:e?.buffers||[],images:e?.images||[]},this.sourceBuffers=[],this.byteLength=0,this.gltf.buffers&&this.gltf.buffers[0]&&(this.byteLength=this.gltf.buffers[0].byteLength,this.sourceBuffers=[this.gltf.buffers[0]])}get json(){return this.gltf.json}getApplicationData(e){return this.json[e]}getExtraData(e){return(this.json.extras||{})[e]}hasExtension(e){const t=this.getUsedExtensions().find(o=>o===e),n=this.getRequiredExtensions().find(o=>o===e);return typeof t=="string"||typeof n=="string"}getExtension(e){const t=this.getUsedExtensions().find(o=>o===e),n=this.json.extensions||{};return t?n[e]:null}getRequiredExtension(e){return this.getRequiredExtensions().find(n=>n===e)?this.getExtension(e):null}getRequiredExtensions(){return this.json.extensionsRequired||[]}getUsedExtensions(){return this.json.extensionsUsed||[]}getRemovedExtensions(){return this.json.extensionsRemoved||[]}getObjectExtension(e,t){return(e.extensions||{})[t]}getScene(e){return this.getObject("scenes",e)}getNode(e){return this.getObject("nodes",e)}getSkin(e){return this.getObject("skins",e)}getMesh(e){return this.getObject("meshes",e)}getMaterial(e){return this.getObject("materials",e)}getAccessor(e){return this.getObject("accessors",e)}getTexture(e){return this.getObject("textures",e)}getSampler(e){return this.getObject("samplers",e)}getImage(e){return this.getObject("images",e)}getBufferView(e){return this.getObject("bufferViews",e)}getBuffer(e){return this.getObject("buffers",e)}getObject(e,t){if(typeof t=="object")return t;const n=this.json[e]&&this.json[e][t];if(!n)throw new Error(`glTF file error: Could not find ${e}[${t}]`);return n}getTypedArrayForBufferView(e){e=this.getBufferView(e);const t=e.buffer,n=this.gltf.buffers[t];br(n);const o=(e.byteOffset||0)+n.byteOffset;return new Uint8Array(n.arrayBuffer,o,e.byteLength)}getTypedArrayForAccessor(e){const t=this.getAccessor(e);return Qyt(this.gltf.json,this.gltf.buffers,t)}getTypedArrayForImageData(e){e=this.getAccessor(e);const t=this.getBufferView(e.bufferView),o=this.getBuffer(t.buffer).data,r=t.byteOffset||0;return new Uint8Array(o,r,t.byteLength)}addApplicationData(e,t){return this.json[e]=t,this}addExtraData(e,t){return this.json.extras=this.json.extras||{},this.json.extras[e]=t,this}addObjectExtension(e,t,n){return e.extensions=e.extensions||{},e.extensions[t]=n,this.registerUsedExtension(t),this}setObjectExtension(e,t,n){const o=e.extensions||{};o[t]=n}removeObjectExtension(e,t){const n=e?.extensions||{};if(n[t]){this.json.extensionsRemoved=this.json.extensionsRemoved||[];const o=this.json.extensionsRemoved;o.includes(t)||o.push(t)}delete n[t]}addExtension(e,t={}){return br(t),this.json.extensions=this.json.extensions||{},this.json.extensions[e]=t,this.registerUsedExtension(e),t}addRequiredExtension(e,t={}){return br(t),this.addExtension(e,t),this.registerRequiredExtension(e),t}registerUsedExtension(e){this.json.extensionsUsed=this.json.extensionsUsed||[],this.json.extensionsUsed.find(t=>t===e)||this.json.extensionsUsed.push(e)}registerRequiredExtension(e){this.registerUsedExtension(e),this.json.extensionsRequired=this.json.extensionsRequired||[],this.json.extensionsRequired.find(t=>t===e)||this.json.extensionsRequired.push(e)}removeExtension(e){if(this.json.extensions?.[e]){this.json.extensionsRemoved=this.json.extensionsRemoved||[];const t=this.json.extensionsRemoved;t.includes(e)||t.push(e)}this.json.extensions&&delete this.json.extensions[e],this.json.extensionsRequired&&this._removeStringFromArray(this.json.extensionsRequired,e),this.json.extensionsUsed&&this._removeStringFromArray(this.json.extensionsUsed,e)}setDefaultScene(e){this.json.scene=e}addScene(e){const{nodeIndices:t}=e;return this.json.scenes=this.json.scenes||[],this.json.scenes.push({nodes:t}),this.json.scenes.length-1}addNode(e){const{meshIndex:t,matrix:n}=e;this.json.nodes=this.json.nodes||[];const o={mesh:t};return n&&(o.matrix=n),this.json.nodes.push(o),this.json.nodes.length-1}addMesh(e){const{attributes:t,indices:n,material:o,mode:r=4}=e,a={primitives:[{attributes:this._addAttributes(t),mode:r}]};if(n){const l=this._addIndices(n);a.primitives[0].indices=l}return Number.isFinite(o)&&(a.primitives[0].material=o),this.json.meshes=this.json.meshes||[],this.json.meshes.push(a),this.json.meshes.length-1}addPointCloud(e){const n={primitives:[{attributes:this._addAttributes(e),mode:0}]};return this.json.meshes=this.json.meshes||[],this.json.meshes.push(n),this.json.meshes.length-1}addImage(e,t){const n=bT(e),o=t||n?.mimeType,s={bufferView:this.addBufferView(e),mimeType:o};return this.json.images=this.json.images||[],this.json.images.push(s),this.json.images.length-1}addBufferView(e,t=0,n=this.byteLength){const o=e.byteLength;br(Number.isFinite(o)),this.sourceBuffers=this.sourceBuffers||[],this.sourceBuffers.push(e);const r={buffer:t,byteOffset:n,byteLength:o};return this.byteLength+=V4(o,4),this.json.bufferViews=this.json.bufferViews||[],this.json.bufferViews.push(r),this.json.bufferViews.length-1}addAccessor(e,t){const n={bufferView:e,type:gte(t.size),componentType:t.componentType,count:t.count,max:t.max,min:t.min};return this.json.accessors=this.json.accessors||[],this.json.accessors.push(n),this.json.accessors.length-1}addBinaryBuffer(e,t={size:3}){const n=this.addBufferView(e);let o={min:t.min,max:t.max};(!o.min||!o.max)&&(o=this._getAccessorMinMax(e,t.size));const r={size:t.size,componentType:W7(e),count:Math.round(e.length/t.size),min:o.min,max:o.max};return this.addAccessor(n,Object.assign(r,t))}addTexture(e){const{imageIndex:t}=e,n={source:t};return this.json.textures=this.json.textures||[],this.json.textures.push(n),this.json.textures.length-1}addMaterial(e){return this.json.materials=this.json.materials||[],this.json.materials.push(e),this.json.materials.length-1}createBinaryChunk(){const e=this.byteLength,t=new ArrayBuffer(e),n=new Uint8Array(t);let o=0;for(const r of this.sourceBuffers||[])o=Z4t(r,n,o);this.json?.buffers?.[0]?this.json.buffers[0].byteLength=e:this.json.buffers=[{byteLength:e}],this.gltf.binary=t,this.sourceBuffers=[t],this.gltf.buffers=[{arrayBuffer:t,byteOffset:0,byteLength:t.byteLength}]}_removeStringFromArray(e,t){let n=!0;for(;n;){const o=e.indexOf(t);o>-1?e.splice(o,1):n=!1}}_addAttributes(e={}){const t={};for(const n in e){const o=e[n],r=this._getGltfAttributeName(n),s=this.addBinaryBuffer(o.value,o);t[r]=s}return t}_addIndices(e){return this.addBinaryBuffer(e,{size:1})}_getGltfAttributeName(e){switch(e.toLowerCase()){case"position":case"positions":case"vertices":return"POSITION";case"normal":case"normals":return"NORMAL";case"color":case"colors":return"COLOR_0";case"texcoord":case"texcoords":return"TEXCOORD_0";default:return e}}_getAccessorMinMax(e,t){const n={min:null,max:null};if(e.length<t)return n;n.min=[],n.max=[];const o=e.subarray(0,t);for(const r of o)n.min.push(r),n.max.push(r);for(let r=t;r<e.length;r+=t)for(let s=0;s<t;s++)n.min[0+s]=Math.min(n.min[0+s],e[r+s]),n.max[0+s]=Math.max(n.max[0+s],e[r+s]);return n}}function yte(i){return(i%1+1)%1}const vte={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16,BOOLEAN:1,STRING:1,ENUM:1},Kyt={INT8:Int8Array,UINT8:Uint8Array,INT16:Int16Array,UINT16:Uint16Array,INT32:Int32Array,UINT32:Uint32Array,INT64:BigInt64Array,UINT64:BigUint64Array,FLOAT32:Float32Array,FLOAT64:Float64Array},wte={INT8:1,UINT8:1,INT16:2,UINT16:2,INT32:4,UINT32:4,INT64:8,UINT64:8,FLOAT32:4,FLOAT64:8};function ET(i,e){return wte[e]*vte[i]}function Z7(i,e,t,n){if(t!=="UINT8"&&t!=="UINT16"&&t!=="UINT32"&&t!=="UINT64")return null;const o=i.getTypedArrayForBufferView(e),r=Y7(o,"SCALAR",t,n+1);return r instanceof BigInt64Array||r instanceof BigUint64Array?null:r}function Y7(i,e,t,n=1){const o=vte[e],r=Kyt[t],s=wte[t],a=n*o,l=a*s;let c=i.buffer,u=i.byteOffset;return u%s!==0&&(c=new Uint8Array(c).slice(u,u+l).buffer,u=0),new r(c,u,a)}function BT(i,e,t){const n=`TEXCOORD_${e.texCoord||0}`,o=t.attributes[n],r=i.getTypedArrayForAccessor(o),s=i.gltf.json,a=e.index,l=s.textures?.[a]?.source;if(typeof l<"u"){const c=s.images?.[l]?.mimeType,u=i.gltf.images?.[l];if(u&&typeof u.width<"u"){const d=[];for(let h=0;h<r.length;h+=2){const p=Jyt(u,c,r,h,e.channels);d.push(p)}return d}}return[]}function Cte(i,e,t,n,o){if(!t?.length)return;const r=[];for(const u of t){let d=n.findIndex(h=>h===u);d===-1&&(d=n.push(u)-1),r.push(d)}const s=new Uint32Array(r),a=i.gltf.buffers.push({arrayBuffer:s.buffer,byteOffset:s.byteOffset,byteLength:s.byteLength})-1,l=i.addBufferView(s,a,0),c=i.addAccessor(l,{size:1,componentType:W7(s),count:s.length});o.attributes[e]=c}function Jyt(i,e,t,n,o=[0]){const r={r:{offset:0,shift:0},g:{offset:1,shift:8},b:{offset:2,shift:16},a:{offset:3,shift:24}},s=t[n],a=t[n+1];let l=1;e&&(e.indexOf("image/jpeg")!==-1||e.indexOf("image/png")!==-1)&&(l=4);const c=Wyt(s,a,i,l);let u=0;for(const d of o){const h=typeof d=="number"?Object.values(r)[d]:r[d],p=c+h.offset,A=ute(i);if(A.data.length<=p)throw new Error(`${A.data.length} <= ${p}`);const f=A.data[p];u|=f<<h.shift}return u}function Wyt(i,e,t,n=1){const o=t.width,r=yte(i)*(o-1),s=Math.round(r),a=t.height,l=yte(e)*(a-1),c=Math.round(l),u=t.components?t.components:n;return(c*o+s)*u}function bte(i,e,t,n,o){const r=[];for(let s=0;s<e;s++){const a=t[s],l=t[s+1]-t[s];if(l+a>n)break;const c=a/o,u=l/o;r.push(i.slice(c,c+u))}return r}function xte(i,e,t){const n=[];for(let o=0;o<e;o++){const r=o*t;n.push(i.slice(r,r+t))}return n}function Mte(i,e,t,n){if(t)throw new Error("Not implemented - arrayOffsets for strings is specified");if(n){const o=[],r=new TextDecoder("utf8");let s=0;for(let a=0;a<i;a++){const l=n[a+1]-n[a];if(l+s<=e.length){const c=e.subarray(s,l+s),u=r.decode(c);o.push(u),s+=l}}return o}return[]}const Zf="EXT_mesh_features",Zyt=Zf;async function Yyt(i,e){const t=new _o(i);$yt(t,e)}function Xyt(i,e){const t=new _o(i);return tvt(t),t.createBinaryChunk(),t.gltf}function $yt(i,e){const t=i.gltf.json;if(t.meshes)for(const n of t.meshes)for(const o of n.primitives)evt(i,o,e)}function evt(i,e,t){if(!t?.gltf?.loadBuffers)return;const o=e.extensions?.[Zf]?.featureIds;if(o)for(const r of o){let s;if(typeof r.attribute<"u"){const a=`_FEATURE_ID_${r.attribute}`,l=e.attributes[a];s=i.getTypedArrayForAccessor(l)}else typeof r.texture<"u"&&t?.gltf?.loadImages?s=BT(i,r.texture,e):s=[];r.data=s}}function tvt(i,e){const t=i.gltf.json.meshes;if(t)for(const n of t)for(const o of n.primitives)nvt(i,o)}function ivt(i,e,t,n){e.extensions||(e.extensions={});let o=e.extensions[Zf];o||(o={featureIds:[]},e.extensions[Zf]=o);const{featureIds:r}=o,s={featureCount:t.length,propertyTable:n,data:t};r.push(s),i.addObjectExtension(e,Zf,o)}function nvt(i,e){const t=e.extensions?.[Zf];if(!t)return;const n=t.featureIds;n.forEach((o,r)=>{if(o.data){const{accessorKey:s,index:a}=ovt(e.attributes),l=new Uint32Array(o.data);n[r]={featureCount:l.length,propertyTable:o.propertyTable,attribute:a},i.gltf.buffers.push({arrayBuffer:l.buffer,byteOffset:l.byteOffset,byteLength:l.byteLength});const c=i.addBufferView(l),u=i.addAccessor(c,{size:1,componentType:W7(l),count:l.length});e.attributes[s]=u}})}function ovt(i){const e="_FEATURE_ID_",t=Object.keys(i).filter(r=>r.indexOf(e)===0);let n=-1;for(const r of t){const s=Number(r.substring(e.length));s>n&&(n=s)}return n++,{accessorKey:`${e}${n}`,index:n}}const svt=Object.freeze(Object.defineProperty({__proto__:null,createExtMeshFeatures:ivt,decode:Yyt,encode:Xyt,name:Zyt},Symbol.toStringTag,{value:"Module"})),Yf="EXT_structural_metadata",rvt=Yf;async function avt(i,e){const t=new _o(i);cvt(t,e)}function lvt(i,e){const t=new _o(i);return Evt(t),t.createBinaryChunk(),t.gltf}function cvt(i,e){if(!e.gltf?.loadBuffers)return;const t=i.getExtension(Yf);t&&(e.gltf?.loadImages&&uvt(i,t),dvt(i,t))}function uvt(i,e){const t=e.propertyTextures,n=i.gltf.json;if(t&&n.meshes)for(const o of n.meshes)for(const r of o.primitives)pvt(i,t,r,e)}function dvt(i,e){const t=e.schema;if(!t)return;const n=t.classes,o=e.propertyTables;if(n&&o)for(const r in n){const s=hvt(o,r);s&&Avt(i,t,s)}}function hvt(i,e){for(const t of i)if(t.class===e)return t;return null}function pvt(i,e,t,n){if(!e)return;const r=t.extensions?.[Yf]?.propertyTextures;if(r)for(const s of r){const a=e[s];fvt(i,a,t,n)}}function fvt(i,e,t,n){if(!e.properties)return;n.dataAttributeNames||(n.dataAttributeNames=[]);const o=e.class;for(const r in e.properties){const s=`${o}_${r}`,a=e.properties?.[r];if(!a)continue;a.data||(a.data=[]);const l=a.data,c=BT(i,a,t);c!==null&&(Cte(i,s,c,l,t),a.data=l,n.dataAttributeNames.push(s))}}function Avt(i,e,t){const n=e.classes?.[t.class];if(!n)throw new Error(`Incorrect data in the EXT_structural_metadata extension: no schema class with name ${t.class}`);const o=t.count;for(const r in n.properties){const s=n.properties[r],a=t.properties?.[r];if(a){const l=mvt(i,e,s,o,a);a.data=l}}}function mvt(i,e,t,n,o){let r=[];const s=o.values,a=i.getTypedArrayForBufferView(s),l=gvt(i,t,o,n),c=yvt(i,o,n);switch(t.type){case"SCALAR":case"VEC2":case"VEC3":case"VEC4":case"MAT2":case"MAT3":case"MAT4":{r=vvt(t,n,a,l);break}case"BOOLEAN":throw new Error(`Not implemented - classProperty.type=${t.type}`);case"STRING":{r=Mte(n,a,l,c);break}case"ENUM":{r=wvt(e,t,n,a,l);break}default:throw new Error(`Unknown classProperty type ${t.type}`)}return r}function gvt(i,e,t,n){return e.array&&typeof e.count>"u"&&typeof t.arrayOffsets<"u"?Z7(i,t.arrayOffsets,t.arrayOffsetType||"UINT32",n):null}function yvt(i,e,t){return typeof e.stringOffsets<"u"?Z7(i,e.stringOffsets,e.stringOffsetType||"UINT32",t):null}function vvt(i,e,t,n){const o=i.array,r=i.count,s=ET(i.type,i.componentType),a=t.byteLength/s;let l;return i.componentType?l=Y7(t,i.type,i.componentType,a):l=t,o?n?bte(l,e,n,t.length,s):r?xte(l,e,r):[]:l}function wvt(i,e,t,n,o){const r=e.enumType;if(!r)throw new Error("Incorrect data in the EXT_structural_metadata extension: classProperty.enumType is not set for type ENUM");const s=i.enums?.[r];if(!s)throw new Error(`Incorrect data in the EXT_structural_metadata extension: schema.enums does't contain ${r}`);const a=s.valueType||"UINT16",l=ET(e.type,a),c=n.byteLength/l;let u=Y7(n,e.type,a,c);if(u||(u=n),e.array){if(o)return Cvt({valuesData:u,numberOfElements:t,arrayOffsets:o,valuesDataBytesLength:n.length,elementSize:l,enumEntry:s});const d=e.count;return d?bvt(u,t,d,s):[]}return IT(u,0,t,s)}function Cvt(i){const{valuesData:e,numberOfElements:t,arrayOffsets:n,valuesDataBytesLength:o,elementSize:r,enumEntry:s}=i,a=[];for(let l=0;l<t;l++){const c=n[l],u=n[l+1]-n[l];if(u+c>o)break;const d=c/r,h=u/r,p=IT(e,d,h,s);a.push(p)}return a}function bvt(i,e,t,n){const o=[];for(let r=0;r<e;r++){const s=t*r,a=IT(i,s,t,n);o.push(a)}return o}function IT(i,e,t,n){const o=[];for(let r=0;r<t;r++)if(i instanceof BigInt64Array||i instanceof BigUint64Array)o.push("");else{const s=i[e+r],a=xvt(n,s);a?o.push(a.name):o.push("")}return o}function xvt(i,e){for(const t of i.values)if(t.value===e)return t;return null}const Mvt="schemaClassId";function Evt(i,e){const t=i.getExtension(Yf);if(t&&t.propertyTables)for(const n of t.propertyTables){const o=n.class,r=t.schema?.classes?.[o];n.properties&&r&&Bvt(n,r,i)}}function Bvt(i,e,t){for(const n in i.properties){const o=i.properties[n].data;if(o){const r=e.properties[n];if(r){const s=Tvt(o,r,t);i.properties[n]=s}}}}function Ivt(i,e,t=Mvt){let n=i.getExtension(Yf);n||(n=i.addExtension(Yf)),n.schema=Svt(e,t,n.schema);const o=Pvt(e,t,n.schema);return n.propertyTables||(n.propertyTables=[]),n.propertyTables.push(o)-1}function Svt(i,e,t){const n=t??{id:"schema_id"},o={properties:{}};for(const r of i){const s={type:r.elementType,componentType:r.componentType};o.properties[r.name]=s}return n.classes={},n.classes[e]=o,n}function Pvt(i,e,t){const n={class:e,count:0};let o=0;const r=t.classes?.[e];for(const s of i){if(o===0&&(o=s.values.length),o!==s.values.length&&s.values.length)throw new Error("Illegal values in attributes");r?.properties[s.name]&&(n.properties||(n.properties={}),n.properties[s.name]={values:0,data:s.values})}return n.count=o,n}function Tvt(i,e,t){const n={values:0};if(e.type==="STRING"){const{stringData:o,stringOffsets:r}=_vt(i);n.stringOffsets=ST(r,t),n.values=ST(o,t)}else if(e.type==="SCALAR"&&e.componentType){const o=Rvt(i,e.componentType);n.values=ST(o,t)}return n}const kvt={INT8:Int8Array,UINT8:Uint8Array,INT16:Int16Array,UINT16:Uint16Array,INT32:Int32Array,UINT32:Uint32Array,INT64:Int32Array,UINT64:Uint32Array,FLOAT32:Float32Array,FLOAT64:Float64Array};function Rvt(i,e){const t=[];for(const o of i)t.push(Number(o));const n=kvt[e];if(!n)throw new Error("Illegal component type");return new n(t)}function _vt(i){const e=new TextEncoder,t=[];let n=0;for(const l of i){const c=e.encode(l);n+=c.length,t.push(c)}const o=new Uint8Array(n),r=[];let s=0;for(const l of t)o.set(l,s),r.push(s),s+=l.length;r.push(s);const a=new Uint32Array(r);return{stringData:o,stringOffsets:a}}function ST(i,e){return e.gltf.buffers.push({arrayBuffer:i.buffer,byteOffset:i.byteOffset,byteLength:i.byteLength}),e.addBufferView(i)}const Dvt=Object.freeze(Object.defineProperty({__proto__:null,createExtStructuralMetadata:Ivt,decode:avt,encode:lvt,name:rvt},Symbol.toStringTag,{value:"Module"})),Ete="EXT_feature_metadata",Lvt=Ete;async function Fvt(i,e){const t=new _o(i);Ovt(t,e)}function Ovt(i,e){if(!e.gltf?.loadBuffers)return;const t=i.getExtension(Ete);t&&(e.gltf?.loadImages&&Nvt(i,t),Uvt(i,t))}function Nvt(i,e){const t=e.schema;if(!t)return;const n=t.classes,{featureTextures:o}=e;if(n&&o)for(const r in n){const s=n[r],a=Hvt(o,r);a&&jvt(i,a,s)}}function Uvt(i,e){const t=e.schema;if(!t)return;const n=t.classes,o=e.featureTables;if(n&&o)for(const r in n){const s=Vvt(o,r);s&&zvt(i,t,s)}}function Vvt(i,e){for(const t in i){const n=i[t];if(n.class===e)return n}return null}function Hvt(i,e){for(const t in i){const n=i[t];if(n.class===e)return n}return null}function zvt(i,e,t){if(!t.class)return;const n=e.classes?.[t.class];if(!n)throw new Error(`Incorrect data in the EXT_structural_metadata extension: no schema class with name ${t.class}`);const o=t.count;for(const r in n.properties){const s=n.properties[r],a=t.properties?.[r];if(a){const l=Gvt(i,e,s,o,a);a.data=l}}}function jvt(i,e,t){const n=e.class;for(const o in t.properties){const r=e?.properties?.[o];if(r){const s=Wvt(i,r,n);r.data=s}}}function Gvt(i,e,t,n,o){let r=[];const s=o.bufferView,a=i.getTypedArrayForBufferView(s),l=Qvt(i,t,o,n),c=qvt(i,t,o,n);return t.type==="STRING"||t.componentType==="STRING"?r=Mte(n,a,l,c):Kvt(t)&&(r=Jvt(t,n,a,l)),r}function Qvt(i,e,t,n){return e.type==="ARRAY"&&typeof e.componentCount>"u"&&typeof t.arrayOffsetBufferView<"u"?Z7(i,t.arrayOffsetBufferView,t.offsetType||"UINT32",n):null}function qvt(i,e,t,n){return typeof t.stringOffsetBufferView<"u"?Z7(i,t.stringOffsetBufferView,t.offsetType||"UINT32",n):null}function Kvt(i){const e=["UINT8","INT16","UINT16","INT32","UINT32","INT64","UINT64","FLOAT32","FLOAT64"];return e.includes(i.type)||typeof i.componentType<"u"&&e.includes(i.componentType)}function Jvt(i,e,t,n){const o=i.type==="ARRAY",r=i.componentCount,s="SCALAR",a=i.componentType||i.type,l=ET(s,a),c=t.byteLength/l,u=Y7(t,s,a,c);return o?n?bte(u,e,n,t.length,l):r?xte(u,e,r):[]:u}function Wvt(i,e,t){const n=i.gltf.json;if(!n.meshes)return[];const o=[];for(const r of n.meshes)for(const s of r.primitives)Zvt(i,t,e,o,s);return o}function Zvt(i,e,t,n,o){const r={channels:t.channels,...t.texture},s=BT(i,r,o);s&&Cte(i,e,s,n,o)}const Yvt=Object.freeze(Object.defineProperty({__proto__:null,decode:Fvt,name:Lvt},Symbol.toStringTag,{value:"Module"})),Xvt="4.3.3",$vt="4.3.3",X7={TRANSCODER:"basis_transcoder.js",TRANSCODER_WASM:"basis_transcoder.wasm",ENCODER:"basis_encoder.js",ENCODER_WASM:"basis_encoder.wasm"};let Bte;async function Ite(i){M4t(i.modules);const e=E4t("basis");return e||(Bte||=e6t(i),await Bte)}async function e6t(i){let e=null,t=null;return[e,t]=await Promise.all([await Mh(X7.TRANSCODER,"textures",i),await Mh(X7.TRANSCODER_WASM,"textures",i)]),e=e||globalThis.BASIS,await t6t(e,t)}function t6t(i,e){const t={};return e&&(t.wasmBinary=e),new Promise(n=>{i(t).then(o=>{const{BasisFile:r,initializeBasis:s}=o;s(),n({BasisFile:r})})})}let PT;async function Ste(i){const e=i.modules||{};return e.basisEncoder?e.basisEncoder:(PT=PT||i6t(i),await PT)}async function i6t(i){let e=null,t=null;return[e,t]=await Promise.all([await Mh(X7.ENCODER,"textures",i),await Mh(X7.ENCODER_WASM,"textures",i)]),e=e||globalThis.BASIS,await n6t(e,t)}function n6t(i,e){const t={};return e&&(t.wasmBinary=e),new Promise(n=>{i(t).then(o=>{const{BasisFile:r,KTX2File:s,initializeBasis:a,BasisEncoder:l}=o;a(),n({BasisFile:r,KTX2File:s,BasisEncoder:l})})})}const Xf={COMPRESSED_RGB_S3TC_DXT1_EXT:33776,COMPRESSED_RGBA_S3TC_DXT5_EXT:33779,COMPRESSED_RGB_PVRTC_4BPPV1_IMG:35840,COMPRESSED_RGBA_PVRTC_4BPPV1_IMG:35842,COMPRESSED_RGB_ETC1_WEBGL:36196,COMPRESSED_RGBA_ASTC_4X4_KHR:37808},o6t=["","WEBKIT_","MOZ_"],Pte={WEBGL_compressed_texture_s3tc:"dxt",WEBGL_compressed_texture_s3tc_srgb:"dxt-srgb",WEBGL_compressed_texture_etc1:"etc1",WEBGL_compressed_texture_etc:"etc2",WEBGL_compressed_texture_pvrtc:"pvrtc",WEBGL_compressed_texture_atc:"atc",WEBGL_compressed_texture_astc:"astc",EXT_texture_compression_rgtc:"rgtc"};let $7=null;function s6t(i){if(!$7){i=i||r6t()||void 0,$7=new Set;for(const e of o6t)for(const t in Pte)if(i&&i.getExtension(`${e}${t}`)){const n=Pte[t];$7.add(n)}}return $7}function r6t(){try{return document.createElement("canvas").getContext("webgl")}catch{return null}}const xr=[171,75,84,88,32,50,48,187,13,10,26,10];function a6t(i){const e=new Uint8Array(i);return!(e.byteLength<xr.length||e[0]!==xr[0]||e[1]!==xr[1]||e[2]!==xr[2]||e[3]!==xr[3]||e[4]!==xr[4]||e[5]!==xr[5]||e[6]!==xr[6]||e[7]!==xr[7]||e[8]!==xr[8]||e[9]!==xr[9]||e[10]!==xr[10]||e[11]!==xr[11])}const l6t={etc1:{basisFormat:0,compressed:!0,format:Xf.COMPRESSED_RGB_ETC1_WEBGL},etc2:{basisFormat:1,compressed:!0},bc1:{basisFormat:2,compressed:!0,format:Xf.COMPRESSED_RGB_S3TC_DXT1_EXT},bc3:{basisFormat:3,compressed:!0,format:Xf.COMPRESSED_RGBA_S3TC_DXT5_EXT},bc4:{basisFormat:4,compressed:!0},bc5:{basisFormat:5,compressed:!0},"bc7-m6-opaque-only":{basisFormat:6,compressed:!0},"bc7-m5":{basisFormat:7,compressed:!0},"pvrtc1-4-rgb":{basisFormat:8,compressed:!0,format:Xf.COMPRESSED_RGB_PVRTC_4BPPV1_IMG},"pvrtc1-4-rgba":{basisFormat:9,compressed:!0,format:Xf.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG},"astc-4x4":{basisFormat:10,compressed:!0,format:Xf.COMPRESSED_RGBA_ASTC_4X4_KHR},"atc-rgb":{basisFormat:11,compressed:!0},"atc-rgba-interpolated-alpha":{basisFormat:12,compressed:!0},rgba32:{basisFormat:13,compressed:!1},rgb565:{basisFormat:14,compressed:!1},bgr565:{basisFormat:15,compressed:!1},rgba4444:{basisFormat:16,compressed:!1}};async function c6t(i,e){if(e.basis.containerFormat==="auto"){if(a6t(i)){const n=await Ste(e);return Tte(n.KTX2File,i,e)}const{BasisFile:t}=await Ite(e);return TT(t,i,e)}if(e.basis.module==="encoder"){const t=await Ste(e);return e.basis.containerFormat==="ktx2"?Tte(t.KTX2File,i,e):TT(t.BasisFile,i,e)}else{const{BasisFile:n}=await Ite(e);return TT(n,i,e)}}function TT(i,e,t){const n=new i(new Uint8Array(e));try{if(!n.startTranscoding())throw new Error("Failed to start basis transcoding");const o=n.getNumImages(),r=[];for(let s=0;s<o;s++){const a=n.getNumLevels(s),l=[];for(let c=0;c<a;c++)l.push(u6t(n,s,c,t));r.push(l)}return r}finally{n.close(),n.delete()}}function u6t(i,e,t,n){const o=i.getImageWidth(e,t),r=i.getImageHeight(e,t),s=i.getHasAlpha(),{compressed:a,format:l,basisFormat:c}=kte(n,s),u=i.getImageTranscodedSizeInBytes(e,t,c),d=new Uint8Array(u);if(!i.transcodeImage(d,e,t,c,0,0))throw new Error("failed to start Basis transcoding");return{width:o,height:r,data:d,compressed:a,format:l,hasAlpha:s}}function Tte(i,e,t){const n=new i(new Uint8Array(e));try{if(!n.startTranscoding())throw new Error("failed to start KTX2 transcoding");const o=n.getLevels(),r=[];for(let s=0;s<o;s++)r.push(d6t(n,s,t));return[r]}finally{n.close(),n.delete()}}function d6t(i,e,t){const{alphaFlag:n,height:o,width:r}=i.getImageLevelInfo(e,0,0),{compressed:s,format:a,basisFormat:l}=kte(t,n),c=i.getImageTranscodedSizeInBytes(e,0,0,l),u=new Uint8Array(c);if(!i.transcodeImage(u,e,0,0,l,0,-1,-1))throw new Error("Failed to transcode KTX2 image");return{width:r,height:o,data:u,compressed:s,levelSize:c,hasAlpha:n,format:a}}function kte(i,e){let t=i&&i.basis&&i.basis.format;return t==="auto"&&(t=Rte()),typeof t=="object"&&(t=e?t.alpha:t.noAlpha),t=t.toLowerCase(),l6t[t]}function Rte(){const i=s6t();return i.has("astc")?"astc-4x4":i.has("dxt")?{alpha:"bc3",noAlpha:"bc1"}:i.has("pvrtc")?{alpha:"pvrtc1-4-rgba",noAlpha:"pvrtc1-4-rgb"}:i.has("etc1")?"etc1":i.has("etc2")?"etc2":"rgb565"}const h6t={...{dataType:null,batchType:null,name:"Basis",id:"basis",module:"textures",version:$vt,worker:!0,extensions:["basis","ktx2"],mimeTypes:["application/octet-stream","image/ktx2"],tests:["sB"],binary:!0,options:{basis:{format:"auto",libraryPath:"libs/",containerFormat:"auto",module:"transcoder"}}},parse:c6t},$f=!0,_te=1735152710,kT=12,e9=8,p6t=1313821514,f6t=5130562,A6t=0,m6t=0,g6t=1;function y6t(i,e=0){return`${String.fromCharCode(i.getUint8(e+0))}${String.fromCharCode(i.getUint8(e+1))}${String.fromCharCode(i.getUint8(e+2))}${String.fromCharCode(i.getUint8(e+3))}`}function v6t(i,e=0,t={}){const n=new DataView(i),{magic:o=_te}=t,r=n.getUint32(e,!1);return r===o||r===_te}function w6t(i,e,t=0,n={}){const o=new DataView(e),r=y6t(o,t+0),s=o.getUint32(t+4,$f),a=o.getUint32(t+8,$f);switch(Object.assign(i,{header:{byteOffset:t,byteLength:a,hasBinChunk:!1},type:r,version:s,json:{},binChunks:[]}),t+=kT,i.version){case 1:return C6t(i,o,t);case 2:return b6t(i,o,t,n={});default:throw new Error(`Invalid GLB version ${i.version}. Only supports version 1 and 2.`)}}function C6t(i,e,t){vc(i.header.byteLength>kT+e9);const n=e.getUint32(t+0,$f),o=e.getUint32(t+4,$f);return t+=e9,vc(o===A6t),RT(i,e,t,n),t+=n,t+=_T(i,e,t,i.header.byteLength),t}function b6t(i,e,t,n){return vc(i.header.byteLength>kT+e9),x6t(i,e,t,n),t+i.header.byteLength}function x6t(i,e,t,n){for(;t+8<=i.header.byteLength;){const o=e.getUint32(t+0,$f),r=e.getUint32(t+4,$f);switch(t+=e9,r){case p6t:RT(i,e,t,o);break;case f6t:_T(i,e,t,o);break;case m6t:n.strict||RT(i,e,t,o);break;case g6t:n.strict||_T(i,e,t,o);break}t+=V4(o,4)}return t}function RT(i,e,t,n){const o=new Uint8Array(e.buffer,t,n),s=new TextDecoder("utf8").decode(o);return i.json=JSON.parse(s),V4(n,4)}function _T(i,e,t,n){return i.header.hasBinChunk=!0,i.binChunks.push({byteOffset:t,byteLength:n,arrayBuffer:e.buffer}),V4(n,4)}function Dte(i,e){if(i.startsWith("data:")||i.startsWith("http:")||i.startsWith("https:"))return i;const n=e.baseUri||e.uri;if(!n)throw new Error(`'baseUri' must be provided to resolve relative url ${i}`);return n.substr(0,n.lastIndexOf("/")+1)+i}const M6t="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",E6t="B9h9z9tFBBBF8dL9gBB9gLaaaaaFa9gEaaaB9gGaaB9gFaFaEQSBBFBFFGEGEGIILF9wFFFLEFBFKNFaFCx/aFMO/LFVK9tv9t9vq95GBt9f9f939h9z9t9f9j9h9s9s9f9jW9vq9zBBp9tv9z9o9v9wW9f9kv9j9v9kv9WvqWv94h919m9mvqBG8Z9tv9z9o9v9wW9f9kv9j9v9kv9J9u9kv94h919m9mvqBIy9tv9z9o9v9wW9f9kv9j9v9kv9J9u9kv949TvZ91v9u9jvBLn9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9P9jWBKi9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9R919hWBNn9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9F949wBcI9z9iqlBMc/j9JSIBTEM9+FLa8jUUUUBCTlRBCBRFEXCBRGCBREEXABCNJAGJAECUaAFAGrCFZHIy86BBAEAIJREAGCFJHGCN9HQBMAFCx+YUUBJAE86BBAFCEWCxkUUBJAB8pEN83EBAFCFJHFCUG9HQBMMkRIbaG97FaK978jUUUUBCU/KBlHL8kUUUUBC9+RKGXAGCFJAI9LQBCaRKAE2BBC+gF9HQBALAEAIJHOAGlAG/8cBBCUoBAG9uC/wgBZHKCUGAKCUG9JyRNAECFJRKCBRVGXEXAVAF9PQFANAFAVlAVANJAF9JyRcGXGXAG9FQBAcCbJHIC9wZHMCE9sRSAMCFWRQAICIrCEJCGrRfCBRbEXAKRTCBRtGXEXGXAOATlAf9PQBCBRKSLMALCU/CBJAtAM9sJRmATAfJRKCBREGXAMCoB9JQBAOAKlC/gB9JQBCBRIEXAmAIJREGXGXGXGXGXATAICKrJ2BBHYCEZfIBFGEBMAECBDtDMIBSEMAEAKDBBIAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnHPCGD+MFAPDQBTFtGmEYIPLdKeOnC0+G+MiDtD9OHdCEDbD8jHPD8dBhUg/8/4/w/goB9+h84k7HeCEWCxkUUBJDBEBAeCx+YUUBJDBBBHnAnDQBBBBBBBBBBBBBBBBAPD8dFhUg/8/4/w/goB9+h84k7HeCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMIBAKCIJAnDeBJAeCx+YUUBJ2BBJRKSGMAEAKDBBNAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnC+P+e+8/4BDtD9OHdCbDbD8jHPD8dBhUg/8/4/w/goB9+h84k7HeCEWCxkUUBJDBEBAeCx+YUUBJDBBBHnAnDQBBBBBBBBBBBBBBBBAPD8dFhUg/8/4/w/goB9+h84k7HeCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMIBAKCNJAnDeBJAeCx+YUUBJ2BBJRKSFMAEAKDBBBDMIBAKCTJRKMGXGXGXGXGXAYCGrCEZfIBFGEBMAECBDtDMITSEMAEAKDBBIAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnHPCGD+MFAPDQBTFtGmEYIPLdKeOnC0+G+MiDtD9OHdCEDbD8jHPD8dBhUg/8/4/w/goB9+h84k7HeCEWCxkUUBJDBEBAeCx+YUUBJDBBBHnAnDQBBBBBBBBBBBBBBBBAPD8dFhUg/8/4/w/goB9+h84k7HeCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMITAKCIJAnDeBJAeCx+YUUBJ2BBJRKSGMAEAKDBBNAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnC+P+e+8/4BDtD9OHdCbDbD8jHPD8dBhUg/8/4/w/goB9+h84k7HeCEWCxkUUBJDBEBAeCx+YUUBJDBBBHnAnDQBBBBBBBBBBBBBBBBAPD8dFhUg/8/4/w/goB9+h84k7HeCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMITAKCNJAnDeBJAeCx+YUUBJ2BBJRKSFMAEAKDBBBDMITAKCTJRKMGXGXGXGXGXAYCIrCEZfIBFGEBMAECBDtDMIASEMAEAKDBBIAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnHPCGD+MFAPDQBTFtGmEYIPLdKeOnC0+G+MiDtD9OHdCEDbD8jHPD8dBhUg/8/4/w/goB9+h84k7HeCEWCxkUUBJDBEBAeCx+YUUBJDBBBHnAnDQBBBBBBBBBBBBBBBBAPD8dFhUg/8/4/w/goB9+h84k7HeCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMIAAKCIJAnDeBJAeCx+YUUBJ2BBJRKSGMAEAKDBBNAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnC+P+e+8/4BDtD9OHdCbDbD8jHPD8dBhUg/8/4/w/goB9+h84k7HeCEWCxkUUBJDBEBAeCx+YUUBJDBBBHnAnDQBBBBBBBBBBBBBBBBAPD8dFhUg/8/4/w/goB9+h84k7HeCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMIAAKCNJAnDeBJAeCx+YUUBJ2BBJRKSFMAEAKDBBBDMIAAKCTJRKMGXGXGXGXGXAYCKrfIBFGEBMAECBDtDMI8wSEMAEAKDBBIAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnHPCGD+MFAPDQBTFtGmEYIPLdKeOnC0+G+MiDtD9OHdCEDbD8jHPD8dBhUg/8/4/w/goB9+h84k7HYCEWCxkUUBJDBEBAYCx+YUUBJDBBBHnAnDQBBBBBBBBBBBBBBBBAPD8dFhUg/8/4/w/goB9+h84k7HYCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMI8wAKCIJAnDeBJAYCx+YUUBJ2BBJRKSGMAEAKDBBNAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnC+P+e+8/4BDtD9OHdCbDbD8jHPD8dBhUg/8/4/w/goB9+h84k7HYCEWCxkUUBJDBEBAYCx+YUUBJDBBBHnAnDQBBBBBBBBBBBBBBBBAPD8dFhUg/8/4/w/goB9+h84k7HYCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMI8wAKCNJAnDeBJAYCx+YUUBJ2BBJRKSFMAEAKDBBBDMI8wAKCTJRKMAICoBJREAICUFJAM9LQFAERIAOAKlC/fB9LQBMMGXAEAM9PQBAECErRIEXGXAOAKlCi9PQBCBRKSOMAmAEJRYGXGXGXGXGXATAECKrJ2BBAICKZrCEZfIBFGEBMAYCBDtDMIBSEMAYAKDBBIAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnHPCGD+MFAPDQBTFtGmEYIPLdKeOnC0+G+MiDtD9OHdCEDbD8jHPD8dBhUg/8/4/w/goB9+h84k7HeCEWCxkUUBJDBEBAeCx+YUUBJDBBBHnAnDQBBBBBBBBBBBBBBBBAPD8dFhUg/8/4/w/goB9+h84k7HeCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMIBAKCIJAnDeBJAeCx+YUUBJ2BBJRKSGMAYAKDBBNAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnC+P+e+8/4BDtD9OHdCbDbD8jHPD8dBhUg/8/4/w/goB9+h84k7HeCEWCxkUUBJDBEBAeCx+YUUBJDBBBHnAnDQBBBBBBBBBBBBBBBBAPD8dFhUg/8/4/w/goB9+h84k7HeCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMIBAKCNJAnDeBJAeCx+YUUBJ2BBJRKSFMAYAKDBBBDMIBAKCTJRKMAICGJRIAECTJHEAM9JQBMMGXAK9FQBAKRTAtCFJHtCI6QGSFMMCBRKSEMGXAM9FQBALCUGJAbJREALAbJDBGBRnCBRYEXAEALCU/CBJAYJHIDBIBHdCFD9tAdCFDbHPD9OD9hD9RHdAIAMJDBIBHiCFD9tAiAPD9OD9hD9RHiDQBTFtGmEYIPLdKeOnH8ZAIAQJDBIBHpCFD9tApAPD9OD9hD9RHpAIASJDBIBHyCFD9tAyAPD9OD9hD9RHyDQBTFtGmEYIPLdKeOnH8cDQBFTtGEmYILPdKOenHPAPDQBFGEBFGEBFGEBFGEAnD9uHnDyBjGBAEAGJHIAnAPAPDQILKOILKOILKOILKOD9uHnDyBjGBAIAGJHIAnAPAPDQNVcMNVcMNVcMNVcMD9uHnDyBjGBAIAGJHIAnAPAPDQSQfbSQfbSQfbSQfbD9uHnDyBjGBAIAGJHIAnA8ZA8cDQNVi8ZcMpySQ8c8dfb8e8fHPAPDQBFGEBFGEBFGEBFGED9uHnDyBjGBAIAGJHIAnAPAPDQILKOILKOILKOILKOD9uHnDyBjGBAIAGJHIAnAPAPDQNVcMNVcMNVcMNVcMD9uHnDyBjGBAIAGJHIAnAPAPDQSQfbSQfbSQfbSQfbD9uHnDyBjGBAIAGJHIAnAdAiDQNiV8ZcpMyS8cQ8df8eb8fHdApAyDQNiV8ZcpMyS8cQ8df8eb8fHiDQBFTtGEmYILPdKOenHPAPDQBFGEBFGEBFGEBFGED9uHnDyBjGBAIAGJHIAnAPAPDQILKOILKOILKOILKOD9uHnDyBjGBAIAGJHIAnAPAPDQNVcMNVcMNVcMNVcMD9uHnDyBjGBAIAGJHIAnAPAPDQSQfbSQfbSQfbSQfbD9uHnDyBjGBAIAGJHIAnAdAiDQNVi8ZcMpySQ8c8dfb8e8fHPAPDQBFGEBFGEBFGEBFGED9uHnDyBjGBAIAGJHIAnAPAPDQILKOILKOILKOILKOD9uHnDyBjGBAIAGJHIAnAPAPDQNVcMNVcMNVcMNVcMD9uHnDyBjGBAIAGJHIAnAPAPDQSQfbSQfbSQfbSQfbD9uHnDyBjGBAIAGJREAYCTJHYAM9JQBMMAbCIJHbAG9JQBMMABAVAG9sJALCUGJAcAG9s/8cBBALALCUGJAcCaJAG9sJAG/8cBBMAcCBAKyAVJRVAKQBMC9+RKSFMCBC99AOAKlAGCAAGCA9Ly6yRKMALCU/KBJ8kUUUUBAKMNBT+BUUUBM+KmFTa8jUUUUBCoFlHL8kUUUUBC9+RKGXAFCE9uHOCtJAI9LQBCaRKAE2BBHNC/wFZC/gF9HQBANCbZHVCF9LQBALCoBJCgFCUF/8MBALC84Jha83EBALC8wJha83EBALC8oJha83EBALCAJha83EBALCiJha83EBALCTJha83EBALha83ENALha83EBAEAIJC9wJRcAECFJHNAOJRMGXAF9FQBCQCbAVCF6yRSABRECBRVCBRQCBRfCBRICBRKEXGXAMAcuQBC9+RKSEMGXGXAN2BBHOC/vF9LQBALCoBJAOCIrCa9zAKJCbZCEWJHb8oGIRTAb8oGBRtGXAOCbZHbAS9PQBALAOCa9zAIJCbZCGWJ8oGBAVAbyROAb9FRbGXGXAGCG9HQBABAt87FBABCIJAO87FBABCGJAT87FBSFMAEAtjGBAECNJAOjGBAECIJATjGBMAVAbJRVALCoBJAKCEWJHmAOjGBAmATjGIALAICGWJAOjGBALCoBJAKCFJCbZHKCEWJHTAtjGBATAOjGIAIAbJRIAKCFJRKSGMGXGXAbCb6QBAQAbJAbC989zJCFJRQSFMAM1BBHbCgFZROGXGXAbCa9MQBAMCFJRMSFMAM1BFHbCgBZCOWAOCgBZqROGXAbCa9MQBAMCGJRMSFMAM1BGHbCgBZCfWAOqROGXAbCa9MQBAMCEJRMSFMAM1BEHbCgBZCdWAOqROGXAbCa9MQBAMCIJRMSFMAM2BIC8cWAOqROAMCLJRMMAOCFrCBAOCFZl9zAQJRQMGXGXAGCG9HQBABAt87FBABCIJAQ87FBABCGJAT87FBSFMAEAtjGBAECNJAQjGBAECIJATjGBMALCoBJAKCEWJHOAQjGBAOATjGIALAICGWJAQjGBALCoBJAKCFJCbZHKCEWJHOAtjGBAOAQjGIAICFJRIAKCFJRKSFMGXAOCDF9LQBALAIAcAOCbZJ2BBHbCIrHTlCbZCGWJ8oGBAVCFJHtATyROALAIAblCbZCGWJ8oGBAtAT9FHmJHtAbCbZHTyRbAT9FRTGXGXAGCG9HQBABAV87FBABCIJAb87FBABCGJAO87FBSFMAEAVjGBAECNJAbjGBAECIJAOjGBMALAICGWJAVjGBALCoBJAKCEWJHYAOjGBAYAVjGIALAICFJHICbZCGWJAOjGBALCoBJAKCFJCbZCEWJHYAbjGBAYAOjGIALAIAmJCbZHICGWJAbjGBALCoBJAKCGJCbZHKCEWJHOAVjGBAOAbjGIAKCFJRKAIATJRIAtATJRVSFMAVCBAM2BBHYyHTAOC/+F6HPJROAYCbZRtGXGXAYCIrHmQBAOCFJRbSFMAORbALAIAmlCbZCGWJ8oGBROMGXGXAtQBAbCFJRVSFMAbRVALAIAYlCbZCGWJ8oGBRbMGXGXAP9FQBAMCFJRYSFMAM1BFHYCgFZRTGXGXAYCa9MQBAMCGJRYSFMAM1BGHYCgBZCOWATCgBZqRTGXAYCa9MQBAMCEJRYSFMAM1BEHYCgBZCfWATqRTGXAYCa9MQBAMCIJRYSFMAM1BIHYCgBZCdWATqRTGXAYCa9MQBAMCLJRYSFMAMCKJRYAM2BLC8cWATqRTMATCFrCBATCFZl9zAQJHQRTMGXGXAmCb6QBAYRPSFMAY1BBHMCgFZROGXGXAMCa9MQBAYCFJRPSFMAY1BFHMCgBZCOWAOCgBZqROGXAMCa9MQBAYCGJRPSFMAY1BGHMCgBZCfWAOqROGXAMCa9MQBAYCEJRPSFMAY1BEHMCgBZCdWAOqROGXAMCa9MQBAYCIJRPSFMAYCLJRPAY2BIC8cWAOqROMAOCFrCBAOCFZl9zAQJHQROMGXGXAtCb6QBAPRMSFMAP1BBHMCgFZRbGXGXAMCa9MQBAPCFJRMSFMAP1BFHMCgBZCOWAbCgBZqRbGXAMCa9MQBAPCGJRMSFMAP1BGHMCgBZCfWAbqRbGXAMCa9MQBAPCEJRMSFMAP1BEHMCgBZCdWAbqRbGXAMCa9MQBAPCIJRMSFMAPCLJRMAP2BIC8cWAbqRbMAbCFrCBAbCFZl9zAQJHQRbMGXGXAGCG9HQBABAT87FBABCIJAb87FBABCGJAO87FBSFMAEATjGBAECNJAbjGBAECIJAOjGBMALCoBJAKCEWJHYAOjGBAYATjGIALAICGWJATjGBALCoBJAKCFJCbZCEWJHYAbjGBAYAOjGIALAICFJHICbZCGWJAOjGBALCoBJAKCGJCbZCEWJHOATjGBAOAbjGIALAIAm9FAmCb6qJHICbZCGWJAbjGBAIAt9FAtCb6qJRIAKCEJRKMANCFJRNABCKJRBAECSJREAKCbZRKAICbZRIAfCEJHfAF9JQBMMCBC99AMAc6yRKMALCoFJ8kUUUUBAKM/tIFGa8jUUUUBCTlRLC9+RKGXAFCLJAI9LQBCaRKAE2BBC/+FZC/QF9HQBALhB83ENAECFJRKAEAIJC98JREGXAF9FQBGXAGCG6QBEXGXAKAE9JQBC9+bMAK1BBHGCgFZRIGXGXAGCa9MQBAKCFJRKSFMAK1BFHGCgBZCOWAICgBZqRIGXAGCa9MQBAKCGJRKSFMAK1BGHGCgBZCfWAIqRIGXAGCa9MQBAKCEJRKSFMAK1BEHGCgBZCdWAIqRIGXAGCa9MQBAKCIJRKSFMAK2BIC8cWAIqRIAKCLJRKMALCNJAICFZCGWqHGAICGrCBAICFrCFZl9zAG8oGBJHIjGBABAIjGBABCIJRBAFCaJHFQBSGMMEXGXAKAE9JQBC9+bMAK1BBHGCgFZRIGXGXAGCa9MQBAKCFJRKSFMAK1BFHGCgBZCOWAICgBZqRIGXAGCa9MQBAKCGJRKSFMAK1BGHGCgBZCfWAIqRIGXAGCa9MQBAKCEJRKSFMAK1BEHGCgBZCdWAIqRIGXAGCa9MQBAKCIJRKSFMAK2BIC8cWAIqRIAKCLJRKMABAICGrCBAICFrCFZl9zALCNJAICFZCGWqHI8oGBJHG87FBAIAGjGBABCGJRBAFCaJHFQBMMCBC99AKAE6yRKMAKM/xLGEaK978jUUUUBCAlHE8kUUUUBGXGXAGCI9HQBGXAFC98ZHI9FQBABRGCBRLEXAGAGDBBBHKCiD+rFCiD+sFD/6FHOAKCND+rFCiD+sFD/6FAOD/gFAKCTD+rFCiD+sFD/6FHND/gFD/kFD/lFHVCBDtD+2FHcAOCUUUU94DtHMD9OD9RD/kFHO9DBB/+hDYAOAOD/mFAVAVD/mFANAcANAMD9OD9RD/kFHOAOD/mFD/kFD/kFD/jFD/nFHND/mF9DBBX9LDYHcD/kFCgFDtD9OAKCUUU94DtD9OD9QAOAND/mFAcD/kFCND+rFCU/+EDtD9OD9QAVAND/mFAcD/kFCTD+rFCUU/8ODtD9OD9QDMBBAGCTJRGALCIJHLAI9JQBMMAIAF9PQFAEAFCEZHLCGWHGqCBCTAGl/8MBAEABAICGWJHIAG/8cBBGXAL9FQBAEAEDBIBHKCiD+rFCiD+sFD/6FHOAKCND+rFCiD+sFD/6FAOD/gFAKCTD+rFCiD+sFD/6FHND/gFD/kFD/lFHVCBDtD+2FHcAOCUUUU94DtHMD9OD9RD/kFHO9DBB/+hDYAOAOD/mFAVAVD/mFANAcANAMD9OD9RD/kFHOAOD/mFD/kFD/kFD/jFD/nFHND/mF9DBBX9LDYHcD/kFCgFDtD9OAKCUUU94DtD9OD9QAOAND/mFAcD/kFCND+rFCU/+EDtD9OD9QAVAND/mFAcD/kFCTD+rFCUU/8ODtD9OD9QDMIBMAIAEAG/8cBBSFMABAFC98ZHGT+HUUUBAGAF9PQBAEAFCEZHICEWHLJCBCAALl/8MBAEABAGCEWJHGAL/8cBBAEAIT+HUUUBAGAEAL/8cBBMAECAJ8kUUUUBM+yEGGaO97GXAF9FQBCBRGEXABCTJHEAEDBBBHICBDtHLCUU98D8cFCUU98D8cEHKD9OABDBBBHOAIDQILKOSQfbPden8c8d8e8fCggFDtD9OD/6FAOAIDQBFGENVcMTtmYi8ZpyHICTD+sFD/6FHND/gFAICTD+rFCTD+sFD/6FHVD/gFD/kFD/lFHI9DB/+g6DYAVAIALD+2FHLAVCUUUU94DtHcD9OD9RD/kFHVAVD/mFAIAID/mFANALANAcD9OD9RD/kFHIAID/mFD/kFD/kFD/jFD/nFHND/mF9DBBX9LDYHLD/kFCTD+rFAVAND/mFALD/kFCggEDtD9OD9QHVAIAND/mFALD/kFCaDbCBDnGCBDnECBDnKCBDnOCBDncCBDnMCBDnfCBDnbD9OHIDQNVi8ZcMpySQ8c8dfb8e8fD9QDMBBABAOAKD9OAVAIDQBFTtGEmYILPdKOenD9QDMBBABCAJRBAGCIJHGAF9JQBMMM94FEa8jUUUUBCAlHE8kUUUUBABAFC98ZHIT+JUUUBGXAIAF9PQBAEAFCEZHLCEWHFJCBCAAFl/8MBAEABAICEWJHBAF/8cBBAEALT+JUUUBABAEAF/8cBBMAECAJ8kUUUUBM/hEIGaF97FaL978jUUUUBCTlRGGXAF9FQBCBREEXAGABDBBBHIABCTJHLDBBBHKDQILKOSQfbPden8c8d8e8fHOCTD+sFHNCID+rFDMIBAB9DBBU8/DY9D/zI818/DYANCEDtD9QD/6FD/nFHNAIAKDQBFGENVcMTtmYi8ZpyHICTD+rFCTD+sFD/6FD/mFHKAKD/mFANAICTD+sFD/6FD/mFHVAVD/mFANAOCTD+rFCTD+sFD/6FD/mFHOAOD/mFD/kFD/kFD/lFCBDtD+4FD/jF9DB/+g6DYHND/mF9DBBX9LDYHID/kFCggEDtHcD9OAVAND/mFAID/kFCTD+rFD9QHVAOAND/mFAID/kFCTD+rFAKAND/mFAID/kFAcD9OD9QHNDQBFTtGEmYILPdKOenHID8dBAGDBIBDyB+t+J83EBABCNJAID8dFAGDBIBDyF+t+J83EBALAVANDQNVi8ZcMpySQ8c8dfb8e8fHND8dBAGDBIBDyG+t+J83EBABCiJAND8dFAGDBIBDyE+t+J83EBABCAJRBAECIJHEAF9JQBMMM/3FGEaF978jUUUUBCoBlREGXAGCGrAF9sHIC98ZHL9FQBCBRGABRFEXAFAFDBBBHKCND+rFCND+sFD/6FAKCiD+sFCnD+rFCUUU/8EDtD+uFD/mFDMBBAFCTJRFAGCIJHGAL9JQBMMGXALAI9PQBAEAICEZHGCGWHFqCBCoBAFl/8MBAEABALCGWJHLAF/8cBBGXAG9FQBAEAEDBIBHKCND+rFCND+sFD/6FAKCiD+sFCnD+rFCUUU/8EDtD+uFD/mFDMIBMALAEAF/8cBBMM9TFEaCBCB8oGUkUUBHFABCEJC98ZJHBjGUkUUBGXGXAB8/BCTWHGuQBCaREABAGlCggEJCTrXBCa6QFMAFREMAEMMMFBCUNMIT9tBB",B6t=new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,3,2,0,0,5,3,1,0,1,12,1,0,10,22,2,12,0,65,0,65,0,65,0,252,10,0,0,11,7,0,65,0,253,15,26,11]),I6t=new Uint8Array([32,0,65,253,3,1,2,34,4,106,6,5,11,8,7,20,13,33,12,16,128,9,116,64,19,113,127,15,10,21,22,14,255,66,24,54,136,107,18,23,192,26,114,118,132,17,77,101,130,144,27,87,131,44,45,74,156,154,70,167]),S6t={0:"",1:"meshopt_decodeFilterOct",2:"meshopt_decodeFilterQuat",3:"meshopt_decodeFilterExp",NONE:"",OCTAHEDRAL:"meshopt_decodeFilterOct",QUATERNION:"meshopt_decodeFilterQuat",EXPONENTIAL:"meshopt_decodeFilterExp"},P6t={0:"meshopt_decodeVertexBuffer",1:"meshopt_decodeIndexBuffer",2:"meshopt_decodeIndexSequence",ATTRIBUTES:"meshopt_decodeVertexBuffer",TRIANGLES:"meshopt_decodeIndexBuffer",INDICES:"meshopt_decodeIndexSequence"};async function T6t(i,e,t,n,o,r="NONE"){const s=await k6t();D6t(s,s.exports[P6t[o]],i,e,t,n,s.exports[S6t[r||"NONE"]])}let DT;async function k6t(){return DT||(DT=R6t()),DT}async function R6t(){let i=M6t;WebAssembly.validate(B6t)&&(i=E6t,console.log("Warning: meshopt_decoder is using experimental SIMD support"));const e=await WebAssembly.instantiate(_6t(i),{});return await e.instance.exports.__wasm_call_ctors(),e.instance}function _6t(i){const e=new Uint8Array(i.length);for(let n=0;n<i.length;++n){const o=i.charCodeAt(n);e[n]=o>96?o-71:o>64?o-65:o>47?o+4:o>46?63:62}let t=0;for(let n=0;n<i.length;++n)e[t++]=e[n]<60?I6t[e[n]]:(e[n]-60)*64+e[++n];return e.buffer.slice(0,t)}function D6t(i,e,t,n,o,r,s){const a=i.exports.sbrk,l=n+3&-4,c=a(l*o),u=a(r.length),d=new Uint8Array(i.exports.memory.buffer);d.set(r,u);const h=e(c,n,o,u,r.length);if(h===0&&s&&s(c,l,o),t.set(d.subarray(c,c+n*o)),a(c-a(0)),h!==0)throw new Error(`Malformed buffer data: ${h}`)}const t9="EXT_meshopt_compression",L6t=t9;async function F6t(i,e){const t=new _o(i);if(!e?.gltf?.decompressMeshes||!e.gltf?.loadBuffers)return;const n=[];for(const o of i.json.bufferViews||[])n.push(O6t(t,o));await Promise.all(n),t.removeExtension(t9)}async function O6t(i,e){const t=i.getObjectExtension(e,t9);if(t){const{byteOffset:n=0,byteLength:o=0,byteStride:r,count:s,mode:a,filter:l="NONE",buffer:c}=t,u=i.gltf.buffers[c],d=new Uint8Array(u.arrayBuffer,u.byteOffset+n,o),h=new Uint8Array(i.gltf.buffers[e.buffer].arrayBuffer,e.byteOffset,e.byteLength);await T6t(h,s,r,d,a,l),i.removeObjectExtension(e,t9)}}const N6t=Object.freeze(Object.defineProperty({__proto__:null,decode:F6t,name:L6t},Symbol.toStringTag,{value:"Module"})),e1="EXT_texture_webp",U6t=e1;function V6t(i,e){const t=new _o(i);if(!Lyt("image/webp")){if(t.getRequiredExtensions().includes(e1))throw new Error(`gltf: Required extension ${e1} not supported by browser`);return}const{json:n}=t;for(const o of n.textures||[]){const r=t.getObjectExtension(o,e1);r&&(o.source=r.source),t.removeObjectExtension(o,e1)}t.removeExtension(e1)}const H6t=Object.freeze(Object.defineProperty({__proto__:null,name:U6t,preprocess:V6t},Symbol.toStringTag,{value:"Module"})),i9="KHR_texture_basisu",z6t=i9;function j6t(i,e){const t=new _o(i),{json:n}=t;for(const o of n.textures||[]){const r=t.getObjectExtension(o,i9);r&&(o.source=r.source,t.removeObjectExtension(o,i9))}t.removeExtension(i9)}const G6t=Object.freeze(Object.defineProperty({__proto__:null,name:z6t,preprocess:j6t},Symbol.toStringTag,{value:"Module"})),Q6t={dataType:null,batchType:null,name:"Draco",id:"draco",module:"draco",version:"4.3.3",worker:!0,extensions:["drc"],mimeTypes:["application/octet-stream"],binary:!0,tests:["DRACO"],options:{draco:{decoderType:typeof WebAssembly=="object"?"wasm":"js",libraryPath:"libs/",extraAttributes:{},attributeNameEntry:void 0}}};function q6t(i,e,t){const n=Fte(e.metadata),o=[],r=K6t(e.attributes);for(const s in i){const a=i[s],l=Lte(s,a,r[s]);o.push(l)}if(t){const s=Lte("indices",t);o.push(s)}return{fields:o,metadata:n}}function K6t(i){const e={};for(const t in i){const n=i[t];e[n.name||"undefined"]=n}return e}function Lte(i,e,t){const n=t?Fte(t.metadata):void 0;return oyt(i,e,n)}function Fte(i){Object.entries(i);const e={};for(const t in i)e[`${t}.string`]=JSON.stringify(i[t]);return e}const Ote={POSITION:"POSITION",NORMAL:"NORMAL",COLOR:"COLOR_0",TEX_COORD:"TEXCOORD_0"},J6t={1:Int8Array,2:Uint8Array,3:Int16Array,4:Uint16Array,5:Int32Array,6:Uint32Array,9:Float32Array},W6t=4;class Z6t{draco;decoder;metadataQuerier;constructor(e){this.draco=e,this.decoder=new this.draco.Decoder,this.metadataQuerier=new this.draco.MetadataQuerier}destroy(){this.draco.destroy(this.decoder),this.draco.destroy(this.metadataQuerier)}parseSync(e,t={}){const n=new this.draco.DecoderBuffer;n.Init(new Int8Array(e),e.byteLength),this._disableAttributeTransforms(t);const o=this.decoder.GetEncodedGeometryType(n),r=o===this.draco.TRIANGULAR_MESH?new this.draco.Mesh:new this.draco.PointCloud;try{let s;switch(o){case this.draco.TRIANGULAR_MESH:s=this.decoder.DecodeBufferToMesh(n,r);break;case this.draco.POINT_CLOUD:s=this.decoder.DecodeBufferToPointCloud(n,r);break;default:throw new Error("DRACO: Unknown geometry type.")}if(!s.ok()||!r.ptr){const h=`DRACO decompression failed: ${s.error_msg()}`;throw new Error(h)}const a=this._getDracoLoaderData(r,o,t),l=this._getMeshData(r,a,t),c=nyt(l.attributes),u=q6t(l.attributes,a,l.indices);return{loader:"draco",loaderData:a,header:{vertexCount:r.num_points(),boundingBox:c},...l,schema:u}}finally{this.draco.destroy(n),r&&this.draco.destroy(r)}}_getDracoLoaderData(e,t,n){const o=this._getTopLevelMetadata(e),r=this._getDracoAttributes(e,n);return{geometry_type:t,num_attributes:e.num_attributes(),num_points:e.num_points(),num_faces:e instanceof this.draco.Mesh?e.num_faces():0,metadata:o,attributes:r}}_getDracoAttributes(e,t){const n={};for(let o=0;o<e.num_attributes();o++){const r=this.decoder.GetAttribute(e,o),s=this._getAttributeMetadata(e,o);n[r.unique_id()]={unique_id:r.unique_id(),attribute_type:r.attribute_type(),data_type:r.data_type(),num_components:r.num_components(),byte_offset:r.byte_offset(),byte_stride:r.byte_stride(),normalized:r.normalized(),attribute_index:o,metadata:s};const a=this._getQuantizationTransform(r,t);a&&(n[r.unique_id()].quantization_transform=a);const l=this._getOctahedronTransform(r,t);l&&(n[r.unique_id()].octahedron_transform=l)}return n}_getMeshData(e,t,n){const o=this._getMeshAttributes(t,e,n);if(!o.POSITION)throw new Error("DRACO: No position attribute found.");return e instanceof this.draco.Mesh?n.topology==="triangle-strip"?{topology:"triangle-strip",mode:4,attributes:o,indices:{value:this._getTriangleStripIndices(e),size:1}}:{topology:"triangle-list",mode:5,attributes:o,indices:{value:this._getTriangleListIndices(e),size:1}}:{topology:"point-list",mode:0,attributes:o}}_getMeshAttributes(e,t,n){const o={};for(const r of Object.values(e.attributes)){const s=this._deduceAttributeName(r,n);r.name=s;const a=this._getAttributeValues(t,r);if(a){const{value:l,size:c}=a;o[s]={value:l,size:c,byteOffset:r.byte_offset,byteStride:r.byte_stride,normalized:r.normalized}}}return o}_getTriangleListIndices(e){const n=e.num_faces()*3,o=n*W6t,r=this.draco._malloc(o);try{return this.decoder.GetTrianglesUInt32Array(e,o,r),new Uint32Array(this.draco.HEAPF32.buffer,r,n).slice()}finally{this.draco._free(r)}}_getTriangleStripIndices(e){const t=new this.draco.DracoInt32Array;try{return this.decoder.GetTriangleStripsFromMesh(e,t),$6t(t)}finally{this.draco.destroy(t)}}_getAttributeValues(e,t){const n=J6t[t.data_type];if(!n)return console.warn(`DRACO: Unsupported attribute type ${t.data_type}`),null;const o=t.num_components,s=e.num_points()*o,a=s*n.BYTES_PER_ELEMENT,l=Y6t(this.draco,n);let c;const u=this.draco._malloc(a);try{const d=this.decoder.GetAttribute(e,t.attribute_index);this.decoder.GetAttributeDataArrayForAllPoints(e,d,l,a,u),c=new n(this.draco.HEAPF32.buffer,u,s).slice()}finally{this.draco._free(u)}return{value:c,size:o}}_deduceAttributeName(e,t){const n=e.unique_id;for(const[s,a]of Object.entries(t.extraAttributes||{}))if(a===n)return s;const o=e.attribute_type;for(const s in Ote)if(this.draco[s]===o)return Ote[s];const r=t.attributeNameEntry||"name";return e.metadata[r]?e.metadata[r].string:`CUSTOM_ATTRIBUTE_${n}`}_getTopLevelMetadata(e){const t=this.decoder.GetMetadata(e);return this._getDracoMetadata(t)}_getAttributeMetadata(e,t){const n=this.decoder.GetAttributeMetadata(e,t);return this._getDracoMetadata(n)}_getDracoMetadata(e){if(!e||!e.ptr)return{};const t={},n=this.metadataQuerier.NumEntries(e);for(let o=0;o<n;o++){const r=this.metadataQuerier.GetEntryName(e,o);t[r]=this._getDracoMetadataField(e,r)}return t}_getDracoMetadataField(e,t){const n=new this.draco.DracoInt32Array;try{this.metadataQuerier.GetIntEntryArray(e,t,n);const o=X6t(n);return{int:this.metadataQuerier.GetIntEntry(e,t),string:this.metadataQuerier.GetStringEntry(e,t),double:this.metadataQuerier.GetDoubleEntry(e,t),intArray:o}}finally{this.draco.destroy(n)}}_disableAttributeTransforms(e){const{quantizedAttributes:t=[],octahedronAttributes:n=[]}=e,o=[...t,...n];for(const r of o)this.decoder.SkipAttributeTransform(this.draco[r])}_getQuantizationTransform(e,t){const{quantizedAttributes:n=[]}=t,o=e.attribute_type();if(n.map(s=>this.decoder[s]).includes(o)){const s=new this.draco.AttributeQuantizationTransform;try{if(s.InitFromAttribute(e))return{quantization_bits:s.quantization_bits(),range:s.range(),min_values:new Float32Array([1,2,3]).map(a=>s.min_value(a))}}finally{this.draco.destroy(s)}}return null}_getOctahedronTransform(e,t){const{octahedronAttributes:n=[]}=t,o=e.attribute_type();if(n.map(s=>this.decoder[s]).includes(o)){const s=new this.draco.AttributeQuantizationTransform;try{if(s.InitFromAttribute(e))return{quantization_bits:s.quantization_bits()}}finally{this.draco.destroy(s)}}return null}}function Y6t(i,e){switch(e){case Float32Array:return i.DT_FLOAT32;case Int8Array:return i.DT_INT8;case Int16Array:return i.DT_INT16;case Int32Array:return i.DT_INT32;case Uint8Array:return i.DT_UINT8;case Uint16Array:return i.DT_UINT16;case Uint32Array:return i.DT_UINT32;default:return i.DT_INVALID}}function X6t(i){const e=i.size(),t=new Int32Array(e);for(let n=0;n<e;n++)t[n]=i.GetValue(n);return t}function $6t(i){const e=i.size(),t=new Int32Array(e);for(let n=0;n<e;n++)t[n]=i.GetValue(n);return t}const e8t="1.5.6",t8t="1.4.1",LT=`https://www.gstatic.com/draco/versioned/decoders/${e8t}`,ir={DECODER:"draco_wasm_wrapper.js",DECODER_WASM:"draco_decoder.wasm",FALLBACK_DECODER:"draco_decoder.js",ENCODER:"draco_encoder.js"},FT={[ir.DECODER]:`${LT}/${ir.DECODER}`,[ir.DECODER_WASM]:`${LT}/${ir.DECODER_WASM}`,[ir.FALLBACK_DECODER]:`${LT}/${ir.FALLBACK_DECODER}`,[ir.ENCODER]:`https://raw.githubusercontent.com/google/draco/${t8t}/javascript/${ir.ENCODER}`};let OT;async function i8t(i){const e=i.modules||{};return e.draco3d?OT||=e.draco3d.createDecoderModule({}).then(t=>({draco:t})):OT||=n8t(i),await OT}async function n8t(i){let e,t;return(i.draco&&i.draco.decoderType)==="js"?e=await Mh(FT[ir.FALLBACK_DECODER],"draco",i,ir.FALLBACK_DECODER):[e,t]=await Promise.all([await Mh(FT[ir.DECODER],"draco",i,ir.DECODER),await Mh(FT[ir.DECODER_WASM],"draco",i,ir.DECODER_WASM)]),e=e||globalThis.DracoDecoderModule,await o8t(e,t)}function o8t(i,e){const t={};return e&&(t.wasmBinary=e),new Promise(n=>{i({...t,onModuleLoaded:o=>n({draco:o})})})}const s8t={...Q6t,parse:r8t};async function r8t(i,e){const{draco:t}=await i8t(e),n=new Z6t(t);try{return n.parseSync(i,e?.draco)}finally{n.destroy()}}function a8t(i){const e={};for(const t in i){const n=i[t];if(t!=="indices"){const o=Nte(n);e[t]=o}}return e}function Nte(i){const{buffer:e,size:t,count:n}=l8t(i);return{value:e,size:t,byteOffset:0,count:n,type:gte(t),componentType:W7(e)}}function l8t(i){let e=i,t=1,n=0;return i&&i.value&&(e=i.value,t=i.size||1),e&&(ArrayBuffer.isView(e)||(e=c8t(e,Float32Array)),n=e.length/t),{buffer:e,size:t,count:n}}function c8t(i,e,t=!1){return i?Array.isArray(i)?new e(i):t&&!(i instanceof e)?new e(i):i:null}const zu="KHR_draco_mesh_compression",u8t=zu;function d8t(i,e,t){const n=new _o(i);for(const o of Ute(n))n.getObjectExtension(o,zu)}async function h8t(i,e,t){if(!e?.gltf?.decompressMeshes)return;const n=new _o(i),o=[];for(const r of Ute(n))n.getObjectExtension(r,zu)&&o.push(f8t(n,r,e,t));await Promise.all(o),n.removeExtension(zu)}function p8t(i,e={}){const t=new _o(i);for(const n of t.json.meshes||[])A8t(n),t.addRequiredExtension(zu)}async function f8t(i,e,t,n){const o=i.getObjectExtension(e,zu);if(!o)return;const r=i.getTypedArrayForBufferView(o.bufferView),s=Nee(r.buffer,r.byteOffset),a={...t};delete a["3d-tiles"];const l=await Cee(s,s8t,a,n),c=a8t(l.attributes);for(const[u,d]of Object.entries(c))if(u in e.attributes){const h=e.attributes[u],p=i.getAccessor(h);p?.min&&p?.max&&(d.min=p.min,d.max=p.max)}e.attributes=c,l.indices&&(e.indices=Nte(l.indices)),i.removeObjectExtension(e,zu),m8t(e)}function A8t(i,e,t=4,n,o){if(!n.DracoWriter)throw new Error("options.gltf.DracoWriter not provided");const r=n.DracoWriter.encodeSync({attributes:i}),s=o?.parseSync?.({attributes:i}),a=n._addFauxAttributes(s.attributes),l=n.addBufferView(r);return{primitives:[{attributes:a,mode:t,extensions:{[zu]:{bufferView:l,attributes:a}}}]}}function m8t(i){if(!i.attributes&&Object.keys(i.attributes).length>0)throw new Error("glTF: Empty primitive detected: Draco decompression failure?")}function*Ute(i){for(const e of i.json.meshes||[])for(const t of e.primitives)yield t}const g8t=Object.freeze(Object.defineProperty({__proto__:null,decode:h8t,encode:p8t,name:u8t,preprocess:d8t},Symbol.toStringTag,{value:"Module"})),y8t={EPSILON:1e-12,debug:!1,precision:4,printTypes:!1,printDegrees:!1,printRowMajor:!0,_cartographicRadians:!1};globalThis.mathgl=globalThis.mathgl||{config:{...y8t}};const Wr=globalThis.mathgl.config;function v8t(i,{precision:e=Wr.precision}={}){return i=w8t(i),`${parseFloat(i.toPrecision(e))}`}function n9(i){return Array.isArray(i)||ArrayBuffer.isView(i)&&!(i instanceof DataView)}function Vte(i,e,t){const n=Wr.EPSILON;try{if(i===e)return!0;if(n9(i)&&n9(e)){if(i.length!==e.length)return!1;for(let o=0;o<i.length;++o)if(!Vte(i[o],e[o]))return!1;return!0}return i&&i.equals?i.equals(e):e&&e.equals?e.equals(i):typeof i=="number"&&typeof e=="number"?Math.abs(i-e)<=Wr.EPSILON*Math.max(1,Math.abs(i),Math.abs(e)):!1}finally{Wr.EPSILON=n}}function w8t(i){return Math.round(i/Wr.EPSILON)*Wr.EPSILON}class Hte extends Array{clone(){return new this.constructor().copy(this)}fromArray(e,t=0){for(let n=0;n<this.ELEMENTS;++n)this[n]=e[n+t];return this.check()}toArray(e=[],t=0){for(let n=0;n<this.ELEMENTS;++n)e[t+n]=this[n];return e}toObject(e){return e}from(e){return Array.isArray(e)?this.copy(e):this.fromObject(e)}to(e){return e===this?this:n9(e)?this.toArray(e):this.toObject(e)}toTarget(e){return e?this.to(e):this}toFloat32Array(){return new Float32Array(this)}toString(){return this.formatString(Wr)}formatString(e){let t="";for(let n=0;n<this.ELEMENTS;++n)t+=(n>0?", ":"")+v8t(this[n],e);return`${e.printTypes?this.constructor.name:""}[${t}]`}equals(e){if(!e||this.length!==e.length)return!1;for(let t=0;t<this.ELEMENTS;++t)if(!Vte(this[t],e[t]))return!1;return!0}exactEquals(e){if(!e||this.length!==e.length)return!1;for(let t=0;t<this.ELEMENTS;++t)if(this[t]!==e[t])return!1;return!0}negate(){for(let e=0;e<this.ELEMENTS;++e)this[e]=-this[e];return this.check()}lerp(e,t,n){if(n===void 0)return this.lerp(this,e,t);for(let o=0;o<this.ELEMENTS;++o){const r=e[o],s=typeof t=="number"?t:t[o];this[o]=r+n*(s-r)}return this.check()}min(e){for(let t=0;t<this.ELEMENTS;++t)this[t]=Math.min(e[t],this[t]);return this.check()}max(e){for(let t=0;t<this.ELEMENTS;++t)this[t]=Math.max(e[t],this[t]);return this.check()}clamp(e,t){for(let n=0;n<this.ELEMENTS;++n)this[n]=Math.min(Math.max(this[n],e[n]),t[n]);return this.check()}add(...e){for(const t of e)for(let n=0;n<this.ELEMENTS;++n)this[n]+=t[n];return this.check()}subtract(...e){for(const t of e)for(let n=0;n<this.ELEMENTS;++n)this[n]-=t[n];return this.check()}scale(e){if(typeof e=="number")for(let t=0;t<this.ELEMENTS;++t)this[t]*=e;else for(let t=0;t<this.ELEMENTS&&t<e.length;++t)this[t]*=e[t];return this.check()}multiplyByScalar(e){for(let t=0;t<this.ELEMENTS;++t)this[t]*=e;return this.check()}check(){if(Wr.debug&&!this.validate())throw new Error(`math.gl: ${this.constructor.name} some fields set to invalid numbers'`);return this}validate(){let e=this.length===this.ELEMENTS;for(let t=0;t<this.ELEMENTS;++t)e=e&&Number.isFinite(this[t]);return e}sub(e){return this.subtract(e)}setScalar(e){for(let t=0;t<this.ELEMENTS;++t)this[t]=e;return this.check()}addScalar(e){for(let t=0;t<this.ELEMENTS;++t)this[t]+=e;return this.check()}subScalar(e){return this.addScalar(-e)}multiplyScalar(e){for(let t=0;t<this.ELEMENTS;++t)this[t]*=e;return this.check()}divideScalar(e){return this.multiplyByScalar(1/e)}clampScalar(e,t){for(let n=0;n<this.ELEMENTS;++n)this[n]=Math.min(Math.max(this[n],e),t);return this.check()}get elements(){return this}}function C8t(i,e){if(i.length!==e)return!1;for(let t=0;t<i.length;++t)if(!Number.isFinite(i[t]))return!1;return!0}function Mr(i){if(!Number.isFinite(i))throw new Error(`Invalid number ${JSON.stringify(i)}`);return i}function b8t(i,e,t=""){if(Wr.debug&&!C8t(i,e))throw new Error(`math.gl: ${t} some fields set to invalid numbers'`);return i}function zte(i,e){if(!i)throw new Error(`math.gl assertion ${e}`)}class x8t extends Hte{get x(){return this[0]}set x(e){this[0]=Mr(e)}get y(){return this[1]}set y(e){this[1]=Mr(e)}len(){return Math.sqrt(this.lengthSquared())}magnitude(){return this.len()}lengthSquared(){let e=0;for(let t=0;t<this.ELEMENTS;++t)e+=this[t]*this[t];return e}magnitudeSquared(){return this.lengthSquared()}distance(e){return Math.sqrt(this.distanceSquared(e))}distanceSquared(e){let t=0;for(let n=0;n<this.ELEMENTS;++n){const o=this[n]-e[n];t+=o*o}return Mr(t)}dot(e){let t=0;for(let n=0;n<this.ELEMENTS;++n)t+=this[n]*e[n];return Mr(t)}normalize(){const e=this.magnitude();if(e!==0)for(let t=0;t<this.ELEMENTS;++t)this[t]/=e;return this.check()}multiply(...e){for(const t of e)for(let n=0;n<this.ELEMENTS;++n)this[n]*=t[n];return this.check()}divide(...e){for(const t of e)for(let n=0;n<this.ELEMENTS;++n)this[n]/=t[n];return this.check()}lengthSq(){return this.lengthSquared()}distanceTo(e){return this.distance(e)}distanceToSquared(e){return this.distanceSquared(e)}getComponent(e){return zte(e>=0&&e<this.ELEMENTS,"index is out of range"),Mr(this[e])}setComponent(e,t){return zte(e>=0&&e<this.ELEMENTS,"index is out of range"),this[e]=t,this.check()}addVectors(e,t){return this.copy(e).add(t)}subVectors(e,t){return this.copy(e).subtract(t)}multiplyVectors(e,t){return this.copy(e).multiply(t)}addScaledVector(e,t){return this.add(new this.constructor(e).multiplyScalar(t))}}let o9=typeof Float32Array<"u"?Float32Array:Array;function M8t(){const i=new o9(2);return o9!=Float32Array&&(i[0]=0,i[1]=0),i}function E8t(i,e,t){const n=e[0],o=e[1];return i[0]=t[0]*n+t[3]*o+t[6],i[1]=t[1]*n+t[4]*o+t[7],i}(function(){const i=M8t();return function(e,t,n,o,r,s){let a,l;for(t||(t=2),n||(n=0),o?l=Math.min(o*t+n,e.length):l=e.length,a=n;a<l;a+=t)i[0]=e[a],i[1]=e[a+1],r(i,i,s),e[a]=i[0],e[a+1]=i[1];return e}})();function B8t(i,e,t){const n=e[0],o=e[1],r=e[2],s=t[3]*n+t[7]*o+t[11]*r||1;return i[0]=(t[0]*n+t[4]*o+t[8]*r)/s,i[1]=(t[1]*n+t[5]*o+t[9]*r)/s,i[2]=(t[2]*n+t[6]*o+t[10]*r)/s,i}function I8t(i,e,t){const n=e[0],o=e[1];return i[0]=t[0]*n+t[2]*o,i[1]=t[1]*n+t[3]*o,i[2]=e[2],i}function S8t(i,e,t){const n=e[0],o=e[1],r=e[2];return i[0]=t[0]*n+t[3]*o+t[6]*r,i[1]=t[1]*n+t[4]*o+t[7]*r,i[2]=t[2]*n+t[5]*o+t[8]*r,i[3]=e[3],i}function P8t(){const i=new o9(3);return o9!=Float32Array&&(i[0]=0,i[1]=0,i[2]=0),i}function T8t(i,e){return i[0]*e[0]+i[1]*e[1]+i[2]*e[2]}function k8t(i,e,t){const n=e[0],o=e[1],r=e[2],s=t[0],a=t[1],l=t[2];return i[0]=o*l-r*a,i[1]=r*s-n*l,i[2]=n*a-o*s,i}function R8t(i,e,t){const n=e[0],o=e[1],r=e[2];let s=t[3]*n+t[7]*o+t[11]*r+t[15];return s=s||1,i[0]=(t[0]*n+t[4]*o+t[8]*r+t[12])/s,i[1]=(t[1]*n+t[5]*o+t[9]*r+t[13])/s,i[2]=(t[2]*n+t[6]*o+t[10]*r+t[14])/s,i}function jte(i,e,t){const n=e[0],o=e[1],r=e[2];return i[0]=n*t[0]+o*t[3]+r*t[6],i[1]=n*t[1]+o*t[4]+r*t[7],i[2]=n*t[2]+o*t[5]+r*t[8],i}function _8t(i,e,t){const n=t[0],o=t[1],r=t[2],s=t[3],a=e[0],l=e[1],c=e[2];let u=o*c-r*l,d=r*a-n*c,h=n*l-o*a,p=o*h-r*d,A=r*u-n*h,f=n*d-o*u;const g=s*2;return u*=g,d*=g,h*=g,p*=2,A*=2,f*=2,i[0]=a+u+p,i[1]=l+d+A,i[2]=c+h+f,i}function D8t(i,e,t,n){const o=[],r=[];return o[0]=e[0]-t[0],o[1]=e[1]-t[1],o[2]=e[2]-t[2],r[0]=o[0],r[1]=o[1]*Math.cos(n)-o[2]*Math.sin(n),r[2]=o[1]*Math.sin(n)+o[2]*Math.cos(n),i[0]=r[0]+t[0],i[1]=r[1]+t[1],i[2]=r[2]+t[2],i}function L8t(i,e,t,n){const o=[],r=[];return o[0]=e[0]-t[0],o[1]=e[1]-t[1],o[2]=e[2]-t[2],r[0]=o[2]*Math.sin(n)+o[0]*Math.cos(n),r[1]=o[1],r[2]=o[2]*Math.cos(n)-o[0]*Math.sin(n),i[0]=r[0]+t[0],i[1]=r[1]+t[1],i[2]=r[2]+t[2],i}function F8t(i,e,t,n){const o=[],r=[];return o[0]=e[0]-t[0],o[1]=e[1]-t[1],o[2]=e[2]-t[2],r[0]=o[0]*Math.cos(n)-o[1]*Math.sin(n),r[1]=o[0]*Math.sin(n)+o[1]*Math.cos(n),r[2]=o[2],i[0]=r[0]+t[0],i[1]=r[1]+t[1],i[2]=r[2]+t[2],i}function O8t(i,e){const t=i[0],n=i[1],o=i[2],r=e[0],s=e[1],a=e[2],l=Math.sqrt((t*t+n*n+o*o)*(r*r+s*s+a*a)),c=l&&T8t(i,e)/l;return Math.acos(Math.min(Math.max(c,-1),1))}(function(){const i=P8t();return function(e,t,n,o,r,s){let a,l;for(t||(t=3),n||(n=0),o?l=Math.min(o*t+n,e.length):l=e.length,a=n;a<l;a+=t)i[0]=e[a],i[1]=e[a+1],i[2]=e[a+2],r(i,i,s),e[a]=i[0],e[a+1]=i[1],e[a+2]=i[2];return e}})();const NT=[0,0,0];let s9,N8t=class cme extends x8t{static get ZERO(){return s9||(s9=new cme(0,0,0),Object.freeze(s9)),s9}constructor(e=0,t=0,n=0){super(-0,-0,-0),arguments.length===1&&n9(e)?this.copy(e):(Wr.debug&&(Mr(e),Mr(t),Mr(n)),this[0]=e,this[1]=t,this[2]=n)}set(e,t,n){return this[0]=e,this[1]=t,this[2]=n,this.check()}copy(e){return this[0]=e[0],this[1]=e[1],this[2]=e[2],this.check()}fromObject(e){return Wr.debug&&(Mr(e.x),Mr(e.y),Mr(e.z)),this[0]=e.x,this[1]=e.y,this[2]=e.z,this.check()}toObject(e){return e.x=this[0],e.y=this[1],e.z=this[2],e}get ELEMENTS(){return 3}get z(){return this[2]}set z(e){this[2]=Mr(e)}angle(e){return O8t(this,e)}cross(e){return k8t(this,this,e),this.check()}rotateX({radians:e,origin:t=NT}){return D8t(this,this,t,e),this.check()}rotateY({radians:e,origin:t=NT}){return L8t(this,this,t,e),this.check()}rotateZ({radians:e,origin:t=NT}){return F8t(this,this,t,e),this.check()}transform(e){return this.transformAsPoint(e)}transformAsPoint(e){return R8t(this,this,e),this.check()}transformAsVector(e){return B8t(this,this,e),this.check()}transformByMatrix3(e){return jte(this,this,e),this.check()}transformByMatrix2(e){return I8t(this,this,e),this.check()}transformByQuaternion(e){return _8t(this,this,e),this.check()}};class U8t extends Hte{toString(){let e="[";if(Wr.printRowMajor){e+="row-major:";for(let t=0;t<this.RANK;++t)for(let n=0;n<this.RANK;++n)e+=` ${this[n*this.RANK+t]}`}else{e+="column-major:";for(let t=0;t<this.ELEMENTS;++t)e+=` ${this[t]}`}return e+="]",e}getElementIndex(e,t){return t*this.RANK+e}getElement(e,t){return this[t*this.RANK+e]}setElement(e,t,n){return this[t*this.RANK+e]=Mr(n),this}getColumn(e,t=new Array(this.RANK).fill(-0)){const n=e*this.RANK;for(let o=0;o<this.RANK;++o)t[o]=this[n+o];return t}setColumn(e,t){const n=e*this.RANK;for(let o=0;o<this.RANK;++o)this[n+o]=t[o];return this}}function V8t(i,e){if(i===e){const t=e[1],n=e[2],o=e[5];i[1]=e[3],i[2]=e[6],i[3]=t,i[5]=e[7],i[6]=n,i[7]=o}else i[0]=e[0],i[1]=e[3],i[2]=e[6],i[3]=e[1],i[4]=e[4],i[5]=e[7],i[6]=e[2],i[7]=e[5],i[8]=e[8];return i}function H8t(i,e){const t=e[0],n=e[1],o=e[2],r=e[3],s=e[4],a=e[5],l=e[6],c=e[7],u=e[8],d=u*s-a*c,h=-u*r+a*l,p=c*r-s*l;let A=t*d+n*h+o*p;return A?(A=1/A,i[0]=d*A,i[1]=(-u*n+o*c)*A,i[2]=(a*n-o*s)*A,i[3]=h*A,i[4]=(u*t-o*l)*A,i[5]=(-a*t+o*r)*A,i[6]=p*A,i[7]=(-c*t+n*l)*A,i[8]=(s*t-n*r)*A,i):null}function z8t(i){const e=i[0],t=i[1],n=i[2],o=i[3],r=i[4],s=i[5],a=i[6],l=i[7],c=i[8];return e*(c*r-s*l)+t*(-c*o+s*a)+n*(l*o-r*a)}function Gte(i,e,t){const n=e[0],o=e[1],r=e[2],s=e[3],a=e[4],l=e[5],c=e[6],u=e[7],d=e[8],h=t[0],p=t[1],A=t[2],f=t[3],g=t[4],m=t[5],v=t[6],y=t[7],w=t[8];return i[0]=h*n+p*s+A*c,i[1]=h*o+p*a+A*u,i[2]=h*r+p*l+A*d,i[3]=f*n+g*s+m*c,i[4]=f*o+g*a+m*u,i[5]=f*r+g*l+m*d,i[6]=v*n+y*s+w*c,i[7]=v*o+y*a+w*u,i[8]=v*r+y*l+w*d,i}function j8t(i,e,t){const n=e[0],o=e[1],r=e[2],s=e[3],a=e[4],l=e[5],c=e[6],u=e[7],d=e[8],h=t[0],p=t[1];return i[0]=n,i[1]=o,i[2]=r,i[3]=s,i[4]=a,i[5]=l,i[6]=h*n+p*s+c,i[7]=h*o+p*a+u,i[8]=h*r+p*l+d,i}function G8t(i,e,t){const n=e[0],o=e[1],r=e[2],s=e[3],a=e[4],l=e[5],c=e[6],u=e[7],d=e[8],h=Math.sin(t),p=Math.cos(t);return i[0]=p*n+h*s,i[1]=p*o+h*a,i[2]=p*r+h*l,i[3]=p*s-h*n,i[4]=p*a-h*o,i[5]=p*l-h*r,i[6]=c,i[7]=u,i[8]=d,i}function Qte(i,e,t){const n=t[0],o=t[1];return i[0]=n*e[0],i[1]=n*e[1],i[2]=n*e[2],i[3]=o*e[3],i[4]=o*e[4],i[5]=o*e[5],i[6]=e[6],i[7]=e[7],i[8]=e[8],i}function Q8t(i,e){const t=e[0],n=e[1],o=e[2],r=e[3],s=t+t,a=n+n,l=o+o,c=t*s,u=n*s,d=n*a,h=o*s,p=o*a,A=o*l,f=r*s,g=r*a,m=r*l;return i[0]=1-d-A,i[3]=u-m,i[6]=h+g,i[1]=u+m,i[4]=1-c-A,i[7]=p-f,i[2]=h-g,i[5]=p+f,i[8]=1-c-d,i}var UT;(function(i){i[i.COL0ROW0=0]="COL0ROW0",i[i.COL0ROW1=1]="COL0ROW1",i[i.COL0ROW2=2]="COL0ROW2",i[i.COL1ROW0=3]="COL1ROW0",i[i.COL1ROW1=4]="COL1ROW1",i[i.COL1ROW2=5]="COL1ROW2",i[i.COL2ROW0=6]="COL2ROW0",i[i.COL2ROW1=7]="COL2ROW1",i[i.COL2ROW2=8]="COL2ROW2"})(UT||(UT={}));const q8t=Object.freeze([1,0,0,0,1,0,0,0,1]);let Q4=class extends U8t{static get IDENTITY(){return J8t()}static get ZERO(){return K8t()}get ELEMENTS(){return 9}get RANK(){return 3}get INDICES(){return UT}constructor(e,...t){super(-0,-0,-0,-0,-0,-0,-0,-0,-0),arguments.length===1&&Array.isArray(e)?this.copy(e):t.length>0?this.copy([e,...t]):this.identity()}copy(e){return this[0]=e[0],this[1]=e[1],this[2]=e[2],this[3]=e[3],this[4]=e[4],this[5]=e[5],this[6]=e[6],this[7]=e[7],this[8]=e[8],this.check()}identity(){return this.copy(q8t)}fromObject(e){return this.check()}fromQuaternion(e){return Q8t(this,e),this.check()}set(e,t,n,o,r,s,a,l,c){return this[0]=e,this[1]=t,this[2]=n,this[3]=o,this[4]=r,this[5]=s,this[6]=a,this[7]=l,this[8]=c,this.check()}setRowMajor(e,t,n,o,r,s,a,l,c){return this[0]=e,this[1]=o,this[2]=a,this[3]=t,this[4]=r,this[5]=l,this[6]=n,this[7]=s,this[8]=c,this.check()}determinant(){return z8t(this)}transpose(){return V8t(this,this),this.check()}invert(){return H8t(this,this),this.check()}multiplyLeft(e){return Gte(this,e,this),this.check()}multiplyRight(e){return Gte(this,this,e),this.check()}rotate(e){return G8t(this,this,e),this.check()}scale(e){return Array.isArray(e)?Qte(this,this,e):Qte(this,this,[e,e]),this.check()}translate(e){return j8t(this,this,e),this.check()}transform(e,t){let n;switch(e.length){case 2:n=E8t(t||[-0,-0],e,this);break;case 3:n=jte(t||[-0,-0,-0],e,this);break;case 4:n=S8t(t||[-0,-0,-0,-0],e,this);break;default:throw new Error("Illegal vector")}return b8t(n,e.length),n}transformVector(e,t){return this.transform(e,t)}transformVector2(e,t){return this.transform(e,t)}transformVector3(e,t){return this.transform(e,t)}},r9,a9=null;function K8t(){return r9||(r9=new Q4([0,0,0,0,0,0,0,0,0]),Object.freeze(r9)),r9}function J8t(){return a9||(a9=new Q4,Object.freeze(a9)),a9}const l9="KHR_texture_transform",W8t=l9,c9=new N8t,Z8t=new Q4,Y8t=new Q4;async function X8t(i,e){if(!new _o(i).hasExtension(l9)||!e.gltf?.loadBuffers)return;const o=i.json.materials||[];for(let r=0;r<o.length;r++)$8t(r,i)}function $8t(i,e){const t=e.json.materials?.[i],n=[t?.pbrMetallicRoughness?.baseColorTexture,t?.emissiveTexture,t?.normalTexture,t?.occlusionTexture,t?.pbrMetallicRoughness?.metallicRoughnessTexture],o=[];for(const r of n)r&&r?.extensions?.[l9]&&ewt(e,i,r,o)}function ewt(i,e,t,n){const o=twt(t,n);if(!o)return;const r=i.json.meshes||[];for(const s of r)for(const a of s.primitives){const l=a.material;Number.isFinite(l)&&e===l&&iwt(i,a,o)}}function twt(i,e){const t=i.extensions?.[l9],{texCoord:n=0}=i,{texCoord:o=n}=t;if(!(e.findIndex(([s,a])=>s===n&&a===o)!==-1)){const s=swt(t);return n!==o&&(i.texCoord=o),e.push([n,o]),{originalTexCoord:n,texCoord:o,matrix:s}}return null}function iwt(i,e,t){const{originalTexCoord:n,texCoord:o,matrix:r}=t,s=e.attributes[`TEXCOORD_${n}`];if(Number.isFinite(s)){const a=i.json.accessors?.[s];if(a&&a.bufferView){const l=i.json.bufferViews?.[a.bufferView];if(l){const{arrayBuffer:c,byteOffset:u}=i.buffers[l.buffer],d=(u||0)+(a.byteOffset||0)+(l.byteOffset||0),{ArrayType:h,length:p}=MT(a,l),A=Ate[a.componentType],f=fte[a.type],g=l.byteStride||A*f,m=new Float32Array(p);for(let v=0;v<a.count;v++){const y=new h(c,d+v*g,2);c9.set(y[0],y[1],1),c9.transformByMatrix3(r),m.set([c9[0],c9[1]],v*f)}n===o?nwt(a,l,i.buffers,m):owt(o,a,e,i,m)}}}}function nwt(i,e,t,n){i.componentType=5126,t.push({arrayBuffer:n.buffer,byteOffset:0,byteLength:n.buffer.byteLength}),e.buffer=t.length-1,e.byteLength=n.buffer.byteLength,e.byteOffset=0,delete e.byteStride}function owt(i,e,t,n,o){n.buffers.push({arrayBuffer:o.buffer,byteOffset:0,byteLength:o.buffer.byteLength});const r=n.json.bufferViews;if(!r)return;r.push({buffer:n.buffers.length-1,byteLength:o.buffer.byteLength,byteOffset:0});const s=n.json.accessors;s&&(s.push({bufferView:r?.length-1,byteOffset:0,componentType:5126,count:e.count,type:"VEC2"}),t.attributes[`TEXCOORD_${i}`]=s.length-1)}function swt(i){const{offset:e=[0,0],rotation:t=0,scale:n=[1,1]}=i,o=new Q4().set(1,0,0,0,1,0,e[0],e[1],1),r=Z8t.set(Math.cos(t),Math.sin(t),0,-Math.sin(t),Math.cos(t),0,0,0,1),s=Y8t.set(n[0],0,0,0,n[1],0,0,0,1);return o.multiplyRight(r).multiplyRight(s)}const rwt=Object.freeze(Object.defineProperty({__proto__:null,decode:X8t,name:W8t},Symbol.toStringTag,{value:"Module"})),Bh="KHR_lights_punctual",awt=Bh;async function lwt(i){const e=new _o(i),{json:t}=e,n=e.getExtension(Bh);n&&(e.json.lights=n.lights,e.removeExtension(Bh));for(const o of t.nodes||[]){const r=e.getObjectExtension(o,Bh);r&&(o.light=r.light),e.removeObjectExtension(o,Bh)}}async function cwt(i){const e=new _o(i),{json:t}=e;if(t.lights){const n=e.addExtension(Bh);br(!n.lights),n.lights=t.lights,delete t.lights}if(e.json.lights){for(const n of e.json.lights){const o=n.node;e.addObjectExtension(o,Bh,n)}delete e.json.lights}}const uwt=Object.freeze(Object.defineProperty({__proto__:null,decode:lwt,encode:cwt,name:awt},Symbol.toStringTag,{value:"Module"})),q4="KHR_materials_unlit",dwt=q4;async function hwt(i){const e=new _o(i),{json:t}=e;for(const n of t.materials||[])n.extensions&&n.extensions.KHR_materials_unlit&&(n.unlit=!0),e.removeObjectExtension(n,q4);e.removeExtension(q4)}function pwt(i){const e=new _o(i),{json:t}=e;if(e.materials)for(const n of t.materials||[])n.unlit&&(delete n.unlit,e.addObjectExtension(n,q4,{}),e.addExtension(q4))}const fwt=Object.freeze(Object.defineProperty({__proto__:null,decode:hwt,encode:pwt,name:dwt},Symbol.toStringTag,{value:"Module"})),K4="KHR_techniques_webgl",Awt=K4;async function mwt(i){const e=new _o(i),{json:t}=e,n=e.getExtension(K4);if(n){const o=ywt(n,e);for(const r of t.materials||[]){const s=e.getObjectExtension(r,K4);s&&(r.technique=Object.assign({},s,o[s.technique]),r.technique.values=vwt(r.technique,e)),e.removeObjectExtension(r,K4)}e.removeExtension(K4)}}async function gwt(i,e){}function ywt(i,e){const{programs:t=[],shaders:n=[],techniques:o=[]}=i,r=new TextDecoder;return n.forEach(s=>{if(Number.isFinite(s.bufferView))s.code=r.decode(e.getTypedArrayForBufferView(s.bufferView));else throw new Error("KHR_techniques_webgl: no shader code")}),t.forEach(s=>{s.fragmentShader=n[s.fragmentShader],s.vertexShader=n[s.vertexShader]}),o.forEach(s=>{s.program=t[s.program]}),o}function vwt(i,e){const t=Object.assign({},i.values);return Object.keys(i.uniforms||{}).forEach(n=>{i.uniforms[n].value&&!(n in t)&&(t[n]=i.uniforms[n].value)}),Object.keys(t).forEach(n=>{typeof t[n]=="object"&&t[n].index!==void 0&&(t[n].texture=e.getTexture(t[n].index))}),t}const qte=[Dvt,svt,N6t,H6t,G6t,g8t,uwt,fwt,Object.freeze(Object.defineProperty({__proto__:null,decode:mwt,encode:gwt,name:Awt},Symbol.toStringTag,{value:"Module"})),rwt,Yvt];function wwt(i,e={},t){const n=qte.filter(o=>Kte(o.name,e));for(const o of n)o.preprocess?.(i,e,t)}async function Cwt(i,e={},t){const n=qte.filter(o=>Kte(o.name,e));for(const o of n)await o.decode?.(i,e,t)}function Kte(i,e){const t=e?.gltf?.excludeExtensions||{};return!(i in t&&!t[i])}const VT="KHR_binary_glTF";function bwt(i){const e=new _o(i),{json:t}=e;for(const n of t.images||[]){const o=e.getObjectExtension(n,VT);o&&Object.assign(n,o),e.removeObjectExtension(n,VT)}t.buffers&&t.buffers[0]&&delete t.buffers[0].uri,e.removeExtension(VT)}const Jte={accessors:"accessor",animations:"animation",buffers:"buffer",bufferViews:"bufferView",images:"image",materials:"material",meshes:"mesh",nodes:"node",samplers:"sampler",scenes:"scene",skins:"skin",textures:"texture"},xwt={accessor:"accessors",animations:"animation",buffer:"buffers",bufferView:"bufferViews",image:"images",material:"materials",mesh:"meshes",node:"nodes",sampler:"samplers",scene:"scenes",skin:"skins",texture:"textures"};class Mwt{idToIndexMap={animations:{},accessors:{},buffers:{},bufferViews:{},images:{},materials:{},meshes:{},nodes:{},samplers:{},scenes:{},skins:{},textures:{}};json;normalize(e,t){this.json=e.json;const n=e.json;switch(n.asset&&n.asset.version){case"2.0":return;case void 0:case"1.0":break;default:console.warn(`glTF: Unknown version ${n.asset.version}`);return}if(!t.normalize)throw new Error("glTF v1 is not supported.");console.warn("Converting glTF v1 to glTF v2 format. This is experimental and may fail."),this._addAsset(n),this._convertTopLevelObjectsToArrays(n),bwt(e),this._convertObjectIdsToArrayIndices(n),this._updateObjects(n),this._updateMaterial(n)}_addAsset(e){e.asset=e.asset||{},e.asset.version="2.0",e.asset.generator=e.asset.generator||"Normalized to glTF 2.0 by loaders.gl"}_convertTopLevelObjectsToArrays(e){for(const t in Jte)this._convertTopLevelObjectToArray(e,t)}_convertTopLevelObjectToArray(e,t){const n=e[t];if(!(!n||Array.isArray(n))){e[t]=[];for(const o in n){const r=n[o];r.id=r.id||o;const s=e[t].length;e[t].push(r),this.idToIndexMap[t][o]=s}}}_convertObjectIdsToArrayIndices(e){for(const t in Jte)this._convertIdsToIndices(e,t);"scene"in e&&(e.scene=this._convertIdToIndex(e.scene,"scene"));for(const t of e.textures)this._convertTextureIds(t);for(const t of e.meshes)this._convertMeshIds(t);for(const t of e.nodes)this._convertNodeIds(t);for(const t of e.scenes)this._convertSceneIds(t)}_convertTextureIds(e){e.source&&(e.source=this._convertIdToIndex(e.source,"image"))}_convertMeshIds(e){for(const t of e.primitives){const{attributes:n,indices:o,material:r}=t;for(const s in n)n[s]=this._convertIdToIndex(n[s],"accessor");o&&(t.indices=this._convertIdToIndex(o,"accessor")),r&&(t.material=this._convertIdToIndex(r,"material"))}}_convertNodeIds(e){e.children&&(e.children=e.children.map(t=>this._convertIdToIndex(t,"node"))),e.meshes&&(e.meshes=e.meshes.map(t=>this._convertIdToIndex(t,"mesh")))}_convertSceneIds(e){e.nodes&&(e.nodes=e.nodes.map(t=>this._convertIdToIndex(t,"node")))}_convertIdsToIndices(e,t){e[t]||(console.warn(`gltf v1: json doesn't contain attribute ${t}`),e[t]=[]);for(const n of e[t])for(const o in n){const r=n[o],s=this._convertIdToIndex(r,o);n[o]=s}}_convertIdToIndex(e,t){const n=xwt[t];if(n in this.idToIndexMap){const o=this.idToIndexMap[n][e];if(!Number.isFinite(o))throw new Error(`gltf v1: failed to resolve ${t} with id ${e}`);return o}return e}_updateObjects(e){for(const t of this.json.buffers)delete t.type}_updateMaterial(e){for(const t of e.materials){t.pbrMetallicRoughness={baseColorFactor:[1,1,1,1],metallicFactor:1,roughnessFactor:1};const n=t.values?.tex||t.values?.texture2d_0||t.values?.diffuseTex,o=e.textures.findIndex(r=>r.id===n);o!==-1&&(t.pbrMetallicRoughness.baseColorTexture={index:o})}}}function Ewt(i,e={}){return new Mwt().normalize(i,e)}async function Bwt(i,e,t=0,n,o){return Iwt(i,e,t,n),Ewt(i,{normalize:n?.gltf?.normalize}),wwt(i,n,o),n?.gltf?.loadBuffers&&i.json.buffers&&await Swt(i,n,o),n?.gltf?.loadImages&&await Pwt(i,n,o),await Cwt(i,n,o),i}function Iwt(i,e,t,n){if(n.uri&&(i.baseUri=n.uri),e instanceof ArrayBuffer&&!v6t(e,t,n)&&(e=new TextDecoder().decode(e)),typeof e=="string")i.json=q4t(e);else if(e instanceof ArrayBuffer){const s={};t=w6t(s,e,t,n.glb),br(s.type==="glTF",`Invalid GLB magic string ${s.type}`),i._glb=s,i.json=s.json}else br(!1,"GLTF: must be ArrayBuffer or string");const o=i.json.buffers||[];if(i.buffers=new Array(o.length).fill(null),i._glb&&i._glb.header.hasBinChunk){const{binChunks:s}=i._glb;i.buffers[0]={arrayBuffer:s[0].arrayBuffer,byteOffset:s[0].byteOffset,byteLength:s[0].byteLength}}const r=i.json.images||[];i.images=new Array(r.length).fill({})}async function Swt(i,e,t){const n=i.json.buffers||[];for(let o=0;o<n.length;++o){const r=n[o];if(r.uri){const{fetch:s}=t;br(s);const a=Dte(r.uri,e),c=await(await t?.fetch?.(a))?.arrayBuffer?.();i.buffers[o]={arrayBuffer:c,byteOffset:0,byteLength:c.byteLength},delete r.uri}else i.buffers[o]===null&&(i.buffers[o]={arrayBuffer:new ArrayBuffer(r.byteLength),byteOffset:0,byteLength:r.byteLength})}}async function Pwt(i,e,t){const n=Twt(i),o=i.json.images||[],r=[];for(const s of n)r.push(kwt(i,o[s],s,e,t));return await Promise.all(r)}function Twt(i){const e=new Set,t=i.json.textures||[];for(const n of t)n.source!==void 0&&e.add(n.source);return Array.from(e).sort()}async function kwt(i,e,t,n,o){let r;if(e.uri&&!e.hasOwnProperty("bufferView")){const a=Dte(e.uri,n),{fetch:l}=o;r=await(await l(a)).arrayBuffer(),e.bufferView={data:r}}if(Number.isFinite(e.bufferView)){const a=Gyt(i.json,i.buffers,e.bufferView);r=Nee(a.buffer,a.byteOffset,a.byteLength)}br(r,"glTF image has no data");let s=await Cee(r,[Dyt,h6t],{...n,mimeType:e.mimeType,basis:n.basis||{format:Rte()}},o);s&&s[0]&&(s={compressed:!0,mipmaps:!1,width:s[0].width,height:s[0].height,data:s[0]}),i.images=i.images||[],i.images[t]=s}const HT={dataType:null,batchType:null,name:"glTF",id:"gltf",module:"gltf",version:Xvt,extensions:["gltf","glb"],mimeTypes:["model/gltf+json","model/gltf-binary"],text:!0,binary:!0,tests:["glTF"],parse:Rwt,options:{gltf:{normalize:!0,loadBuffers:!0,loadImages:!0,decompressMeshes:!0},log:console}};async function Rwt(i,e={},t){e={...HT.options,...e},e.gltf={...HT.options.gltf,...e.gltf};const{byteOffset:n=0}=e;return await Bwt({},i,n,e,t)}const _wt={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},Dwt={5120:1,5121:1,5122:2,5123:2,5125:4,5126:4},Zr={TEXTURE_MAG_FILTER:10240,TEXTURE_MIN_FILTER:10241,TEXTURE_WRAP_S:10242,TEXTURE_WRAP_T:10243,REPEAT:10497,LINEAR:9729,NEAREST_MIPMAP_LINEAR:9986},Lwt={magFilter:Zr.TEXTURE_MAG_FILTER,minFilter:Zr.TEXTURE_MIN_FILTER,wrapS:Zr.TEXTURE_WRAP_S,wrapT:Zr.TEXTURE_WRAP_T},Fwt={[Zr.TEXTURE_MAG_FILTER]:Zr.LINEAR,[Zr.TEXTURE_MIN_FILTER]:Zr.NEAREST_MIPMAP_LINEAR,[Zr.TEXTURE_WRAP_S]:Zr.REPEAT,[Zr.TEXTURE_WRAP_T]:Zr.REPEAT};function Owt(){return{id:"default-sampler",parameters:Fwt}}function Nwt(i){return Dwt[i]}function Uwt(i){return _wt[i]}class Vwt{baseUri="";jsonUnprocessed;json;buffers=[];images=[];postProcess(e,t={}){const{json:n,buffers:o=[],images:r=[]}=e,{baseUri:s=""}=e;return br(n),this.baseUri=s,this.buffers=o,this.images=r,this.jsonUnprocessed=n,this.json=this._resolveTree(e.json,t),this.json}_resolveTree(e,t={}){const n={...e};return this.json=n,e.bufferViews&&(n.bufferViews=e.bufferViews.map((o,r)=>this._resolveBufferView(o,r))),e.images&&(n.images=e.images.map((o,r)=>this._resolveImage(o,r))),e.samplers&&(n.samplers=e.samplers.map((o,r)=>this._resolveSampler(o,r))),e.textures&&(n.textures=e.textures.map((o,r)=>this._resolveTexture(o,r))),e.accessors&&(n.accessors=e.accessors.map((o,r)=>this._resolveAccessor(o,r))),e.materials&&(n.materials=e.materials.map((o,r)=>this._resolveMaterial(o,r))),e.meshes&&(n.meshes=e.meshes.map((o,r)=>this._resolveMesh(o,r))),e.nodes&&(n.nodes=e.nodes.map((o,r)=>this._resolveNode(o,r)),n.nodes=n.nodes.map((o,r)=>this._resolveNodeChildren(o))),e.skins&&(n.skins=e.skins.map((o,r)=>this._resolveSkin(o,r))),e.scenes&&(n.scenes=e.scenes.map((o,r)=>this._resolveScene(o,r))),typeof this.json.scene=="number"&&n.scenes&&(n.scene=n.scenes[this.json.scene]),n}getScene(e){return this._get(this.json.scenes,e)}getNode(e){return this._get(this.json.nodes,e)}getSkin(e){return this._get(this.json.skins,e)}getMesh(e){return this._get(this.json.meshes,e)}getMaterial(e){return this._get(this.json.materials,e)}getAccessor(e){return this._get(this.json.accessors,e)}getCamera(e){return this._get(this.json.cameras,e)}getTexture(e){return this._get(this.json.textures,e)}getSampler(e){return this._get(this.json.samplers,e)}getImage(e){return this._get(this.json.images,e)}getBufferView(e){return this._get(this.json.bufferViews,e)}getBuffer(e){return this._get(this.json.buffers,e)}_get(e,t){if(typeof t=="object")return t;const n=e&&e[t];return n||console.warn(`glTF file error: Could not find ${e}[${t}]`),n}_resolveScene(e,t){return{...e,id:e.id||`scene-${t}`,nodes:(e.nodes||[]).map(n=>this.getNode(n))}}_resolveNode(e,t){const n={...e,id:e?.id||`node-${t}`};return e.mesh!==void 0&&(n.mesh=this.getMesh(e.mesh)),e.camera!==void 0&&(n.camera=this.getCamera(e.camera)),e.skin!==void 0&&(n.skin=this.getSkin(e.skin)),e.meshes!==void 0&&e.meshes.length&&(n.mesh=e.meshes.reduce((o,r)=>{const s=this.getMesh(r);return o.id=s.id,o.primitives=o.primitives.concat(s.primitives),o},{primitives:[]})),n}_resolveNodeChildren(e){return e.children&&(e.children=e.children.map(t=>this.getNode(t))),e}_resolveSkin(e,t){const n=typeof e.inverseBindMatrices=="number"?this.getAccessor(e.inverseBindMatrices):void 0;return{...e,id:e.id||`skin-${t}`,inverseBindMatrices:n}}_resolveMesh(e,t){const n={...e,id:e.id||`mesh-${t}`,primitives:[]};return e.primitives&&(n.primitives=e.primitives.map(o=>{const r={...o,attributes:{},indices:void 0,material:void 0},s=o.attributes;for(const a in s)r.attributes[a]=this.getAccessor(s[a]);return o.indices!==void 0&&(r.indices=this.getAccessor(o.indices)),o.material!==void 0&&(r.material=this.getMaterial(o.material)),r})),n}_resolveMaterial(e,t){const n={...e,id:e.id||`material-${t}`};if(n.normalTexture&&(n.normalTexture={...n.normalTexture},n.normalTexture.texture=this.getTexture(n.normalTexture.index)),n.occlusionTexture&&(n.occlusionTexture={...n.occlusionTexture},n.occlusionTexture.texture=this.getTexture(n.occlusionTexture.index)),n.emissiveTexture&&(n.emissiveTexture={...n.emissiveTexture},n.emissiveTexture.texture=this.getTexture(n.emissiveTexture.index)),n.emissiveFactor||(n.emissiveFactor=n.emissiveTexture?[1,1,1]:[0,0,0]),n.pbrMetallicRoughness){n.pbrMetallicRoughness={...n.pbrMetallicRoughness};const o=n.pbrMetallicRoughness;o.baseColorTexture&&(o.baseColorTexture={...o.baseColorTexture},o.baseColorTexture.texture=this.getTexture(o.baseColorTexture.index)),o.metallicRoughnessTexture&&(o.metallicRoughnessTexture={...o.metallicRoughnessTexture},o.metallicRoughnessTexture.texture=this.getTexture(o.metallicRoughnessTexture.index))}return n}_resolveAccessor(e,t){const n=Nwt(e.componentType),o=Uwt(e.type),r=n*o,s={...e,id:e.id||`accessor-${t}`,bytesPerComponent:n,components:o,bytesPerElement:r,value:void 0,bufferView:void 0,sparse:void 0};if(e.bufferView!==void 0&&(s.bufferView=this.getBufferView(e.bufferView)),s.bufferView){const a=s.bufferView.buffer,{ArrayType:l,byteLength:c}=MT(s,s.bufferView),u=(s.bufferView.byteOffset||0)+(s.byteOffset||0)+a.byteOffset;let d=a.arrayBuffer.slice(u,u+c);s.bufferView.byteStride&&(d=this._getValueFromInterleavedBuffer(a,u,s.bufferView.byteStride,s.bytesPerElement,s.count)),s.value=new l(d)}return s}_getValueFromInterleavedBuffer(e,t,n,o,r){const s=new Uint8Array(r*o);for(let a=0;a<r;a++){const l=t+a*n;s.set(new Uint8Array(e.arrayBuffer.slice(l,l+o)),a*o)}return s.buffer}_resolveTexture(e,t){return{...e,id:e.id||`texture-${t}`,sampler:typeof e.sampler=="number"?this.getSampler(e.sampler):Owt(),source:typeof e.source=="number"?this.getImage(e.source):void 0}}_resolveSampler(e,t){const n={id:e.id||`sampler-${t}`,...e,parameters:{}};for(const o in n){const r=this._enumSamplerParameter(o);r!==void 0&&(n.parameters[r]=n[o])}return n}_enumSamplerParameter(e){return Lwt[e]}_resolveImage(e,t){const n={...e,id:e.id||`image-${t}`,image:null,bufferView:e.bufferView!==void 0?this.getBufferView(e.bufferView):void 0},o=this.images[t];return o&&(n.image=o),n}_resolveBufferView(e,t){const n=e.buffer,o=this.buffers[n].arrayBuffer;let r=this.buffers[n].byteOffset||0;return e.byteOffset&&(r+=e.byteOffset),{id:`bufferView-${t}`,...e,buffer:this.buffers[n],data:new Uint8Array(o,r,e.byteLength)}}_resolveCamera(e,t){const n={...e,id:e.id||`camera-${t}`};return n.perspective,n.orthographic,n}}function Hwt(i,e){return new Vwt().postProcess(i,e)}class zwt{constructor(e){}load(e,t,n,o,r,s,a){o=o||{},jwt(e,t,n,o,r,function(){hn.scheduleTask(function(){r.scene.fire("modelLoaded",r.id),r.fire("loaded",!0,!1)}),s&&s()},function(l){e.error(l),a&&a(l),r.fire("error",l)})}parse(e,t,n,o,r,s,a){o=o||{},zT(e,"",t,n,o,r,function(){r.scene.fire("modelLoaded",r.id),r.fire("loaded",!0,!1),s&&s()},function(l){r.error(l),r.fire("error",l),a&&a(l)})}}function jwt(i,e,t,n,o,r,s){const a=i.viewer.scene.canvas.spinner;a.processes++,e.split(".").pop()==="glb"?i.dataSource.getGLB(e,c=>{n.basePath=Wte(e),zT(i,e,c,t,n,o,r,s),a.processes--},c=>{a.processes--,s(c)}):i.dataSource.getGLTF(e,c=>{n.basePath=Wte(e),zT(i,e,c,t,n,o,r,s),a.processes--},c=>{a.processes--,s(c)})}function Wte(i){const e=i.lastIndexOf("/");return e!==0?i.substring(0,e+1):""}function zT(i,e,t,n,o,r,s,a){const l=i.viewer.scene.canvas.spinner;l.processes++,gT(t,HT,{baseUri:o.basePath}).then(c=>{const u=Hwt(c),d={entityId:o.entityId,autoMetaModel:o.autoMetaModel,globalizeObjectIds:o.globalizeObjectIds,metaObjects:[],loadBuffer:o.loadBuffer,basePath:o.basePath,handlenode:o.handlenode,backfaces:!!o.backfaces,gltfData:u,scene:r.scene,plugin:i,sceneModel:r,numObjects:0,nextId:0};Gwt(d),qwt(d),o.autoMetaModel&&d.metaObjects.push({id:r.id,type:"Default",name:r.id}),Wwt(d),r.finalize(),o.autoMetaModel&&i.viewer.metaScene.createMetaModel(r.id,{metaObjects:d.metaObjects}),l.processes--,s()}).catch(c=>{a&&a(c)})}function Gwt(i){const t=i.gltfData.textures;if(t)for(let n=0,o=t.length;n<o;n++)Qwt(i,t[n])}function Qwt(i,e){if(!e.source||!e.source.image)return;const t=`texture-${i.nextId++}`;let n=Ef;switch(e.sampler.minFilter){case 9728:n=mh;break;case 9729:n=As;break;case 9984:n=o4;break;case 9985:n=s4;break;case 9986:n=Ef;break;case 9987:n=Bf;break}let o=As;switch(e.sampler.magFilter){case 9728:o=mh;break;case 9729:o=As;break}let r=En;switch(e.sampler.wrapS){case 33071:r=fs;break;case 33648:r=uc;break;case 10497:r=En;break}let s=En;switch(e.sampler.wrapT){case 33071:s=fs;break;case 33648:s=uc;break;case 10497:s=En;break}let a=En;switch(e.sampler.wrapR){case 33071:a=fs;break;case 33648:a=uc;break;case 10497:a=En;break}i.sceneModel.createTexture({id:t,image:e.source.image,flipY:!!e.flipY,minFilter:n,magFilter:o,wrapS:r,wrapT:s,wrapR:a,encoding:pn}),e._textureId=t}function qwt(i){const t=i.gltfData.materials;if(t)for(let n=0,o=t.length;n<o;n++){const r=t[n];r._textureSetId=Kwt(i,r),r._attributes=Jwt(i,r)}}function Kwt(i,e){const t={};switch(e.normalTexture&&(t.normalTextureId=e.normalTexture.texture._textureId),e.occlusionTexture&&(t.occlusionTextureId=e.occlusionTexture.texture._textureId),e.emissiveTexture&&(t.emissiveTextureId=e.emissiveTexture.texture._textureId),e.alphaMode){case"OPAQUE":break;case"MASK":const r=e.alphaCutoff;t.alphaCutoff=r!==void 0?r:.5;break}const n=e.pbrMetallicRoughness;if(e.pbrMetallicRoughness){const r=e.pbrMetallicRoughness,s=r.baseColorTexture||r.colorTexture;s&&(s.texture?t.colorTextureId=s.texture._textureId:t.colorTextureId=i.gltfData.textures[s.index]._textureId),n.metallicRoughnessTexture&&(t.metallicRoughnessTextureId=n.metallicRoughnessTexture.texture._textureId)}const o=e.extensions;if(o){const r=o.KHR_materials_pbrSpecularGlossiness;if(r){r.specularTexture;const s=r.specularColorTexture;s!=null&&(t.colorTextureId=i.gltfData.textures[s.index]._textureId)}}return t.normalTextureId!==void 0||t.occlusionTextureId!==void 0||t.emissiveTextureId!==void 0||t.colorTextureId!==void 0||t.metallicRoughnessTextureId!==void 0?(t.id=`textureSet-${i.nextId++};`,i.sceneModel.createTextureSet(t),t.id):null}function Jwt(i,e){const t=e.extensions,n={color:new Float32Array([1,1,1,1]),opacity:1,metallic:0,roughness:1,doubleSided:!0};if(t){const r=t.KHR_materials_pbrSpecularGlossiness;if(r){const a=r.diffuseFactor;a!=null&&n.color.set(a)}const s=t.KHR_materials_common;if(s){const a=s.technique,l=s.values||{},c=a==="BLINN",u=a==="PHONG",d=a==="LAMBERT",h=l.diffuse;h&&(c||u||d)&&(At.isString(h)||n.color.set(h));const p=l.transparency;p!=null&&(n.opacity=p);const A=l.transparent;A!=null&&(n.opacity=A)}}const o=e.pbrMetallicRoughness;if(o){const r=o.baseColorFactor;r&&(n.color[0]=r[0],n.color[1]=r[1],n.color[2]=r[2],n.opacity=r[3]);const s=o.metallicFactor;s!=null&&(n.metallic=s);const a=o.roughnessFactor;a!=null&&(n.roughness=a)}return n.doubleSided=e.doubleSided!==!1,n}function Wwt(i){const e=i.gltfData,t=e.scene||e.scenes[0];if(!t){Xwt(i,"glTF has no default scene");return}const n=t.nodes;if(!n)return;(function s(a){a.forEach(l=>{const c=l.mesh;c&&(c.instances||=0,c.instances+=1),l.children&&s(l.children)})})(n);const o=[];let r=null;(function s(a,l,c){a.forEach(u=>{const d=u.name;let h=d!=null&&d||l===0&&"entity-"+i.nextId++;if(h){for(;i.sceneModel.objects[h];)h="entity-"+i.nextId++;o.push(r),r=[]}const p=Zwt(u,c);if(u.mesh&&Ywt(u,i,p,r),u.children&&s(u.children,l+1,p),h){if(r.length>0){const A=i.globalizeObjectIds?b.globalizeObjectId(i.sceneModel.id,h):h;i.sceneModel.createEntity({id:A,meshIds:r,isObject:!0}),i.autoMetaModel&&i.metaObjects.push({id:A,type:"Default",name:A,parent:i.sceneModel.id})}r=o.pop()}})})(n,0,null)}function Zwt(i,e){let t;return i.matrix&&(t=i.matrix,e?e=b.mulMat4(e,t,b.mat4()):e=t),i.translation&&(t=b.translationMat4v(i.translation),e?e=b.mulMat4(e,t,b.mat4()):e=t),i.rotation&&(t=b.quaternionToMat4(i.rotation),e?e=b.mulMat4(e,t,b.mat4()):e=t),i.scale&&(t=b.scalingMat4v(i.scale),e?e=b.mulMat4(e,t,b.mat4()):e=t),e}function Ywt(i,e,t,n){const o=i.mesh;if(!o)return;const r=o.primitives.length;if(r>0)for(let s=0;s<r;s++){const a=o.primitives[s];if(a.mode<4)continue;const l={id:e.sceneModel.id+"."+e.numObjects++},c=a.material;c?(l.textureSetId=c._textureSetId,l.color=c._attributes.color,l.opacity=c._attributes.opacity,l.metallic=c._attributes.metallic,l.roughness=c._attributes.roughness):(l.color=new Float32Array([1,1,1]),l.opacity=1);const u=e.backfaces!==!1||c&&c.doubleSided!==!1;switch(a.mode){case 0:l.primitive="points";break;case 1:l.primitive="lines";break;case 2:l.primitive="lines";break;case 3:l.primitive="lines";break;case 4:l.primitive=u?"triangles":"solid";break;case 5:l.primitive=u?"triangles":"solid";break;case 6:l.primitive=u?"triangles":"solid";break;default:l.primitive=u?"triangles":"solid"}const d=a.attributes.POSITION;if(!d)continue;l.localPositions=d.value,l.positions=new Float64Array(l.localPositions.length),a.attributes.NORMAL&&(l.normals=a.attributes.NORMAL.value),a.attributes.TEXCOORD_0&&(l.uv=a.attributes.TEXCOORD_0.value),a.indices&&(l.indices=a.indices.value),t?b.transformPositions3(t,l.localPositions,l.positions):l.positions.set(l.localPositions);const h=b.vec3();Ow(l.positions,l.positions,h)&&(l.origin=h),e.sceneModel.createMesh(l),n.push(l.id)}}function Xwt(i,e){i.plugin.error(e)}const Zte={DEFAULT:{}};class jT extends qr{constructor(e,t={}){super("GLTFLoader",e,t),this._sceneModelLoader=new zwt(this,t),this.dataSource=t.dataSource,this.objectDefaults=t.objectDefaults}set dataSource(e){this._dataSource=e||new wee}get dataSource(){return this._dataSource}set objectDefaults(e){this._objectDefaults=e||Zte}get objectDefaults(){return this._objectDefaults}load(e={}){e.id&&this.viewer.scene.components[e.id]&&(this.error("Component with this ID already exists in viewer: "+e.id+" - will autogenerate this ID"),delete e.id);const t=new I4(this.viewer.scene,At.apply(e,{isModel:!0,dtxEnabled:e.dtxEnabled})),n=t.id;if(!e.src&&!e.gltf)return this.error("load() param expected: src or gltf"),t;if(e.metaModelSrc||e.metaModelJSON){const o=r=>{this.viewer.metaScene.createMetaModel(n,r,{}),this.viewer.scene.canvas.spinner.processes--,e.src?this._sceneModelLoader.load(this,e.src,r,e,t):this._sceneModelLoader.parse(this,e.gltf,r,e,t)};if(e.metaModelSrc){const r=e.metaModelSrc;this.viewer.scene.canvas.spinner.processes++,this._dataSource.getMetaModel(r,s=>{this.viewer.scene.canvas.spinner.processes--,o(s)},s=>{this.error(`load(): Failed to load model metadata for model '${n} from '${r}' - ${s}`),this.viewer.scene.canvas.spinner.processes--})}else e.metaModelJSON&&o(e.metaModelJSON)}else e.src?this._sceneModelLoader.load(this,e.src,null,e,t):this._sceneModelLoader.parse(this,e.gltf,null,e,t);return t.once("destroyed",()=>{this.viewer.metaScene.destroyMetaModel(n)}),t}destroy(){super.destroy()}}function $wt(i,e,t={}){const n="lightgrey",o=t.hoverColor||"rgba(0,0,0,0.4)",r=t.textColor||"black",s=t.canvasElement||document.body,a=500,l=a+a/3,c=l/24,u=[{boundary:[6,6,6,6],color:t.frontColor||t.color||"#55FF55"},{boundary:[18,6,6,6],color:t.backColor||t.color||"#55FF55"},{boundary:[12,6,6,6],color:t.rightColor||t.color||"#FF5555"},{boundary:[0,6,6,6],color:t.leftColor||t.color||"#FF5555"},{boundary:[6,0,6,6],color:t.topColor||t.color||"#7777FF"},{boundary:[6,12,6,6],color:t.bottomColor||t.color||"#7777FF"}],d=[{label:"NavCube.front",boundaries:[[7,7,4,4]],dir:[0,1,0],up:[0,0,1]},{label:"NavCube.back",boundaries:[[19,7,4,4]],dir:[0,-1,0],up:[0,0,1]},{label:"NavCube.right",boundaries:[[13,7,4,4]],dir:[-1,0,0],up:[0,0,1]},{label:"NavCube.left",boundaries:[[1,7,4,4]],dir:[1,0,0],up:[0,0,1]},{label:"NavCube.top",boundaries:[[7,1,4,4]],dir:[0,0,-1],up:[0,1,0]},{label:"NavCube.bottom",boundaries:[[7,13,4,4]],dir:[0,0,1],up:[0,-1,0]},{boundaries:[[7,5,4,2]],dir:[0,1,-1],up:[0,1,1]},{boundaries:[[1,6,4,1],[6,1,1,4]],dir:[1,0,-1],up:[1,0,1]},{boundaries:[[7,0,4,1],[19,6,4,1]],dir:[0,-1,-1],up:[0,-1,1]},{boundaries:[[13,6,4,1],[11,1,1,4]],dir:[-1,0,-1],up:[-1,0,1]},{boundaries:[[7,11,4,2]],dir:[0,1,1],up:[0,-1,1]},{boundaries:[[1,11,4,1],[6,13,1,4]],dir:[1,0,1],up:[-1,0,1]},{boundaries:[[7,17,4,1],[19,11,4,1]],dir:[0,-1,1],up:[0,1,1]},{boundaries:[[13,11,4,1],[11,13,1,4]],dir:[-1,0,1],up:[1,0,1]},{boundaries:[[5,7,2,4]],dir:[1,1,0],up:[0,0,1]},{boundaries:[[11,7,2,4]],dir:[-1,1,0],up:[0,0,1]},{boundaries:[[17,7,2,4]],dir:[-1,-1,0],up:[0,0,1]},{boundaries:[[0,7,1,4],[23,7,1,4]],dir:[1,-1,0],up:[0,0,1]},{boundaries:[[5,11,2,2]],dir:[1,1,1],up:[-1,-1,1]},{boundaries:[[23,11,1,1],[6,17,1,1],[0,11,1,1]],dir:[1,-1,1],up:[-1,1,1]},{boundaries:[[5,5,2,2]],dir:[1,1,-1],up:[1,1,1]},{boundaries:[[11,17,1,1],[17,11,2,1]],dir:[-1,-1,1],up:[1,1,1]},{boundaries:[[17,6,2,1],[11,0,1,1]],dir:[-1,-1,-1],up:[-1,-1,1]},{boundaries:[[11,11,2,2]],dir:[-1,1,1],up:[1,-1,1]},{boundaries:[[0,6,1,1],[6,0,1,1],[23,6,1,1]],dir:[1,-1,-1],up:[1,-1,1]},{boundaries:[[11,5,2,2]],dir:[-1,1,-1],up:[-1,1,1]}];t.frontColor||t.color,t.backColor||t.color,t.rightColor||t.color,t.leftColor||t.color,t.topColor||t.color,t.bottomColor||t.color;const h=[{yUp:"",label:"NavCube.front",boundaries:[[7,7,4,4]],dir:[0,0,-1],up:[0,1,0]},{label:"NavCube.back",boundaries:[[19,7,4,4]],dir:[0,0,1],up:[0,1,0]},{label:"NavCube.right",boundaries:[[13,7,4,4]],dir:[-1,0,0],up:[0,1,0]},{label:"NavCube.left",boundaries:[[1,7,4,4]],dir:[1,0,0],up:[0,1,0]},{label:"NavCube.top",boundaries:[[7,1,4,4]],dir:[0,-1,0],up:[0,0,-1]},{label:"NavCube.bottom",boundaries:[[7,13,4,4]],dir:[0,1,0],up:[0,0,1]},{boundaries:[[7,5,4,2]],dir:[0,-.7071,-.7071],up:[0,.7071,-.7071]},{boundaries:[[1,6,4,1],[6,1,1,4]],dir:[1,-1,0],up:[1,1,0]},{boundaries:[[7,0,4,1],[19,6,4,1]],dir:[0,-.7071,.7071],up:[0,.7071,.7071]},{boundaries:[[13,6,4,1],[11,1,1,4]],dir:[-1,-1,0],up:[-1,1,0]},{boundaries:[[7,11,4,2]],dir:[0,1,-1],up:[0,1,1]},{boundaries:[[1,11,4,1],[6,13,1,4]],dir:[1,1,0],up:[-1,1,0]},{boundaries:[[7,17,4,1],[19,11,4,1]],dir:[0,1,1],up:[0,1,-1]},{boundaries:[[13,11,4,1],[11,13,1,4]],dir:[-1,1,0],up:[1,1,0]},{boundaries:[[5,7,2,4]],dir:[1,0,-1],up:[0,1,0]},{boundaries:[[11,7,2,4]],dir:[-1,0,-1],up:[0,1,0]},{boundaries:[[17,7,2,4]],dir:[-1,0,1],up:[0,1,0]},{boundaries:[[0,7,1,4],[23,7,1,4]],dir:[1,0,1],up:[0,1,0]},{boundaries:[[5,11,2,2]],dir:[.5,.7071,-.5],up:[-.5,.7071,.5]},{boundaries:[[23,11,1,1],[6,17,1,1],[0,11,1,1]],dir:[.5,.7071,.5],up:[-.5,.7071,-.5]},{boundaries:[[5,5,2,2]],dir:[.5,-.7071,-.5],up:[.5,.7071,-.5]},{boundaries:[[11,17,1,1],[17,11,2,1]],dir:[-.5,.7071,.5],up:[.5,.7071,-.5]},{boundaries:[[17,6,2,1],[11,0,1,1]],dir:[-.5,-.7071,.5],up:[-.5,.7071,.5]},{boundaries:[[11,11,2,2]],dir:[-.5,.7071,-.5],up:[.5,.7071,.5]},{boundaries:[[0,6,1,1],[6,0,1,1],[23,6,1,1]],dir:[.5,-.7071,.5],up:[.5,.7071,.5]},{boundaries:[[11,5,2,2]],dir:[-.5,-.7071,-.5],up:[-.5,.7071,-.5]}];for(let v=0,y=d.length;v<y;v++)b.normalizeVec3(d[v].dir,d[v].dir),b.normalizeVec3(d[v].up,d[v].up);for(let v=0,y=h.length;v<y;v++)b.normalizeVec3(h[v].dir,h[v].dir),b.normalizeVec3(h[v].up,h[v].up);var p=h;this._textureCanvas=document.createElement("canvas"),this._textureCanvas.width=l,this._textureCanvas.height=a,this._textureCanvas.style.width=l+"px",this._textureCanvas.style.height=a+"px",this._textureCanvas.style.padding="0",this._textureCanvas.style.margin="0",this._textureCanvas.style.top="0",this._textureCanvas.style.background=n,this._textureCanvas.style.position="absolute",this._textureCanvas.style.opacity="1.0",this._textureCanvas.style.visibility="hidden",this._textureCanvas.style["z-index"]=2e6,s.appendChild(this._textureCanvas);const A=this._textureCanvas.getContext("2d");let f=!1;function g(){for(let M=0,B=u.length;M<B;M++){const S=u[M],I=S.boundary,R=Math.round(I[0]*c),T=Math.round(I[1]*c),_=Math.round(I[2]*c),F=Math.round(I[3]*c);A.fillStyle=S.color,A.fillRect(R,T,_,F)}for(let M=0,B=p.length;M<B;M++){let S,I,R,T;const _=p[M],F=_.boundaries;for(var v=0,y=F.length;v<y;v++){const N=F[v];S=Math.round(N[0]*c),I=Math.round(N[1]*c),R=Math.round(N[2]*c),T=Math.round(N[3]*c),_.highlighted&&(A.fillStyle=_.highlighted?o:_.color||n,A.fillRect(S,I,R,T))}if(_.label){A.fillStyle=r,A.font="60px sans-serif",A.textAlign="center";var w=S+R*.5,x=I+T*.7;A.fillText(m(_.label),w,x,80)}}e.glRedraw()}const m=(function(){const v={"NavCube.front":"NavCube.front","NavCube.back":"NavCube.back","NavCube.right":"NavCube.right","NavCube.left":"NavCube.left","NavCube.top":"NavCube.top","NavCube.bottom":"NavCube.bottom"},y={"NavCube.front":"NavCube.front","NavCube.back":"NavCube.back","NavCube.right":"NavCube.right","NavCube.left":"NavCube.left","NavCube.top":"NavCube.top","NavCube.bottom":"NavCube.bottom"},w={"NavCube.front":"FRONT","NavCube.back":"BACK","NavCube.right":"RIGHT","NavCube.left":"LEFT","NavCube.top":"TOP","NavCube.bottom":"BOTTOM"};return function(x){const M=f?y:v,B=M?M[x]:null;return B?i.localeService.translate(B)||w[B]||B:x}})();this.setZUp=function(){f=!0,p=d,this.clear()},this.setYUp=function(){f=!1,p=h,this.clear()},this.clear=function(){A.fillStyle=n,A.fillRect(0,0,l,a);for(var v=0,y=p.length;v<y;v++){const w=p[v];w.highlighted=!1}g()},this.getArea=function(v){const y=v[0]*l,w=a-v[1]*a;for(var x=0,M=p.length;x<M;x++){const R=p[x].boundaries;for(var B=0,S=R.length;B<S;B++){const T=R[B];if(y>=T[0]*c&&y<=(T[0]+T[2])*c&&w>=T[1]*c&&w<=(T[1]+T[3])*c)return x}}return-1},this.setAreaHighlighted=function(v,y){var w=p[v];if(!w)throw"Area not found: "+v;w.highlighted=!!y,g()},this.getAreaDir=function(v){var y=p[v];if(!y)throw"Unknown area: "+v;return y.dir},this.getAreaUp=function(v){var y=p[v];if(!y)throw"Unknown area: "+v;return y.up},this.getImage=function(){return this._textureCanvas},this.destroy=function(){this._textureCanvas&&(this._textureCanvas.parentNode.removeChild(this._textureCanvas),this._textureCanvas=null)}}const Yte=b.vec3(),Xte=b.vec3();b.mat4();class GT extends qr{constructor(e,t={}){super("NavCube",e,t),e.navCube=this;try{this._navCubeScene=new x7(e,{canvasId:t.canvasId,canvasElement:t.canvasElement,transparent:!0}),this._navCubeCanvas=this._navCubeScene.canvas.canvas,this._navCubeScene.input.keyboardEnabled=!1}catch(m){this.error(m);return}const n=this._navCubeScene;n.clearLights(),new Ma(n,{dir:[.4,-.4,.8],color:[.8,1,1],intensity:1,space:"view"}),new Ma(n,{dir:[-.8,-.3,-.4],color:[.8,.8,.8],intensity:1,space:"view"}),new Ma(n,{dir:[.8,-.6,-.8],color:[1,1,1],intensity:1,space:"view"}),this._navCubeCamera=n.camera,this._navCubeCamera.ortho.scale=7,this._navCubeCamera.ortho.near=.1,this._navCubeCamera.ortho.far=2e3,n.edgeMaterial.edgeColor=[.2,.2,.2],n.edgeMaterial.edgeAlpha=.6,this._zUp=!!e.camera.zUp;var o=this;this.setIsProjectNorth(t.isProjectNorth),this.setProjectNorthOffsetAngle(t.projectNorthOffsetAngle);const r=(function(){const m=b.mat4();return function(v,y,w){return b.identityMat4(m),b.rotationMat4v(v*o._projectNorthOffsetAngle*b.DEGTORAD,[0,1,0],m),b.transformVec3(m,y,w)}})();this._synchCamera=(function(){var m=b.rotationMat4c(-90*b.DEGTORAD,1,0,0),v=b.vec3(),y=b.vec3(),w=b.vec3();return function(){var x=e.camera.eye,M=e.camera.look,B=e.camera.up;v=b.mulVec3Scalar(b.normalizeVec3(b.subVec3(x,M,v)),5),o._isProjectNorth&&o._projectNorthOffsetAngle&&(v=r(-1,v,Yte),B=r(-1,B,Xte)),o._zUp?(b.transformVec3(m,v,y),b.transformVec3(m,B,w),o._navCubeCamera.look=[0,0,0],o._navCubeCamera.eye=b.transformVec3(m,v,y),o._navCubeCamera.up=b.transformPoint3(m,B,w)):(o._navCubeCamera.look=[0,0,0],o._navCubeCamera.eye=v,o._navCubeCamera.up=B)}})(),this._cubeTextureCanvas=new $wt(e,n,t),this._cubeSampler=new If(n,{image:this._cubeTextureCanvas.getImage(),flipY:!0,wrapS:fs,wrapT:fs}),this._cubeMesh=new yi(n,{geometry:new yn(n,{primitive:"triangles",normals:[0,0,1,0,0,1,0,0,1,0,0,1,1,0,0,1,0,0,1,0,0,1,0,0,0,1,0,0,1,0,0,1,0,0,1,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,0,-1,0,0,-1,0,0,-1,0,0,-1],positions:[1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,1,1,-1,-1,1,-1,-1,1,1,-1,1,1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,1,-1,1,-1,-1,1,1,-1,-1,-1,-1,-1,-1,1,-1,1,1,-1],uv:[.5,.6666,.25,.6666,.25,.3333,.5,.3333,.5,.6666,.5,.3333,.75,.3333,.75,.6666,.5,.6666,.5,1,.25,1,.25,.6666,.25,.6666,0,.6666,0,.3333,.25,.3333,.25,0,.5,0,.5,.3333,.25,.3333,.75,.3333,1,.3333,1,.6666,.75,.6666],indices:[0,1,2,0,2,3,4,5,6,4,6,7,8,9,10,8,10,11,12,13,14,12,14,15,16,17,18,16,18,19,20,21,22,20,22,23]}),material:new vn(n,{diffuse:[.4,.4,.4],specular:[.4,.4,.4],emissive:[.6,.6,.6],diffuseMap:this._cubeSampler,emissiveMap:this._cubeSampler}),visible:!0,edges:!0}),this._shadow=t.shadowVisible===!1?null:new yi(n,{geometry:new yn(n,bf({center:[0,0,0],radiusTop:.001,radiusBottom:1.4,height:.01,radialSegments:20,heightSegments:1,openEnded:!0})),material:new vn(n,{diffuse:[0,0,0],specular:[0,0,0],emissive:[0,0,0],alpha:.5}),position:[0,-1.5,0],visible:!0,pickable:!1,backfaces:!1}),this._onCameraMatrix=e.camera.on("matrix",this._synchCamera),this._onCameraWorldAxis=e.camera.on("worldAxis",()=>{e.camera.zUp?(this._zUp=!0,this._cubeTextureCanvas.setZUp(),this._repaint(),this._synchCamera()):e.camera.yUp&&(this._zUp=!1,this._cubeTextureCanvas.setYUp(),this._repaint(),this._synchCamera())}),this._onCameraFOV=e.camera.perspective.on("fov",m=>{this._synchProjection&&(this._navCubeCamera.perspective.fov=m)}),this._onCameraProjection=e.camera.on("projection",m=>{this._synchProjection&&(this._navCubeCamera.projection=m==="ortho"||m==="perspective"?m:"perspective")});var s=-1;function a(m,v){var y=(m-A)*-p,w=(v-f)*-p;e.camera.orbitYaw(y),e.camera.orbitPitch(-w),A=m,f=v}function l(m){const{left:v,top:y}=o._navCubeCanvas.getBoundingClientRect();return[m.clientX-v,m.clientY-y]}{var c=null,u=null,d=!1,h=!1,p=.5,A,f;o._navCubeCanvas.addEventListener("mouseenter",o._onMouseEnter=function(m){h=!0}),o._navCubeCanvas.addEventListener("mouseleave",o._onMouseLeave=function(m){h=!1}),o._navCubeCanvas.addEventListener("mousedown",o._onMouseDown=function(m){if(m.which===1){c=m.x,u=m.y,A=m.clientX,f=m.clientY;var v=l({clientX:m.clientX,clientY:m.clientY}),y=n.pick({canvasPos:v});y?d=!0:d=!1}}),o._navCubeCanvas.addEventListener("mouseup",o._onMouseUp=function(m){if(m.which===1&&(d=!1,c!==null)){var v=l({clientX:m.clientX,clientY:m.clientY}),y=n.pick({canvasPos:v,pickSurface:!0});if(y&&y.uv){var w=o._cubeTextureCanvas.getArea(y.uv);if(w>=0&&(o._navCubeCanvas.style.cursor="pointer",s>=0&&(o._cubeTextureCanvas.setAreaHighlighted(s,!1),o._repaint(),s=-1),w>=0)){if(o._cubeTextureCanvas.setAreaHighlighted(w,!0),s=w,o._repaint(),m.x<c-3||m.x>c+3||m.y<u-3||m.y>u+3)return;var x=o._cubeTextureCanvas.getAreaDir(w);if(x){var M=o._cubeTextureCanvas.getAreaUp(w);o._isProjectNorth&&o._projectNorthOffsetAngle&&(x=r(1,x,Yte),M=r(1,M,Xte)),g(x,M,function(){s>=0&&(o._cubeTextureCanvas.setAreaHighlighted(s,!1),o._repaint(),s=-1),o._navCubeCanvas.style.cursor="pointer",s>=0&&(o._cubeTextureCanvas.setAreaHighlighted(s,!1),o._repaint(),s=-1),w>=0&&(o._cubeTextureCanvas.setAreaHighlighted(w,!1),s=-1,o._repaint())})}}}}}),o._navCubeCanvas.addEventListener("mousemove",o._onMouseMove=function(m){if(s>=0&&(o._cubeTextureCanvas.setAreaHighlighted(s,!1),o._repaint(),s=-1),!(m.buttons===1&&!d)){if(d){var v=m.clientX,y=m.clientY;o._navCubeCanvas.style.cursor="move",a(v,y);return}if(h){var w=l({clientX:m.clientX,clientY:m.clientY}),x=n.pick({canvasPos:w,pickSurface:!0});if(x){if(x.uv){o._navCubeCanvas.style.cursor="pointer";var M=o._cubeTextureCanvas.getArea(x.uv);if(M===s)return;s>=0&&o._cubeTextureCanvas.setAreaHighlighted(s,!1),M>=0&&(o._cubeTextureCanvas.setAreaHighlighted(M,!0),o._repaint(),s=M)}}else o._navCubeCanvas.style.cursor="default",s>=0&&(o._cubeTextureCanvas.setAreaHighlighted(s,!1),o._repaint(),s=-1)}}}),o._navCubeCanvas.addEventListener("touchstart",o._onTouchStart=function(m){if(m.touches.length>0){c=m.touches[0].clientX,u=m.touches[0].clientY,A=m.touches[0].clientX,f=m.touches[0].clientY;var v=l({clientX:m.touches[0].clientX,clientY:m.touches[0].clientY}),y=n.pick({canvasPos:v});y?d=!0:d=!1}},{passive:!1}),o._navCubeCanvas.addEventListener("touchmove",o._onTouchMove=function(m){m.preventDefault();var v=m.touches[0],y=v.clientX,w=v.clientY,x=document.elementFromPoint(y,w);if(h=o._navCubeCanvas===x,!!h&&d){a(y,w);return}},{passive:!1}),o._navCubeCanvas.addEventListener("touchend",o._onTouchEnd=function(m){d=!1});var g=(function(){var m=b.vec3();return function(v,y,w){var x=o._fitVisible?e.scene.getAABB(e.scene.visibleObjectIds):e.scene.aabb,M=b.getAABB3Diag(x);b.getAABB3Center(x,m);var B=Math.abs(M/Math.tan(o._cameraFitFOV*b.DEGTORAD));e.cameraControl.pivotPos=m,o._cameraFly?e.cameraFlight.flyTo({look:m,eye:[m[0]-B*v[0],m[1]-B*v[1],m[2]-B*v[2]],up:y||[0,1,0],orthoScale:M*1.1,fitFOV:o._cameraFitFOV,duration:o._cameraFlyDuration},w):e.cameraFlight.jumpTo({look:m,eye:[m[0]-B*v[0],m[1]-B*v[1],m[2]-B*v[2]],up:y||[0,1,0],orthoScale:M*1.1,fitFOV:o._cameraFitFOV},w)}})()}this._onUpdated=e.localeService.on("updated",()=>{this._cubeTextureCanvas.clear(),this._repaint()}),this.setVisible(t.visible),this.setCameraFitFOV(t.cameraFitFOV),this.setCameraFly(t.cameraFly),this.setCameraFlyDuration(t.cameraFlyDuration),this.setFitVisible(t.fitVisible),this.setSynchProjection(t.synchProjection)}send(e,t){e==="language"&&(this._cubeTextureCanvas.clear(),this._repaint())}_repaint(){const e=this._cubeTextureCanvas.getImage();this._cubeMesh.material.diffuseMap.image=e,this._cubeMesh.material.emissiveMap.image=e}setVisible(e=!0){this._navCubeCanvas&&(this._cubeMesh.visible=e,this._shadow&&(this._shadow.visible=e),this._navCubeCanvas.style.visibility=e?"visible":"hidden")}getVisible(){return this._navCubeCanvas?this._cubeMesh.visible:!1}setFitVisible(e=!1){this._fitVisible=e}getFitVisible(){return this._fitVisible}setCameraFly(e=!0){this._cameraFly=e}getCameraFly(){return this._cameraFly}setCameraFitFOV(e=45){this._cameraFitFOV=e}getCameraFitFOV(){return this._cameraFitFOV}setCameraFlyDuration(e=.5){this._cameraFlyDuration=e}getCameraFlyDuration(){return this._cameraFlyDuration}setSynchProjection(e=!1){this._synchProjection=e}getSynchProjection(){return this._synchProjection}setIsProjectNorth(e=!1){this._isProjectNorth=e}getIsProjectNorth(){return this._isProjectNorth}setProjectNorthOffsetAngle(e){this._projectNorthOffsetAngle=e}getProjectNorthOffsetAngle(){return this._projectNorthOffsetAngle}destroy(){this._navCubeCanvas&&(this.viewer.localeService.off(this._onUpdated),this.viewer.camera.off(this._onCameraMatrix),this.viewer.camera.off(this._onCameraWorldAxis),this.viewer.camera.perspective.off(this._onCameraFOV),this.viewer.camera.off(this._onCameraProjection),this._navCubeCanvas.removeEventListener("mouseenter",this._onMouseEnter),this._navCubeCanvas.removeEventListener("mouseleave",this._onMouseLeave),this._navCubeCanvas.removeEventListener("mousedown",this._onMouseDown),this._navCubeCanvas.removeEventListener("mousemove",this._onMouseMove),this._navCubeCanvas.removeEventListener("mouseup",this._onMouseUp),this._navCubeCanvas.removeEventListener("touchstart",this._onTouchStart),this._navCubeCanvas.removeEventListener("touchmove",this._onTouchMove),this._navCubeCanvas.removeEventListener("touchend",this._onTouchEnd),this._navCubeCanvas=null,this._cubeTextureCanvas.destroy(),this._cubeTextureCanvas=null,this._onMouseEnter=null,this._onMouseLeave=null,this._onMouseDown=null,this._onMouseMove=null,this._onMouseUp=null,this._onTouchStart=null,this._onTouchMove=null,this._onTouchEnd=null),this._navCubeScene.destroy(),this._navCubeScene=null,this._cubeMesh=null,this._shadow=null,super.destroy()}}class e7t{constructor(e){const t=e.cameraControl,n=e.scene,o=n.canvas.canvas,r=!1,s=1,a=.09,l=.01,c=new n4(n,{position:[0,0,0],scale:[5,5,5],isObject:!1}),u=b.vec3();this._setPosition=(function(){const x=b.vec3(),M=b.vec3();return function(B){u.set(B),Ah(B,x,M),c.origin=x,c.position=M}})(),this._setQuaternion=x=>{c.quaternion=x};const d=(x,M)=>new yn(c,bf({radiusTop:.001,radiusBottom:x,radialSegments:32,heightSegments:1,height:M,openEnded:!1})),h=(x,M,B)=>new yn(c,bf({radiusTop:x,radiusBottom:x,radialSegments:B,heightSegments:1,height:M,openEnded:!1})),p=(x,M,B)=>new yn(c,bS({radius:s-.2,tube:x,radialSegments:64,tubeSegments:B,arc:Math.PI*2*M})),A={curve:p(l,.25,14),curveHandle:p(a,.25,14),hoop:p(l,1,8),arrowHead:d(.07,.2),arrowHeadBig:d(.09,.25),arrowHeadHandle:h(a,.37,8),axis:h(l,s,20),axisHandle:h(a,s,20)},f=x=>new vn(c,{diffuse:x,emissive:x,ambient:[0,0,0],specular:[.6,.6,.3],shininess:80,lineWidth:2}),g=(x,M)=>new fc(c,{edges:!1,fill:!0,fillColor:x,fillAlpha:M}),m=new vn(c,{diffuse:[1,1,0],alpha:0,alphaMode:"blend"}),v={},y=(x,M)=>{b.mulVec3Scalar(x,-1,b.vec3());const B=f(x),S=b.quaternionToRotationMat4(M,b.identityMat4());b.mulMat4(b.rotationMat4v(Math.PI,[0,1,0],b.mat4()),S,S);const I=b.scaleMat4v([.6,.6,.6],b.identityMat4()),R=(ne,ie)=>{const Me=b.translateMat4v(ne,b.identityMat4()),Ae=b.identityMat4();return b.mulMat4(Me,ie,Ae),b.mulMat4(S,Ae,Ae),b.mulMat4(Ae,I,b.identityMat4())},T=c.addChild(new yi(c,{geometry:A.curve,material:B,matrix:S,pickable:!1,collidable:!0,clippable:!1,backfaces:!0,visible:!1,isUI:!0,isObject:!1}),r),_=c.addChild(new yi(c,{geometry:A.curveHandle,material:m,matrix:S,pickable:!0,collidable:!0,clippable:!1,backfaces:!0,visible:!1,isUI:!0,isObject:!1}),r),F=c.addChild(new yi(c,{geometry:A.arrowHead,material:B,matrix:R([.8,.07,0],b.rotationMat4v(180*b.DEGTORAD,[0,0,1],b.identityMat4())),pickable:!0,collidable:!0,clippable:!1,visible:!1,isUI:!0,isObject:!1}),r),N=c.addChild(new yi(c,{geometry:A.arrowHead,material:B,matrix:R([.07,.8,0],b.rotationMat4v(90*b.DEGTORAD,[0,0,1],b.identityMat4())),pickable:!0,collidable:!0,clippable:!1,visible:!1,isUI:!0,isObject:!1}),r),z=c.addChild(new yi(c,{geometry:A.hoop,material:B,highlighted:!0,highlightMaterial:g(x,.6),matrix:S,pickable:!1,collidable:!0,clippable:!1,visible:!1,isUI:!0,isObject:!1}),r),j=b.quaternionToRotationMat4(b.vec3PairToQuaternion([0,1,0],x),b.identityMat4());b.mulMat4(b.rotationMat4v(Math.PI,[0,1,0],b.mat4()),j,j);const W=ne=>b.mulMat4(j,b.translateMat4c(0,ne,0,b.identityMat4()),b.identityMat4()),J=W(s+.1),$=W(s/2),ue=c.addChild(new yi(c,{geometry:A.arrowHead,material:B,matrix:J,pickable:!1,collidable:!0,clippable:!1,visible:!1,isUI:!0,isObject:!1}),r),Ee=c.addChild(new yi(c,{geometry:A.arrowHeadHandle,material:m,matrix:J,pickable:!0,collidable:!0,clippable:!1,visible:!1,isUI:!0,isObject:!1}),r),Be=c.addChild(new yi(c,{geometry:A.axis,material:B,matrix:$,pickable:!1,collidable:!0,clippable:!1,visible:!1,isUI:!0,isObject:!1}),r),ze=c.addChild(new yi(c,{geometry:A.axisHandle,material:m,matrix:$,pickable:!0,collidable:!0,clippable:!1,visible:!1,isUI:!0,isObject:!1}),r),Qe=c.addChild(new yi(c,{geometry:A.arrowHeadBig,material:B,matrix:J,pickable:!1,collidable:!0,clippable:!1,visible:!1,isUI:!0,isObject:!1}),r),me=(ne,ie)=>b.vec3ApplyQuaternion(c.quaternion,ne,ie),_e=(function(){const ne=b.vec3(),ie=b.vec3(),Me=b.vec3();return(Ae,q)=>{me(x,ne);const Z=u,oe=ne;b.canvasPosToWorldRay(o,n.camera.viewMatrix,n.camera.projMatrix,n.camera.projection,Ae,ie,Me);const fe=b.dotVec3(oe,Me),Se=b.subVec3(ie,Z,q),X=b.dotVec3(Se,oe),H=b.dotVec3(Se,Me),ee=1-fe*fe;if(Math.abs(ee)>1e-10){const be=(X-fe*H)/ee;return b.addVec3(Z,b.mulVec3Scalar(oe,be,q),q),!0}else return!1}})(),De=b.vec3(),ve=b.vec3();v[Ee.id]=v[ze.id]={setActivated:ne=>Qe.visible=ne,initDragAction:ne=>_e(ne,De)&&b.subVec3(De,u,De)&&(ie=>{_e(ie,ve)&&(b.subVec3(ve,De,ve),this._setPosition(ve),this._handlers&&this._handlers.onPosition(ve))})},v[_.id]={setActivated:ne=>z.visible=ne,initDragAction:ne=>{const ie=(function(){const Ae=n.camera.projectWorldPos(u);me(x,ve),b.transformVec3(n.camera.normalMatrix,ve,ve);const q=Math.sign(ve[2]);return Z=>{const oe=Z[0]-Ae[0],fe=Z[1]-Ae[1];return q*Math.atan2(-fe,oe)}})();let Me=ie(ne);return Ae=>{const q=ie(Ae);c.rotate(x,(q-Me)*180/Math.PI),this._handlers&&this._handlers.onQuaternion(c.quaternion),Me=q}}};let ge=!1,Ie=!1,Ne=!1;const qe=()=>{const ne=Ne&≥Ee.visible=ze.visible=ue.visible=Be.visible=!!ne,ne||(Qe.visible=!1)},Q=()=>{const ne=Ne&&Ie;_.visible=T.visible=F.visible=N.visible=!!ne,ne||(z.visible=!1)};return{setPositionActive:ne=>{ge=ne,qe()},setRotationActive:ne=>{Ie=ne,Q()},set visible(ne){Ne=ne,qe(),Q()}}};this._displayMeshes={center:c.addChild(new yi(c,{geometry:new yn(c,xf({radius:.05})),material:new vn(c,{diffuse:[0,0,0],emissive:[0,0,0],ambient:[0,0,0],specular:[.6,.6,.3],shininess:80}),pickable:!1,collidable:!0,clippable:!1,visible:!1,isObject:!1}),r),x:y([1,0,0],b.vec3PairToQuaternion([1,0,0],[0,0,1])),y:y([0,1,0],b.eulerToQuaternion([90,0,0],"XYZ")),z:y([0,0,1],b.identityQuaternion())};const w=[];{let x=-1;const M=S=>{c.scale[0]!==S&&(c.scale=[S,S,S],this._handlers&&this._handlers.onScreenScale&&this._handlers.onScreenScale(c.scale))},B=n.on("tick",()=>{const S=n.camera,I=Math.abs(b.distVec3(S.eye,u));S.projection==="perspective"?I!==x&&M(.07*I*Math.tan(S.perspective.fov*b.DEGTORAD)):S.projection==="ortho"&&M(S.ortho.scale/10),x=I});w.push(()=>n.off(B))}{let x=null,M=null;w.push(()=>{M&&M.cleanup()});const B=b.vec2(),S=(F,N)=>{N[0]=F.pageX,N[1]=F.pageY,vl(o.ownerDocument.documentElement,o,N)},I=F=>{S(F,B);const N=n.pick({canvasPos:B}),z=N&&N.entity,j=z&&z.id;return j in v&&v[j]},R=(F,N)=>{const z=I(N(F));if(z){M&&M.cleanup();const j=z.initDragAction(B);return j&&(t.pointerEnabled=!1,z.setActivated(!0),M={onChange:W=>{const J=N(W);J&&(S(J,B),j(B))},cleanup:function(){M=null,t.pointerEnabled=!0,z.setActivated(!1)}}),!!j}else return!1},T=(F,N)=>{o.addEventListener(F,N),w.push(()=>o.removeEventListener(F,N))},_=F=>{F.preventDefault(),F.stopPropagation(),F.stopImmediatePropagation()};T("mousedown",F=>{F.which===1&&R(F,N=>N.which===1&&N)&&_(F)}),T("mousemove",F=>{if(M)M.onChange(F),_(F);else{x&&x();const N=I(F);N?(N.setActivated(!0),x=()=>N.setActivated(!1)):x=null}}),T("mouseup",F=>{M&&(M.onChange(F),M.cleanup())}),T("touchstart",F=>{if(F.preventDefault(),F.touches.length===1){const N=F.touches[0].identifier;R(F,z=>[...z.changedTouches].find(j=>j.identifier===N))&&_(F)}}),T("touchmove",F=>{M&&(M.onChange(F),_(F))}),T("touchend",F=>{M&&(M.onChange(F),M.cleanup())})}this.__destroy=()=>{w.forEach(x=>x()),c.destroy();for(let x in v)delete v[x]}}destroy(){this.__destroy()}setHandlers(e){Object.values(this._displayMeshes).forEach(t=>t.visible=!!e),this._handlers=e,this._displayMeshes.x.setPositionActive(e&&e.onPosition),this._displayMeshes.y.setPositionActive(e&&e.onPosition),this._displayMeshes.z.setPositionActive(e&&e.onPosition),this._displayMeshes.x.setRotationActive(e&&e.onQuaternion),this._displayMeshes.y.setRotationActive(e&&e.onQuaternion),this._displayMeshes.z.setRotationActive(e&&e.onQuaternion)}setPosition(e){this._setPosition(e)}setQuaternion(e){this._setQuaternion(e)}}let t7t=class{constructor(e,t,n){this.id=n.id,this._sectionPlane=n,this._mesh=new yi(t,{id:n.id,geometry:new yn(t,vS({xSize:.5,ySize:.5,zSize:.001})),material:new vn(t,{emissive:[1,1,1],diffuse:[0,0,0],backfaces:!1}),edgeMaterial:new ZS(t,{edgeColor:[0,0,0],edgeAlpha:1,edgeWidth:1}),highlightMaterial:new fc(t,{fill:!0,fillColor:[.5,1,.5],fillAlpha:.7,edges:!0,edgeColor:[0,0,0],edgeAlpha:1,edgeWidth:1}),selectedMaterial:new fc(t,{fill:!0,fillColor:[0,0,1],fillAlpha:.7,edges:!0,edgeColor:[1,0,0],edgeAlpha:1,edgeWidth:1}),highlighted:!0,scale:[3,3,3],position:[0,0,0],rotation:[0,0,0],opacity:.3,edges:!0});{const o=b.vec3([0,0,0]),r=b.vec3(),s=b.vec3([0,0,1]),a=b.vec4(4),l=b.vec3(),c=()=>{const u=this._sectionPlane.scene.center,d=[-this._sectionPlane.dir[0],-this._sectionPlane.dir[1],-this._sectionPlane.dir[2]];b.subVec3(u,this._sectionPlane.pos,o);const h=-b.dotVec3(d,o);b.normalizeVec3(d),b.mulVec3Scalar(d,h,r);const p=b.vec3PairToQuaternion(s,this._sectionPlane.dir,a);l[0]=r[0]*.1,l[1]=r[1]*.1,l[2]=r[2]*.1,this._mesh.quaternion=p,this._mesh.position=l};this._onSectionPlanePos=this._sectionPlane.on("pos",c),this._onSectionPlaneDir=this._sectionPlane.on("dir",c)}this._highlighted=!1,this._selected=!1}setHighlighted(e){this._highlighted=!!e,this._mesh.highlighted=this._highlighted,this._mesh.highlightMaterial.fillColor=e?[0,.7,0]:[0,0,0]}getHighlighted(){return this._highlighted}setSelected(e){this._selected=!!e,this._mesh.edgeMaterial.edgeWidth=e?3:1,this._mesh.highlightMaterial.edgeWidth=e?3:1}getSelected(){return this._selected}destroy(){this._sectionPlane.off(this._onSectionPlanePos),this._sectionPlane.off(this._onSectionPlaneDir),this._mesh.destroy()}};class i7t{constructor(e,t){if(!t.onHoverEnterPlane||!t.onHoverLeavePlane||!t.onClickedNothing||!t.onClickedPlane)throw"Missing config(s): onHoverEnterPlane, onHoverLeavePlane, onClickedNothing || onClickedPlane";this.plugin=e,this._viewer=e.viewer,this._onHoverEnterPlane=t.onHoverEnterPlane,this._onHoverLeavePlane=t.onHoverLeavePlane,this._onClickedNothing=t.onClickedNothing,this._onClickedPlane=t.onClickedPlane,this._visible=!0,this._planes={},this._canvas=t.overviewCanvas,this._scene=new x7(this._viewer,{canvasId:this._canvas.id,transparent:!0}),this._scene.clearLights(),new Ma(this._scene,{dir:[.4,-.4,.8],color:[.8,1,1],intensity:1,space:"view"}),new Ma(this._scene,{dir:[-.8,-.3,-.4],color:[.8,.8,.8],intensity:1,space:"view"}),new Ma(this._scene,{dir:[.8,-.6,-.8],color:[1,1,1],intensity:1,space:"view"}),this._scene.camera,this._scene.camera.perspective.fov=70,this._zUp=!1;{const o=this._scene.camera,r=b.rotationMat4c(-90*b.DEGTORAD,1,0,0),s=b.vec3(),a=b.vec3(),l=b.vec3();this._synchCamera=()=>{const c=this._viewer.camera.eye,u=this._viewer.camera.look,d=this._viewer.camera.up;b.mulVec3Scalar(b.normalizeVec3(b.subVec3(c,u,s)),7),this._zUp?(b.transformVec3(r,s,a),b.transformVec3(r,d,l),o.look=[0,0,0],o.eye=b.transformVec3(r,s,a),o.up=b.transformPoint3(r,d,l)):(o.look=[0,0,0],o.eye=s,o.up=d)}}this._onViewerCameraMatrix=this._viewer.camera.on("matrix",this._synchCamera),this._onViewerCameraWorldAxis=this._viewer.camera.on("worldAxis",this._synchCamera),this._onViewerCameraFOV=this._viewer.camera.perspective.on("fov",o=>{this._scene.camera.perspective.fov=o});{var n=null;this._onInputMouseMove=this._scene.input.on("mousemove",o=>{const r=this._scene.pick({canvasPos:o});r?(!n||r.entity.id!==n.id)&&(n&&this._planes[n.id]&&this._onHoverLeavePlane(n.id),n=r.entity,this._planes[n.id]&&this._onHoverEnterPlane(n.id)):n&&(this._onHoverLeavePlane(n.id),n=null)}),this._scene.canvas.canvas.addEventListener("mouseup",this._onCanvasMouseUp=()=>{n?this._planes[n.id]&&this._onClickedPlane(n.id):this._onClickedNothing()}),this._scene.canvas.canvas.addEventListener("mouseout",this._onCanvasMouseOut=()=>{n&&(this._onHoverLeavePlane(n.id),n=null)})}this.setVisible(t.overviewVisible)}addSectionPlane(e){this._planes[e.id]=new t7t(this,this._scene,e)}setPlaneHighlighted(e,t){const n=this._planes[e];n&&n.setHighlighted(t)}setPlaneSelected(e,t){const n=this._planes[e];n&&n.setSelected(t)}removeSectionPlane(e){const t=this._planes[e.id];t&&(t.destroy(),delete this._planes[e.id])}setVisible(e=!0){this._visible=e,this._canvas.style.visibility=e?"visible":"hidden"}getVisible(){return this._visible}destroy(){this._viewer.camera.off(this._onViewerCameraMatrix),this._viewer.camera.off(this._onViewerCameraWorldAxis),this._viewer.camera.perspective.off(this._onViewerCameraFOV),this._scene.input.off(this._onInputMouseMove),this._scene.canvas.canvas.removeEventListener("mouseup",this._onCanvasMouseUp),this._scene.canvas.canvas.removeEventListener("mouseout",this._onCanvasMouseOut),this._scene.destroy()}}const Cc=b.AABB3(),Ih=b.vec3();class n7t extends qr{constructor(e,t={}){if(super("SectionPlanes",e),this._freeControls=[],this._sectionPlanes=e.scene.sectionPlanes,this._controls={},this._shownControlId=null,t.overviewCanvasId!==null&&t.overviewCanvasId!==void 0){const n=document.getElementById(t.overviewCanvasId);n?this._overview=new i7t(this,{overviewCanvas:n,visible:t.overviewVisible,onHoverEnterPlane:(o=>{this._overview.setPlaneHighlighted(o,!0)}),onHoverLeavePlane:(o=>{this._overview.setPlaneHighlighted(o,!1)}),onClickedPlane:(o=>{if(this.getShownControl()===o){this.hideControl();return}this.showControl(o);const s=this.sectionPlanes[o].pos;Cc.set(this.viewer.scene.aabb),b.getAABB3Center(Cc,Ih),Cc[0]+=s[0]-Ih[0],Cc[1]+=s[1]-Ih[1],Cc[2]+=s[2]-Ih[2],Cc[3]+=s[0]-Ih[0],Cc[4]+=s[1]-Ih[1],Cc[5]+=s[2]-Ih[2],this.viewer.cameraFlight.flyTo({aabb:Cc,fitFOV:65})}),onClickedNothing:(()=>{this.hideControl()})}):this.warn("Can't find overview canvas: '"+t.overviewCanvasId+"' - will create plugin without overview")}this._onSceneSectionPlaneCreated=e.scene.on("sectionPlaneCreated",n=>{this._sectionPlaneCreated(n)})}setOverviewVisible(e){this._overview&&this._overview.setVisible(e)}getOverviewVisible(){if(this._overview)return this._overview.getVisible()}get sectionPlanes(){return this._sectionPlanes}createSectionPlane(e={}){return e.id!==void 0&&e.id!==null&&this.viewer.scene.components[e.id]&&(this.error("Viewer component with this ID already exists: "+e.id),delete e.id),new SP(this.viewer.scene,{id:e.id,pos:e.pos,dir:e.dir,active:!0})}_sectionPlaneCreated(e){const t=this._freeControls.length>0?this._freeControls.pop():(()=>{const n=this.viewer.scene,o=(function(){const d=new n4(n,{isObject:!1});return d.addChild(new yi(d,{geometry:new yn(d,{primitive:"triangles",positions:[.5,.5,0,.5,-.5,0,-.5,-.5,0,-.5,.5,0,.5,.5,-0,.5,-.5,-0,-.5,-.5,-0,-.5,.5,-0],indices:[0,1,2,2,3,0]}),material:new vn(d,{emissive:[0,0,0],diffuse:[0,0,0],backfaces:!0}),opacity:.6,ghosted:!0,ghostMaterial:new fc(d,{edges:!1,filled:!0,fillColor:[1,1,0],edgeColor:[0,0,0],fillAlpha:.1,backfaces:!0}),pickable:!1,collidable:!0,clippable:!1,visible:!1,scale:[2.4,2.4,1],isObject:!1})),d.addChild(new yi(d,{geometry:new yn(d,bS({center:[0,0,0],radius:1.7,tube:.02,radialSegments:4,tubeSegments:4,arc:Math.PI*2})),material:new vn(d,{emissive:[0,0,0],diffuse:[0,0,0],specular:[0,0,0],shininess:0}),highlightMaterial:new fc(d,{edges:!1,edgeColor:[0,0,0],filled:!0,fillColor:[.8,.8,.8],fillAlpha:1}),pickable:!1,collidable:!1,clippable:!1,visible:!1,scale:[1,1,.1],rotation:[0,0,45],isObject:!1})),{setPosition:(function(){const h=b.vec3(),p=b.vec3();return function(A){Ah(A,h,p),d.origin=h,d.position=p}})(),setQuaternion:h=>{d.quaternion=h},setScale:h=>{d.scale=h},setVisible:h=>{d.visible=h},destroy:()=>{d.destroy()}}})();let r=()=>{};const s=new e7t(this.viewer);let a=!1,l=!1,c=null;const u=()=>{const d=l&&!a;o.setVisible(d),s.setHandlers(d&&c)};return{_destroy:()=>{r(),s.destroy(),o.destroy()},setCulled:d=>{a=d,u()},setVisible:d=>{l=d,u()},_setSectionPlane:d=>{if(r(),d){let h=!1;c={onPosition:m=>{o.setPosition(m),d.pos=m},onQuaternion:m=>{o.setQuaternion(m),h=!0,d.quaternion=m},onScreenScale:m=>{o.setScale(m)}};const p=()=>{o.setPosition(d.pos),s.setPosition(d.pos)},A=()=>{o.setQuaternion(d.quaternion),s.setQuaternion(d.quaternion)};p(),A();const f=d.on("pos",p),g=d.on("dir",()=>{h?h=!1:A()});r=()=>{d.off(f),d.off(g),r=()=>{}}}}}})();t._setSectionPlane(e),t.setVisible(!1),this._controls[e.id]=t,this._overview&&this._overview.addSectionPlane(e),e.once("destroyed",()=>{this._sectionPlaneDestroyed(e)})}flipSectionPlanes(){const e=this.viewer.scene.sectionPlanes;for(let t in e)e[t].flipDir()}showControl(e){const t=this._controls[e];if(!t){this.error("Control not found: "+e);return}this.hideControl(),t.setVisible(!0),this._overview&&this._overview.setPlaneSelected(e,!0),this._shownControlId=e}getShownControl(){return this._shownControlId}hideControl(){for(var e in this._controls)this._controls.hasOwnProperty(e)&&(this._controls[e].setVisible(!1),this._overview&&this._overview.setPlaneSelected(e,!1));this._shownControlId=null}destroySectionPlane(e){var t=this.viewer.scene.sectionPlanes[e];if(!t){this.error("SectionPlane not found: "+e);return}this._sectionPlaneDestroyed(t),t.destroy(),e===this._shownControlId&&(this._shownControlId=null)}_sectionPlaneDestroyed(e){this._overview&&this._overview.removeSectionPlane(e);const t=this._controls[e.id];t&&(t.setVisible(!1),t._setSectionPlane(null),delete this._controls[e.id],this._freeControls.push(t))}clear(){const e=Object.keys(this._sectionPlanes);for(var t=0,n=e.length;t<n;t++)this.destroySectionPlane(e[t])}send(e,t){switch(e){case"snapshotStarting":for(let n in this._controls)this._controls.hasOwnProperty(n)&&this._controls[n].setCulled(!0);break;case"snapshotFinished":for(let n in this._controls)this._controls.hasOwnProperty(n)&&this._controls[n].setCulled(!1);break;case"clearSectionPlanes":this.clear();break}}destroy(){this.clear(),this._overview&&this._overview.destroy(),this._destroyFreeControls(),super.destroy()}_destroyFreeControls(){for(var e=this._freeControls.pop();e;)e._destroy(),e=this._freeControls.pop();this.viewer.scene.off(this._onSceneSectionPlaneCreated)}}class $te{constructor(e={}){this.cacheBuster=e.cacheBuster!==!1}_cacheBusterURL(e){if(!this.cacheBuster)return e;const t=new Date().getTime();return e.indexOf("?")>-1?e+"&_="+t:e+"?_="+t}getManifest(e,t,n){At.loadJSON(this._cacheBusterURL(e),o=>{t(o)},function(o){n(o)})}getMetaModel(e,t,n){At.loadJSON(this._cacheBusterURL(e),o=>{t(o)},function(o){n(o)})}getXKT(e,t,n){var o=()=>{};t=t||o,n=n||o;const r=/^data:(.*?)(;base64)?,(.*)$/,s=e.match(r);if(s){const c=!!s[2];var a=s[3];a=window.decodeURIComponent(a),c&&(a=window.atob(a));try{const u=new ArrayBuffer(a.length),d=new Uint8Array(u);for(var l=0;l<a.length;l++)d[l]=a.charCodeAt(l);t(u)}catch(u){n(u)}}else{const c=new XMLHttpRequest;c.open("GET",this._cacheBusterURL(e),!0),c.responseType="arraybuffer",c.onreadystatechange=function(){c.readyState===4&&(c.status===200?t(c.response):n("getXKT error : "+c.response))},c.send(null)}}}var J4={exports:{}};var o7t=J4.exports,eie;function s7t(){return eie||(eie=1,(function(i,e){(function(t,n){n(e)})(o7t,(function(t){function n(D){let Y=D.length;for(;--Y>=0;)D[Y]=0}const o=256,r=286,s=30,a=15,l=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),c=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),u=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),d=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),h=new Array(576);n(h);const p=new Array(60);n(p);const A=new Array(512);n(A);const f=new Array(256);n(f);const g=new Array(29);n(g);const m=new Array(s);function v(D,Y,O,xe,we){this.static_tree=D,this.extra_bits=Y,this.extra_base=O,this.elems=xe,this.max_length=we,this.has_stree=D&&D.length}let y,w,x;function M(D,Y){this.dyn_tree=D,this.max_code=0,this.stat_desc=Y}n(m);const B=D=>D<256?A[D]:A[256+(D>>>7)],S=(D,Y)=>{D.pending_buf[D.pending++]=255&Y,D.pending_buf[D.pending++]=Y>>>8&255},I=(D,Y,O)=>{D.bi_valid>16-O?(D.bi_buf|=Y<<D.bi_valid&65535,S(D,D.bi_buf),D.bi_buf=Y>>16-D.bi_valid,D.bi_valid+=O-16):(D.bi_buf|=Y<<D.bi_valid&65535,D.bi_valid+=O)},R=(D,Y,O)=>{I(D,O[2*Y],O[2*Y+1])},T=(D,Y)=>{let O=0;do O|=1&D,D>>>=1,O<<=1;while(--Y>0);return O>>>1},_=(D,Y,O)=>{const xe=new Array(16);let we,ye,tt=0;for(we=1;we<=a;we++)tt=tt+O[we-1]<<1,xe[we]=tt;for(ye=0;ye<=Y;ye++){let Oe=D[2*ye+1];Oe!==0&&(D[2*ye]=T(xe[Oe]++,Oe))}},F=D=>{let Y;for(Y=0;Y<r;Y++)D.dyn_ltree[2*Y]=0;for(Y=0;Y<s;Y++)D.dyn_dtree[2*Y]=0;for(Y=0;Y<19;Y++)D.bl_tree[2*Y]=0;D.dyn_ltree[512]=1,D.opt_len=D.static_len=0,D.sym_next=D.matches=0},N=D=>{D.bi_valid>8?S(D,D.bi_buf):D.bi_valid>0&&(D.pending_buf[D.pending++]=D.bi_buf),D.bi_buf=0,D.bi_valid=0},z=(D,Y,O,xe)=>{const we=2*Y,ye=2*O;return D[we]<D[ye]||D[we]===D[ye]&&xe[Y]<=xe[O]},j=(D,Y,O)=>{const xe=D.heap[O];let we=O<<1;for(;we<=D.heap_len&&(we<D.heap_len&&z(Y,D.heap[we+1],D.heap[we],D.depth)&&we++,!z(Y,xe,D.heap[we],D.depth));)D.heap[O]=D.heap[we],O=we,we<<=1;D.heap[O]=xe},W=(D,Y,O)=>{let xe,we,ye,tt,Oe=0;if(D.sym_next!==0)do xe=255&D.pending_buf[D.sym_buf+Oe++],xe+=(255&D.pending_buf[D.sym_buf+Oe++])<<8,we=D.pending_buf[D.sym_buf+Oe++],xe===0?R(D,we,Y):(ye=f[we],R(D,ye+o+1,Y),tt=l[ye],tt!==0&&(we-=g[ye],I(D,we,tt)),xe--,ye=B(xe),R(D,ye,O),tt=c[ye],tt!==0&&(xe-=m[ye],I(D,xe,tt)));while(Oe<D.sym_next);R(D,256,Y)},J=(D,Y)=>{const O=Y.dyn_tree,xe=Y.stat_desc.static_tree,we=Y.stat_desc.has_stree,ye=Y.stat_desc.elems;let tt,Oe,wt,Ve=-1;for(D.heap_len=0,D.heap_max=573,tt=0;tt<ye;tt++)O[2*tt]!==0?(D.heap[++D.heap_len]=Ve=tt,D.depth[tt]=0):O[2*tt+1]=0;for(;D.heap_len<2;)wt=D.heap[++D.heap_len]=Ve<2?++Ve:0,O[2*wt]=1,D.depth[wt]=0,D.opt_len--,we&&(D.static_len-=xe[2*wt+1]);for(Y.max_code=Ve,tt=D.heap_len>>1;tt>=1;tt--)j(D,O,tt);wt=ye;do tt=D.heap[1],D.heap[1]=D.heap[D.heap_len--],j(D,O,1),Oe=D.heap[1],D.heap[--D.heap_max]=tt,D.heap[--D.heap_max]=Oe,O[2*wt]=O[2*tt]+O[2*Oe],D.depth[wt]=(D.depth[tt]>=D.depth[Oe]?D.depth[tt]:D.depth[Oe])+1,O[2*tt+1]=O[2*Oe+1]=wt,D.heap[1]=wt++,j(D,O,1);while(D.heap_len>=2);D.heap[--D.heap_max]=D.heap[1],((et,si)=>{const Gt=si.dyn_tree,Ct=si.max_code,ho=si.stat_desc.static_tree,Di=si.stat_desc.has_stree,Kt=si.stat_desc.extra_bits,zi=si.stat_desc.extra_base,ni=si.stat_desc.max_length;let Bt,ti,ji,Pt,Ti,ri,Jt=0;for(Pt=0;Pt<=a;Pt++)et.bl_count[Pt]=0;for(Gt[2*et.heap[et.heap_max]+1]=0,Bt=et.heap_max+1;Bt<573;Bt++)ti=et.heap[Bt],Pt=Gt[2*Gt[2*ti+1]+1]+1,Pt>ni&&(Pt=ni,Jt++),Gt[2*ti+1]=Pt,ti>Ct||(et.bl_count[Pt]++,Ti=0,ti>=zi&&(Ti=Kt[ti-zi]),ri=Gt[2*ti],et.opt_len+=ri*(Pt+Ti),Di&&(et.static_len+=ri*(ho[2*ti+1]+Ti)));if(Jt!==0){do{for(Pt=ni-1;et.bl_count[Pt]===0;)Pt--;et.bl_count[Pt]--,et.bl_count[Pt+1]+=2,et.bl_count[ni]--,Jt-=2}while(Jt>0);for(Pt=ni;Pt!==0;Pt--)for(ti=et.bl_count[Pt];ti!==0;)ji=et.heap[--Bt],ji>Ct||(Gt[2*ji+1]!==Pt&&(et.opt_len+=(Pt-Gt[2*ji+1])*Gt[2*ji],Gt[2*ji+1]=Pt),ti--)}})(D,Y),_(O,Ve,D.bl_count)},$=(D,Y,O)=>{let xe,we,ye=-1,tt=Y[1],Oe=0,wt=7,Ve=4;for(tt===0&&(wt=138,Ve=3),Y[2*(O+1)+1]=65535,xe=0;xe<=O;xe++)we=tt,tt=Y[2*(xe+1)+1],++Oe<wt&&we===tt||(Oe<Ve?D.bl_tree[2*we]+=Oe:we!==0?(we!==ye&&D.bl_tree[2*we]++,D.bl_tree[32]++):Oe<=10?D.bl_tree[34]++:D.bl_tree[36]++,Oe=0,ye=we,tt===0?(wt=138,Ve=3):we===tt?(wt=6,Ve=3):(wt=7,Ve=4))},ue=(D,Y,O)=>{let xe,we,ye=-1,tt=Y[1],Oe=0,wt=7,Ve=4;for(tt===0&&(wt=138,Ve=3),xe=0;xe<=O;xe++)if(we=tt,tt=Y[2*(xe+1)+1],!(++Oe<wt&&we===tt)){if(Oe<Ve)do R(D,we,D.bl_tree);while(--Oe!=0);else we!==0?(we!==ye&&(R(D,we,D.bl_tree),Oe--),R(D,16,D.bl_tree),I(D,Oe-3,2)):Oe<=10?(R(D,17,D.bl_tree),I(D,Oe-3,3)):(R(D,18,D.bl_tree),I(D,Oe-11,7));Oe=0,ye=we,tt===0?(wt=138,Ve=3):we===tt?(wt=6,Ve=3):(wt=7,Ve=4)}};let Ee=!1;const Be=(D,Y,O,xe)=>{I(D,0+(xe?1:0),3),N(D),S(D,O),S(D,~O),O&&D.pending_buf.set(D.window.subarray(Y,Y+O),D.pending),D.pending+=O};var ze=(D,Y,O,xe)=>{let we,ye,tt=0;D.level>0?(D.strm.data_type===2&&(D.strm.data_type=(Oe=>{let wt,Ve=4093624447;for(wt=0;wt<=31;wt++,Ve>>>=1)if(1&Ve&&Oe.dyn_ltree[2*wt]!==0)return 0;if(Oe.dyn_ltree[18]!==0||Oe.dyn_ltree[20]!==0||Oe.dyn_ltree[26]!==0)return 1;for(wt=32;wt<o;wt++)if(Oe.dyn_ltree[2*wt]!==0)return 1;return 0})(D)),J(D,D.l_desc),J(D,D.d_desc),tt=(Oe=>{let wt;for($(Oe,Oe.dyn_ltree,Oe.l_desc.max_code),$(Oe,Oe.dyn_dtree,Oe.d_desc.max_code),J(Oe,Oe.bl_desc),wt=18;wt>=3&&Oe.bl_tree[2*d[wt]+1]===0;wt--);return Oe.opt_len+=3*(wt+1)+5+5+4,wt})(D),we=D.opt_len+3+7>>>3,ye=D.static_len+3+7>>>3,ye<=we&&(we=ye)):we=ye=O+5,O+4<=we&&Y!==-1?Be(D,Y,O,xe):D.strategy===4||ye===we?(I(D,2+(xe?1:0),3),W(D,h,p)):(I(D,4+(xe?1:0),3),((Oe,wt,Ve,et)=>{let si;for(I(Oe,wt-257,5),I(Oe,Ve-1,5),I(Oe,et-4,4),si=0;si<et;si++)I(Oe,Oe.bl_tree[2*d[si]+1],3);ue(Oe,Oe.dyn_ltree,wt-1),ue(Oe,Oe.dyn_dtree,Ve-1)})(D,D.l_desc.max_code+1,D.d_desc.max_code+1,tt+1),W(D,D.dyn_ltree,D.dyn_dtree)),F(D),xe&&N(D)},Qe={_tr_init:D=>{Ee||((()=>{let Y,O,xe,we,ye;const tt=new Array(16);for(xe=0,we=0;we<28;we++)for(g[we]=xe,Y=0;Y<1<<l[we];Y++)f[xe++]=we;for(f[xe-1]=we,ye=0,we=0;we<16;we++)for(m[we]=ye,Y=0;Y<1<<c[we];Y++)A[ye++]=we;for(ye>>=7;we<s;we++)for(m[we]=ye<<7,Y=0;Y<1<<c[we]-7;Y++)A[256+ye++]=we;for(O=0;O<=a;O++)tt[O]=0;for(Y=0;Y<=143;)h[2*Y+1]=8,Y++,tt[8]++;for(;Y<=255;)h[2*Y+1]=9,Y++,tt[9]++;for(;Y<=279;)h[2*Y+1]=7,Y++,tt[7]++;for(;Y<=287;)h[2*Y+1]=8,Y++,tt[8]++;for(_(h,287,tt),Y=0;Y<s;Y++)p[2*Y+1]=5,p[2*Y]=T(Y,5);y=new v(h,l,257,r,a),w=new v(p,c,0,s,a),x=new v(new Array(0),u,0,19,7)})(),Ee=!0),D.l_desc=new M(D.dyn_ltree,y),D.d_desc=new M(D.dyn_dtree,w),D.bl_desc=new M(D.bl_tree,x),D.bi_buf=0,D.bi_valid=0,F(D)},_tr_stored_block:Be,_tr_flush_block:ze,_tr_tally:(D,Y,O)=>(D.pending_buf[D.sym_buf+D.sym_next++]=Y,D.pending_buf[D.sym_buf+D.sym_next++]=Y>>8,D.pending_buf[D.sym_buf+D.sym_next++]=O,Y===0?D.dyn_ltree[2*O]++:(D.matches++,Y--,D.dyn_ltree[2*(f[O]+o+1)]++,D.dyn_dtree[2*B(Y)]++),D.sym_next===D.sym_end),_tr_align:D=>{I(D,2,3),R(D,256,h),(Y=>{Y.bi_valid===16?(S(Y,Y.bi_buf),Y.bi_buf=0,Y.bi_valid=0):Y.bi_valid>=8&&(Y.pending_buf[Y.pending++]=255&Y.bi_buf,Y.bi_buf>>=8,Y.bi_valid-=8)})(D)}},me=(D,Y,O,xe)=>{let we=65535&D|0,ye=D>>>16&65535|0,tt=0;for(;O!==0;){tt=O>2e3?2e3:O,O-=tt;do we=we+Y[xe++]|0,ye=ye+we|0;while(--tt);we%=65521,ye%=65521}return we|ye<<16|0};const _e=new Uint32Array((()=>{let D,Y=[];for(var O=0;O<256;O++){D=O;for(var xe=0;xe<8;xe++)D=1&D?3988292384^D>>>1:D>>>1;Y[O]=D}return Y})());var De=(D,Y,O,xe)=>{const we=_e,ye=xe+O;D^=-1;for(let tt=xe;tt<ye;tt++)D=D>>>8^we[255&(D^Y[tt])];return-1^D},ve={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},ge={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8};const{_tr_init:Ie,_tr_stored_block:Ne,_tr_flush_block:qe,_tr_tally:Q,_tr_align:ne}=Qe,{Z_NO_FLUSH:ie,Z_PARTIAL_FLUSH:Me,Z_FULL_FLUSH:Ae,Z_FINISH:q,Z_BLOCK:Z,Z_OK:oe,Z_STREAM_END:fe,Z_STREAM_ERROR:Se,Z_DATA_ERROR:X,Z_BUF_ERROR:H,Z_DEFAULT_COMPRESSION:ee,Z_FILTERED:be,Z_HUFFMAN_ONLY:re,Z_RLE:he,Z_FIXED:je,Z_DEFAULT_STRATEGY:de,Z_UNKNOWN:Fe,Z_DEFLATED:ut}=ge,Ce=258,Xe=262,ht=42,lt=113,dt=666,bt=(D,Y)=>(D.msg=ve[Y],Y),ke=D=>2*D-(D>4?9:0),Je=D=>{let Y=D.length;for(;--Y>=0;)D[Y]=0},ft=D=>{let Y,O,xe,we=D.w_size;Y=D.hash_size,xe=Y;do O=D.head[--xe],D.head[xe]=O>=we?O-we:0;while(--Y);Y=we,xe=Y;do O=D.prev[--xe],D.prev[xe]=O>=we?O-we:0;while(--Y)};let it=(D,Y,O)=>(Y<<D.hash_shift^O)&D.hash_mask;const Ge=D=>{const Y=D.state;let O=Y.pending;O>D.avail_out&&(O=D.avail_out),O!==0&&(D.output.set(Y.pending_buf.subarray(Y.pending_out,Y.pending_out+O),D.next_out),D.next_out+=O,Y.pending_out+=O,D.total_out+=O,D.avail_out-=O,Y.pending-=O,Y.pending===0&&(Y.pending_out=0))},pe=(D,Y)=>{qe(D,D.block_start>=0?D.block_start:-1,D.strstart-D.block_start,Y),D.block_start=D.strstart,Ge(D.strm)},Te=(D,Y)=>{D.pending_buf[D.pending++]=Y},mt=(D,Y)=>{D.pending_buf[D.pending++]=Y>>>8&255,D.pending_buf[D.pending++]=255&Y},vt=(D,Y,O,xe)=>{let we=D.avail_in;return we>xe&&(we=xe),we===0?0:(D.avail_in-=we,Y.set(D.input.subarray(D.next_in,D.next_in+we),O),D.state.wrap===1?D.adler=me(D.adler,Y,we,O):D.state.wrap===2&&(D.adler=De(D.adler,Y,we,O)),D.next_in+=we,D.total_in+=we,we)},It=(D,Y)=>{let O,xe,we=D.max_chain_length,ye=D.strstart,tt=D.prev_length,Oe=D.nice_match;const wt=D.strstart>D.w_size-Xe?D.strstart-(D.w_size-Xe):0,Ve=D.window,et=D.w_mask,si=D.prev,Gt=D.strstart+Ce;let Ct=Ve[ye+tt-1],ho=Ve[ye+tt];D.prev_length>=D.good_match&&(we>>=2),Oe>D.lookahead&&(Oe=D.lookahead);do if(O=Y,Ve[O+tt]===ho&&Ve[O+tt-1]===Ct&&Ve[O]===Ve[ye]&&Ve[++O]===Ve[ye+1]){ye+=2,O++;do;while(Ve[++ye]===Ve[++O]&&Ve[++ye]===Ve[++O]&&Ve[++ye]===Ve[++O]&&Ve[++ye]===Ve[++O]&&Ve[++ye]===Ve[++O]&&Ve[++ye]===Ve[++O]&&Ve[++ye]===Ve[++O]&&Ve[++ye]===Ve[++O]&&ye<Gt);if(xe=Ce-(Gt-ye),ye=Gt-Ce,xe>tt){if(D.match_start=Y,tt=xe,xe>=Oe)break;Ct=Ve[ye+tt-1],ho=Ve[ye+tt]}}while((Y=si[Y&et])>wt&&--we!=0);return tt<=D.lookahead?tt:D.lookahead},kt=D=>{const Y=D.w_size;let O,xe,we;do{if(xe=D.window_size-D.lookahead-D.strstart,D.strstart>=Y+(Y-Xe)&&(D.window.set(D.window.subarray(Y,Y+Y-xe),0),D.match_start-=Y,D.strstart-=Y,D.block_start-=Y,D.insert>D.strstart&&(D.insert=D.strstart),ft(D),xe+=Y),D.strm.avail_in===0)break;if(O=vt(D.strm,D.window,D.strstart+D.lookahead,xe),D.lookahead+=O,D.lookahead+D.insert>=3)for(we=D.strstart-D.insert,D.ins_h=D.window[we],D.ins_h=it(D,D.ins_h,D.window[we+1]);D.insert&&(D.ins_h=it(D,D.ins_h,D.window[we+3-1]),D.prev[we&D.w_mask]=D.head[D.ins_h],D.head[D.ins_h]=we,we++,D.insert--,!(D.lookahead+D.insert<3)););}while(D.lookahead<Xe&&D.strm.avail_in!==0)},Wi=(D,Y)=>{let O,xe,we,ye=D.pending_buf_size-5>D.w_size?D.w_size:D.pending_buf_size-5,tt=0,Oe=D.strm.avail_in;do{if(O=65535,we=D.bi_valid+42>>3,D.strm.avail_out<we||(we=D.strm.avail_out-we,xe=D.strstart-D.block_start,O>xe+D.strm.avail_in&&(O=xe+D.strm.avail_in),O>we&&(O=we),O<ye&&(O===0&&Y!==q||Y===ie||O!==xe+D.strm.avail_in)))break;tt=Y===q&&O===xe+D.strm.avail_in?1:0,Ne(D,0,0,tt),D.pending_buf[D.pending-4]=O,D.pending_buf[D.pending-3]=O>>8,D.pending_buf[D.pending-2]=~O,D.pending_buf[D.pending-1]=~O>>8,Ge(D.strm),xe&&(xe>O&&(xe=O),D.strm.output.set(D.window.subarray(D.block_start,D.block_start+xe),D.strm.next_out),D.strm.next_out+=xe,D.strm.avail_out-=xe,D.strm.total_out+=xe,D.block_start+=xe,O-=xe),O&&(vt(D.strm,D.strm.output,D.strm.next_out,O),D.strm.next_out+=O,D.strm.avail_out-=O,D.strm.total_out+=O)}while(tt===0);return Oe-=D.strm.avail_in,Oe&&(Oe>=D.w_size?(D.matches=2,D.window.set(D.strm.input.subarray(D.strm.next_in-D.w_size,D.strm.next_in),0),D.strstart=D.w_size,D.insert=D.strstart):(D.window_size-D.strstart<=Oe&&(D.strstart-=D.w_size,D.window.set(D.window.subarray(D.w_size,D.w_size+D.strstart),0),D.matches<2&&D.matches++,D.insert>D.strstart&&(D.insert=D.strstart)),D.window.set(D.strm.input.subarray(D.strm.next_in-Oe,D.strm.next_in),D.strstart),D.strstart+=Oe,D.insert+=Oe>D.w_size-D.insert?D.w_size-D.insert:Oe),D.block_start=D.strstart),D.high_water<D.strstart&&(D.high_water=D.strstart),tt?4:Y!==ie&&Y!==q&&D.strm.avail_in===0&&D.strstart===D.block_start?2:(we=D.window_size-D.strstart,D.strm.avail_in>we&&D.block_start>=D.w_size&&(D.block_start-=D.w_size,D.strstart-=D.w_size,D.window.set(D.window.subarray(D.w_size,D.w_size+D.strstart),0),D.matches<2&&D.matches++,we+=D.w_size,D.insert>D.strstart&&(D.insert=D.strstart)),we>D.strm.avail_in&&(we=D.strm.avail_in),we&&(vt(D.strm,D.window,D.strstart,we),D.strstart+=we,D.insert+=we>D.w_size-D.insert?D.w_size-D.insert:we),D.high_water<D.strstart&&(D.high_water=D.strstart),we=D.bi_valid+42>>3,we=D.pending_buf_size-we>65535?65535:D.pending_buf_size-we,ye=we>D.w_size?D.w_size:we,xe=D.strstart-D.block_start,(xe>=ye||(xe||Y===q)&&Y!==ie&&D.strm.avail_in===0&&xe<=we)&&(O=xe>we?we:xe,tt=Y===q&&D.strm.avail_in===0&&O===xe?1:0,Ne(D,D.block_start,O,tt),D.block_start+=O,Ge(D.strm)),tt?3:1)},Qn=(D,Y)=>{let O,xe;for(;;){if(D.lookahead<Xe){if(kt(D),D.lookahead<Xe&&Y===ie)return 1;if(D.lookahead===0)break}if(O=0,D.lookahead>=3&&(D.ins_h=it(D,D.ins_h,D.window[D.strstart+3-1]),O=D.prev[D.strstart&D.w_mask]=D.head[D.ins_h],D.head[D.ins_h]=D.strstart),O!==0&&D.strstart-O<=D.w_size-Xe&&(D.match_length=It(D,O)),D.match_length>=3)if(xe=Q(D,D.strstart-D.match_start,D.match_length-3),D.lookahead-=D.match_length,D.match_length<=D.max_lazy_match&&D.lookahead>=3){D.match_length--;do D.strstart++,D.ins_h=it(D,D.ins_h,D.window[D.strstart+3-1]),O=D.prev[D.strstart&D.w_mask]=D.head[D.ins_h],D.head[D.ins_h]=D.strstart;while(--D.match_length!=0);D.strstart++}else D.strstart+=D.match_length,D.match_length=0,D.ins_h=D.window[D.strstart],D.ins_h=it(D,D.ins_h,D.window[D.strstart+1]);else xe=Q(D,0,D.window[D.strstart]),D.lookahead--,D.strstart++;if(xe&&(pe(D,!1),D.strm.avail_out===0))return 1}return D.insert=D.strstart<2?D.strstart:2,Y===q?(pe(D,!0),D.strm.avail_out===0?3:4):D.sym_next&&(pe(D,!1),D.strm.avail_out===0)?1:2},Ui=(D,Y)=>{let O,xe,we;for(;;){if(D.lookahead<Xe){if(kt(D),D.lookahead<Xe&&Y===ie)return 1;if(D.lookahead===0)break}if(O=0,D.lookahead>=3&&(D.ins_h=it(D,D.ins_h,D.window[D.strstart+3-1]),O=D.prev[D.strstart&D.w_mask]=D.head[D.ins_h],D.head[D.ins_h]=D.strstart),D.prev_length=D.match_length,D.prev_match=D.match_start,D.match_length=2,O!==0&&D.prev_length<D.max_lazy_match&&D.strstart-O<=D.w_size-Xe&&(D.match_length=It(D,O),D.match_length<=5&&(D.strategy===be||D.match_length===3&&D.strstart-D.match_start>4096)&&(D.match_length=2)),D.prev_length>=3&&D.match_length<=D.prev_length){we=D.strstart+D.lookahead-3,xe=Q(D,D.strstart-1-D.prev_match,D.prev_length-3),D.lookahead-=D.prev_length-1,D.prev_length-=2;do++D.strstart<=we&&(D.ins_h=it(D,D.ins_h,D.window[D.strstart+3-1]),O=D.prev[D.strstart&D.w_mask]=D.head[D.ins_h],D.head[D.ins_h]=D.strstart);while(--D.prev_length!=0);if(D.match_available=0,D.match_length=2,D.strstart++,xe&&(pe(D,!1),D.strm.avail_out===0))return 1}else if(D.match_available){if(xe=Q(D,0,D.window[D.strstart-1]),xe&&pe(D,!1),D.strstart++,D.lookahead--,D.strm.avail_out===0)return 1}else D.match_available=1,D.strstart++,D.lookahead--}return D.match_available&&(xe=Q(D,0,D.window[D.strstart-1]),D.match_available=0),D.insert=D.strstart<2?D.strstart:2,Y===q?(pe(D,!0),D.strm.avail_out===0?3:4):D.sym_next&&(pe(D,!1),D.strm.avail_out===0)?1:2};function wn(D,Y,O,xe,we){this.good_length=D,this.max_lazy=Y,this.nice_length=O,this.max_chain=xe,this.func=we}const on=[new wn(0,0,0,0,Wi),new wn(4,4,8,4,Qn),new wn(4,5,16,8,Qn),new wn(4,6,32,32,Qn),new wn(4,4,16,16,Ui),new wn(8,16,32,32,Ui),new wn(8,16,128,128,Ui),new wn(8,32,128,256,Ui),new wn(32,128,258,1024,Ui),new wn(32,258,258,4096,Ui)];function Ag(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=ut,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),Je(this.dyn_ltree),Je(this.dyn_dtree),Je(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),Je(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),Je(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}const Ll=D=>{if(!D)return 1;const Y=D.state;return!Y||Y.strm!==D||Y.status!==ht&&Y.status!==57&&Y.status!==69&&Y.status!==73&&Y.status!==91&&Y.status!==103&&Y.status!==lt&&Y.status!==dt?1:0},uy=D=>{if(Ll(D))return bt(D,Se);D.total_in=D.total_out=0,D.data_type=Fe;const Y=D.state;return Y.pending=0,Y.pending_out=0,Y.wrap<0&&(Y.wrap=-Y.wrap),Y.status=Y.wrap===2?57:Y.wrap?ht:lt,D.adler=Y.wrap===2?0:1,Y.last_flush=-2,Ie(Y),oe},tp=D=>{const Y=uy(D);var O;return Y===oe&&((O=D.state).window_size=2*O.w_size,Je(O.head),O.max_lazy_match=on[O.level].max_lazy,O.good_match=on[O.level].good_length,O.nice_match=on[O.level].nice_length,O.max_chain_length=on[O.level].max_chain,O.strstart=0,O.block_start=0,O.lookahead=0,O.insert=0,O.match_length=O.prev_length=2,O.match_available=0,O.ins_h=0),Y},dy=(D,Y,O,xe,we,ye)=>{if(!D)return Se;let tt=1;if(Y===ee&&(Y=6),xe<0?(tt=0,xe=-xe):xe>15&&(tt=2,xe-=16),we<1||we>9||O!==ut||xe<8||xe>15||Y<0||Y>9||ye<0||ye>je||xe===8&&tt!==1)return bt(D,Se);xe===8&&(xe=9);const Oe=new Ag;return D.state=Oe,Oe.strm=D,Oe.status=ht,Oe.wrap=tt,Oe.gzhead=null,Oe.w_bits=xe,Oe.w_size=1<<Oe.w_bits,Oe.w_mask=Oe.w_size-1,Oe.hash_bits=we+7,Oe.hash_size=1<<Oe.hash_bits,Oe.hash_mask=Oe.hash_size-1,Oe.hash_shift=~~((Oe.hash_bits+3-1)/3),Oe.window=new Uint8Array(2*Oe.w_size),Oe.head=new Uint16Array(Oe.hash_size),Oe.prev=new Uint16Array(Oe.w_size),Oe.lit_bufsize=1<<we+6,Oe.pending_buf_size=4*Oe.lit_bufsize,Oe.pending_buf=new Uint8Array(Oe.pending_buf_size),Oe.sym_buf=Oe.lit_bufsize,Oe.sym_end=3*(Oe.lit_bufsize-1),Oe.level=Y,Oe.strategy=ye,Oe.method=O,tp(D)};var gd={deflateInit:(D,Y)=>dy(D,Y,ut,15,8,de),deflateInit2:dy,deflateReset:tp,deflateResetKeep:uy,deflateSetHeader:(D,Y)=>Ll(D)||D.state.wrap!==2?Se:(D.state.gzhead=Y,oe),deflate:(D,Y)=>{if(Ll(D)||Y>Z||Y<0)return D?bt(D,Se):Se;const O=D.state;if(!D.output||D.avail_in!==0&&!D.input||O.status===dt&&Y!==q)return bt(D,D.avail_out===0?H:Se);const xe=O.last_flush;if(O.last_flush=Y,O.pending!==0){if(Ge(D),D.avail_out===0)return O.last_flush=-1,oe}else if(D.avail_in===0&&ke(Y)<=ke(xe)&&Y!==q)return bt(D,H);if(O.status===dt&&D.avail_in!==0)return bt(D,H);if(O.status===ht&&O.wrap===0&&(O.status=lt),O.status===ht){let we=ut+(O.w_bits-8<<4)<<8,ye=-1;if(ye=O.strategy>=re||O.level<2?0:O.level<6?1:O.level===6?2:3,we|=ye<<6,O.strstart!==0&&(we|=32),we+=31-we%31,mt(O,we),O.strstart!==0&&(mt(O,D.adler>>>16),mt(O,65535&D.adler)),D.adler=1,O.status=lt,Ge(D),O.pending!==0)return O.last_flush=-1,oe}if(O.status===57){if(D.adler=0,Te(O,31),Te(O,139),Te(O,8),O.gzhead)Te(O,(O.gzhead.text?1:0)+(O.gzhead.hcrc?2:0)+(O.gzhead.extra?4:0)+(O.gzhead.name?8:0)+(O.gzhead.comment?16:0)),Te(O,255&O.gzhead.time),Te(O,O.gzhead.time>>8&255),Te(O,O.gzhead.time>>16&255),Te(O,O.gzhead.time>>24&255),Te(O,O.level===9?2:O.strategy>=re||O.level<2?4:0),Te(O,255&O.gzhead.os),O.gzhead.extra&&O.gzhead.extra.length&&(Te(O,255&O.gzhead.extra.length),Te(O,O.gzhead.extra.length>>8&255)),O.gzhead.hcrc&&(D.adler=De(D.adler,O.pending_buf,O.pending,0)),O.gzindex=0,O.status=69;else if(Te(O,0),Te(O,0),Te(O,0),Te(O,0),Te(O,0),Te(O,O.level===9?2:O.strategy>=re||O.level<2?4:0),Te(O,3),O.status=lt,Ge(D),O.pending!==0)return O.last_flush=-1,oe}if(O.status===69){if(O.gzhead.extra){let we=O.pending,ye=(65535&O.gzhead.extra.length)-O.gzindex;for(;O.pending+ye>O.pending_buf_size;){let Oe=O.pending_buf_size-O.pending;if(O.pending_buf.set(O.gzhead.extra.subarray(O.gzindex,O.gzindex+Oe),O.pending),O.pending=O.pending_buf_size,O.gzhead.hcrc&&O.pending>we&&(D.adler=De(D.adler,O.pending_buf,O.pending-we,we)),O.gzindex+=Oe,Ge(D),O.pending!==0)return O.last_flush=-1,oe;we=0,ye-=Oe}let tt=new Uint8Array(O.gzhead.extra);O.pending_buf.set(tt.subarray(O.gzindex,O.gzindex+ye),O.pending),O.pending+=ye,O.gzhead.hcrc&&O.pending>we&&(D.adler=De(D.adler,O.pending_buf,O.pending-we,we)),O.gzindex=0}O.status=73}if(O.status===73){if(O.gzhead.name){let we,ye=O.pending;do{if(O.pending===O.pending_buf_size){if(O.gzhead.hcrc&&O.pending>ye&&(D.adler=De(D.adler,O.pending_buf,O.pending-ye,ye)),Ge(D),O.pending!==0)return O.last_flush=-1,oe;ye=0}we=O.gzindex<O.gzhead.name.length?255&O.gzhead.name.charCodeAt(O.gzindex++):0,Te(O,we)}while(we!==0);O.gzhead.hcrc&&O.pending>ye&&(D.adler=De(D.adler,O.pending_buf,O.pending-ye,ye)),O.gzindex=0}O.status=91}if(O.status===91){if(O.gzhead.comment){let we,ye=O.pending;do{if(O.pending===O.pending_buf_size){if(O.gzhead.hcrc&&O.pending>ye&&(D.adler=De(D.adler,O.pending_buf,O.pending-ye,ye)),Ge(D),O.pending!==0)return O.last_flush=-1,oe;ye=0}we=O.gzindex<O.gzhead.comment.length?255&O.gzhead.comment.charCodeAt(O.gzindex++):0,Te(O,we)}while(we!==0);O.gzhead.hcrc&&O.pending>ye&&(D.adler=De(D.adler,O.pending_buf,O.pending-ye,ye))}O.status=103}if(O.status===103){if(O.gzhead.hcrc){if(O.pending+2>O.pending_buf_size&&(Ge(D),O.pending!==0))return O.last_flush=-1,oe;Te(O,255&D.adler),Te(O,D.adler>>8&255),D.adler=0}if(O.status=lt,Ge(D),O.pending!==0)return O.last_flush=-1,oe}if(D.avail_in!==0||O.lookahead!==0||Y!==ie&&O.status!==dt){let we=O.level===0?Wi(O,Y):O.strategy===re?((ye,tt)=>{let Oe;for(;;){if(ye.lookahead===0&&(kt(ye),ye.lookahead===0)){if(tt===ie)return 1;break}if(ye.match_length=0,Oe=Q(ye,0,ye.window[ye.strstart]),ye.lookahead--,ye.strstart++,Oe&&(pe(ye,!1),ye.strm.avail_out===0))return 1}return ye.insert=0,tt===q?(pe(ye,!0),ye.strm.avail_out===0?3:4):ye.sym_next&&(pe(ye,!1),ye.strm.avail_out===0)?1:2})(O,Y):O.strategy===he?((ye,tt)=>{let Oe,wt,Ve,et;const si=ye.window;for(;;){if(ye.lookahead<=Ce){if(kt(ye),ye.lookahead<=Ce&&tt===ie)return 1;if(ye.lookahead===0)break}if(ye.match_length=0,ye.lookahead>=3&&ye.strstart>0&&(Ve=ye.strstart-1,wt=si[Ve],wt===si[++Ve]&&wt===si[++Ve]&&wt===si[++Ve])){et=ye.strstart+Ce;do;while(wt===si[++Ve]&&wt===si[++Ve]&&wt===si[++Ve]&&wt===si[++Ve]&&wt===si[++Ve]&&wt===si[++Ve]&&wt===si[++Ve]&&wt===si[++Ve]&&Ve<et);ye.match_length=Ce-(et-Ve),ye.match_length>ye.lookahead&&(ye.match_length=ye.lookahead)}if(ye.match_length>=3?(Oe=Q(ye,1,ye.match_length-3),ye.lookahead-=ye.match_length,ye.strstart+=ye.match_length,ye.match_length=0):(Oe=Q(ye,0,ye.window[ye.strstart]),ye.lookahead--,ye.strstart++),Oe&&(pe(ye,!1),ye.strm.avail_out===0))return 1}return ye.insert=0,tt===q?(pe(ye,!0),ye.strm.avail_out===0?3:4):ye.sym_next&&(pe(ye,!1),ye.strm.avail_out===0)?1:2})(O,Y):on[O.level].func(O,Y);if(we!==3&&we!==4||(O.status=dt),we===1||we===3)return D.avail_out===0&&(O.last_flush=-1),oe;if(we===2&&(Y===Me?ne(O):Y!==Z&&(Ne(O,0,0,!1),Y===Ae&&(Je(O.head),O.lookahead===0&&(O.strstart=0,O.block_start=0,O.insert=0))),Ge(D),D.avail_out===0))return O.last_flush=-1,oe}return Y!==q?oe:O.wrap<=0?fe:(O.wrap===2?(Te(O,255&D.adler),Te(O,D.adler>>8&255),Te(O,D.adler>>16&255),Te(O,D.adler>>24&255),Te(O,255&D.total_in),Te(O,D.total_in>>8&255),Te(O,D.total_in>>16&255),Te(O,D.total_in>>24&255)):(mt(O,D.adler>>>16),mt(O,65535&D.adler)),Ge(D),O.wrap>0&&(O.wrap=-O.wrap),O.pending!==0?oe:fe)},deflateEnd:D=>{if(Ll(D))return Se;const Y=D.state.status;return D.state=null,Y===lt?bt(D,X):oe},deflateSetDictionary:(D,Y)=>{let O=Y.length;if(Ll(D))return Se;const xe=D.state,we=xe.wrap;if(we===2||we===1&&xe.status!==ht||xe.lookahead)return Se;if(we===1&&(D.adler=me(D.adler,Y,O,0)),xe.wrap=0,O>=xe.w_size){we===0&&(Je(xe.head),xe.strstart=0,xe.block_start=0,xe.insert=0);let wt=new Uint8Array(xe.w_size);wt.set(Y.subarray(O-xe.w_size,O),0),Y=wt,O=xe.w_size}const ye=D.avail_in,tt=D.next_in,Oe=D.input;for(D.avail_in=O,D.next_in=0,D.input=Y,kt(xe);xe.lookahead>=3;){let wt=xe.strstart,Ve=xe.lookahead-2;do xe.ins_h=it(xe,xe.ins_h,xe.window[wt+3-1]),xe.prev[wt&xe.w_mask]=xe.head[xe.ins_h],xe.head[xe.ins_h]=wt,wt++;while(--Ve);xe.strstart=wt,xe.lookahead=2,kt(xe)}return xe.strstart+=xe.lookahead,xe.block_start=xe.strstart,xe.insert=xe.lookahead,xe.lookahead=0,xe.match_length=xe.prev_length=2,xe.match_available=0,D.next_in=tt,D.input=Oe,D.avail_in=ye,xe.wrap=we,oe},deflateInfo:"pako deflate (from Nodeca project)"};const CO=(D,Y)=>Object.prototype.hasOwnProperty.call(D,Y);var ZC=function(D){const Y=Array.prototype.slice.call(arguments,1);for(;Y.length;){const O=Y.shift();if(O){if(typeof O!="object")throw new TypeError(O+"must be non-object");for(const xe in O)CO(O,xe)&&(D[xe]=O[xe])}}return D},YC=D=>{let Y=0;for(let xe=0,we=D.length;xe<we;xe++)Y+=D[xe].length;const O=new Uint8Array(Y);for(let xe=0,we=0,ye=D.length;xe<ye;xe++){let tt=D[xe];O.set(tt,we),we+=tt.length}return O};let XC=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{XC=!1}const ip=new Uint8Array(256);for(let D=0;D<256;D++)ip[D]=D>=252?6:D>=248?5:D>=240?4:D>=224?3:D>=192?2:1;ip[254]=ip[254]=1;var hy=D=>{if(typeof TextEncoder=="function"&&TextEncoder.prototype.encode)return new TextEncoder().encode(D);let Y,O,xe,we,ye,tt=D.length,Oe=0;for(we=0;we<tt;we++)O=D.charCodeAt(we),(64512&O)==55296&&we+1<tt&&(xe=D.charCodeAt(we+1),(64512&xe)==56320&&(O=65536+(O-55296<<10)+(xe-56320),we++)),Oe+=O<128?1:O<2048?2:O<65536?3:4;for(Y=new Uint8Array(Oe),ye=0,we=0;ye<Oe;we++)O=D.charCodeAt(we),(64512&O)==55296&&we+1<tt&&(xe=D.charCodeAt(we+1),(64512&xe)==56320&&(O=65536+(O-55296<<10)+(xe-56320),we++)),O<128?Y[ye++]=O:O<2048?(Y[ye++]=192|O>>>6,Y[ye++]=128|63&O):O<65536?(Y[ye++]=224|O>>>12,Y[ye++]=128|O>>>6&63,Y[ye++]=128|63&O):(Y[ye++]=240|O>>>18,Y[ye++]=128|O>>>12&63,Y[ye++]=128|O>>>6&63,Y[ye++]=128|63&O);return Y},se=(D,Y)=>{const O=Y||D.length;if(typeof TextDecoder=="function"&&TextDecoder.prototype.decode)return new TextDecoder().decode(D.subarray(0,Y));let xe,we;const ye=new Array(2*O);for(we=0,xe=0;xe<O;){let tt=D[xe++];if(tt<128){ye[we++]=tt;continue}let Oe=ip[tt];if(Oe>4)ye[we++]=65533,xe+=Oe-1;else{for(tt&=Oe===2?31:Oe===3?15:7;Oe>1&&xe<O;)tt=tt<<6|63&D[xe++],Oe--;Oe>1?ye[we++]=65533:tt<65536?ye[we++]=tt:(tt-=65536,ye[we++]=55296|tt>>10&1023,ye[we++]=56320|1023&tt)}}return((tt,Oe)=>{if(Oe<65534&&tt.subarray&&XC)return String.fromCharCode.apply(null,tt.length===Oe?tt:tt.subarray(0,Oe));let wt="";for(let Ve=0;Ve<Oe;Ve++)wt+=String.fromCharCode(tt[Ve]);return wt})(ye,we)},Ke=(D,Y)=>{(Y=Y||D.length)>D.length&&(Y=D.length);let O=Y-1;for(;O>=0&&(192&D[O])==128;)O--;return O<0||O===0?Y:O+ip[D[O]]>Y?O:Y},st=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0};const rt=Object.prototype.toString,{Z_NO_FLUSH:Ye,Z_SYNC_FLUSH:xt,Z_FULL_FLUSH:Rt,Z_FINISH:zt,Z_OK:Ft,Z_STREAM_END:Xt,Z_DEFAULT_COMPRESSION:ei,Z_DEFAULT_STRATEGY:Qt,Z_DEFLATED:vi}=ge;function Ri(D){this.options=ZC({level:ei,method:vi,chunkSize:16384,windowBits:15,memLevel:8,strategy:Qt},D||{});let Y=this.options;Y.raw&&Y.windowBits>0?Y.windowBits=-Y.windowBits:Y.gzip&&Y.windowBits>0&&Y.windowBits<16&&(Y.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new st,this.strm.avail_out=0;let O=gd.deflateInit2(this.strm,Y.level,Y.method,Y.windowBits,Y.memLevel,Y.strategy);if(O!==Ft)throw new Error(ve[O]);if(Y.header&&gd.deflateSetHeader(this.strm,Y.header),Y.dictionary){let xe;if(xe=typeof Y.dictionary=="string"?hy(Y.dictionary):rt.call(Y.dictionary)==="[object ArrayBuffer]"?new Uint8Array(Y.dictionary):Y.dictionary,O=gd.deflateSetDictionary(this.strm,xe),O!==Ft)throw new Error(ve[O]);this._dict_set=!0}}function Bn(D,Y){const O=new Ri(Y);if(O.push(D,!0),O.err)throw O.msg||ve[O.err];return O.result}Ri.prototype.push=function(D,Y){const O=this.strm,xe=this.options.chunkSize;let we,ye;if(this.ended)return!1;for(ye=Y===~~Y?Y:Y===!0?zt:Ye,typeof D=="string"?O.input=hy(D):rt.call(D)==="[object ArrayBuffer]"?O.input=new Uint8Array(D):O.input=D,O.next_in=0,O.avail_in=O.input.length;;)if(O.avail_out===0&&(O.output=new Uint8Array(xe),O.next_out=0,O.avail_out=xe),(ye===xt||ye===Rt)&&O.avail_out<=6)this.onData(O.output.subarray(0,O.next_out)),O.avail_out=0;else{if(we=gd.deflate(O,ye),we===Xt)return O.next_out>0&&this.onData(O.output.subarray(0,O.next_out)),we=gd.deflateEnd(this.strm),this.onEnd(we),this.ended=!0,we===Ft;if(O.avail_out!==0){if(ye>0&&O.next_out>0)this.onData(O.output.subarray(0,O.next_out)),O.avail_out=0;else if(O.avail_in===0)break}else this.onData(O.output)}return!0},Ri.prototype.onData=function(D){this.chunks.push(D)},Ri.prototype.onEnd=function(D){D===Ft&&(this.result=YC(this.chunks)),this.chunks=[],this.err=D,this.msg=this.strm.msg};var Cn={Deflate:Ri,deflate:Bn,deflateRaw:function(D,Y){return(Y=Y||{}).raw=!0,Bn(D,Y)},gzip:function(D,Y){return(Y=Y||{}).gzip=!0,Bn(D,Y)}};const Hi=16209;var qt=function(D,Y){let O,xe,we,ye,tt,Oe,wt,Ve,et,si,Gt,Ct,ho,Di,Kt,zi,ni,Bt,ti,ji,Pt,Ti,ri,Jt;const wi=D.state;O=D.next_in,ri=D.input,xe=O+(D.avail_in-5),we=D.next_out,Jt=D.output,ye=we-(Y-D.avail_out),tt=we+(D.avail_out-257),Oe=wi.dmax,wt=wi.wsize,Ve=wi.whave,et=wi.wnext,si=wi.window,Gt=wi.hold,Ct=wi.bits,ho=wi.lencode,Di=wi.distcode,Kt=(1<<wi.lenbits)-1,zi=(1<<wi.distbits)-1;e:do{Ct<15&&(Gt+=ri[O++]<<Ct,Ct+=8,Gt+=ri[O++]<<Ct,Ct+=8),ni=ho[Gt&Kt];t:for(;;){if(Bt=ni>>>24,Gt>>>=Bt,Ct-=Bt,Bt=ni>>>16&255,Bt===0)Jt[we++]=65535∋else{if(!(16&Bt)){if((64&Bt)==0){ni=ho[(65535&ni)+(Gt&(1<<Bt)-1)];continue t}if(32&Bt){wi.mode=16191;break e}D.msg="invalid literal/length code",wi.mode=Hi;break e}ti=65535&ni,Bt&=15,Bt&&(Ct<Bt&&(Gt+=ri[O++]<<Ct,Ct+=8),ti+=Gt&(1<<Bt)-1,Gt>>>=Bt,Ct-=Bt),Ct<15&&(Gt+=ri[O++]<<Ct,Ct+=8,Gt+=ri[O++]<<Ct,Ct+=8),ni=Di[Gt&zi];i:for(;;){if(Bt=ni>>>24,Gt>>>=Bt,Ct-=Bt,Bt=ni>>>16&255,!(16&Bt)){if((64&Bt)==0){ni=Di[(65535&ni)+(Gt&(1<<Bt)-1)];continue i}D.msg="invalid distance code",wi.mode=Hi;break e}if(ji=65535&ni,Bt&=15,Ct<Bt&&(Gt+=ri[O++]<<Ct,Ct+=8,Ct<Bt&&(Gt+=ri[O++]<<Ct,Ct+=8)),ji+=Gt&(1<<Bt)-1,ji>Oe){D.msg="invalid distance too far back",wi.mode=Hi;break e}if(Gt>>>=Bt,Ct-=Bt,Bt=we-ye,ji>Bt){if(Bt=ji-Bt,Bt>Ve&&wi.sane){D.msg="invalid distance too far back",wi.mode=Hi;break e}if(Pt=0,Ti=si,et===0){if(Pt+=wt-Bt,Bt<ti){ti-=Bt;do Jt[we++]=si[Pt++];while(--Bt);Pt=we-ji,Ti=Jt}}else if(et<Bt){if(Pt+=wt+et-Bt,Bt-=et,Bt<ti){ti-=Bt;do Jt[we++]=si[Pt++];while(--Bt);if(Pt=0,et<ti){Bt=et,ti-=Bt;do Jt[we++]=si[Pt++];while(--Bt);Pt=we-ji,Ti=Jt}}}else if(Pt+=et-Bt,Bt<ti){ti-=Bt;do Jt[we++]=si[Pt++];while(--Bt);Pt=we-ji,Ti=Jt}for(;ti>2;)Jt[we++]=Ti[Pt++],Jt[we++]=Ti[Pt++],Jt[we++]=Ti[Pt++],ti-=3;ti&&(Jt[we++]=Ti[Pt++],ti>1&&(Jt[we++]=Ti[Pt++]))}else{Pt=we-ji;do Jt[we++]=Jt[Pt++],Jt[we++]=Jt[Pt++],Jt[we++]=Jt[Pt++],ti-=3;while(ti>2);ti&&(Jt[we++]=Jt[Pt++],ti>1&&(Jt[we++]=Jt[Pt++]))}break}}break}}while(O<xe&&we<tt);ti=Ct>>3,O-=ti,Ct-=ti<<3,Gt&=(1<<Ct)-1,D.next_in=O,D.next_out=we,D.avail_in=O<xe?xe-O+5:5-(O-xe),D.avail_out=we<tt?tt-we+257:257-(we-tt),wi.hold=Gt,wi.bits=Ct};const mn=15,_i=new Uint16Array([3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0]),Vs=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78]),yd=new Uint16Array([1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0]),Hs=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]);var Na=(D,Y,O,xe,we,ye,tt,Oe)=>{const wt=Oe.bits;let Ve,et,si,Gt,Ct,ho,Di=0,Kt=0,zi=0,ni=0,Bt=0,ti=0,ji=0,Pt=0,Ti=0,ri=0,Jt=null;const wi=new Uint16Array(16),zs=new Uint16Array(16);let my,nb,ob,sb=null;for(Di=0;Di<=mn;Di++)wi[Di]=0;for(Kt=0;Kt<xe;Kt++)wi[Y[O+Kt]]++;for(Bt=wt,ni=mn;ni>=1&&wi[ni]===0;ni--);if(Bt>ni&&(Bt=ni),ni===0)return we[ye++]=20971520,we[ye++]=20971520,Oe.bits=1,0;for(zi=1;zi<ni&&wi[zi]===0;zi++);for(Bt<zi&&(Bt=zi),Pt=1,Di=1;Di<=mn;Di++)if(Pt<<=1,Pt-=wi[Di],Pt<0)return-1;if(Pt>0&&(D===0||ni!==1))return-1;for(zs[1]=0,Di=1;Di<mn;Di++)zs[Di+1]=zs[Di]+wi[Di];for(Kt=0;Kt<xe;Kt++)Y[O+Kt]!==0&&(tt[zs[Y[O+Kt]]++]=Kt);if(D===0?(Jt=sb=tt,ho=20):D===1?(Jt=_i,sb=Vs,ho=257):(Jt=yd,sb=Hs,ho=0),ri=0,Kt=0,Di=zi,Ct=ye,ti=Bt,ji=0,si=-1,Ti=1<<Bt,Gt=Ti-1,D===1&&Ti>852||D===2&&Ti>592)return 1;for(;;){my=Di-ji,tt[Kt]+1<ho?(nb=0,ob=tt[Kt]):tt[Kt]>=ho?(nb=sb[tt[Kt]-ho],ob=Jt[tt[Kt]-ho]):(nb=96,ob=0),Ve=1<<Di-ji,et=1<<ti,zi=et;do et-=Ve,we[Ct+(ri>>ji)+et]=my<<24|nb<<16|ob|0;while(et!==0);for(Ve=1<<Di-1;ri&Ve;)Ve>>=1;if(Ve!==0?(ri&=Ve-1,ri+=Ve):ri=0,Kt++,--wi[Di]==0){if(Di===ni)break;Di=Y[O+tt[Kt]]}if(Di>Bt&&(ri&Gt)!==si){for(ji===0&&(ji=Bt),Ct+=zi,ti=Di-ji,Pt=1<<ti;ti+ji<ni&&(Pt-=wi[ti+ji],!(Pt<=0));)ti++,Pt<<=1;if(Ti+=1<<ti,D===1&&Ti>852||D===2&&Ti>592)return 1;si=ri&Gt,we[si]=Bt<<24|ti<<16|Ct-ye|0}}return ri!==0&&(we[Ct+ri]=Di-ji<<24|64<<16|0),Oe.bits=Bt,0};const{Z_FINISH:In,Z_BLOCK:ar,Z_TREES:$o,Z_OK:qn,Z_STREAM_END:ws,Z_NEED_DICT:py,Z_STREAM_ERROR:wo,Z_DATA_ERROR:w2e,Z_MEM_ERROR:C2e,Z_BUF_ERROR:oni,Z_DEFLATED:b2e}=ge,$C=16180,eb=16190,zc=16191,bO=16192,xO=16194,tb=16199,ib=16200,MO=16206,Un=16209,x2e=D=>(D>>>24&255)+(D>>>8&65280)+((65280&D)<<8)+((255&D)<<24);function sni(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const np=D=>{if(!D)return 1;const Y=D.state;return!Y||Y.strm!==D||Y.mode<$C||Y.mode>16211?1:0},M2e=D=>{if(np(D))return wo;const Y=D.state;return D.total_in=D.total_out=Y.total=0,D.msg="",Y.wrap&&(D.adler=1&Y.wrap),Y.mode=$C,Y.last=0,Y.havedict=0,Y.flags=-1,Y.dmax=32768,Y.head=null,Y.hold=0,Y.bits=0,Y.lencode=Y.lendyn=new Int32Array(852),Y.distcode=Y.distdyn=new Int32Array(592),Y.sane=1,Y.back=-1,qn},E2e=D=>{if(np(D))return wo;const Y=D.state;return Y.wsize=0,Y.whave=0,Y.wnext=0,M2e(D)},B2e=(D,Y)=>{let O;if(np(D))return wo;const xe=D.state;return Y<0?(O=0,Y=-Y):(O=5+(Y>>4),Y<48&&(Y&=15)),Y&&(Y<8||Y>15)?wo:(xe.window!==null&&xe.wbits!==Y&&(xe.window=null),xe.wrap=O,xe.wbits=Y,E2e(D))},I2e=(D,Y)=>{if(!D)return wo;const O=new sni;D.state=O,O.strm=D,O.window=null,O.mode=$C;const xe=B2e(D,Y);return xe!==qn&&(D.state=null),xe};let EO,BO,S2e=!0;const rni=D=>{if(S2e){EO=new Int32Array(512),BO=new Int32Array(32);let Y=0;for(;Y<144;)D.lens[Y++]=8;for(;Y<256;)D.lens[Y++]=9;for(;Y<280;)D.lens[Y++]=7;for(;Y<288;)D.lens[Y++]=8;for(Na(1,D.lens,0,288,EO,0,D.work,{bits:9}),Y=0;Y<32;)D.lens[Y++]=5;Na(2,D.lens,0,32,BO,0,D.work,{bits:5}),S2e=!1}D.lencode=EO,D.lenbits=9,D.distcode=BO,D.distbits=5},P2e=(D,Y,O,xe)=>{let we;const ye=D.state;return ye.window===null&&(ye.wsize=1<<ye.wbits,ye.wnext=0,ye.whave=0,ye.window=new Uint8Array(ye.wsize)),xe>=ye.wsize?(ye.window.set(Y.subarray(O-ye.wsize,O),0),ye.wnext=0,ye.whave=ye.wsize):(we=ye.wsize-ye.wnext,we>xe&&(we=xe),ye.window.set(Y.subarray(O-xe,O-xe+we),ye.wnext),(xe-=we)?(ye.window.set(Y.subarray(O-xe,O),0),ye.wnext=xe,ye.whave=ye.wsize):(ye.wnext+=we,ye.wnext===ye.wsize&&(ye.wnext=0),ye.whave<ye.wsize&&(ye.whave+=we))),0};var jc={inflateReset:E2e,inflateReset2:B2e,inflateResetKeep:M2e,inflateInit:D=>I2e(D,15),inflateInit2:I2e,inflate:(D,Y)=>{let O,xe,we,ye,tt,Oe,wt,Ve,et,si,Gt,Ct,ho,Di,Kt,zi,ni,Bt,ti,ji,Pt,Ti,ri=0;const Jt=new Uint8Array(4);let wi,zs;const my=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(np(D)||!D.output||!D.input&&D.avail_in!==0)return wo;O=D.state,O.mode===zc&&(O.mode=bO),tt=D.next_out,we=D.output,wt=D.avail_out,ye=D.next_in,xe=D.input,Oe=D.avail_in,Ve=O.hold,et=O.bits,si=Oe,Gt=wt,Ti=qn;e:for(;;)switch(O.mode){case $C:if(O.wrap===0){O.mode=bO;break}for(;et<16;){if(Oe===0)break e;Oe--,Ve+=xe[ye++]<<et,et+=8}if(2&O.wrap&&Ve===35615){O.wbits===0&&(O.wbits=15),O.check=0,Jt[0]=255&Ve,Jt[1]=Ve>>>8&255,O.check=De(O.check,Jt,2,0),Ve=0,et=0,O.mode=16181;break}if(O.head&&(O.head.done=!1),!(1&O.wrap)||(((255&Ve)<<8)+(Ve>>8))%31){D.msg="incorrect header check",O.mode=Un;break}if((15&Ve)!==b2e){D.msg="unknown compression method",O.mode=Un;break}if(Ve>>>=4,et-=4,Pt=8+(15&Ve),O.wbits===0&&(O.wbits=Pt),Pt>15||Pt>O.wbits){D.msg="invalid window size",O.mode=Un;break}O.dmax=1<<O.wbits,O.flags=0,D.adler=O.check=1,O.mode=512&Ve?16189:zc,Ve=0,et=0;break;case 16181:for(;et<16;){if(Oe===0)break e;Oe--,Ve+=xe[ye++]<<et,et+=8}if(O.flags=Ve,(255&O.flags)!==b2e){D.msg="unknown compression method",O.mode=Un;break}if(57344&O.flags){D.msg="unknown header flags set",O.mode=Un;break}O.head&&(O.head.text=Ve>>8&1),512&O.flags&&4&O.wrap&&(Jt[0]=255&Ve,Jt[1]=Ve>>>8&255,O.check=De(O.check,Jt,2,0)),Ve=0,et=0,O.mode=16182;case 16182:for(;et<32;){if(Oe===0)break e;Oe--,Ve+=xe[ye++]<<et,et+=8}O.head&&(O.head.time=Ve),512&O.flags&&4&O.wrap&&(Jt[0]=255&Ve,Jt[1]=Ve>>>8&255,Jt[2]=Ve>>>16&255,Jt[3]=Ve>>>24&255,O.check=De(O.check,Jt,4,0)),Ve=0,et=0,O.mode=16183;case 16183:for(;et<16;){if(Oe===0)break e;Oe--,Ve+=xe[ye++]<<et,et+=8}O.head&&(O.head.xflags=255&Ve,O.head.os=Ve>>8),512&O.flags&&4&O.wrap&&(Jt[0]=255&Ve,Jt[1]=Ve>>>8&255,O.check=De(O.check,Jt,2,0)),Ve=0,et=0,O.mode=16184;case 16184:if(1024&O.flags){for(;et<16;){if(Oe===0)break e;Oe--,Ve+=xe[ye++]<<et,et+=8}O.length=Ve,O.head&&(O.head.extra_len=Ve),512&O.flags&&4&O.wrap&&(Jt[0]=255&Ve,Jt[1]=Ve>>>8&255,O.check=De(O.check,Jt,2,0)),Ve=0,et=0}else O.head&&(O.head.extra=null);O.mode=16185;case 16185:if(1024&O.flags&&(Ct=O.length,Ct>Oe&&(Ct=Oe),Ct&&(O.head&&(Pt=O.head.extra_len-O.length,O.head.extra||(O.head.extra=new Uint8Array(O.head.extra_len)),O.head.extra.set(xe.subarray(ye,ye+Ct),Pt)),512&O.flags&&4&O.wrap&&(O.check=De(O.check,xe,Ct,ye)),Oe-=Ct,ye+=Ct,O.length-=Ct),O.length))break e;O.length=0,O.mode=16186;case 16186:if(2048&O.flags){if(Oe===0)break e;Ct=0;do Pt=xe[ye+Ct++],O.head&&Pt&&O.length<65536&&(O.head.name+=String.fromCharCode(Pt));while(Pt&&Ct<Oe);if(512&O.flags&&4&O.wrap&&(O.check=De(O.check,xe,Ct,ye)),Oe-=Ct,ye+=Ct,Pt)break e}else O.head&&(O.head.name=null);O.length=0,O.mode=16187;case 16187:if(4096&O.flags){if(Oe===0)break e;Ct=0;do Pt=xe[ye+Ct++],O.head&&Pt&&O.length<65536&&(O.head.comment+=String.fromCharCode(Pt));while(Pt&&Ct<Oe);if(512&O.flags&&4&O.wrap&&(O.check=De(O.check,xe,Ct,ye)),Oe-=Ct,ye+=Ct,Pt)break e}else O.head&&(O.head.comment=null);O.mode=16188;case 16188:if(512&O.flags){for(;et<16;){if(Oe===0)break e;Oe--,Ve+=xe[ye++]<<et,et+=8}if(4&O.wrap&&Ve!==(65535&O.check)){D.msg="header crc mismatch",O.mode=Un;break}Ve=0,et=0}O.head&&(O.head.hcrc=O.flags>>9&1,O.head.done=!0),D.adler=O.check=0,O.mode=zc;break;case 16189:for(;et<32;){if(Oe===0)break e;Oe--,Ve+=xe[ye++]<<et,et+=8}D.adler=O.check=x2e(Ve),Ve=0,et=0,O.mode=eb;case eb:if(O.havedict===0)return D.next_out=tt,D.avail_out=wt,D.next_in=ye,D.avail_in=Oe,O.hold=Ve,O.bits=et,py;D.adler=O.check=1,O.mode=zc;case zc:if(Y===ar||Y===$o)break e;case bO:if(O.last){Ve>>>=7&et,et-=7&et,O.mode=MO;break}for(;et<3;){if(Oe===0)break e;Oe--,Ve+=xe[ye++]<<et,et+=8}switch(O.last=1&Ve,Ve>>>=1,et-=1,3&Ve){case 0:O.mode=16193;break;case 1:if(rni(O),O.mode=tb,Y===$o){Ve>>>=2,et-=2;break e}break;case 2:O.mode=16196;break;case 3:D.msg="invalid block type",O.mode=Un}Ve>>>=2,et-=2;break;case 16193:for(Ve>>>=7&et,et-=7&et;et<32;){if(Oe===0)break e;Oe--,Ve+=xe[ye++]<<et,et+=8}if((65535&Ve)!=(Ve>>>16^65535)){D.msg="invalid stored block lengths",O.mode=Un;break}if(O.length=65535&Ve,Ve=0,et=0,O.mode=xO,Y===$o)break e;case xO:O.mode=16195;case 16195:if(Ct=O.length,Ct){if(Ct>Oe&&(Ct=Oe),Ct>wt&&(Ct=wt),Ct===0)break e;we.set(xe.subarray(ye,ye+Ct),tt),Oe-=Ct,ye+=Ct,wt-=Ct,tt+=Ct,O.length-=Ct;break}O.mode=zc;break;case 16196:for(;et<14;){if(Oe===0)break e;Oe--,Ve+=xe[ye++]<<et,et+=8}if(O.nlen=257+(31&Ve),Ve>>>=5,et-=5,O.ndist=1+(31&Ve),Ve>>>=5,et-=5,O.ncode=4+(15&Ve),Ve>>>=4,et-=4,O.nlen>286||O.ndist>30){D.msg="too many length or distance symbols",O.mode=Un;break}O.have=0,O.mode=16197;case 16197:for(;O.have<O.ncode;){for(;et<3;){if(Oe===0)break e;Oe--,Ve+=xe[ye++]<<et,et+=8}O.lens[my[O.have++]]=7&Ve,Ve>>>=3,et-=3}for(;O.have<19;)O.lens[my[O.have++]]=0;if(O.lencode=O.lendyn,O.lenbits=7,wi={bits:O.lenbits},Ti=Na(0,O.lens,0,19,O.lencode,0,O.work,wi),O.lenbits=wi.bits,Ti){D.msg="invalid code lengths set",O.mode=Un;break}O.have=0,O.mode=16198;case 16198:for(;O.have<O.nlen+O.ndist;){for(;ri=O.lencode[Ve&(1<<O.lenbits)-1],Kt=ri>>>24,zi=ri>>>16&255,ni=65535&ri,!(Kt<=et);){if(Oe===0)break e;Oe--,Ve+=xe[ye++]<<et,et+=8}if(ni<16)Ve>>>=Kt,et-=Kt,O.lens[O.have++]=ni;else{if(ni===16){for(zs=Kt+2;et<zs;){if(Oe===0)break e;Oe--,Ve+=xe[ye++]<<et,et+=8}if(Ve>>>=Kt,et-=Kt,O.have===0){D.msg="invalid bit length repeat",O.mode=Un;break}Pt=O.lens[O.have-1],Ct=3+(3&Ve),Ve>>>=2,et-=2}else if(ni===17){for(zs=Kt+3;et<zs;){if(Oe===0)break e;Oe--,Ve+=xe[ye++]<<et,et+=8}Ve>>>=Kt,et-=Kt,Pt=0,Ct=3+(7&Ve),Ve>>>=3,et-=3}else{for(zs=Kt+7;et<zs;){if(Oe===0)break e;Oe--,Ve+=xe[ye++]<<et,et+=8}Ve>>>=Kt,et-=Kt,Pt=0,Ct=11+(127&Ve),Ve>>>=7,et-=7}if(O.have+Ct>O.nlen+O.ndist){D.msg="invalid bit length repeat",O.mode=Un;break}for(;Ct--;)O.lens[O.have++]=Pt}}if(O.mode===Un)break;if(O.lens[256]===0){D.msg="invalid code -- missing end-of-block",O.mode=Un;break}if(O.lenbits=9,wi={bits:O.lenbits},Ti=Na(1,O.lens,0,O.nlen,O.lencode,0,O.work,wi),O.lenbits=wi.bits,Ti){D.msg="invalid literal/lengths set",O.mode=Un;break}if(O.distbits=6,O.distcode=O.distdyn,wi={bits:O.distbits},Ti=Na(2,O.lens,O.nlen,O.ndist,O.distcode,0,O.work,wi),O.distbits=wi.bits,Ti){D.msg="invalid distances set",O.mode=Un;break}if(O.mode=tb,Y===$o)break e;case tb:O.mode=ib;case ib:if(Oe>=6&&wt>=258){D.next_out=tt,D.avail_out=wt,D.next_in=ye,D.avail_in=Oe,O.hold=Ve,O.bits=et,qt(D,Gt),tt=D.next_out,we=D.output,wt=D.avail_out,ye=D.next_in,xe=D.input,Oe=D.avail_in,Ve=O.hold,et=O.bits,O.mode===zc&&(O.back=-1);break}for(O.back=0;ri=O.lencode[Ve&(1<<O.lenbits)-1],Kt=ri>>>24,zi=ri>>>16&255,ni=65535&ri,!(Kt<=et);){if(Oe===0)break e;Oe--,Ve+=xe[ye++]<<et,et+=8}if(zi&&(240&zi)==0){for(Bt=Kt,ti=zi,ji=ni;ri=O.lencode[ji+((Ve&(1<<Bt+ti)-1)>>Bt)],Kt=ri>>>24,zi=ri>>>16&255,ni=65535&ri,!(Bt+Kt<=et);){if(Oe===0)break e;Oe--,Ve+=xe[ye++]<<et,et+=8}Ve>>>=Bt,et-=Bt,O.back+=Bt}if(Ve>>>=Kt,et-=Kt,O.back+=Kt,O.length=ni,zi===0){O.mode=16205;break}if(32&zi){O.back=-1,O.mode=zc;break}if(64&zi){D.msg="invalid literal/length code",O.mode=Un;break}O.extra=15&zi,O.mode=16201;case 16201:if(O.extra){for(zs=O.extra;et<zs;){if(Oe===0)break e;Oe--,Ve+=xe[ye++]<<et,et+=8}O.length+=Ve&(1<<O.extra)-1,Ve>>>=O.extra,et-=O.extra,O.back+=O.extra}O.was=O.length,O.mode=16202;case 16202:for(;ri=O.distcode[Ve&(1<<O.distbits)-1],Kt=ri>>>24,zi=ri>>>16&255,ni=65535&ri,!(Kt<=et);){if(Oe===0)break e;Oe--,Ve+=xe[ye++]<<et,et+=8}if((240&zi)==0){for(Bt=Kt,ti=zi,ji=ni;ri=O.distcode[ji+((Ve&(1<<Bt+ti)-1)>>Bt)],Kt=ri>>>24,zi=ri>>>16&255,ni=65535&ri,!(Bt+Kt<=et);){if(Oe===0)break e;Oe--,Ve+=xe[ye++]<<et,et+=8}Ve>>>=Bt,et-=Bt,O.back+=Bt}if(Ve>>>=Kt,et-=Kt,O.back+=Kt,64&zi){D.msg="invalid distance code",O.mode=Un;break}O.offset=ni,O.extra=15&zi,O.mode=16203;case 16203:if(O.extra){for(zs=O.extra;et<zs;){if(Oe===0)break e;Oe--,Ve+=xe[ye++]<<et,et+=8}O.offset+=Ve&(1<<O.extra)-1,Ve>>>=O.extra,et-=O.extra,O.back+=O.extra}if(O.offset>O.dmax){D.msg="invalid distance too far back",O.mode=Un;break}O.mode=16204;case 16204:if(wt===0)break e;if(Ct=Gt-wt,O.offset>Ct){if(Ct=O.offset-Ct,Ct>O.whave&&O.sane){D.msg="invalid distance too far back",O.mode=Un;break}Ct>O.wnext?(Ct-=O.wnext,ho=O.wsize-Ct):ho=O.wnext-Ct,Ct>O.length&&(Ct=O.length),Di=O.window}else Di=we,ho=tt-O.offset,Ct=O.length;Ct>wt&&(Ct=wt),wt-=Ct,O.length-=Ct;do we[tt++]=Di[ho++];while(--Ct);O.length===0&&(O.mode=ib);break;case 16205:if(wt===0)break e;we[tt++]=O.length,wt--,O.mode=ib;break;case MO:if(O.wrap){for(;et<32;){if(Oe===0)break e;Oe--,Ve|=xe[ye++]<<et,et+=8}if(Gt-=wt,D.total_out+=Gt,O.total+=Gt,4&O.wrap&&Gt&&(D.adler=O.check=O.flags?De(O.check,we,Gt,tt-Gt):me(O.check,we,Gt,tt-Gt)),Gt=wt,4&O.wrap&&(O.flags?Ve:x2e(Ve))!==O.check){D.msg="incorrect data check",O.mode=Un;break}Ve=0,et=0}O.mode=16207;case 16207:if(O.wrap&&O.flags){for(;et<32;){if(Oe===0)break e;Oe--,Ve+=xe[ye++]<<et,et+=8}if(4&O.wrap&&Ve!==(4294967295&O.total)){D.msg="incorrect length check",O.mode=Un;break}Ve=0,et=0}O.mode=16208;case 16208:Ti=ws;break e;case Un:Ti=w2e;break e;case 16210:return C2e;default:return wo}return D.next_out=tt,D.avail_out=wt,D.next_in=ye,D.avail_in=Oe,O.hold=Ve,O.bits=et,(O.wsize||Gt!==D.avail_out&&O.mode<Un&&(O.mode<MO||Y!==In))&&P2e(D,D.output,D.next_out,Gt-D.avail_out),si-=D.avail_in,Gt-=D.avail_out,D.total_in+=si,D.total_out+=Gt,O.total+=Gt,4&O.wrap&&Gt&&(D.adler=O.check=O.flags?De(O.check,we,Gt,D.next_out-Gt):me(O.check,we,Gt,D.next_out-Gt)),D.data_type=O.bits+(O.last?64:0)+(O.mode===zc?128:0)+(O.mode===tb||O.mode===xO?256:0),(si===0&&Gt===0||Y===In)&&Ti===qn&&(Ti=oni),Ti},inflateEnd:D=>{if(np(D))return wo;let Y=D.state;return Y.window&&(Y.window=null),D.state=null,qn},inflateGetHeader:(D,Y)=>{if(np(D))return wo;const O=D.state;return(2&O.wrap)==0?wo:(O.head=Y,Y.done=!1,qn)},inflateSetDictionary:(D,Y)=>{const O=Y.length;let xe,we,ye;return np(D)?wo:(xe=D.state,xe.wrap!==0&&xe.mode!==eb?wo:xe.mode===eb&&(we=1,we=me(we,Y,O,0),we!==xe.check)?w2e:(ye=P2e(D,Y,O,O),ye?(xe.mode=16210,C2e):(xe.havedict=1,qn)))},inflateInfo:"pako inflate (from Nodeca project)"},ani=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1};const T2e=Object.prototype.toString,{Z_NO_FLUSH:lni,Z_FINISH:cni,Z_OK:fy,Z_STREAM_END:IO,Z_NEED_DICT:SO,Z_STREAM_ERROR:uni,Z_DATA_ERROR:k2e,Z_MEM_ERROR:dni}=ge;function Ay(D){this.options=ZC({chunkSize:65536,windowBits:15,to:""},D||{});const Y=this.options;Y.raw&&Y.windowBits>=0&&Y.windowBits<16&&(Y.windowBits=-Y.windowBits,Y.windowBits===0&&(Y.windowBits=-15)),!(Y.windowBits>=0&&Y.windowBits<16)||D&&D.windowBits||(Y.windowBits+=32),Y.windowBits>15&&Y.windowBits<48&&(15&Y.windowBits)==0&&(Y.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new st,this.strm.avail_out=0;let O=jc.inflateInit2(this.strm,Y.windowBits);if(O!==fy)throw new Error(ve[O]);if(this.header=new ani,jc.inflateGetHeader(this.strm,this.header),Y.dictionary&&(typeof Y.dictionary=="string"?Y.dictionary=hy(Y.dictionary):T2e.call(Y.dictionary)==="[object ArrayBuffer]"&&(Y.dictionary=new Uint8Array(Y.dictionary)),Y.raw&&(O=jc.inflateSetDictionary(this.strm,Y.dictionary),O!==fy)))throw new Error(ve[O])}function PO(D,Y){const O=new Ay(Y);if(O.push(D),O.err)throw O.msg||ve[O.err];return O.result}Ay.prototype.push=function(D,Y){const O=this.strm,xe=this.options.chunkSize,we=this.options.dictionary;let ye,tt,Oe;if(this.ended)return!1;for(tt=Y===~~Y?Y:Y===!0?cni:lni,T2e.call(D)==="[object ArrayBuffer]"?O.input=new Uint8Array(D):O.input=D,O.next_in=0,O.avail_in=O.input.length;;){for(O.avail_out===0&&(O.output=new Uint8Array(xe),O.next_out=0,O.avail_out=xe),ye=jc.inflate(O,tt),ye===SO&&we&&(ye=jc.inflateSetDictionary(O,we),ye===fy?ye=jc.inflate(O,tt):ye===k2e&&(ye=SO));O.avail_in>0&&ye===IO&&O.state.wrap>0&&D[O.next_in]!==0;)jc.inflateReset(O),ye=jc.inflate(O,tt);switch(ye){case uni:case k2e:case SO:case dni:return this.onEnd(ye),this.ended=!0,!1}if(Oe=O.avail_out,O.next_out&&(O.avail_out===0||ye===IO))if(this.options.to==="string"){let wt=Ke(O.output,O.next_out),Ve=O.next_out-wt,et=se(O.output,wt);O.next_out=Ve,O.avail_out=xe-Ve,Ve&&O.output.set(O.output.subarray(wt,wt+Ve),0),this.onData(et)}else this.onData(O.output.length===O.next_out?O.output:O.output.subarray(0,O.next_out));if(ye!==fy||Oe!==0){if(ye===IO)return ye=jc.inflateEnd(this.strm),this.onEnd(ye),this.ended=!0,!0;if(O.avail_in===0)break}}return!0},Ay.prototype.onData=function(D){this.chunks.push(D)},Ay.prototype.onEnd=function(D){D===fy&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=YC(this.chunks)),this.chunks=[],this.err=D,this.msg=this.strm.msg};var hni={Inflate:Ay,inflate:PO,inflateRaw:function(D,Y){return(Y=Y||{}).raw=!0,PO(D,Y)},ungzip:PO};const{Deflate:pni,deflate:fni,deflateRaw:Ani,gzip:mni}=Cn,{Inflate:gni,inflate:yni,inflateRaw:vni,ungzip:wni}=hni;var R2e=pni,_2e=fni,D2e=Ani,L2e=mni,F2e=gni,O2e=yni,N2e=vni,U2e=wni,V2e=ge,Cni={Deflate:R2e,deflate:_2e,deflateRaw:D2e,gzip:L2e,Inflate:F2e,inflate:O2e,inflateRaw:N2e,ungzip:U2e,constants:V2e};t.Deflate=R2e,t.Inflate=F2e,t.constants=V2e,t.default=Cni,t.deflate=_2e,t.deflateRaw=D2e,t.gzip=L2e,t.inflate=O2e,t.inflateRaw=N2e,t.ungzip=U2e,Object.defineProperty(t,"__esModule",{value:!0})}))})(J4,J4.exports)),J4.exports}var tie=s7t();const Ia=mg({__proto__:null,default:n3(tie)},[tie]);let _s=window.pako||Ia;_s.inflate||(_s=_s.default);const r7t=(function(){const i=new Float32Array(3);return function(e){return i[0]=e[0]/255,i[1]=e[1]/255,i[2]=e[2]/255,i}})();function a7t(i){return{positions:i[0],normals:i[1],indices:i[2],edgeIndices:i[3],meshPositions:i[4],meshIndices:i[5],meshEdgesIndices:i[6],meshColors:i[7],entityIDs:i[8],entityMeshes:i[9],entityIsObjects:i[10],positionsDecodeMatrix:i[11]}}function l7t(i){return{positions:new Uint16Array(_s.inflate(i.positions).buffer),normals:new Int8Array(_s.inflate(i.normals).buffer),indices:new Uint32Array(_s.inflate(i.indices).buffer),edgeIndices:new Uint32Array(_s.inflate(i.edgeIndices).buffer),meshPositions:new Uint32Array(_s.inflate(i.meshPositions).buffer),meshIndices:new Uint32Array(_s.inflate(i.meshIndices).buffer),meshEdgesIndices:new Uint32Array(_s.inflate(i.meshEdgesIndices).buffer),meshColors:new Uint8Array(_s.inflate(i.meshColors).buffer),entityIDs:_s.inflate(i.entityIDs,{to:"string"}),entityMeshes:new Uint32Array(_s.inflate(i.entityMeshes).buffer),entityIsObjects:new Uint8Array(_s.inflate(i.entityIsObjects).buffer),positionsDecodeMatrix:new Float32Array(_s.inflate(i.positionsDecodeMatrix).buffer)}}function c7t(i,e,t,n,o,r){r.getNextId(),n.positionsCompression="precompressed",n.normalsCompression="precompressed";const s=t.positions,a=t.normals,l=t.indices,c=t.edgeIndices,u=t.meshPositions,d=t.meshIndices,h=t.meshEdgesIndices,p=t.meshColors,A=JSON.parse(t.entityIDs),f=t.entityMeshes,g=t.entityIsObjects,m=u.length,v=f.length;for(let y=0;y<v;y++){const w=A[y],x=e.globalizeObjectIds?b.globalizeObjectId(n.id,w):w,M=i.metaScene.metaObjects[x],B={},S={};if(M){if(e.excludeTypesMap&&M.type&&e.excludeTypesMap[M.type]||e.includeTypesMap&&M.type&&!e.includeTypesMap[M.type])continue;const T=e.objectDefaults?e.objectDefaults[M.type]||e.objectDefaults.DEFAULT:null;T&&(T.visible===!1&&(B.visible=!1),T.pickable===!1&&(B.pickable=!1),T.colorize&&(S.color=T.colorize),T.opacity!==void 0&&T.opacity!==null&&(S.opacity=T.opacity))}else if(e.excludeUnclassifiedObjects)continue;const I=y===v-1,R=[];for(let T=f[y],_=I?f.length:f[y+1];T<_;T++){const F=T===m-1,N=x+".mesh."+T,z=r7t(p.subarray(T*4,T*4+3)),j=p[T*4+3]/255;n.createMesh(At.apply(S,{id:N,primitive:"triangles",positionsCompressed:s.subarray(u[T],F?s.length:u[T+1]),normalsCompressed:a.subarray(u[T],F?s.length:u[T+1]),indices:l.subarray(d[T],F?l.length:d[T+1]),edgeIndices:c.subarray(h[T],F?c.length:h[T+1]),positionsDecodeMatrix:t.positionsDecodeMatrix,color:z,opacity:j})),R.push(N)}n.createEntity(At.apply(B,{id:x,isObject:g[y]===1,meshIds:R}))}}const iie={version:1,parse:function(i,e,t,n,o,r){const s=a7t(t),a=l7t(s);c7t(i,e,a,n,o,r)}};let Do=window.pako||Ia;Do.inflate||(Do=Do.default);function u7t(i){return{positions:i[0],normals:i[1],indices:i[2],edgeIndices:i[3],meshPositions:i[4],meshIndices:i[5],meshEdgesIndices:i[6],meshColors:i[7],entityIDs:i[8],entityMeshes:i[9],entityIsObjects:i[10],positionsDecodeMatrix:i[11],entityMeshIds:i[12],entityMatrices:i[13],entityUsesInstancing:i[14]}}function d7t(i){return{positions:new Uint16Array(Do.inflate(i.positions).buffer),normals:new Int8Array(Do.inflate(i.normals).buffer),indices:new Uint32Array(Do.inflate(i.indices).buffer),edgeIndices:new Uint32Array(Do.inflate(i.edgeIndices).buffer),meshPositions:new Uint32Array(Do.inflate(i.meshPositions).buffer),meshIndices:new Uint32Array(Do.inflate(i.meshIndices).buffer),meshEdgesIndices:new Uint32Array(Do.inflate(i.meshEdgesIndices).buffer),meshColors:new Uint8Array(Do.inflate(i.meshColors).buffer),entityIDs:Do.inflate(i.entityIDs,{to:"string"}),entityMeshes:new Uint32Array(Do.inflate(i.entityMeshes).buffer),entityIsObjects:new Uint8Array(Do.inflate(i.entityIsObjects).buffer),positionsDecodeMatrix:new Float32Array(Do.inflate(i.positionsDecodeMatrix).buffer),entityMeshIds:new Uint32Array(Do.inflate(i.entityMeshIds).buffer),entityMatrices:new Float32Array(Do.inflate(i.entityMatrices).buffer),entityUsesInstancing:new Uint8Array(Do.inflate(i.entityUsesInstancing).buffer)}}const h7t=(function(){const i=new Float32Array(3);return function(e){return i[0]=e[0]/255,i[1]=e[1]/255,i[2]=e[2]/255,i}})();function p7t(i,e,t,n,o,r){const s=r.getNextId();n.positionsCompression="precompressed",n.normalsCompression="precompressed";const a=t.positions,l=t.normals,c=t.indices,u=t.edgeIndices,d=t.meshPositions,h=t.meshIndices,p=t.meshEdgesIndices,A=t.meshColors,f=JSON.parse(t.entityIDs),g=t.entityMeshes,m=t.entityIsObjects,v=t.entityMeshIds,y=t.entityMatrices,w=t.entityUsesInstancing,x=d.length,M=g.length,B={};for(let S=0;S<M;S++){const I=f[S],R=e.globalizeObjectIds?b.globalizeObjectId(n.id,I):I,T=i.metaScene.metaObjects[R],_={},F={},N=y.subarray(S*16,S*16+16);if(T){if(e.excludeTypesMap&&T.type&&e.excludeTypesMap[T.type]||e.includeTypesMap&&T.type&&!e.includeTypesMap[T.type])continue;const W=e.objectDefaults?e.objectDefaults[T.type]||e.objectDefaults.DEFAULT:null;W&&(W.visible===!1&&(_.visible=!1),W.pickable===!1&&(_.pickable=!1),W.colorize&&(F.color=W.colorize),W.opacity!==void 0&&W.opacity!==null&&(F.opacity=W.opacity))}else if(e.excludeUnclassifiedObjects)continue;const z=S===M-1,j=[];for(let W=g[S],J=z?v.length:g[S+1];W<J;W++){const $=v[W],ue=$===x-1,Ee=r.getNextId(),Be=h7t(A.subarray($*4,$*4+3)),ze=A[$*4+3]/255,Qe=a.subarray(d[$],ue?a.length:d[$+1]),me=l.subarray(d[$],ue?a.length:d[$+1]),_e=c.subarray(h[$],ue?c.length:h[$+1]),De=u.subarray(p[$],ue?u.length:p[$+1]);if(w[S]===1){const ve=`${s}.geometry.${Ee}.${$}`;ve in B||(n.createGeometry({id:ve,positionsCompressed:Qe,normalsCompressed:me,indices:_e,edgeIndices:De,primitive:"triangles",positionsDecodeMatrix:t.positionsDecodeMatrix}),B[ve]=!0),n.createMesh(At.apply(F,{id:Ee,color:Be,opacity:ze,matrix:N,geometryId:ve})),j.push(Ee)}else n.createMesh(At.apply(F,{id:Ee,primitive:"triangles",positionsCompressed:Qe,normalsCompressed:me,indices:_e,edgeIndices:De,positionsDecodeMatrix:t.positionsDecodeMatrix,color:Be,opacity:ze})),j.push(Ee)}j.length&&n.createEntity(At.apply(_,{id:R,isObject:m[S]===1,meshIds:j}))}}const nie={version:2,parse:function(i,e,t,n,o,r){const s=u7t(t),a=d7t(s);p7t(i,e,a,n,o,r)}};let xo=window.pako||Ia;xo.inflate||(xo=xo.default);function f7t(i){return{positions:i[0],normals:i[1],indices:i[2],edgeIndices:i[3],meshPositions:i[4],meshIndices:i[5],meshEdgesIndices:i[6],meshColors:i[7],entityIDs:i[8],entityMeshes:i[9],entityIsObjects:i[10],instancedPositionsDecodeMatrix:i[11],batchedPositionsDecodeMatrix:i[12],entityMeshIds:i[13],entityMatrices:i[14],entityUsesInstancing:i[15]}}function A7t(i){return{positions:new Uint16Array(xo.inflate(i.positions).buffer),normals:new Int8Array(xo.inflate(i.normals).buffer),indices:new Uint32Array(xo.inflate(i.indices).buffer),edgeIndices:new Uint32Array(xo.inflate(i.edgeIndices).buffer),meshPositions:new Uint32Array(xo.inflate(i.meshPositions).buffer),meshIndices:new Uint32Array(xo.inflate(i.meshIndices).buffer),meshEdgesIndices:new Uint32Array(xo.inflate(i.meshEdgesIndices).buffer),meshColors:new Uint8Array(xo.inflate(i.meshColors).buffer),entityIDs:xo.inflate(i.entityIDs,{to:"string"}),entityMeshes:new Uint32Array(xo.inflate(i.entityMeshes).buffer),entityIsObjects:new Uint8Array(xo.inflate(i.entityIsObjects).buffer),instancedPositionsDecodeMatrix:new Float32Array(xo.inflate(i.instancedPositionsDecodeMatrix).buffer),batchedPositionsDecodeMatrix:new Float32Array(xo.inflate(i.batchedPositionsDecodeMatrix).buffer),entityMeshIds:new Uint32Array(xo.inflate(i.entityMeshIds).buffer),entityMatrices:new Float32Array(xo.inflate(i.entityMatrices).buffer),entityUsesInstancing:new Uint8Array(xo.inflate(i.entityUsesInstancing).buffer)}}const m7t=(function(){const i=new Float32Array(3);return function(e){return i[0]=e[0]/255,i[1]=e[1]/255,i[2]=e[2]/255,i}})();function g7t(i,e,t,n,o,r){const s=r.getNextId();n.positionsCompression="precompressed",n.normalsCompression="precompressed";const a=t.positions,l=t.normals,c=t.indices,u=t.edgeIndices,d=t.meshPositions,h=t.meshIndices,p=t.meshEdgesIndices,A=t.meshColors,f=JSON.parse(t.entityIDs),g=t.entityMeshes,m=t.entityIsObjects,v=t.entityMeshIds,y=t.entityMatrices,w=t.entityUsesInstancing,x=d.length,M=g.length,B={};for(let F=0;F<M;F++){const N=f[F],z=e.globalizeObjectIds?b.globalizeObjectId(n.id,N):N,j=i.metaScene.metaObjects[z],W={},J={},$=y.subarray(F*16,F*16+16);if(j){if(e.excludeTypesMap&&j.type&&e.excludeTypesMap[j.type]||e.includeTypesMap&&j.type&&!e.includeTypesMap[j.type])continue;const Be=e.objectDefaults?e.objectDefaults[j.type]||e.objectDefaults.DEFAULT:null;Be&&(Be.visible===!1&&(W.visible=!1),Be.pickable===!1&&(W.pickable=!1),Be.colorize&&(J.color=Be.colorize),Be.opacity!==void 0&&Be.opacity!==null&&(J.opacity=Be.opacity))}else if(e.excludeUnclassifiedObjects)continue;const ue=F===M-1,Ee=[];for(let Be=g[F],ze=ue?v.length:g[F+1];Be<ze;Be++){var S=v[Be];const Qe=S===x-1,me=`${s}.${z}.mesh.${S}`,_e=m7t(A.subarray(S*4,S*4+3)),De=A[S*4+3]/255;var I=a.subarray(d[S],Qe?a.length:d[S+1]),R=l.subarray(d[S],Qe?a.length:d[S+1]),T=c.subarray(h[S],Qe?c.length:h[S+1]),_=u.subarray(p[S],Qe?u.length:p[S+1]);if(w[F]===1){const ve=`${s}.geometry.${me}.${S}`;ve in B||(n.createGeometry({id:ve,positionsCompressed:I,normalsCompressed:R,indices:T,edgeIndices:_,primitive:"triangles",positionsDecodeMatrix:t.instancedPositionsDecodeMatrix}),B[ve]=!0),n.createMesh(At.apply(J,{id:me,color:_e,opacity:De,matrix:$,geometryId:ve})),Ee.push(me)}else n.createMesh(At.apply(J,{id:me,primitive:"triangles",positionsCompressed:I,normalsCompressed:R,indices:T,edgeIndices:_,positionsDecodeMatrix:t.batchedPositionsDecodeMatrix,color:_e,opacity:De})),Ee.push(me)}Ee.length&&n.createEntity(At.apply(W,{id:z,isObject:m[F]===1,meshIds:Ee}))}}const oie={version:3,parse:function(i,e,t,n,o,r){const s=f7t(t),a=A7t(s);g7t(i,e,a,n,o,r)}};let Lo=window.pako||Ia;Lo.inflate||(Lo=Lo.default);function y7t(i){return{positions:i[0],normals:i[1],indices:i[2],edgeIndices:i[3],decodeMatrices:i[4],matrices:i[5],eachPrimitivePositionsAndNormalsPortion:i[6],eachPrimitiveIndicesPortion:i[7],eachPrimitiveEdgeIndicesPortion:i[8],eachPrimitiveDecodeMatricesPortion:i[9],eachPrimitiveColor:i[10],primitiveInstances:i[11],eachEntityId:i[12],eachEntityPrimitiveInstancesPortion:i[13],eachEntityMatricesPortion:i[14],eachEntityMatrix:i[15]}}function v7t(i){return{positions:new Uint16Array(Lo.inflate(i.positions).buffer),normals:new Int8Array(Lo.inflate(i.normals).buffer),indices:new Uint32Array(Lo.inflate(i.indices).buffer),edgeIndices:new Uint32Array(Lo.inflate(i.edgeIndices).buffer),decodeMatrices:new Float32Array(Lo.inflate(i.decodeMatrices).buffer),matrices:new Float32Array(Lo.inflate(i.matrices).buffer),eachPrimitivePositionsAndNormalsPortion:new Uint32Array(Lo.inflate(i.eachPrimitivePositionsAndNormalsPortion).buffer),eachPrimitiveIndicesPortion:new Uint32Array(Lo.inflate(i.eachPrimitiveIndicesPortion).buffer),eachPrimitiveEdgeIndicesPortion:new Uint32Array(Lo.inflate(i.eachPrimitiveEdgeIndicesPortion).buffer),eachPrimitiveDecodeMatricesPortion:new Uint32Array(Lo.inflate(i.eachPrimitiveDecodeMatricesPortion).buffer),eachPrimitiveColor:new Uint8Array(Lo.inflate(i.eachPrimitiveColor).buffer),primitiveInstances:new Uint32Array(Lo.inflate(i.primitiveInstances).buffer),eachEntityId:Lo.inflate(i.eachEntityId,{to:"string"}),eachEntityPrimitiveInstancesPortion:new Uint32Array(Lo.inflate(i.eachEntityPrimitiveInstancesPortion).buffer),eachEntityMatricesPortion:new Uint32Array(Lo.inflate(i.eachEntityMatricesPortion).buffer)}}const w7t=(function(){const i=new Float32Array(3);return function(e){return i[0]=e[0]/255,i[1]=e[1]/255,i[2]=e[2]/255,i}})();function C7t(i,e,t,n,o,r){const s=r.getNextId();n.positionsCompression="precompressed",n.normalsCompression="precompressed";const a=t.positions,l=t.normals,c=t.indices,u=t.edgeIndices,d=t.decodeMatrices,h=t.matrices,p=t.eachPrimitivePositionsAndNormalsPortion,A=t.eachPrimitiveIndicesPortion,f=t.eachPrimitiveEdgeIndicesPortion,g=t.eachPrimitiveDecodeMatricesPortion,m=t.eachPrimitiveColor,v=t.primitiveInstances,y=JSON.parse(t.eachEntityId),w=t.eachEntityPrimitiveInstancesPortion,x=t.eachEntityMatricesPortion,M=p.length,B=v.length,S=new Uint8Array(M),I=new Uint32Array(M),R=y.length;for(let F=0;F<M;F++)I[F]=F;I.sort((F,N)=>g[F]<g[N]?-1:g[F]>g[N]?1:0);for(let F=0;F<B;F++){const N=v[F];S[N]++}const T={};for(let F=0;F<R;F++){const N=R-1,z=F===N,j=w[F],W=z?w[N]:w[F+1];for(let J=j;J<W;J++){const $=v[J];S[$]>1||(T[$]=F)}}for(let F=0;F<M;F++){const N=I[F],z=N===M-1,W=S[N]>1,J=w7t(m.subarray(N*4,N*4+3)),$=m[N*4+3]/255,ue=a.subarray(p[N],z?a.length:p[N+1]),Ee=l.subarray(p[N],z?l.length:p[N+1]),Be=c.subarray(A[N],z?c.length:A[N+1]),ze=u.subarray(f[N],z?u.length:f[N+1]),Qe=d.subarray(g[N],g[N]+16);if(W){const me=`${s}-geometry.${N}`;n.createGeometry({id:me,primitive:"triangles",positionsCompressed:ue,normalsCompressed:Ee,indices:Be,edgeIndices:ze,positionsDecodeMatrix:Qe})}else{const me=`${s}-${N}`,_e=T[N];y[_e];const De={};n.createMesh(At.apply(De,{id:me,primitive:"triangles",positionsCompressed:ue,normalsCompressed:Ee,indices:Be,edgeIndices:ze,positionsDecodeMatrix:Qe,color:J,opacity:$}))}}let _=0;for(let F=0;F<R;F++){const N=R-1,z=F===N,j=y[F],W=w[F],J=z?w[N]:w[F+1],$=[];for(let ue=W;ue<J;ue++){const Ee=v[ue];if(S[Ee]>1){const Qe={},me=`${s}-instance.${_++}`,_e=`${s}-geometry.${Ee}`,De=x[F]*16,ve=h.subarray(De,De+16);n.createMesh(At.apply(Qe,{id:me,geometryId:_e,matrix:ve})),$.push(me)}else $.push(Ee)}if($.length>0){const ue={};n.createEntity(At.apply(ue,{id:j,isObject:!0,meshIds:$}))}}}const sie={version:4,parse:function(i,e,t,n,o,r){const s=y7t(t),a=v7t(s);C7t(i,e,a,n,o,r)}};let gs=window.pako||Ia;gs.inflate||(gs=gs.default);function b7t(i){return{positions:i[0],normals:i[1],indices:i[2],edgeIndices:i[3],matrices:i[4],eachPrimitivePositionsAndNormalsPortion:i[5],eachPrimitiveIndicesPortion:i[6],eachPrimitiveEdgeIndicesPortion:i[7],eachPrimitiveColor:i[8],primitiveInstances:i[9],eachEntityId:i[10],eachEntityPrimitiveInstancesPortion:i[11],eachEntityMatricesPortion:i[12]}}function x7t(i){return{positions:new Float32Array(gs.inflate(i.positions).buffer),normals:new Int8Array(gs.inflate(i.normals).buffer),indices:new Uint32Array(gs.inflate(i.indices).buffer),edgeIndices:new Uint32Array(gs.inflate(i.edgeIndices).buffer),matrices:new Float32Array(gs.inflate(i.matrices).buffer),eachPrimitivePositionsAndNormalsPortion:new Uint32Array(gs.inflate(i.eachPrimitivePositionsAndNormalsPortion).buffer),eachPrimitiveIndicesPortion:new Uint32Array(gs.inflate(i.eachPrimitiveIndicesPortion).buffer),eachPrimitiveEdgeIndicesPortion:new Uint32Array(gs.inflate(i.eachPrimitiveEdgeIndicesPortion).buffer),eachPrimitiveColor:new Uint8Array(gs.inflate(i.eachPrimitiveColor).buffer),primitiveInstances:new Uint32Array(gs.inflate(i.primitiveInstances).buffer),eachEntityId:gs.inflate(i.eachEntityId,{to:"string"}),eachEntityPrimitiveInstancesPortion:new Uint32Array(gs.inflate(i.eachEntityPrimitiveInstancesPortion).buffer),eachEntityMatricesPortion:new Uint32Array(gs.inflate(i.eachEntityMatricesPortion).buffer)}}const M7t=(function(){const i=new Float32Array(3);return function(e){return i[0]=e[0]/255,i[1]=e[1]/255,i[2]=e[2]/255,i}})();function E7t(i,e,t,n,o,r){const s=r.getNextId();n.positionsCompression="disabled",n.normalsCompression="precompressed";const a=t.positions,l=t.normals,c=t.indices,u=t.edgeIndices,d=t.matrices,h=t.eachPrimitivePositionsAndNormalsPortion,p=t.eachPrimitiveIndicesPortion,A=t.eachPrimitiveEdgeIndicesPortion,f=t.eachPrimitiveColor,g=t.primitiveInstances,m=JSON.parse(t.eachEntityId),v=t.eachEntityPrimitiveInstancesPortion,y=t.eachEntityMatricesPortion,w=h.length,x=g.length,M=new Uint8Array(w),B=m.length;for(let R=0;R<x;R++){const T=g[R];M[T]++}const S={};for(let R=0;R<B;R++){const T=B-1,_=R===T,F=v[R],N=_?v[T]:v[R+1];for(let z=F;z<N;z++){const j=g[z];M[j]>1||(S[j]=R)}}for(let R=0;R<w;R++){const T=R===w-1,F=M[R]>1,N=M7t(f.subarray(R*4,R*4+3)),z=f[R*4+3]/255,j=a.subarray(h[R],T?a.length:h[R+1]),W=l.subarray(h[R],T?l.length:h[R+1]),J=c.subarray(p[R],T?c.length:p[R+1]),$=u.subarray(A[R],T?u.length:A[R+1]);if(F){const ue=`${s}-geometry.${R}`;n.createGeometry({id:ue,primitive:"triangles",positionsCompressed:j,normalsCompressed:W,indices:J,edgeIndices:$})}else{const ue=R,Ee=S[R];m[Ee];const Be={};n.createMesh(At.apply(Be,{id:ue,primitive:"triangles",positionsCompressed:j,normalsCompressed:W,indices:J,edgeIndices:$,color:N,opacity:z}))}}let I=0;for(let R=0;R<B;R++){const T=B-1,_=R===T,F=m[R],N=v[R],z=_?v[T]:v[R+1],j=[];for(let W=N;W<z;W++){const J=g[W];if(M[J]>1){const Ee={},Be="instance."+I++,ze="geometry"+J,Qe=y[R]*16,me=d.subarray(Qe,Qe+16);n.createMesh(At.apply(Ee,{id:Be,geometryId:ze,matrix:me})),j.push(Be)}else j.push(J)}if(j.length>0){const W={};n.createEntity(At.apply(W,{id:F,isObject:!0,meshIds:j}))}}}const rie={version:5,parse:function(i,e,t,n,o,r){const s=b7t(t),a=x7t(s);E7t(i,e,a,n,o,r)}};let W4=window.pako||Ia;W4.inflate||(W4=W4.default);function B7t(i){return{positions:i[0],normals:i[1],indices:i[2],edgeIndices:i[3],matrices:i[4],reusedPrimitivesDecodeMatrix:i[5],eachPrimitivePositionsAndNormalsPortion:i[6],eachPrimitiveIndicesPortion:i[7],eachPrimitiveEdgeIndicesPortion:i[8],eachPrimitiveColorAndOpacity:i[9],primitiveInstances:i[10],eachEntityId:i[11],eachEntityPrimitiveInstancesPortion:i[12],eachEntityMatricesPortion:i[13],eachTileAABB:i[14],eachTileEntitiesPortion:i[15]}}function I7t(i){function e(t,n){return t.length===0?[]:W4.inflate(t,n).buffer}return{positions:new Uint16Array(e(i.positions)),normals:new Int8Array(e(i.normals)),indices:new Uint32Array(e(i.indices)),edgeIndices:new Uint32Array(e(i.edgeIndices)),matrices:new Float32Array(e(i.matrices)),reusedPrimitivesDecodeMatrix:new Float32Array(e(i.reusedPrimitivesDecodeMatrix)),eachPrimitivePositionsAndNormalsPortion:new Uint32Array(e(i.eachPrimitivePositionsAndNormalsPortion)),eachPrimitiveIndicesPortion:new Uint32Array(e(i.eachPrimitiveIndicesPortion)),eachPrimitiveEdgeIndicesPortion:new Uint32Array(e(i.eachPrimitiveEdgeIndicesPortion)),eachPrimitiveColorAndOpacity:new Uint8Array(e(i.eachPrimitiveColorAndOpacity)),primitiveInstances:new Uint32Array(e(i.primitiveInstances)),eachEntityId:W4.inflate(i.eachEntityId,{to:"string"}),eachEntityPrimitiveInstancesPortion:new Uint32Array(e(i.eachEntityPrimitiveInstancesPortion)),eachEntityMatricesPortion:new Uint32Array(e(i.eachEntityMatricesPortion)),eachTileAABB:new Float64Array(e(i.eachTileAABB)),eachTileEntitiesPortion:new Uint32Array(e(i.eachTileEntitiesPortion))}}const S7t=(function(){const i=new Float32Array(3);return function(e){return i[0]=e[0]/255,i[1]=e[1]/255,i[2]=e[2]/255,i}})();function P7t(i,e,t,n,o,r){const s=r.getNextId(),a=t.positions,l=t.normals,c=t.indices,u=t.edgeIndices,d=t.matrices,h=t.reusedPrimitivesDecodeMatrix,p=t.eachPrimitivePositionsAndNormalsPortion,A=t.eachPrimitiveIndicesPortion,f=t.eachPrimitiveEdgeIndicesPortion,g=t.eachPrimitiveColorAndOpacity,m=t.primitiveInstances,v=JSON.parse(t.eachEntityId),y=t.eachEntityPrimitiveInstancesPortion,w=t.eachEntityMatricesPortion,x=t.eachTileAABB,M=t.eachTileEntitiesPortion,B=p.length,S=m.length,I=v.length,R=M.length,T=new Uint32Array(B);for(let N=0;N<S;N++){const z=m[N];T[z]!==void 0?T[z]++:T[z]=1}const _=b.vec3(),F=b.AABB3();for(let N=0;N<R;N++){const z=R-1,j=N===z,W=M[N],J=j?I:M[N+1],$=N*6,ue=x.subarray($,$+6);b.getAABB3Center(ue,_),F[0]=ue[0]-_[0],F[1]=ue[1]-_[1],F[2]=ue[2]-_[2],F[3]=ue[3]-_[0],F[4]=ue[4]-_[1],F[5]=ue[5]-_[2];const Ee=Yt.createPositionsDecodeMatrix(F),Be={};for(let ze=W;ze<J;ze++){const Qe=v[ze],me=e.globalizeObjectIds?b.globalizeObjectId(n.id,Qe):Qe,_e=w[ze],De=d.slice(_e,_e+16),ve=I-1,ge=ze===ve,Ie=y[ze],Ne=ge?m.length:y[ze+1],qe=[],Q=i.metaScene.metaObjects[me],ne={},ie={};if(Q){if(e.excludeTypesMap&&Q.type&&e.excludeTypesMap[Q.type]||e.includeTypesMap&&Q.type&&!e.includeTypesMap[Q.type]||e.includeIdsMap&&Q.id&&!e.includeIdsMap[Q.id])continue;const Me=e.objectDefaults?e.objectDefaults[Q.type]||e.objectDefaults.DEFAULT:null;Me&&(Me.visible===!1&&(ne.visible=!1),Me.pickable===!1&&(ne.pickable=!1),Me.colorize&&(ie.color=Me.colorize),Me.opacity!==void 0&&Me.opacity!==null&&(ie.opacity=Me.opacity))}else if(e.excludeUnclassifiedObjects)continue;for(let Me=Ie;Me<Ne;Me++){const Ae=m[Me],Z=T[Ae]>1,oe=Ae===B-1,fe=a.subarray(p[Ae],oe?a.length:p[Ae+1]),Se=l.subarray(p[Ae],oe?l.length:p[Ae+1]),X=c.subarray(A[Ae],oe?c.length:A[Ae+1]),H=u.subarray(f[Ae],oe?u.length:f[Ae+1]),ee=S7t(g.subarray(Ae*4,Ae*4+3)),be=g[Ae*4+3]/255,re=r.getNextId();if(Z){const he=`${s}-geometry.${N}.${Ae}`;Be[he]||(n.createGeometry({id:he,primitive:"triangles",positionsCompressed:fe,indices:X,edgeIndices:H,positionsDecodeMatrix:h}),Be[he]=!0),n.createMesh(At.apply(ie,{id:re,geometryId:he,origin:_,matrix:De,color:ee,opacity:be})),qe.push(re)}else n.createMesh(At.apply(ie,{id:re,origin:_,primitive:"triangles",positionsCompressed:fe,normalsCompressed:Se,indices:X,edgeIndices:H,positionsDecodeMatrix:Ee,color:ee,opacity:be})),qe.push(re)}qe.length>0&&n.createEntity(At.apply(ne,{id:me,isObject:!0,meshIds:qe}))}}}const aie={version:6,parse:function(i,e,t,n,o,r){const s=B7t(t),a=I7t(s);P7t(i,e,a,n,o,r)}};let Z4=window.pako||Ia;Z4.inflate||(Z4=Z4.default);function T7t(i){return{positions:i[0],normals:i[1],colors:i[2],indices:i[3],edgeIndices:i[4],matrices:i[5],reusedGeometriesDecodeMatrix:i[6],eachGeometryPrimitiveType:i[7],eachGeometryPositionsPortion:i[8],eachGeometryNormalsPortion:i[9],eachGeometryColorsPortion:i[10],eachGeometryIndicesPortion:i[11],eachGeometryEdgeIndicesPortion:i[12],eachMeshGeometriesPortion:i[13],eachMeshMatricesPortion:i[14],eachMeshMaterial:i[15],eachEntityId:i[16],eachEntityMeshesPortion:i[17],eachTileAABB:i[18],eachTileEntitiesPortion:i[19]}}function k7t(i){function e(t,n){return t.length===0?[]:Z4.inflate(t,n).buffer}return{positions:new Uint16Array(e(i.positions)),normals:new Int8Array(e(i.normals)),colors:new Uint8Array(e(i.colors)),indices:new Uint32Array(e(i.indices)),edgeIndices:new Uint32Array(e(i.edgeIndices)),matrices:new Float32Array(e(i.matrices)),reusedGeometriesDecodeMatrix:new Float32Array(e(i.reusedGeometriesDecodeMatrix)),eachGeometryPrimitiveType:new Uint8Array(e(i.eachGeometryPrimitiveType)),eachGeometryPositionsPortion:new Uint32Array(e(i.eachGeometryPositionsPortion)),eachGeometryNormalsPortion:new Uint32Array(e(i.eachGeometryNormalsPortion)),eachGeometryColorsPortion:new Uint32Array(e(i.eachGeometryColorsPortion)),eachGeometryIndicesPortion:new Uint32Array(e(i.eachGeometryIndicesPortion)),eachGeometryEdgeIndicesPortion:new Uint32Array(e(i.eachGeometryEdgeIndicesPortion)),eachMeshGeometriesPortion:new Uint32Array(e(i.eachMeshGeometriesPortion)),eachMeshMatricesPortion:new Uint32Array(e(i.eachMeshMatricesPortion)),eachMeshMaterial:new Uint8Array(e(i.eachMeshMaterial)),eachEntityId:Z4.inflate(i.eachEntityId,{to:"string"}),eachEntityMeshesPortion:new Uint32Array(e(i.eachEntityMeshesPortion)),eachTileAABB:new Float64Array(e(i.eachTileAABB)),eachTileEntitiesPortion:new Uint32Array(e(i.eachTileEntitiesPortion))}}const R7t=(function(){const i=new Float32Array(3);return function(e){return i[0]=e[0]/255,i[1]=e[1]/255,i[2]=e[2]/255,i}})();function lie(i){const e=[];for(let t=0,n=i.length;t<n;t+=3)e.push(i[t]),e.push(i[t+1]),e.push(i[t+2]),e.push(1);return e}function _7t(i,e,t,n,o,r){const s=r.getNextId(),a=t.positions,l=t.normals,c=t.colors,u=t.indices,d=t.edgeIndices,h=t.matrices,p=t.reusedGeometriesDecodeMatrix,A=t.eachGeometryPrimitiveType,f=t.eachGeometryPositionsPortion,g=t.eachGeometryNormalsPortion,m=t.eachGeometryColorsPortion,v=t.eachGeometryIndicesPortion,y=t.eachGeometryEdgeIndicesPortion,w=t.eachMeshGeometriesPortion,x=t.eachMeshMatricesPortion,M=t.eachMeshMaterial,B=JSON.parse(t.eachEntityId),S=t.eachEntityMeshesPortion,I=t.eachTileAABB,R=t.eachTileEntitiesPortion,T=f.length,_=w.length,F=B.length,N=R.length,z=new Uint32Array(T);for(let J=0;J<_;J++){const $=w[J];z[$]!==void 0?z[$]++:z[$]=1}const j=b.vec3(),W=b.AABB3();for(let J=0;J<N;J++){const $=N-1,ue=J===$,Ee=R[J],Be=ue?F:R[J+1],ze=J*6,Qe=I.subarray(ze,ze+6);b.getAABB3Center(Qe,j),W[0]=Qe[0]-j[0],W[1]=Qe[1]-j[1],W[2]=Qe[2]-j[2],W[3]=Qe[3]-j[0],W[4]=Qe[4]-j[1],W[5]=Qe[5]-j[2];const me=Yt.createPositionsDecodeMatrix(W),_e={};for(let De=Ee;De<Be;De++){const ve=B[De],ge=e.globalizeObjectIds?b.globalizeObjectId(n.id,ve):ve,Ie=F-1,Ne=De===Ie,qe=S[De],Q=Ne?w.length:S[De+1],ne=[],ie=i.metaScene.metaObjects[ge],Me={},Ae={};if(ie){if(e.excludeTypesMap&&ie.type&&e.excludeTypesMap[ie.type]||e.includeTypesMap&&ie.type&&!e.includeTypesMap[ie.type]||e.includeIdsMap&&ie.id&&!e.includeIdsMap[ie.id])continue;const q=e.objectDefaults?e.objectDefaults[ie.type]||e.objectDefaults.DEFAULT:null;q&&(q.visible===!1&&(Me.visible=!1),q.pickable===!1&&(Me.pickable=!1),q.colorize&&(Ae.color=q.colorize),q.opacity!==void 0&&q.opacity!==null&&(Ae.opacity=q.opacity),q.metallic!==void 0&&q.metallic!==null&&(Ae.metallic=q.metallic),q.roughness!==void 0&&q.roughness!==null&&(Ae.roughness=q.roughness))}else if(e.excludeUnclassifiedObjects)continue;for(let q=qe;q<Q;q++){const Z=w[q],fe=z[Z]>1,Se=Z===T-1,X=R7t(M.subarray(q*6,q*6+3)),H=M[q*6+3]/255,ee=M[q*6+4]/255,be=M[q*6+5]/255,re=r.getNextId();if(fe){const he=x[q],je=h.slice(he,he+16),de=`${s}-geometry.${J}.${Z}`;if(!_e[de]){const Fe=A[Z];let ut,Ce,Xe,ht,lt,dt;switch(Fe){case 0:ut="solid",Ce=a.subarray(f[Z],Se?a.length:f[Z+1]),Xe=l.subarray(g[Z],Se?l.length:g[Z+1]),lt=u.subarray(v[Z],Se?u.length:v[Z+1]),dt=d.subarray(y[Z],Se?d.length:y[Z+1]);break;case 1:ut="surface",Ce=a.subarray(f[Z],Se?a.length:f[Z+1]),Xe=l.subarray(g[Z],Se?l.length:g[Z+1]),lt=u.subarray(v[Z],Se?u.length:v[Z+1]),dt=d.subarray(y[Z],Se?d.length:y[Z+1]);break;case 2:ut="points",Ce=a.subarray(f[Z],Se?a.length:f[Z+1]),ht=lie(c.subarray(m[Z],Se?c.length:m[Z+1]));break;case 3:ut="lines",Ce=a.subarray(f[Z],Se?a.length:f[Z+1]),lt=u.subarray(v[Z],Se?u.length:v[Z+1]);break;default:continue}n.createGeometry({id:de,primitive:ut,positionsCompressed:Ce,normalsCompressed:Xe,colors:ht,indices:lt,edgeIndices:dt,positionsDecodeMatrix:p}),_e[de]=!0}n.createMesh(At.apply(Ae,{id:re,geometryId:de,origin:j,matrix:je,color:X,metallic:ee,roughness:be,opacity:H})),ne.push(re)}else{const he=A[Z];let je,de,Fe,ut,Ce,Xe;switch(he){case 0:je="solid",de=a.subarray(f[Z],Se?a.length:f[Z+1]),Fe=l.subarray(g[Z],Se?l.length:g[Z+1]),Ce=u.subarray(v[Z],Se?u.length:v[Z+1]),Xe=d.subarray(y[Z],Se?d.length:y[Z+1]);break;case 1:je="surface",de=a.subarray(f[Z],Se?a.length:f[Z+1]),Fe=l.subarray(g[Z],Se?l.length:g[Z+1]),Ce=u.subarray(v[Z],Se?u.length:v[Z+1]),Xe=d.subarray(y[Z],Se?d.length:y[Z+1]);break;case 2:je="points",de=a.subarray(f[Z],Se?a.length:f[Z+1]),ut=lie(c.subarray(m[Z],Se?c.length:m[Z+1]));break;case 3:je="lines",de=a.subarray(f[Z],Se?a.length:f[Z+1]),Ce=u.subarray(v[Z],Se?u.length:v[Z+1]);break;default:continue}n.createMesh(At.apply(Ae,{id:re,origin:j,primitive:je,positionsCompressed:de,normalsCompressed:Fe,colors:ut,indices:Ce,edgeIndices:Xe,positionsDecodeMatrix:me,color:X,metallic:ee,roughness:be,opacity:H})),ne.push(re)}}ne.length>0&&n.createEntity(At.apply(Me,{id:ge,isObject:!0,meshIds:ne}))}}}const cie={version:7,parse:function(i,e,t,n,o,r){const s=T7t(t),a=k7t(s);_7t(i,e,a,n,o,r)}};let Sh=window.pako||Ia;Sh.inflate||(Sh=Sh.default);const bc=b.vec4(),uie=b.vec4();function D7t(i){return{types:i[0],eachMetaObjectId:i[1],eachMetaObjectType:i[2],eachMetaObjectName:i[3],eachMetaObjectParent:i[4],positions:i[5],normals:i[6],colors:i[7],indices:i[8],edgeIndices:i[9],matrices:i[10],reusedGeometriesDecodeMatrix:i[11],eachGeometryPrimitiveType:i[12],eachGeometryPositionsPortion:i[13],eachGeometryNormalsPortion:i[14],eachGeometryColorsPortion:i[15],eachGeometryIndicesPortion:i[16],eachGeometryEdgeIndicesPortion:i[17],eachMeshGeometriesPortion:i[18],eachMeshMatricesPortion:i[19],eachMeshMaterial:i[20],eachEntityMetaObject:i[21],eachEntityMeshesPortion:i[22],eachTileAABB:i[23],eachTileEntitiesPortion:i[24]}}function L7t(i){function e(t,n){return t.length===0?[]:Sh.inflate(t,n).buffer}return{types:Sh.inflate(i.types,{to:"string"}),eachMetaObjectId:Sh.inflate(i.eachMetaObjectId,{to:"string"}),eachMetaObjectType:new Uint32Array(e(i.eachMetaObjectType)),eachMetaObjectName:Sh.inflate(i.eachMetaObjectName,{to:"string"}),eachMetaObjectParent:new Uint32Array(e(i.eachMetaObjectParent)),positions:new Uint16Array(e(i.positions)),normals:new Int8Array(e(i.normals)),colors:new Uint8Array(e(i.colors)),indices:new Uint32Array(e(i.indices)),edgeIndices:new Uint32Array(e(i.edgeIndices)),matrices:new Float32Array(e(i.matrices)),reusedGeometriesDecodeMatrix:new Float32Array(e(i.reusedGeometriesDecodeMatrix)),eachGeometryPrimitiveType:new Uint8Array(e(i.eachGeometryPrimitiveType)),eachGeometryPositionsPortion:new Uint32Array(e(i.eachGeometryPositionsPortion)),eachGeometryNormalsPortion:new Uint32Array(e(i.eachGeometryNormalsPortion)),eachGeometryColorsPortion:new Uint32Array(e(i.eachGeometryColorsPortion)),eachGeometryIndicesPortion:new Uint32Array(e(i.eachGeometryIndicesPortion)),eachGeometryEdgeIndicesPortion:new Uint32Array(e(i.eachGeometryEdgeIndicesPortion)),eachMeshGeometriesPortion:new Uint32Array(e(i.eachMeshGeometriesPortion)),eachMeshMatricesPortion:new Uint32Array(e(i.eachMeshMatricesPortion)),eachMeshMaterial:new Uint8Array(e(i.eachMeshMaterial)),eachEntityMetaObject:new Uint32Array(e(i.eachEntityMetaObject)),eachEntityMeshesPortion:new Uint32Array(e(i.eachEntityMeshesPortion)),eachTileAABB:new Float64Array(e(i.eachTileAABB)),eachTileEntitiesPortion:new Uint32Array(e(i.eachTileEntitiesPortion))}}const F7t=(function(){const i=new Float32Array(3);return function(e){return i[0]=e[0]/255,i[1]=e[1]/255,i[2]=e[2]/255,i}})();function die(i){const e=[];for(let t=0,n=i.length;t<n;t+=3)e.push(i[t]),e.push(i[t+1]),e.push(i[t+2]),e.push(1);return e}function O7t(i,e,t,n,o,r){const s=r.getNextId(),a=JSON.parse(t.types),l=JSON.parse(t.eachMetaObjectId),c=t.eachMetaObjectType,u=JSON.parse(t.eachMetaObjectName),d=t.eachMetaObjectParent,h=t.positions,p=t.normals,A=t.colors,f=t.indices,g=t.edgeIndices,m=t.matrices,v=t.reusedGeometriesDecodeMatrix,y=t.eachGeometryPrimitiveType,w=t.eachGeometryPositionsPortion,x=t.eachGeometryNormalsPortion,M=t.eachGeometryColorsPortion,B=t.eachGeometryIndicesPortion,S=t.eachGeometryEdgeIndicesPortion,I=t.eachMeshGeometriesPortion,R=t.eachMeshMatricesPortion,T=t.eachMeshMaterial,_=t.eachEntityMetaObject,F=t.eachEntityMeshesPortion,N=t.eachTileAABB,z=t.eachTileEntitiesPortion,j=l.length,W=w.length,J=I.length,$=_.length,ue=z.length;if(o){const me={metaObjects:[]};for(let _e=0;_e<j;_e++){const De=l[_e],ve=c[_e],ge=a[ve]||"default",Ie=u[_e],Ne=d[_e],qe=Ne!==_e?l[Ne]:null;me.metaObjects.push({id:De,type:ge,name:Ie,parent:qe})}o.loadData(me,{includeTypes:e.includeTypes,excludeTypes:e.excludeTypes,globalizeObjectIds:e.globalizeObjectIds})}const Ee=new Uint32Array(W);for(let me=0;me<J;me++){const _e=I[me];Ee[_e]!==void 0?Ee[_e]++:Ee[_e]=1}const Be=b.vec3(),ze=b.AABB3(),Qe={};for(let me=0;me<ue;me++){const _e=ue-1,De=me===_e,ve=z[me],ge=De?$:z[me+1],Ie=me*6,Ne=N.subarray(Ie,Ie+6);b.getAABB3Center(Ne,Be),ze[0]=Ne[0]-Be[0],ze[1]=Ne[1]-Be[1],ze[2]=Ne[2]-Be[2],ze[3]=Ne[3]-Be[0],ze[4]=Ne[4]-Be[1],ze[5]=Ne[5]-Be[2];const qe=Yt.createPositionsDecodeMatrix(ze),Q={};for(let ne=ve;ne<ge;ne++){const ie=_[ne],Ae=l[ie],q=e.globalizeObjectIds?b.globalizeObjectId(n.id,Ae):Ae,Z=$-1,oe=ne===Z,fe=F[ne],Se=oe?I.length:F[ne+1],X=[],H=i.metaScene.metaObjects[q],ee={},be={};if(H){if(e.excludeTypesMap&&H.type&&e.excludeTypesMap[H.type]||e.includeTypesMap&&H.type&&!e.includeTypesMap[H.type]||e.includeIdsMap&&H.id&&!e.includeIdsMap[H.id])continue;const re=e.objectDefaults?e.objectDefaults[H.type]||e.objectDefaults.DEFAULT:null;re&&(re.visible===!1&&(ee.visible=!1),re.pickable===!1&&(ee.pickable=!1),re.colorize&&(be.color=re.colorize),re.opacity!==void 0&&re.opacity!==null&&(be.opacity=re.opacity),re.metallic!==void 0&&re.metallic!==null&&(be.metallic=re.metallic),re.roughness!==void 0&&re.roughness!==null&&(be.roughness=re.roughness))}else if(e.excludeUnclassifiedObjects)continue;for(let re=fe;re<Se;re++){const he=I[re],de=Ee[he]>1,Fe=he===W-1,ut=F7t(T.subarray(re*6,re*6+3)),Ce=T[re*6+3]/255,Xe=T[re*6+4]/255,ht=T[re*6+5]/255,lt=r.getNextId();if(de){const dt=R[re],bt=m.slice(dt,dt+16),ke=`${s}-geometry.${me}.${he}`;let Je=Qe[ke];if(!Je){Je={batchThisMesh:!e.reuseGeometries};const ft=y[he];let it=!1;switch(ft){case 0:Je.primitiveName="solid",Je.geometryPositions=h.subarray(w[he],Fe?h.length:w[he+1]),Je.geometryNormals=p.subarray(x[he],Fe?p.length:x[he+1]),Je.geometryIndices=f.subarray(B[he],Fe?f.length:B[he+1]),Je.geometryEdgeIndices=g.subarray(S[he],Fe?g.length:S[he+1]),it=Je.geometryPositions.length>0&&Je.geometryIndices.length>0;break;case 1:Je.primitiveName="surface",Je.geometryPositions=h.subarray(w[he],Fe?h.length:w[he+1]),Je.geometryNormals=p.subarray(x[he],Fe?p.length:x[he+1]),Je.geometryIndices=f.subarray(B[he],Fe?f.length:B[he+1]),Je.geometryEdgeIndices=g.subarray(S[he],Fe?g.length:S[he+1]),it=Je.geometryPositions.length>0&&Je.geometryIndices.length>0;break;case 2:Je.primitiveName="points",Je.geometryPositions=h.subarray(w[he],Fe?h.length:w[he+1]),Je.geometryColors=die(A.subarray(M[he],Fe?A.length:M[he+1])),it=Je.geometryPositions.length>0;break;case 3:Je.primitiveName="lines",Je.geometryPositions=h.subarray(w[he],Fe?h.length:w[he+1]),Je.geometryIndices=f.subarray(B[he],Fe?f.length:B[he+1]),it=Je.geometryPositions.length>0&&Je.geometryIndices.length>0;break;default:continue}if(it||(Je=null),Je&&(Je.geometryPositions.length>1e3,Je.batchThisMesh)){Je.decompressedPositions=new Float32Array(Je.geometryPositions.length);const Ge=Je.geometryPositions,pe=Je.decompressedPositions;for(let Te=0,mt=Ge.length;Te<mt;Te+=3)pe[Te+0]=Ge[Te+0]*v[0]+v[12],pe[Te+1]=Ge[Te+1]*v[5]+v[13],pe[Te+2]=Ge[Te+2]*v[10]+v[14];Je.geometryPositions=null,Qe[ke]=Je}}if(Je)if(Je.batchThisMesh){const ft=Je.decompressedPositions,it=new Uint16Array(ft.length);for(let Ge=0,pe=ft.length;Ge<pe;Ge+=3)bc[0]=ft[Ge+0],bc[1]=ft[Ge+1],bc[2]=ft[Ge+2],bc[3]=1,b.transformVec4(bt,bc,uie),Yt.compressPosition(uie,ze,bc),it[Ge+0]=bc[0],it[Ge+1]=bc[1],it[Ge+2]=bc[2];n.createMesh(At.apply(be,{id:lt,origin:Be,primitive:Je.primitiveName,positionsCompressed:it,normalsCompressed:Je.geometryNormals,colorsCompressed:Je.geometryColors,indices:Je.geometryIndices,edgeIndices:Je.geometryEdgeIndices,positionsDecodeMatrix:qe,color:ut,metallic:Xe,roughness:ht,opacity:Ce})),X.push(lt)}else Q[ke]||(n.createGeometry({id:ke,primitive:Je.primitiveName,positionsCompressed:Je.geometryPositions,normalsCompressed:Je.geometryNormals,colorsCompressed:Je.geometryColors,indices:Je.geometryIndices,edgeIndices:Je.geometryEdgeIndices,positionsDecodeMatrix:v}),Q[ke]=!0),n.createMesh(At.apply(be,{id:lt,geometryId:ke,origin:Be,matrix:bt,color:ut,metallic:Xe,roughness:ht,opacity:Ce})),X.push(lt)}else{const dt=y[he];let bt,ke,Je,ft,it,Ge,pe=!1;switch(dt){case 0:bt="solid",ke=h.subarray(w[he],Fe?h.length:w[he+1]),Je=p.subarray(x[he],Fe?p.length:x[he+1]),it=f.subarray(B[he],Fe?f.length:B[he+1]),Ge=g.subarray(S[he],Fe?g.length:S[he+1]),pe=ke.length>0&&it.length>0;break;case 1:bt="surface",ke=h.subarray(w[he],Fe?h.length:w[he+1]),Je=p.subarray(x[he],Fe?p.length:x[he+1]),it=f.subarray(B[he],Fe?f.length:B[he+1]),Ge=g.subarray(S[he],Fe?g.length:S[he+1]),pe=ke.length>0&&it.length>0;break;case 2:bt="points",ke=h.subarray(w[he],Fe?h.length:w[he+1]),ft=die(A.subarray(M[he],Fe?A.length:M[he+1])),pe=ke.length>0;break;case 3:bt="lines",ke=h.subarray(w[he],Fe?h.length:w[he+1]),it=f.subarray(B[he],Fe?f.length:B[he+1]),pe=ke.length>0&&it.length>0;break;default:continue}pe&&(n.createMesh(At.apply(be,{id:lt,origin:Be,primitive:bt,positionsCompressed:ke,normalsCompressed:Je,colorsCompressed:ft,indices:it,edgeIndices:Ge,positionsDecodeMatrix:qe,color:ut,metallic:Xe,roughness:ht,opacity:Ce})),X.push(lt))}}X.length>0&&n.createEntity(At.apply(ee,{id:q,isObject:!0,meshIds:X}))}}}const hie={version:8,parse:function(i,e,t,n,o,r){const s=D7t(t),a=L7t(s);O7t(i,e,a,n,o,r)}};let t1=window.pako||Ia;t1.inflate||(t1=t1.default);const xc=b.vec4(),pie=b.vec4();function N7t(i){return{metadata:i[0],positions:i[1],normals:i[2],colors:i[3],indices:i[4],edgeIndices:i[5],matrices:i[6],reusedGeometriesDecodeMatrix:i[7],eachGeometryPrimitiveType:i[8],eachGeometryPositionsPortion:i[9],eachGeometryNormalsPortion:i[10],eachGeometryColorsPortion:i[11],eachGeometryIndicesPortion:i[12],eachGeometryEdgeIndicesPortion:i[13],eachMeshGeometriesPortion:i[14],eachMeshMatricesPortion:i[15],eachMeshMaterial:i[16],eachEntityId:i[17],eachEntityMeshesPortion:i[18],eachTileAABB:i[19],eachTileEntitiesPortion:i[20]}}function U7t(i){function e(t,n){return t.length===0?[]:t1.inflate(t,n).buffer}return{metadata:JSON.parse(t1.inflate(i.metadata,{to:"string"})),positions:new Uint16Array(e(i.positions)),normals:new Int8Array(e(i.normals)),colors:new Uint8Array(e(i.colors)),indices:new Uint32Array(e(i.indices)),edgeIndices:new Uint32Array(e(i.edgeIndices)),matrices:new Float32Array(e(i.matrices)),reusedGeometriesDecodeMatrix:new Float32Array(e(i.reusedGeometriesDecodeMatrix)),eachGeometryPrimitiveType:new Uint8Array(e(i.eachGeometryPrimitiveType)),eachGeometryPositionsPortion:new Uint32Array(e(i.eachGeometryPositionsPortion)),eachGeometryNormalsPortion:new Uint32Array(e(i.eachGeometryNormalsPortion)),eachGeometryColorsPortion:new Uint32Array(e(i.eachGeometryColorsPortion)),eachGeometryIndicesPortion:new Uint32Array(e(i.eachGeometryIndicesPortion)),eachGeometryEdgeIndicesPortion:new Uint32Array(e(i.eachGeometryEdgeIndicesPortion)),eachMeshGeometriesPortion:new Uint32Array(e(i.eachMeshGeometriesPortion)),eachMeshMatricesPortion:new Uint32Array(e(i.eachMeshMatricesPortion)),eachMeshMaterial:new Uint8Array(e(i.eachMeshMaterial)),eachEntityId:JSON.parse(t1.inflate(i.eachEntityId,{to:"string"})),eachEntityMeshesPortion:new Uint32Array(e(i.eachEntityMeshesPortion)),eachTileAABB:new Float64Array(e(i.eachTileAABB)),eachTileEntitiesPortion:new Uint32Array(e(i.eachTileEntitiesPortion))}}const V7t=(function(){const i=new Float32Array(3);return function(e){return i[0]=e[0]/255,i[1]=e[1]/255,i[2]=e[2]/255,i}})();function H7t(i,e,t,n,o,r){const s=r.getNextId(),a=t.metadata,l=t.positions,c=t.normals,u=t.colors,d=t.indices,h=t.edgeIndices,p=t.matrices,A=t.reusedGeometriesDecodeMatrix,f=t.eachGeometryPrimitiveType,g=t.eachGeometryPositionsPortion,m=t.eachGeometryNormalsPortion,v=t.eachGeometryColorsPortion,y=t.eachGeometryIndicesPortion,w=t.eachGeometryEdgeIndicesPortion,x=t.eachMeshGeometriesPortion,M=t.eachMeshMatricesPortion,B=t.eachMeshMaterial,S=t.eachEntityId,I=t.eachEntityMeshesPortion,R=t.eachTileAABB,T=t.eachTileEntitiesPortion,_=g.length,F=x.length,N=I.length,z=T.length;o&&o.loadData(a,{includeTypes:e.includeTypes,excludeTypes:e.excludeTypes,globalizeObjectIds:e.globalizeObjectIds});const j=new Uint32Array(_);for(let ue=0;ue<F;ue++){const Ee=x[ue];j[Ee]!==void 0?j[Ee]++:j[Ee]=1}const W=b.vec3(),J=b.AABB3(),$={};for(let ue=0;ue<z;ue++){const Ee=z-1,Be=ue===Ee,ze=T[ue],Qe=Be?N-1:T[ue+1]-1,me=ue*6,_e=R.subarray(me,me+6);b.getAABB3Center(_e,W),J[0]=_e[0]-W[0],J[1]=_e[1]-W[1],J[2]=_e[2]-W[2],J[3]=_e[3]-W[0],J[4]=_e[4]-W[1],J[5]=_e[5]-W[2];const De=Yt.createPositionsDecodeMatrix(J),ve={};for(let ge=ze;ge<=Qe;ge++){const Ie=S[ge],Ne=e.globalizeObjectIds?b.globalizeObjectId(n.id,Ie):Ie,qe=N-1,Q=ge===qe,ne=I[ge],ie=Q?x.length-1:I[ge+1]-1,Me=[],Ae=i.metaScene.metaObjects[Ne],q={},Z={};if(!(e.includeIdsMap&&Ie&&!e.includeIdsMap[Ie])){if(Ae){if(e.excludeTypesMap&&Ae.type&&e.excludeTypesMap[Ae.type]||e.includeTypesMap&&Ae.type&&!e.includeTypesMap[Ae.type]||e.includeIdsMap&&Ae.id&&!e.includeIdsMap[Ae.id])continue;const oe=e.objectDefaults?e.objectDefaults[Ae.type]||e.objectDefaults.DEFAULT:null;oe&&(oe.visible===!1&&(q.visible=!1),oe.pickable===!1&&(q.pickable=!1),oe.colorize&&(Z.color=oe.colorize),oe.opacity!==void 0&&oe.opacity!==null&&(Z.opacity=oe.opacity),oe.metallic!==void 0&&oe.metallic!==null&&(Z.metallic=oe.metallic),oe.roughness!==void 0&&oe.roughness!==null&&(Z.roughness=oe.roughness))}else if(e.excludeUnclassifiedObjects)continue;for(let oe=ne;oe<=ie;oe++){const fe=x[oe],X=j[fe]>1,H=fe===_-1,ee=V7t(B.subarray(oe*6,oe*6+3)),be=B[oe*6+3]/255,re=B[oe*6+4]/255,he=B[oe*6+5]/255,je=r.getNextId();if(X){const de=M[oe],Fe=p.slice(de,de+16),ut=`${s}-geometry.${ue}.${fe}`;let Ce=$[ut];if(!Ce){Ce={batchThisMesh:!e.reuseGeometries};const Xe=f[fe];let ht=!1;switch(Xe){case 0:Ce.primitiveName="solid",Ce.geometryPositions=l.subarray(g[fe],H?l.length:g[fe+1]),Ce.geometryNormals=c.subarray(m[fe],H?c.length:m[fe+1]),Ce.geometryIndices=d.subarray(y[fe],H?d.length:y[fe+1]),Ce.geometryEdgeIndices=h.subarray(w[fe],H?h.length:w[fe+1]),ht=Ce.geometryPositions.length>0&&Ce.geometryIndices.length>0;break;case 1:Ce.primitiveName="surface",Ce.geometryPositions=l.subarray(g[fe],H?l.length:g[fe+1]),Ce.geometryNormals=c.subarray(m[fe],H?c.length:m[fe+1]),Ce.geometryIndices=d.subarray(y[fe],H?d.length:y[fe+1]),Ce.geometryEdgeIndices=h.subarray(w[fe],H?h.length:w[fe+1]),ht=Ce.geometryPositions.length>0&&Ce.geometryIndices.length>0;break;case 2:Ce.primitiveName="points",Ce.geometryPositions=l.subarray(g[fe],H?l.length:g[fe+1]),Ce.geometryColors=u.subarray(v[fe],H?u.length:v[fe+1]),ht=Ce.geometryPositions.length>0;break;case 3:Ce.primitiveName="lines",Ce.geometryPositions=l.subarray(g[fe],H?l.length:g[fe+1]),Ce.geometryIndices=d.subarray(y[fe],H?d.length:y[fe+1]),ht=Ce.geometryPositions.length>0&&Ce.geometryIndices.length>0;break;default:continue}if(ht||(Ce=null),Ce&&(Ce.geometryPositions.length>1e3,Ce.batchThisMesh)){Ce.decompressedPositions=new Float32Array(Ce.geometryPositions.length),Ce.transformedAndRecompressedPositions=new Uint16Array(Ce.geometryPositions.length);const lt=Ce.geometryPositions,dt=Ce.decompressedPositions;for(let bt=0,ke=lt.length;bt<ke;bt+=3)dt[bt+0]=lt[bt+0]*A[0]+A[12],dt[bt+1]=lt[bt+1]*A[5]+A[13],dt[bt+2]=lt[bt+2]*A[10]+A[14];Ce.geometryPositions=null,$[ut]=Ce}}if(Ce)if(Ce.batchThisMesh){const Xe=Ce.decompressedPositions,ht=Ce.transformedAndRecompressedPositions;for(let lt=0,dt=Xe.length;lt<dt;lt+=3)xc[0]=Xe[lt+0],xc[1]=Xe[lt+1],xc[2]=Xe[lt+2],xc[3]=1,b.transformVec4(Fe,xc,pie),Yt.compressPosition(pie,J,xc),ht[lt+0]=xc[0],ht[lt+1]=xc[1],ht[lt+2]=xc[2];n.createMesh(At.apply(Z,{id:je,origin:W,primitive:Ce.primitiveName,positionsCompressed:ht,normalsCompressed:Ce.geometryNormals,colorsCompressed:Ce.geometryColors,indices:Ce.geometryIndices,edgeIndices:Ce.geometryEdgeIndices,positionsDecodeMatrix:De,color:ee,metallic:re,roughness:he,opacity:be})),Me.push(je)}else ve[ut]||(n.createGeometry({id:ut,primitive:Ce.primitiveName,positionsCompressed:Ce.geometryPositions,normalsCompressed:Ce.geometryNormals,colorsCompressed:Ce.geometryColors,indices:Ce.geometryIndices,edgeIndices:Ce.geometryEdgeIndices,positionsDecodeMatrix:A}),ve[ut]=!0),n.createMesh(At.apply(Z,{id:je,geometryId:ut,origin:W,matrix:Fe,color:ee,metallic:re,roughness:he,opacity:be})),Me.push(je)}else{const de=f[fe];let Fe,ut,Ce,Xe,ht,lt,dt=!1;switch(de){case 0:Fe="solid",ut=l.subarray(g[fe],H?l.length:g[fe+1]),Ce=c.subarray(m[fe],H?c.length:m[fe+1]),ht=d.subarray(y[fe],H?d.length:y[fe+1]),lt=h.subarray(w[fe],H?h.length:w[fe+1]),dt=ut.length>0&&ht.length>0;break;case 1:Fe="surface",ut=l.subarray(g[fe],H?l.length:g[fe+1]),Ce=c.subarray(m[fe],H?c.length:m[fe+1]),ht=d.subarray(y[fe],H?d.length:y[fe+1]),lt=h.subarray(w[fe],H?h.length:w[fe+1]),dt=ut.length>0&&ht.length>0;break;case 2:Fe="points",ut=l.subarray(g[fe],H?l.length:g[fe+1]),Xe=u.subarray(v[fe],H?u.length:v[fe+1]),dt=ut.length>0;break;case 3:Fe="lines",ut=l.subarray(g[fe],H?l.length:g[fe+1]),ht=d.subarray(y[fe],H?d.length:y[fe+1]),dt=ut.length>0&&ht.length>0;break;default:continue}dt&&(n.createMesh(At.apply(Z,{id:je,origin:W,primitive:Fe,positionsCompressed:ut,normalsCompressed:Ce,colorsCompressed:Xe,indices:ht,edgeIndices:lt,positionsDecodeMatrix:De,color:ee,metallic:re,roughness:he,opacity:be})),Me.push(je))}}Me.length>0&&n.createEntity(At.apply(q,{id:Ne,isObject:!0,meshIds:Me}))}}}}const fie={version:9,parse:function(i,e,t,n,o,r){const s=N7t(t),a=U7t(s);H7t(i,e,a,n,o,r)}};let i1=window.pako||Ia;i1.inflate||(i1=i1.default);const Mc=b.vec4(),Aie=b.vec4(),z7t=9;function j7t(i){let e=0;return{metadata:i[e++],textureData:i[e++],eachTextureDataPortion:i[e++],eachTextureAttributes:i[e++],positions:i[e++],normals:i[e++],colors:i[e++],uvs:i[e++],indices:i[e++],edgeIndices:i[e++],eachTextureSetTextures:i[e++],matrices:i[e++],reusedGeometriesDecodeMatrix:i[e++],eachGeometryPrimitiveType:i[e++],eachGeometryPositionsPortion:i[e++],eachGeometryNormalsPortion:i[e++],eachGeometryColorsPortion:i[e++],eachGeometryUVsPortion:i[e++],eachGeometryIndicesPortion:i[e++],eachGeometryEdgeIndicesPortion:i[e++],eachMeshGeometriesPortion:i[e++],eachMeshMatricesPortion:i[e++],eachMeshTextureSet:i[e++],eachMeshMaterialAttributes:i[e++],eachEntityId:i[e++],eachEntityMeshesPortion:i[e++],eachTileAABB:i[e++],eachTileEntitiesPortion:i[e++]}}function G7t(i){function e(t,n){return t.length===0?[]:i1.inflate(t,n).buffer}return{metadata:JSON.parse(i1.inflate(i.metadata,{to:"string"})),textureData:new Uint8Array(e(i.textureData)),eachTextureDataPortion:new Uint32Array(e(i.eachTextureDataPortion)),eachTextureAttributes:new Uint16Array(e(i.eachTextureAttributes)),positions:new Uint16Array(e(i.positions)),normals:new Int8Array(e(i.normals)),colors:new Uint8Array(e(i.colors)),uvs:new Float32Array(e(i.uvs)),indices:new Uint32Array(e(i.indices)),edgeIndices:new Uint32Array(e(i.edgeIndices)),eachTextureSetTextures:new Int32Array(e(i.eachTextureSetTextures)),matrices:new Float32Array(e(i.matrices)),reusedGeometriesDecodeMatrix:new Float32Array(e(i.reusedGeometriesDecodeMatrix)),eachGeometryPrimitiveType:new Uint8Array(e(i.eachGeometryPrimitiveType)),eachGeometryPositionsPortion:new Uint32Array(e(i.eachGeometryPositionsPortion)),eachGeometryNormalsPortion:new Uint32Array(e(i.eachGeometryNormalsPortion)),eachGeometryColorsPortion:new Uint32Array(e(i.eachGeometryColorsPortion)),eachGeometryUVsPortion:new Uint32Array(e(i.eachGeometryUVsPortion)),eachGeometryIndicesPortion:new Uint32Array(e(i.eachGeometryIndicesPortion)),eachGeometryEdgeIndicesPortion:new Uint32Array(e(i.eachGeometryEdgeIndicesPortion)),eachMeshGeometriesPortion:new Uint32Array(e(i.eachMeshGeometriesPortion)),eachMeshMatricesPortion:new Uint32Array(e(i.eachMeshMatricesPortion)),eachMeshTextureSet:new Int32Array(e(i.eachMeshTextureSet)),eachMeshMaterialAttributes:new Uint8Array(e(i.eachMeshMaterialAttributes)),eachEntityId:JSON.parse(i1.inflate(i.eachEntityId,{to:"string"})),eachEntityMeshesPortion:new Uint32Array(e(i.eachEntityMeshesPortion)),eachTileAABB:new Float64Array(e(i.eachTileAABB)),eachTileEntitiesPortion:new Uint32Array(e(i.eachTileEntitiesPortion))}}const Q7t=(function(){const i=new Float32Array(3);return function(e){return i[0]=e[0]/255,i[1]=e[1]/255,i[2]=e[2]/255,i}})();(function(){const i=document.createElement("canvas"),e=i.getContext("2d");return function(t){return i.width=t.width,i.height=t.height,e.putImageData(t,0,0),i.toDataURL()}})();function q7t(i,e,t,n,o,r){const s=r.getNextId(),a=t.metadata,l=t.textureData,c=t.eachTextureDataPortion,u=t.eachTextureAttributes,d=t.positions,h=t.normals,p=t.colors,A=t.uvs,f=t.indices,g=t.edgeIndices,m=t.eachTextureSetTextures,v=t.matrices,y=t.reusedGeometriesDecodeMatrix,w=t.eachGeometryPrimitiveType,x=t.eachGeometryPositionsPortion,M=t.eachGeometryNormalsPortion,B=t.eachGeometryColorsPortion,S=t.eachGeometryUVsPortion,I=t.eachGeometryIndicesPortion,R=t.eachGeometryEdgeIndicesPortion,T=t.eachMeshGeometriesPortion,_=t.eachMeshMatricesPortion,F=t.eachMeshTextureSet,N=t.eachMeshMaterialAttributes,z=t.eachEntityId,j=t.eachEntityMeshesPortion,W=t.eachTileAABB,J=t.eachTileEntitiesPortion,$=c.length,ue=m.length/5,Ee=x.length,Be=T.length,ze=j.length,Qe=J.length;o&&o.loadData(a,{includeTypes:e.includeTypes,excludeTypes:e.excludeTypes,globalizeObjectIds:e.globalizeObjectIds});for(let ge=0;ge<$;ge++){const Ie=ge===$-1,Ne=c[ge],qe=Ie?l.length:c[ge+1],ne=qe-Ne>0,ie=ge*z7t,Me=u[ie+0]===1,Ae=u[ie+1];u[ie+2],u[ie+3];const q=u[ie+4],Z=u[ie+5],oe=u[ie+6],fe=u[ie+7],Se=u[ie+8];if(ne){const H=new Uint8Array(l.subarray(Ne,qe)).buffer,ee=`${s}-texture-${ge}`;if(Me)n.createTexture({id:ee,buffers:[H],minFilter:q,magFilter:Z,wrapS:oe,wrapT:fe,wrapR:Se});else{const be=Ae===qw?"image/jpeg":Ae===Kw?"image/png":"image/gif",re=new Blob([H],{type:be}),je=(window.URL||window.webkitURL).createObjectURL(re),de=document.createElement("img");de.src=je,n.createTexture({id:ee,image:de,minFilter:q,magFilter:Z,wrapS:oe,wrapT:fe,wrapR:Se})}}}for(let ge=0;ge<ue;ge++){const Ie=ge*5,Ne=`${s}-textureSet-${ge}`,qe=m[Ie+0],Q=m[Ie+1],ne=m[Ie+2],ie=m[Ie+3],Me=m[Ie+4];n.createTextureSet({id:Ne,colorTextureId:qe>=0?`${s}-texture-${qe}`:null,normalsTextureId:ne>=0?`${s}-texture-${ne}`:null,metallicRoughnessTextureId:Q>=0?`${s}-texture-${Q}`:null,emissiveTextureId:ie>=0?`${s}-texture-${ie}`:null,occlusionTextureId:Me>=0?`${s}-texture-${Me}`:null})}const me=new Uint32Array(Ee);for(let ge=0;ge<Be;ge++){const Ie=T[ge];me[Ie]!==void 0?me[Ie]++:me[Ie]=1}const _e=b.vec3(),De=b.AABB3(),ve={};for(let ge=0;ge<Qe;ge++){const Ie=Qe-1,Ne=ge===Ie,qe=J[ge],Q=Ne?ze-1:J[ge+1]-1,ne=ge*6,ie=W.subarray(ne,ne+6);b.getAABB3Center(ie,_e),De[0]=ie[0]-_e[0],De[1]=ie[1]-_e[1],De[2]=ie[2]-_e[2],De[3]=ie[3]-_e[0],De[4]=ie[4]-_e[1],De[5]=ie[5]-_e[2];const Me=Yt.createPositionsDecodeMatrix(De),Ae={};for(let q=qe;q<=Q;q++){const Z=z[q],oe=e.globalizeObjectIds?b.globalizeObjectId(n.id,Z):Z,fe=ze-1,Se=q===fe,X=j[q],H=Se?T.length-1:j[q+1]-1,ee=[],be=i.metaScene.metaObjects[oe],re={},he={};if(!(e.includeIdsMap&&Z&&!e.includeIdsMap[Z])){if(be){if(e.excludeTypesMap&&be.type&&e.excludeTypesMap[be.type]||e.includeTypesMap&&be.type&&!e.includeTypesMap[be.type]||e.includeIdsMap&&be.id&&!e.includeIdsMap[be.id])continue;const je=e.objectDefaults?e.objectDefaults[be.type]||e.objectDefaults.DEFAULT:null;je&&(je.visible===!1&&(re.visible=!1),je.pickable===!1&&(re.pickable=!1),je.colorize&&(he.color=je.colorize),je.opacity!==void 0&&je.opacity!==null&&(he.opacity=je.opacity),je.metallic!==void 0&&je.metallic!==null&&(he.metallic=je.metallic),je.roughness!==void 0&&je.roughness!==null&&(he.roughness=je.roughness))}else if(e.excludeUnclassifiedObjects)continue;for(let je=X;je<=H;je++){const de=T[je],ut=me[de]>1,Ce=de===Ee-1,Xe=F[je],ht=Xe>=0?`${s}-textureSet-${Xe}`:null,lt=Q7t(N.subarray(je*6,je*6+3)),dt=N[je*6+3]/255,bt=N[je*6+4]/255,ke=N[je*6+5]/255,Je=r.getNextId();if(ut){const ft=_[je],it=v.slice(ft,ft+16),Ge=`${s}-geometry.${ge}.${de}`;let pe=ve[Ge];if(!pe){pe={batchThisMesh:!e.reuseGeometries};const Te=w[de];let mt=!1;switch(Te){case 0:pe.primitiveName="solid",pe.geometryPositions=d.subarray(x[de],Ce?d.length:x[de+1]),pe.geometryNormals=h.subarray(M[de],Ce?h.length:M[de+1]),pe.geometryUVs=A.subarray(S[de],Ce?A.length:S[de+1]),pe.geometryIndices=f.subarray(I[de],Ce?f.length:I[de+1]),pe.geometryEdgeIndices=g.subarray(R[de],Ce?g.length:R[de+1]),mt=pe.geometryPositions.length>0&&pe.geometryIndices.length>0;break;case 1:pe.primitiveName="surface",pe.geometryPositions=d.subarray(x[de],Ce?d.length:x[de+1]),pe.geometryNormals=h.subarray(M[de],Ce?h.length:M[de+1]),pe.geometryUVs=A.subarray(S[de],Ce?A.length:S[de+1]),pe.geometryIndices=f.subarray(I[de],Ce?f.length:I[de+1]),pe.geometryEdgeIndices=g.subarray(R[de],Ce?g.length:R[de+1]),mt=pe.geometryPositions.length>0&&pe.geometryIndices.length>0;break;case 2:pe.primitiveName="points",pe.geometryPositions=d.subarray(x[de],Ce?d.length:x[de+1]),pe.geometryColors=p.subarray(B[de],Ce?p.length:B[de+1]),mt=pe.geometryPositions.length>0;break;case 3:pe.primitiveName="lines",pe.geometryPositions=d.subarray(x[de],Ce?d.length:x[de+1]),pe.geometryIndices=f.subarray(I[de],Ce?f.length:I[de+1]),mt=pe.geometryPositions.length>0&&pe.geometryIndices.length>0;break;case 4:pe.primitiveName="lines",pe.geometryPositions=d.subarray(x[de],Ce?d.length:x[de+1]),pe.geometryIndices=mie(pe.geometryPositions,f.subarray(I[de],Ce?f.length:I[de+1])),mt=pe.geometryPositions.length>0&&pe.geometryIndices.length>0;break;default:continue}if(mt||(pe=null),pe&&(pe.geometryPositions.length>1e3,pe.batchThisMesh)){pe.decompressedPositions=new Float32Array(pe.geometryPositions.length),pe.transformedAndRecompressedPositions=new Uint16Array(pe.geometryPositions.length);const vt=pe.geometryPositions,It=pe.decompressedPositions;for(let kt=0,Wi=vt.length;kt<Wi;kt+=3)It[kt+0]=vt[kt+0]*y[0]+y[12],It[kt+1]=vt[kt+1]*y[5]+y[13],It[kt+2]=vt[kt+2]*y[10]+y[14];pe.geometryPositions=null,ve[Ge]=pe}}if(pe)if(pe.batchThisMesh){const Te=pe.decompressedPositions,mt=pe.transformedAndRecompressedPositions;for(let vt=0,It=Te.length;vt<It;vt+=3)Mc[0]=Te[vt+0],Mc[1]=Te[vt+1],Mc[2]=Te[vt+2],Mc[3]=1,b.transformVec4(it,Mc,Aie),Yt.compressPosition(Aie,De,Mc),mt[vt+0]=Mc[0],mt[vt+1]=Mc[1],mt[vt+2]=Mc[2];n.createMesh(At.apply(he,{id:Je,textureSetId:ht,origin:_e,primitive:pe.primitiveName,positionsCompressed:mt,normalsCompressed:pe.geometryNormals,uv:pe.geometryUVs,colorsCompressed:pe.geometryColors,indices:pe.geometryIndices,edgeIndices:pe.geometryEdgeIndices,positionsDecodeMatrix:Me,color:lt,metallic:bt,roughness:ke,opacity:dt})),ee.push(Je)}else Ae[Ge]||(n.createGeometry({id:Ge,primitive:pe.primitiveName,positionsCompressed:pe.geometryPositions,normalsCompressed:pe.geometryNormals,uv:pe.geometryUVs,colorsCompressed:pe.geometryColors,indices:pe.geometryIndices,edgeIndices:pe.geometryEdgeIndices,positionsDecodeMatrix:y}),Ae[Ge]=!0),n.createMesh(At.apply(he,{id:Je,geometryId:Ge,textureSetId:ht,matrix:it,color:lt,metallic:bt,roughness:ke,opacity:dt,origin:_e})),ee.push(Je)}else{const ft=w[de];let it,Ge,pe,Te,mt,vt,It,kt=!1;switch(ft){case 0:it="solid",Ge=d.subarray(x[de],Ce?d.length:x[de+1]),pe=h.subarray(M[de],Ce?h.length:M[de+1]),Te=A.subarray(S[de],Ce?A.length:S[de+1]),vt=f.subarray(I[de],Ce?f.length:I[de+1]),It=g.subarray(R[de],Ce?g.length:R[de+1]),kt=Ge.length>0&&vt.length>0;break;case 1:it="surface",Ge=d.subarray(x[de],Ce?d.length:x[de+1]),pe=h.subarray(M[de],Ce?h.length:M[de+1]),Te=A.subarray(S[de],Ce?A.length:S[de+1]),vt=f.subarray(I[de],Ce?f.length:I[de+1]),It=g.subarray(R[de],Ce?g.length:R[de+1]),kt=Ge.length>0&&vt.length>0;break;case 2:it="points",Ge=d.subarray(x[de],Ce?d.length:x[de+1]),mt=p.subarray(B[de],Ce?p.length:B[de+1]),kt=Ge.length>0;break;case 3:it="lines",Ge=d.subarray(x[de],Ce?d.length:x[de+1]),vt=f.subarray(I[de],Ce?f.length:I[de+1]),kt=Ge.length>0&&vt.length>0;break;case 4:it="lines",Ge=d.subarray(x[de],Ce?d.length:x[de+1]),vt=mie(Ge,f.subarray(I[de],Ce?f.length:I[de+1])),kt=Ge.length>0&&vt.length>0;break;default:continue}kt&&(n.createMesh(At.apply(he,{id:Je,textureSetId:ht,origin:_e,primitive:it,positionsCompressed:Ge,normalsCompressed:pe,uv:Te&&Te.length>0?Te:null,colorsCompressed:mt,indices:vt,edgeIndices:It,positionsDecodeMatrix:Me,color:lt,metallic:bt,roughness:ke,opacity:dt})),ee.push(Je))}}ee.length>0&&n.createEntity(At.apply(re,{id:oe,isObject:!0,meshIds:ee}))}}}}function mie(i,e){const t=[];if(e.length>1)for(let n=0,o=e.length-1;n<o;n++)t.push(e[n]),t.push(e[n+1]);else if(i.length>1)for(let n=0,o=i.length/3-1;n<o;n++)t.push(n),t.push(n+1);return t}const gie={version:10,parse:function(i,e,t,n,o,r){const s=j7t(t),a=G7t(s);q7t(i,e,a,n,o,r)}},Ec=b.vec4(),yie=b.vec4(),K7t=9;function J7t(i){const e=(function(){const o=new ArrayBuffer(2);return new Uint16Array(o)[0]=1,new Uint8Array(o)[0]!==1})(),t=(function(){let o=0;const r=new DataView(i);return function(s){const a=1+2*o++,l=r.getUint32(a*4,!0),c=r.getUint32((a+1)*4,!0),u=s.BYTES_PER_ELEMENT;if(e&&u>1){const d=new Uint8Array(i,l,c),h=u/2,p=d.length/u;for(let A=0;A<p;A++){const f=A*u;for(let g=0;g<h;g++){const m=f+g,v=f-g+u-1,y=d[m];d[m]=d[v],d[v]=y}}}return new s(i,l,c/u)}})(),n=(function(){const o=new TextDecoder;return()=>JSON.parse(o.decode(t(Uint8Array)))})();return{metadata:n(),textureData:t(Uint8Array),eachTextureDataPortion:t(Uint32Array),eachTextureAttributes:t(Uint16Array),positions:t(Uint16Array),normals:t(Int8Array),colors:t(Uint8Array),uvs:t(Float32Array),indices:t(Uint32Array),edgeIndices:t(Uint32Array),eachTextureSetTextures:t(Int32Array),matrices:t(Float32Array),reusedGeometriesDecodeMatrix:t(Float32Array),eachGeometryPrimitiveType:t(Uint8Array),eachGeometryPositionsPortion:t(Uint32Array),eachGeometryNormalsPortion:t(Uint32Array),eachGeometryColorsPortion:t(Uint32Array),eachGeometryUVsPortion:t(Uint32Array),eachGeometryIndicesPortion:t(Uint32Array),eachGeometryEdgeIndicesPortion:t(Uint32Array),eachMeshGeometriesPortion:t(Uint32Array),eachMeshMatricesPortion:t(Uint32Array),eachMeshTextureSet:t(Int32Array),eachMeshMaterialAttributes:t(Uint8Array),eachEntityId:n(),eachEntityMeshesPortion:t(Uint32Array),eachTileAABB:t(Float64Array),eachTileEntitiesPortion:t(Uint32Array)}}const W7t=(function(){const i=new Float32Array(3);return function(e){return i[0]=e[0]/255,i[1]=e[1]/255,i[2]=e[2]/255,i}})();(function(){const i=document.createElement("canvas"),e=i.getContext("2d");return function(t){return i.width=t.width,i.height=t.height,e.putImageData(t,0,0),i.toDataURL()}})();function Z7t(i,e,t,n,o,r){const s=r.getNextId(),a=t.metadata,l=t.textureData,c=t.eachTextureDataPortion,u=t.eachTextureAttributes,d=t.positions,h=t.normals,p=t.colors,A=t.uvs,f=t.indices,g=t.edgeIndices,m=t.eachTextureSetTextures,v=t.matrices,y=t.reusedGeometriesDecodeMatrix,w=t.eachGeometryPrimitiveType,x=t.eachGeometryPositionsPortion,M=t.eachGeometryNormalsPortion,B=t.eachGeometryColorsPortion,S=t.eachGeometryUVsPortion,I=t.eachGeometryIndicesPortion,R=t.eachGeometryEdgeIndicesPortion,T=t.eachMeshGeometriesPortion,_=t.eachMeshMatricesPortion,F=t.eachMeshTextureSet,N=t.eachMeshMaterialAttributes,z=t.eachEntityId,j=t.eachEntityMeshesPortion,W=t.eachTileAABB,J=t.eachTileEntitiesPortion,$=c.length,ue=m.length/5,Ee=x.length,Be=T.length,ze=j.length,Qe=J.length;o&&o.loadData(a,{includeTypes:e.includeTypes,excludeTypes:e.excludeTypes,globalizeObjectIds:e.globalizeObjectIds});for(let ge=0;ge<$;ge++){const Ie=ge===$-1,Ne=c[ge],qe=Ie?l.length:c[ge+1],ne=qe-Ne>0,ie=ge*K7t,Me=u[ie+0]===1,Ae=u[ie+1];u[ie+2],u[ie+3];const q=u[ie+4],Z=u[ie+5],oe=u[ie+6],fe=u[ie+7],Se=u[ie+8];if(ne){const H=new Uint8Array(l.subarray(Ne,qe)).buffer,ee=`${s}-texture-${ge}`;if(Me)n.createTexture({id:ee,buffers:[H],minFilter:q,magFilter:Z,wrapS:oe,wrapT:fe,wrapR:Se});else{const be=Ae===qw?"image/jpeg":Ae===Kw?"image/png":"image/gif",re=new Blob([H],{type:be}),je=(window.URL||window.webkitURL).createObjectURL(re),de=document.createElement("img");de.src=je,n.createTexture({id:ee,image:de,minFilter:q,magFilter:Z,wrapS:oe,wrapT:fe,wrapR:Se})}}}for(let ge=0;ge<ue;ge++){const Ie=ge*5,Ne=`${s}-textureSet-${ge}`,qe=m[Ie+0],Q=m[Ie+1],ne=m[Ie+2],ie=m[Ie+3],Me=m[Ie+4];n.createTextureSet({id:Ne,colorTextureId:qe>=0?`${s}-texture-${qe}`:null,normalsTextureId:ne>=0?`${s}-texture-${ne}`:null,metallicRoughnessTextureId:Q>=0?`${s}-texture-${Q}`:null,emissiveTextureId:ie>=0?`${s}-texture-${ie}`:null,occlusionTextureId:Me>=0?`${s}-texture-${Me}`:null})}const me=new Uint32Array(Ee);for(let ge=0;ge<Be;ge++){const Ie=T[ge];me[Ie]!==void 0?me[Ie]++:me[Ie]=1}const _e=b.vec3(),De=b.AABB3(),ve={};for(let ge=0;ge<Qe;ge++){const Ie=Qe-1,Ne=ge===Ie,qe=J[ge],Q=Ne?ze-1:J[ge+1]-1,ne=ge*6,ie=W.subarray(ne,ne+6);b.getAABB3Center(ie,_e),De[0]=ie[0]-_e[0],De[1]=ie[1]-_e[1],De[2]=ie[2]-_e[2],De[3]=ie[3]-_e[0],De[4]=ie[4]-_e[1],De[5]=ie[5]-_e[2];const Me=Yt.createPositionsDecodeMatrix(De),Ae={};for(let q=qe;q<=Q;q++){const Z=z[q],oe=e.globalizeObjectIds?b.globalizeObjectId(n.id,Z):Z,fe=ze-1,Se=q===fe,X=j[q],H=Se?T.length-1:j[q+1]-1,ee=[],be=i.metaScene.metaObjects[oe],re={},he={};if(!(e.includeIdsMap&&Z&&!e.includeIdsMap[Z])){if(be){if(e.excludeTypesMap&&be.type&&e.excludeTypesMap[be.type]||e.includeTypesMap&&be.type&&!e.includeTypesMap[be.type]||e.includeIdsMap&&be.id&&!e.includeIdsMap[be.id])continue;const je=e.objectDefaults?e.objectDefaults[be.type]||e.objectDefaults.DEFAULT:null;je&&(je.visible===!1&&(re.visible=!1),je.pickable===!1&&(re.pickable=!1),je.colorize&&(he.color=je.colorize),je.opacity!==void 0&&je.opacity!==null&&(he.opacity=je.opacity),je.metallic!==void 0&&je.metallic!==null&&(he.metallic=je.metallic),je.roughness!==void 0&&je.roughness!==null&&(he.roughness=je.roughness))}else if(e.excludeUnclassifiedObjects)continue;for(let je=X;je<=H;je++){const de=T[je],ut=me[de]>1,Ce=de===Ee-1,Xe=F[je],ht=Xe>=0?`${s}-textureSet-${Xe}`:null,lt=W7t(N.subarray(je*6,je*6+3)),dt=N[je*6+3]/255,bt=N[je*6+4]/255,ke=N[je*6+5]/255,Je=r.getNextId();if(ut){const ft=_[je],it=v.slice(ft,ft+16),Ge=`${s}-geometry.${ge}.${de}`;let pe=ve[Ge];if(!pe){pe={batchThisMesh:!e.reuseGeometries};const Te=w[de];let mt=!1;switch(Te){case 0:pe.primitiveName="solid",pe.geometryPositions=d.subarray(x[de],Ce?d.length:x[de+1]),pe.geometryNormals=h.subarray(M[de],Ce?h.length:M[de+1]),pe.geometryUVs=A.subarray(S[de],Ce?A.length:S[de+1]),pe.geometryIndices=f.subarray(I[de],Ce?f.length:I[de+1]),pe.geometryEdgeIndices=g.subarray(R[de],Ce?g.length:R[de+1]),mt=pe.geometryPositions.length>0&&pe.geometryIndices.length>0;break;case 1:pe.primitiveName="surface",pe.geometryPositions=d.subarray(x[de],Ce?d.length:x[de+1]),pe.geometryNormals=h.subarray(M[de],Ce?h.length:M[de+1]),pe.geometryUVs=A.subarray(S[de],Ce?A.length:S[de+1]),pe.geometryIndices=f.subarray(I[de],Ce?f.length:I[de+1]),pe.geometryEdgeIndices=g.subarray(R[de],Ce?g.length:R[de+1]),mt=pe.geometryPositions.length>0&&pe.geometryIndices.length>0;break;case 2:pe.primitiveName="points",pe.geometryPositions=d.subarray(x[de],Ce?d.length:x[de+1]),pe.geometryColors=p.subarray(B[de],Ce?p.length:B[de+1]),mt=pe.geometryPositions.length>0;break;case 3:pe.primitiveName="lines",pe.geometryPositions=d.subarray(x[de],Ce?d.length:x[de+1]),pe.geometryIndices=f.subarray(I[de],Ce?f.length:I[de+1]),mt=pe.geometryPositions.length>0&&pe.geometryIndices.length>0;break;case 4:pe.primitiveName="lines",pe.geometryPositions=d.subarray(x[de],Ce?d.length:x[de+1]),pe.geometryIndices=vie(pe.geometryPositions,f.subarray(I[de],Ce?f.length:I[de+1])),mt=pe.geometryPositions.length>0&&pe.geometryIndices.length>0;break;default:continue}if(mt||(pe=null),pe&&(pe.geometryPositions.length>1e3,pe.batchThisMesh)){pe.decompressedPositions=new Float32Array(pe.geometryPositions.length),pe.transformedAndRecompressedPositions=new Uint16Array(pe.geometryPositions.length);const vt=pe.geometryPositions,It=pe.decompressedPositions;for(let kt=0,Wi=vt.length;kt<Wi;kt+=3)It[kt+0]=vt[kt+0]*y[0]+y[12],It[kt+1]=vt[kt+1]*y[5]+y[13],It[kt+2]=vt[kt+2]*y[10]+y[14];pe.geometryPositions=null,ve[Ge]=pe}}if(pe)if(pe.batchThisMesh){const Te=pe.decompressedPositions,mt=pe.transformedAndRecompressedPositions;for(let vt=0,It=Te.length;vt<It;vt+=3)Ec[0]=Te[vt+0],Ec[1]=Te[vt+1],Ec[2]=Te[vt+2],Ec[3]=1,b.transformVec4(it,Ec,yie),Yt.compressPosition(yie,De,Ec),mt[vt+0]=Ec[0],mt[vt+1]=Ec[1],mt[vt+2]=Ec[2];n.createMesh(At.apply(he,{id:Je,textureSetId:ht,origin:_e,primitive:pe.primitiveName,positionsCompressed:mt,normalsCompressed:pe.geometryNormals,uv:pe.geometryUVs,colorsCompressed:pe.geometryColors,indices:pe.geometryIndices,edgeIndices:pe.geometryEdgeIndices,positionsDecodeMatrix:Me,color:lt,metallic:bt,roughness:ke,opacity:dt})),ee.push(Je)}else Ae[Ge]||(n.createGeometry({id:Ge,primitive:pe.primitiveName,positionsCompressed:pe.geometryPositions,normalsCompressed:pe.geometryNormals,uv:pe.geometryUVs,colorsCompressed:pe.geometryColors,indices:pe.geometryIndices,edgeIndices:pe.geometryEdgeIndices,positionsDecodeMatrix:y}),Ae[Ge]=!0),n.createMesh(At.apply(he,{id:Je,geometryId:Ge,textureSetId:ht,matrix:it,color:lt,metallic:bt,roughness:ke,opacity:dt,origin:_e})),ee.push(Je)}else{const ft=w[de];let it,Ge,pe,Te,mt,vt,It,kt=!1;switch(ft){case 0:it="solid",Ge=d.subarray(x[de],Ce?d.length:x[de+1]),pe=h.subarray(M[de],Ce?h.length:M[de+1]),Te=A.subarray(S[de],Ce?A.length:S[de+1]),vt=f.subarray(I[de],Ce?f.length:I[de+1]),It=g.subarray(R[de],Ce?g.length:R[de+1]),kt=Ge.length>0&&vt.length>0;break;case 1:it="surface",Ge=d.subarray(x[de],Ce?d.length:x[de+1]),pe=h.subarray(M[de],Ce?h.length:M[de+1]),Te=A.subarray(S[de],Ce?A.length:S[de+1]),vt=f.subarray(I[de],Ce?f.length:I[de+1]),It=g.subarray(R[de],Ce?g.length:R[de+1]),kt=Ge.length>0&&vt.length>0;break;case 2:it="points",Ge=d.subarray(x[de],Ce?d.length:x[de+1]),mt=p.subarray(B[de],Ce?p.length:B[de+1]),kt=Ge.length>0;break;case 3:it="lines",Ge=d.subarray(x[de],Ce?d.length:x[de+1]),vt=f.subarray(I[de],Ce?f.length:I[de+1]),kt=Ge.length>0&&vt.length>0;break;case 4:it="lines",Ge=d.subarray(x[de],Ce?d.length:x[de+1]),vt=vie(Ge,f.subarray(I[de],Ce?f.length:I[de+1])),kt=Ge.length>0&&vt.length>0;break;default:continue}kt&&(n.createMesh(At.apply(he,{id:Je,textureSetId:ht,origin:_e,primitive:it,positionsCompressed:Ge,normalsCompressed:pe,uv:Te&&Te.length>0?Te:null,colorsCompressed:mt,indices:vt,edgeIndices:It,positionsDecodeMatrix:Me,color:lt,metallic:bt,roughness:ke,opacity:dt})),ee.push(Je))}}ee.length>0&&n.createEntity(At.apply(re,{id:oe,isObject:!0,meshIds:ee}))}}}}function vie(i,e){const t=[];if(e.length>1)for(let n=0,o=e.length-1;n<o;n++)t.push(e[n]),t.push(e[n+1]);else if(i.length>1)for(let n=0,o=i.length/3-1;n<o;n++)t.push(n),t.push(n+1);return t}const wie={version:11,parseArrayBuffer:function(i,e,t,n,o,r){const s=J7t(t);Z7t(i,e,s,n,o,r)}};let Ph=window.pako||Ia;Ph.inflate||(Ph=Ph.default);const Bc=b.vec4(),Cie=b.vec4(),Y7t=9;function X7t(i){const e=(function(){const o=new ArrayBuffer(2);return new Uint16Array(o)[0]=1,new Uint8Array(o)[0]!==1})(),t=(function(){let o=0;const r=new DataView(i);return function(s){const a=1+2*o++,l=r.getUint32(a*4,!0),c=r.getUint32((a+1)*4,!0),u=s.BYTES_PER_ELEMENT;if(e&&u>1){const d=new Uint8Array(i,l,c),h=u/2,p=d.length/u;for(let A=0;A<p;A++){const f=A*u;for(let g=0;g<h;g++){const m=f+g,v=f-g+u-1,y=d[m];d[m]=d[v],d[v]=y}}}return new s(i,l,c/u)}})(),n=(function(){const o=new TextDecoder;return()=>JSON.parse(o.decode(t(Uint8Array)))})();return{metadata:n(),textureData:t(Uint8Array),eachTextureDataPortion:t(Uint32Array),eachTextureAttributes:t(Uint16Array),positions:t(Uint16Array),normals:t(Int8Array),colors:t(Uint8Array),uvs:t(Float32Array),indices:t(Uint32Array),edgeIndices:t(Uint32Array),eachTextureSetTextures:t(Int32Array),matrices:t(Float32Array),reusedGeometriesDecodeMatrix:t(Float32Array),eachGeometryPrimitiveType:t(Uint8Array),eachGeometryAxisLabel:n(),eachGeometryPositionsPortion:t(Uint32Array),eachGeometryNormalsPortion:t(Uint32Array),eachGeometryColorsPortion:t(Uint32Array),eachGeometryUVsPortion:t(Uint32Array),eachGeometryIndicesPortion:t(Uint32Array),eachGeometryEdgeIndicesPortion:t(Uint32Array),eachMeshGeometriesPortion:t(Uint32Array),eachMeshMatricesPortion:t(Uint32Array),eachMeshTextureSet:t(Int32Array),eachMeshMaterialAttributes:t(Uint8Array),eachEntityId:n(),eachEntityMeshesPortion:t(Uint32Array),eachTileAABB:t(Float64Array),eachTileEntitiesPortion:t(Uint32Array)}}function $7t(i){let e=0;return{metadata:i[e++],textureData:i[e++],eachTextureDataPortion:i[e++],eachTextureAttributes:i[e++],positions:i[e++],normals:i[e++],colors:i[e++],uvs:i[e++],indices:i[e++],edgeIndices:i[e++],eachTextureSetTextures:i[e++],matrices:i[e++],reusedGeometriesDecodeMatrix:i[e++],eachGeometryPrimitiveType:i[e++],eachGeometryAxisLabel:i[e++],eachGeometryPositionsPortion:i[e++],eachGeometryNormalsPortion:i[e++],eachGeometryColorsPortion:i[e++],eachGeometryUVsPortion:i[e++],eachGeometryIndicesPortion:i[e++],eachGeometryEdgeIndicesPortion:i[e++],eachMeshGeometriesPortion:i[e++],eachMeshMatricesPortion:i[e++],eachMeshTextureSet:i[e++],eachMeshMaterialAttributes:i[e++],eachEntityId:i[e++],eachEntityMeshesPortion:i[e++],eachTileAABB:i[e++],eachTileEntitiesPortion:i[e++]}}function e9t(i){function e(t,n){return t.length===0?[]:Ph.inflate(t,n).buffer}return{metadata:JSON.parse(Ph.inflate(i.metadata,{to:"string"})),textureData:new Uint8Array(e(i.textureData)),eachTextureDataPortion:new Uint32Array(e(i.eachTextureDataPortion)),eachTextureAttributes:new Uint16Array(e(i.eachTextureAttributes)),positions:new Uint16Array(e(i.positions)),normals:new Int8Array(e(i.normals)),colors:new Uint8Array(e(i.colors)),uvs:new Float32Array(e(i.uvs)),indices:new Uint32Array(e(i.indices)),edgeIndices:new Uint32Array(e(i.edgeIndices)),eachTextureSetTextures:new Int32Array(e(i.eachTextureSetTextures)),matrices:new Float32Array(e(i.matrices)),reusedGeometriesDecodeMatrix:new Float32Array(e(i.reusedGeometriesDecodeMatrix)),eachGeometryPrimitiveType:new Uint8Array(e(i.eachGeometryPrimitiveType)),eachGeometryAxisLabel:JSON.parse(Ph.inflate(i.eachGeometryAxisLabel,{to:"string"})),eachGeometryPositionsPortion:new Uint32Array(e(i.eachGeometryPositionsPortion)),eachGeometryNormalsPortion:new Uint32Array(e(i.eachGeometryNormalsPortion)),eachGeometryColorsPortion:new Uint32Array(e(i.eachGeometryColorsPortion)),eachGeometryUVsPortion:new Uint32Array(e(i.eachGeometryUVsPortion)),eachGeometryIndicesPortion:new Uint32Array(e(i.eachGeometryIndicesPortion)),eachGeometryEdgeIndicesPortion:new Uint32Array(e(i.eachGeometryEdgeIndicesPortion)),eachMeshGeometriesPortion:new Uint32Array(e(i.eachMeshGeometriesPortion)),eachMeshMatricesPortion:new Uint32Array(e(i.eachMeshMatricesPortion)),eachMeshTextureSet:new Int32Array(e(i.eachMeshTextureSet)),eachMeshMaterialAttributes:new Uint8Array(e(i.eachMeshMaterialAttributes)),eachEntityId:JSON.parse(Ph.inflate(i.eachEntityId,{to:"string"})),eachEntityMeshesPortion:new Uint32Array(e(i.eachEntityMeshesPortion)),eachTileAABB:new Float64Array(e(i.eachTileAABB)),eachTileEntitiesPortion:new Uint32Array(e(i.eachTileEntitiesPortion))}}const t9t=(function(){const i=new Float32Array(3);return function(e){return i[0]=e[0]/255,i[1]=e[1]/255,i[2]=e[2]/255,i}})();(function(){const i=document.createElement("canvas"),e=i.getContext("2d");return function(t){return i.width=t.width,i.height=t.height,e.putImageData(t,0,0),i.toDataURL()}})();function bie(i,e,t,n,o,r){const s=r.getNextId(),a=t.metadata,l=t.textureData,c=t.eachTextureDataPortion,u=t.eachTextureAttributes,d=t.positions,h=t.normals,p=t.colors,A=t.uvs,f=t.indices,g=t.edgeIndices,m=t.eachTextureSetTextures,v=t.matrices,y=t.reusedGeometriesDecodeMatrix,w=t.eachGeometryPrimitiveType,x=t.eachGeometryAxisLabel,M=t.eachGeometryPositionsPortion,B=t.eachGeometryNormalsPortion,S=t.eachGeometryColorsPortion,I=t.eachGeometryUVsPortion,R=t.eachGeometryIndicesPortion,T=t.eachGeometryEdgeIndicesPortion,_=t.eachMeshGeometriesPortion,F=t.eachMeshMatricesPortion,N=t.eachMeshTextureSet,z=t.eachMeshMaterialAttributes,j=t.eachEntityId,W=t.eachEntityMeshesPortion,J=t.eachTileAABB,$=t.eachTileEntitiesPortion,ue=c.length,Ee=m.length/5,Be=M.length,ze=_.length,Qe=W.length,me=$.length;o&&o.loadData(a,{includeTypes:e.includeTypes,excludeTypes:e.excludeTypes,globalizeObjectIds:e.globalizeObjectIds});for(let Ie=0;Ie<ue;Ie++){const Ne=Ie===ue-1,qe=c[Ie],Q=Ne?l.length:c[Ie+1],ie=Q-qe>0,Me=Ie*Y7t,Ae=u[Me+0]===1,q=u[Me+1];u[Me+2],u[Me+3];const Z=u[Me+4],oe=u[Me+5],fe=u[Me+6],Se=u[Me+7],X=u[Me+8];if(ie){const ee=new Uint8Array(l.subarray(qe,Q)).buffer,be=`${s}-texture-${Ie}`;if(Ae)n.createTexture({id:be,buffers:[ee],minFilter:Z,magFilter:oe,wrapS:fe,wrapT:Se,wrapR:X});else{const re=q===qw?"image/jpeg":q===Kw?"image/png":"image/gif",he=new Blob([ee],{type:re}),de=(window.URL||window.webkitURL).createObjectURL(he),Fe=document.createElement("img");Fe.src=de,n.createTexture({id:be,image:Fe,minFilter:Z,magFilter:oe,wrapS:fe,wrapT:Se,wrapR:X})}}}for(let Ie=0;Ie<Ee;Ie++){const Ne=Ie*5,qe=`${s}-textureSet-${Ie}`,Q=m[Ne+0],ne=m[Ne+1],ie=m[Ne+2],Me=m[Ne+3],Ae=m[Ne+4];n.createTextureSet({id:qe,colorTextureId:Q>=0?`${s}-texture-${Q}`:null,normalsTextureId:ie>=0?`${s}-texture-${ie}`:null,metallicRoughnessTextureId:ne>=0?`${s}-texture-${ne}`:null,emissiveTextureId:Me>=0?`${s}-texture-${Me}`:null,occlusionTextureId:Ae>=0?`${s}-texture-${Ae}`:null})}const _e=new Uint32Array(Be);for(let Ie=0;Ie<ze;Ie++){const Ne=_[Ie];_e[Ne]!==void 0?_e[Ne]++:_e[Ne]=1}const De=b.vec3(),ve=b.AABB3(),ge={};for(let Ie=0;Ie<me;Ie++){const Ne=me-1,qe=Ie===Ne,Q=$[Ie],ne=qe?Qe-1:$[Ie+1]-1,ie=Ie*6,Me=J.subarray(ie,ie+6);b.getAABB3Center(Me,De),ve[0]=Me[0]-De[0],ve[1]=Me[1]-De[1],ve[2]=Me[2]-De[2],ve[3]=Me[3]-De[0],ve[4]=Me[4]-De[1],ve[5]=Me[5]-De[2];const Ae=Yt.createPositionsDecodeMatrix(ve),q={};for(let Z=Q;Z<=ne;Z++){const oe=j[Z],fe=e.globalizeObjectIds?b.globalizeObjectId(n.id,oe):oe,Se=Qe-1,X=Z===Se,H=W[Z],ee=X?_.length-1:W[Z+1]-1,be=[],re=i.metaScene.metaObjects[fe],he={},je={};if(!(e.includeIdsMap&&oe&&!e.includeIdsMap[oe])){if(re){if(e.excludeTypesMap&&re.type&&e.excludeTypesMap[re.type]||e.includeTypesMap&&re.type&&!e.includeTypesMap[re.type]||e.includeIdsMap&&re.id&&!e.includeIdsMap[re.id])continue;const de=e.objectDefaults?e.objectDefaults[re.type]||e.objectDefaults.DEFAULT:null;de&&(de.visible===!1&&(he.visible=!1),de.pickable===!1&&(he.pickable=!1),de.colorize&&(je.color=de.colorize),de.opacity!==void 0&&de.opacity!==null&&(je.opacity=de.opacity),de.metallic!==void 0&&de.metallic!==null&&(je.metallic=de.metallic),de.roughness!==void 0&&de.roughness!==null&&(je.roughness=de.roughness))}else if(e.excludeUnclassifiedObjects)continue;for(let de=H;de<=ee;de++){const Fe=_[de],Ce=_e[Fe]>1,Xe=Fe===Be-1,ht=N[de],lt=ht>=0?`${s}-textureSet-${ht}`:null,dt=t9t(z.subarray(de*6,de*6+3)),bt=z[de*6+3]/255,ke=z[de*6+4]/255,Je=z[de*6+5]/255,ft=r.getNextId();if(Ce){const it=F[de],Ge=v.slice(it,it+16),pe=`${s}-geometry.${Ie}.${Fe}`;let Te=ge[pe];if(!Te){Te={batchThisMesh:!e.reuseGeometries};const mt=w[Fe],vt=x[Fe];let It=!1,kt;switch(mt){case 0:Te.primitiveName="solid",Te.geometryPositions=d.subarray(M[Fe],Xe?d.length:M[Fe+1]),Te.geometryNormals=h.subarray(B[Fe],Xe?h.length:B[Fe+1]),Te.geometryUVs=A.subarray(I[Fe],Xe?A.length:I[Fe+1]),Te.geometryIndices=f.subarray(R[Fe],Xe?f.length:R[Fe+1]),Te.geometryEdgeIndices=g.subarray(T[Fe],Xe?g.length:T[Fe+1]),It=Te.geometryPositions.length>0&&Te.geometryIndices.length>0;break;case 1:Te.primitiveName="surface",Te.geometryPositions=d.subarray(M[Fe],Xe?d.length:M[Fe+1]),Te.geometryNormals=h.subarray(B[Fe],Xe?h.length:B[Fe+1]),Te.geometryUVs=A.subarray(I[Fe],Xe?A.length:I[Fe+1]),Te.geometryIndices=f.subarray(R[Fe],Xe?f.length:R[Fe+1]),Te.geometryEdgeIndices=g.subarray(T[Fe],Xe?g.length:T[Fe+1]),It=Te.geometryPositions.length>0&&Te.geometryIndices.length>0;break;case 2:Te.primitiveName="points",Te.geometryPositions=d.subarray(M[Fe],Xe?d.length:M[Fe+1]),Te.geometryColors=p.subarray(S[Fe],Xe?p.length:S[Fe+1]),It=Te.geometryPositions.length>0;break;case 3:Te.primitiveName="lines",Te.geometryPositions=d.subarray(M[Fe],Xe?d.length:M[Fe+1]),Te.geometryIndices=f.subarray(R[Fe],Xe?f.length:R[Fe+1]),It=Te.geometryPositions.length>0&&Te.geometryIndices.length>0;break;case 4:Te.primitiveName="lines",Te.geometryPositions=d.subarray(M[Fe],Xe?d.length:M[Fe+1]),Te.geometryIndices=xie(Te.geometryPositions,f.subarray(R[Fe],Xe?f.length:R[Fe+1])),It=Te.geometryPositions.length>0&&Te.geometryIndices.length>0;break;case 7:Te.primitiveName="lines",Te.geometryPositions=d.subarray(M[Fe],Xe?d.length:M[Fe+1]),Te.decompressedPositions=Yt.decompressPositions(Te.geometryPositions,y),kt=Mf({origin:Te.decompressedPositions,text:vt,size:2}),Te.decompressedPositions=kt.positions,Te.geometryIndices=kt.indices,Te.geometryPositions=null,It=Te.decompressedPositions.length>0&&Te.geometryIndices.length>0;break;default:continue}if(It||(Te=null),Te&&(Te.geometryPositions&&Te.geometryPositions.length>1e3,Te.batchThisMesh)){if(mt===7)Te.transformedAndRecompressedPositions=new Uint16Array(Te.decompressedPositions.length);else{Te.decompressedPositions=new Float32Array(Te.geometryPositions.length),Te.transformedAndRecompressedPositions=new Uint16Array(Te.geometryPositions.length);const Wi=Te.geometryPositions,Qn=Te.decompressedPositions;for(let Ui=0,wn=Wi.length;Ui<wn;Ui+=3)Qn[Ui+0]=Wi[Ui+0]*y[0]+y[12],Qn[Ui+1]=Wi[Ui+1]*y[5]+y[13],Qn[Ui+2]=Wi[Ui+2]*y[10]+y[14];Te.geometryPositions=null}ge[pe]=Te}}if(Te)if(Te.batchThisMesh){const mt=Te.decompressedPositions,vt=Te.transformedAndRecompressedPositions;for(let It=0,kt=mt.length;It<kt;It+=3)Bc[0]=mt[It+0],Bc[1]=mt[It+1],Bc[2]=mt[It+2],Bc[3]=1,b.transformVec4(Ge,Bc,Cie),Yt.compressPosition(Cie,ve,Bc),vt[It+0]=Bc[0],vt[It+1]=Bc[1],vt[It+2]=Bc[2];n.createMesh(At.apply(je,{id:ft,textureSetId:lt,origin:De,primitive:Te.primitiveName,positionsCompressed:vt,normalsCompressed:Te.geometryNormals,uv:Te.geometryUVs,colorsCompressed:Te.geometryColors,indices:Te.geometryIndices,edgeIndices:Te.geometryEdgeIndices,positionsDecodeMatrix:Ae,color:dt,metallic:ke,roughness:Je,opacity:bt})),be.push(ft)}else{if(!q[pe]){let mt={id:pe,primitive:Te.primitiveName,normalsCompressed:Te.geometryNormals,uv:Te.geometryUVs,colorsCompressed:Te.geometryColors,indices:Te.geometryIndices,edgeIndices:Te.geometryEdgeIndices};Te.geometryPositions?mt={...mt,positionsCompressed:Te.geometryPositions,positionsDecodeMatrix:y}:mt={...mt,positions:Te.decompressedPositions},n.createGeometry(mt),q[pe]=!0}n.createMesh(At.apply(je,{id:ft,geometryId:pe,textureSetId:lt,matrix:Ge,color:dt,metallic:ke,roughness:Je,opacity:bt,origin:De})),be.push(ft)}}else{const it=w[Fe],Ge=x[Fe];let pe,Te,mt,vt,It,kt,Wi,Qn=!1,Ui;switch(it){case 0:pe="solid",Te=d.subarray(M[Fe],Xe?d.length:M[Fe+1]),mt=h.subarray(B[Fe],Xe?h.length:B[Fe+1]),vt=A.subarray(I[Fe],Xe?A.length:I[Fe+1]),kt=f.subarray(R[Fe],Xe?f.length:R[Fe+1]),Wi=g.subarray(T[Fe],Xe?g.length:T[Fe+1]),Qn=Te.length>0&&kt.length>0;break;case 1:pe="surface",Te=d.subarray(M[Fe],Xe?d.length:M[Fe+1]),mt=h.subarray(B[Fe],Xe?h.length:B[Fe+1]),vt=A.subarray(I[Fe],Xe?A.length:I[Fe+1]),kt=f.subarray(R[Fe],Xe?f.length:R[Fe+1]),Wi=g.subarray(T[Fe],Xe?g.length:T[Fe+1]),Qn=Te.length>0&&kt.length>0;break;case 2:pe="points",Te=d.subarray(M[Fe],Xe?d.length:M[Fe+1]),It=p.subarray(S[Fe],Xe?p.length:S[Fe+1]),Qn=Te.length>0;break;case 3:pe="lines",Te=d.subarray(M[Fe],Xe?d.length:M[Fe+1]),kt=f.subarray(R[Fe],Xe?f.length:R[Fe+1]),Qn=Te.length>0&&kt.length>0;break;case 4:pe="lines",Te=d.subarray(M[Fe],Xe?d.length:M[Fe+1]),kt=xie(Te,f.subarray(R[Fe],Xe?f.length:R[Fe+1])),Qn=Te.length>0&&kt.length>0;break;case 7:pe="lines",Te=d.subarray(M[Fe],Xe?d.length:M[Fe+1]),Te=Yt.decompressPositions(Te,Ae),Ui=Mf({origin:Te,text:Ge,size:2}),Te=Ui.positions,kt=Ui.indices,Qn=Te.length>0&&kt.length>0;break;default:continue}if(Qn){let wn=At.apply(je,{id:ft,textureSetId:lt,origin:De,primitive:pe,normalsCompressed:mt,uv:vt&&vt.length>0?vt:null,colorsCompressed:It,indices:kt,edgeIndices:Wi,color:dt,metallic:ke,roughness:Je,opacity:bt});it!==7?wn={...wn,positionsCompressed:Te,positionsDecodeMatrix:Ae}:wn={...wn,positions:Te},n.createMesh(wn),be.push(ft)}}}be.length>0&&n.createEntity(At.apply(he,{id:fe,isObject:!0,meshIds:be}))}}}}function xie(i,e){const t=[];if(e.length>1)for(let n=0,o=e.length-1;n<o;n++)t.push(e[n]),t.push(e[n+1]);else if(i.length>1)for(let n=0,o=i.length/3-1;n<o;n++)t.push(n),t.push(n+1);return t}const Mie={version:12,parseArrayBuffer:function(i,e,t,n,o,r){const s=X7t(t);bie(i,e,s,n,o,r)},parse:function(i,e,t,n,o,r){const s=$7t(t),a=e9t(s);bie(i,e,a,n,o,r)}},Ds={};Ds[iie.version]=iie,Ds[nie.version]=nie,Ds[oie.version]=oie,Ds[sie.version]=sie,Ds[rie.version]=rie,Ds[aie.version]=aie,Ds[cie.version]=cie,Ds[hie.version]=hie,Ds[fie.version]=fie,Ds[gie.version]=gie,Ds[wie.version]=wie,Ds[Mie.version]=Mie;class u9 extends qr{constructor(e,t={}){super("XKTLoader",e,t),this._maxGeometryBatchSize=t.maxGeometryBatchSize,this.textureTranscoder=t.textureTranscoder,this.dataSource=t.dataSource,this.objectDefaults=t.objectDefaults,this.includeTypes=t.includeTypes,this.excludeTypes=t.excludeTypes,this.excludeUnclassifiedObjects=t.excludeUnclassifiedObjects,this.reuseGeometries=t.reuseGeometries}get supportedVersions(){return Object.keys(Ds)}get textureTranscoder(){return this._textureTranscoder}set textureTranscoder(e){this._textureTranscoder=e}get dataSource(){return this._dataSource}set dataSource(e){this._dataSource=e||new $te}get objectDefaults(){return this._objectDefaults}set objectDefaults(e){this._objectDefaults=e||Zte}get includeTypes(){return this._includeTypes}set includeTypes(e){this._includeTypes=e}get excludeTypes(){return this._excludeTypes}set excludeTypes(e){this._excludeTypes=e}get includeIds(){return this._includeIds}set includeIds(e){this._includeIds=e}get excludeUnclassifiedObjects(){return this._excludeUnclassifiedObjects}set excludeUnclassifiedObjects(e){this._excludeUnclassifiedObjects=!!e}get globalizeObjectIds(){return this._globalizeObjectIds}set globalizeObjectIds(e){this._globalizeObjectIds=!!e}get reuseGeometries(){return this._reuseGeometries}set reuseGeometries(e){this._reuseGeometries=e!==!1}load(e={}){if(e.id&&this.viewer.scene.components[e.id]&&(this.error("Component with this ID already exists in viewer: "+e.id+" - will autogenerate this ID"),delete e.id),!e.src&&!e.xkt&&!e.manifestSrc&&!e.manifest)throw new Error("XKTLoaderPlugin: load() param expected: src, xkt, manifestSrc or manifestData");const t={},n=e.includeTypes||this._includeTypes,o=e.excludeTypes||this._excludeTypes,r=e.includeIds||this._includeIds,s=e.objectDefaults||this._objectDefaults;if(t.reuseGeometries=e.reuseGeometries!==null&&e.reuseGeometries!==void 0?e.reuseGeometries:this._reuseGeometries!==!1,n){t.includeTypesMap={};for(let A=0,f=n.length;A<f;A++)t.includeTypesMap[n[A]]=!0}if(o){t.excludeTypesMap={};for(let A=0,f=o.length;A<f;A++)t.excludeTypesMap[o[A]]=!0}if(r){t.includeIdsMap={};for(let A=0,f=r.length;A<f;A++)t.includeIdsMap[r[A]]=!0}s&&(t.objectDefaults=s),t.excludeUnclassifiedObjects=e.excludeUnclassifiedObjects!==void 0?!!e.excludeUnclassifiedObjects:this._excludeUnclassifiedObjects,t.globalizeObjectIds=e.globalizeObjectIds!==void 0&&e.globalizeObjectIds!==null?!!e.globalizeObjectIds:this._globalizeObjectIds;const a=new I4(this.viewer.scene,At.apply(e,{isModel:!0,textureTranscoder:this._textureTranscoder,maxGeometryBatchSize:this._maxGeometryBatchSize,origin:e.origin,disableVertexWelding:e.disableVertexWelding||!1,disableIndexRebucketing:e.disableIndexRebucketing||!1,dtxEnabled:e.dtxEnabled,renderOrder:e.renderOrder})),l=a.id,c=new $$({metaScene:this.viewer.metaScene,id:l});this.viewer.scene.canvas.spinner.processes++;const u=()=>{a.destroyed||(a.finalize(),c.finalize(),this.viewer.scene.canvas.spinner.processes--,a.once("destroyed",()=>{this.viewer.metaScene.destroyMetaModel(c.id)}),this.scheduleTask(()=>{a.destroyed||(a.scene.fire("modelLoaded",a.id),a.fire("loaded",!0,!1))}))},d=A=>{this.viewer.scene.canvas.spinner.processes--,this.error(A),a.fire("error",A)};let h=0;const p={getNextId:()=>`${l}.${h++}`};if(e.metaModelSrc||e.metaModelData)if(e.metaModelSrc){const A=e.metaModelSrc;this._dataSource.getMetaModel(A,f=>{a.destroyed||(c.loadData(f,{includeTypes:n,excludeTypes:o,globalizeObjectIds:t.globalizeObjectIds}),e.src?this._loadModel(e.src,t,a,null,p,u,d):(this._parseModel(e.xkt,t,a,null,p),u()))},f=>{d(`load(): Failed to load model metadata for model '${l} from '${A}' - ${f}`)})}else e.metaModelData&&(c.loadData(e.metaModelData,{includeTypes:n,excludeTypes:o,globalizeObjectIds:t.globalizeObjectIds}),e.src?this._loadModel(e.src,t,a,null,p,u,d):(this._parseModel(e.xkt,t,a,null,p),u()));else if(e.src)this._loadModel(e.src,t,a,c,p,u,d);else if(e.xkt)this._parseModel(e.xkt,t,a,c,p),u();else if(e.manifestSrc||e.manifest){const A=e.manifestSrc?i9t(e.manifestSrc):"",f=(v,y,w)=>{let x=0;const M=()=>{a.destroyed||x>=v.length?y():this._dataSource.getMetaModel(`${A}${v[x]}`,B=>{c.loadData(B,{includeTypes:n,excludeTypes:o,globalizeObjectIds:t.globalizeObjectIds}),x++,this.scheduleTask(M,200)},w)};M()},g=(v,y,w)=>{let x=0;const M=()=>{a.destroyed||x>=v.length?y():this._dataSource.getXKT(`${A}${v[x]}`,B=>{this._parseModel(B,t,a,null,p),a.preFinalize(),x++,this.scheduleTask(M,200)},w)};M()},m=(v,y,w)=>{let x=0;const M=()=>{a.destroyed||x>=v.length?y():this._dataSource.getXKT(`${A}${v[x]}`,B=>{this._parseModel(B,t,a,c,p),a.preFinalize(),x++,this.scheduleTask(M,200)},w)};M()};if(e.manifest){const v=e.manifest,y=v.xktFiles;if(!y||y.length===0){d("load(): Failed to load model manifest - manifest not valid");return}const w=v.metaModelFiles;w?f(w,()=>{g(y,u,d)},d):m(y,u,d)}else this._dataSource.getManifest(e.manifestSrc,v=>{if(a.destroyed)return;const y=v.xktFiles;if(!y||y.length===0){d("load(): Failed to load model manifest - manifest not valid");return}const w=v.metaModelFiles;w?f(w,()=>{g(y,u,d)},d):m(y,u,d)},d)}return a}_loadModel(e,t,n,o,r,s,a){this._dataSource.getXKT(e,l=>{this._parseModel(l,t,n,o,r),n.preFinalize(),s()},a)}async _parseModel(e,t,n,o,r){if(n.destroyed)return;const s=new DataView(e),a=new Uint8Array(e),l=s.getUint32(0,!0),c=l&2147483647,u=c<11||c>=12&&l>>>31,d=Ds[c];if(!d){this.error("Unsupported .XKT file version: "+c+" - this XKTLoaderPlugin supports versions "+Object.keys(Ds));return}if(!u){d.parseArrayBuffer(this.viewer,t,e,n,o,r);return}const h=s.getUint32(4,!0),p=[];let A=(h+2)*4;for(let f=0;f<h;f++){const g=s.getUint32((f+2)*4,!0);p.push(a.subarray(A,A+g)),A+=g}d.parse(this.viewer,t,p,n,o,r)}}function i9t(i){i.indexOf("?")>-1&&(i=i.split("?")[0]);const e=i.split("/");return e.pop(),e.join("/")+"/"}let n9t=1;class QT{constructor(e,t,n=null){this.tileset=e,this.computePriority=e.plugin.computePriority,this.distanceFactorToFreeData=e.plugin.distanceFactorToFreeData,this.src=t.content?.uri??null;const o=this.src?new URL(this.src).pathname:null;this.name=`${e.name}_${o?o.substring(o.lastIndexOf("/")+1):`tileWithNoContent_${n9t++}`}`,this.parent=n,this.refine=t.refine,this.data=null,this.fetching=null,this.depth=n?n.depth+1:1,this.model=null,this.loadProcess=null,this.loading=!1,this.currentDistanceFromCamera=null,this._visible=!n,this.priority=1,this.geometricError=t.geometricError;const[r,s,a,l,c,u,d,h,p,A,f,g]=t.boundingVolume.box;let m=[r,s,a],v=1;e.rootTransform&&(b.transformPoint3(e.rootTransform,m,m),v=e.rootTransform[0]),m=[m[0],m[2],-m[1]],this.center=Object.freeze(m);const y=[l,c,u],w=[-d,-h,-p],x=[A,f,g];this.xSize=b.lenVec3(y)*v,this.ySize=b.lenVec3(x)*v,this.zSize=b.lenVec3(w)*v,this.volume=this.xSize*2*this.ySize*2*this.zSize*2,this.children=t.children?.map(M=>new QT(e,M,this))??[],e.tiles.add(this)}get visible(){return this._visible}set visible(e){this._visible!==e&&(this._visible=e,e?this.tileset.visibleTiles.add(this):this.tileset.visibleTiles.delete(this))}get loaded(){return!!this.model}get viewDistance(){return this.tileset.sensitivity*this.geometricError}get isWithinCameraVisibleRange(){return this.currentDistanceFromCamera<=this.viewDistance}updateVisibility(e){this.currentDistanceFromCamera=b.distVec3(this.center,e),this.parent&&(this.visible=this.isWithinCameraVisibleRange,this.currentDistanceFromCamera>this.viewDistance*this.distanceFactorToFreeData&&(this.data=null)),this.visible&&this.children.forEach(n=>n.updateVisibility(e)),this.priority=this.computePriority(this)}fetchData(){return this.data?this.data:this.src?(this.fetching||(this.fetching=new Promise((e,t)=>{fetch(this.src).then(n=>{n.ok?n.arrayBuffer().then(o=>{this.data=o,this.fetching=null,e(this.data)}):t(n)})})),this.fetching):null}showBoundingBox(){const{viewer:e}=this.tileset.plugin,{xSize:t,ySize:n,zSize:o,center:r}=this,s=1/this.depth;this.boxLines=new yi(e.scene,{geometry:new yn(e.scene,wS({center:r,xSize:t,ySize:n,zSize:o})),material:new vn(e.scene,{emissive:[1-s,s,(1-s)/2]})})}async load(){if(this.loading)return this.loadProcess;if(this.loaded)return this.model;if(this.loading=!0,!this.data)try{await this.fetchData()}catch(e){return console.warn(`[Xeokit - TilesetLoaderPlugin] Impossible to fetch data of tile "${this.name}".`,e),this.loading=!1,null}if(!this.visible)return this.loading=!1,null;this.tileset.plugin.debugMode&&this.showBoundingBox();try{const e=new Promise(t=>{const n=this.tileset.plugin.loader.load({id:this.name,xkt:this.data,metaModelData:{metaObjects:[{id:"metaModelRoot"}]}});n.once("loaded",()=>{this.loading=!1,this.loadProcess=null,this.model=n,this.tileset.destroyed||!this.visible?(this.unload(),t(null)):(this.tileset.loadedTiles.add(this),t(n))}),n.once("destroyed",()=>{this.loading=!1,this.loadProcess=null,t(null)})});return this.loadProcess=e,this.loadProcess}catch(e){return console.warn(`[Xeokit - TilesetLoaderPlugin] Impossible to load tile "${this.name}".`,e),null}}unload(){this.boxLines&&(this.boxLines.destroy(),this.boxLines=null),this.model&&(this.model.destroy(),this.model=null),this.tileset.loadedTiles.delete(this),this.children.forEach(e=>{e.loaded&&e.unload()})}}function o9t(i,e,t){const n=Array.from(i),o=n.splice(0,e),r=async s=>{if(await t(s),n.length>0){const a=n.shift();r(a)}};o.forEach(r)}function s9t(i){let e=!1;return{cancel(){e=!0},async run(n){for(let o of i){if(e)break;await new Promise(r=>setTimeout(()=>(n(o)||Promise.resolve()).then(r)))}}}}let r9t=0;class a9t{constructor(e,t){this.plugin=e,this.name=t.name||`tileset-${r9t++}`,this.tiles=new Set,this.visibleTiles=new Set,this.loadedTiles=new Set,this.queue=null,this.renderNeeded=!0,this.destroyed=!1,this._sensitivity=e.sensitivity,t.root.transform&&(this.rootTransform=t.root.transform),this.root=new QT(this,t.root),this.root.load().then(n=>e.viewer.cameraFlight.flyTo(n))}get sensitivity(){return this._sensitivity}set sensitivity(e){this._sensitivity=e,this.updateVisibility()}updateVisibility(){this.tiles.forEach(e=>{e!==this.root&&(e.visible=!1)}),this.root.updateVisibility(this.plugin.viewer.camera.eye),this.renderNeeded=!0}render(){if(!this.renderNeeded)return;this.queue&&this.queue.cancel(),this.loadedTiles.forEach(t=>{t.visible||t.unload()});const e=Array.from(this.visibleTiles).filter(t=>!t.loaded).sort((t,n)=>t.priority-n.priority);o9t(e,40,t=>t.fetchData()),this.queue=s9t(e),this.queue.run(t=>t.load()),this.renderNeeded=!1}destroy(){this.queue&&this.queue.cancel(),this.loadedTiles.forEach(e=>e.unload()),this.destroyed=!0,this.plugin.tilesets.delete(this)}}function l9t(i){return i.depth}class Eie extends qr{constructor(e,t={}){super("TilesetLoader",e);const{computePriority:n=l9t,sensitivity:o=50,distanceFactorToFreeData:r=3,debugMode:s=!1}=t;this._sensitivity=o,this.distanceFactorToFreeData=r,this.computePriority=n,this.debugMode=s,this.tilesets=new Set,e.camera.on("matrix",this.updateTilesetsVisibilityCallback=()=>this.updateTilesetsVisibility()),e.scene.on("tick",this.renderTilesetsCallback=()=>this.renderTilesets()),this.loader=new u9(e)}load(e){const t=new a9t(this,e);return this.tilesets.add(t),t}updateTilesetsVisibility(){this.tilesets.forEach(e=>e.updateVisibility())}renderTilesets(){this.tilesets.forEach(e=>e.render())}get sensitivity(){return this._sensitivity}set sensitivity(e){this._sensitivity=e,this.tilesets.forEach(t=>t.sensitivity=this._sensitivity)}destroy(){this.viewer.camera.off(this.updateTilesetsVisibilityCallback),this.viewer.scene.off(this.renderTilesetsCallback),this.tilesets.forEach(e=>e.destroy()),super.destroy()}}const c9t="2.6.90";typeof window<"u"&&(window.__XEOKIT__?console.warn("WARNING: Multiple instances of xeokit-sdk being imported."):window.__XEOKIT__=c9t);const Ic=Object.freeze(Object.defineProperty({__proto__:null,AlphaFormat:rY,AmbientLight:MP,AngleMeasurementEditMouseControl:Q3t,AngleMeasurementEditTouchControl:q3t,AngleMeasurementsControl:XP,AngleMeasurementsMouseControl:cee,AngleMeasurementsPlugin:D7,AngleMeasurementsTouchControl:G3t,AnnotationsPlugin:eT,AxisGizmoPlugin:Y3t,BCFViewpointsPlugin:V7,Bitmap:HY,ByteType:ZZ,CameraMemento:Fmt,CameraPath:lft,CameraPathAnimation:To,ClampToEdgeWrapping:fs,Component:li,CompressedMediaType:Rft,Configs:t7,ContextMenu:Ept,CubicBezierCurve:Umt,Curve:t4,DefaultLoadingManager:KX,DepthFormat:uY,DepthStencilFormat:dY,DirLight:Ma,DistanceMeasurementEditControl:iT,DistanceMeasurementEditMouseControl:s4t,DistanceMeasurementEditTouchControl:r4t,DistanceMeasurementsControl:tT,DistanceMeasurementsMouseControl:fee,DistanceMeasurementsPlugin:Aee,DistanceMeasurementsTouchControl:o4t,EdgeMaterial:ZS,EmphasisMaterial:fc,FastNavPlugin:vee,FloatType:tY,Fresnel:E1t,Frustum:vr,FrustumPlane:dh,GIFMediaType:kft,GLTFDefaultDataSource:wee,GLTFLoaderPlugin:jT,HalfFloatType:iY,ImagePlane:g1t,IntType:$Z,JPEGMediaType:qw,KTX2TextureTranscoder:xa,LOD:p$,LambertMaterial:y1t,LightMap:Dmt,LineSet:a$,LinearEncoding:Ys,LinearFilter:As,LinearMipMapLinearFilter:Bf,LinearMipMapNearestFilter:s4,LinearMipmapLinearFilter:gh,LinearMipmapNearestFilter:Tft,Loader:JX,LoadingManager:qX,LocaleService:TZ,LuminanceAlphaFormat:cY,LuminanceFormat:lY,Map:Qr,Marker:P4,MarqueePicker:dl,MarqueePickerMouseControl:aft,Mesh:yi,MeshSurfaceArea:qY,MeshVolume:jY,MetallicMaterial:C1t,MirroredRepeatWrapping:uc,ModelMemento:Omt,NavCubePlugin:GT,NearestFilter:mh,NearestMipMapLinearFilter:Ef,NearestMipMapNearestFilter:o4,NearestMipmapLinearFilter:WZ,NearestMipmapNearestFilter:JZ,Node:n4,ObjectsKdTree3:Ppt,ObjectsMemento:Nmt,PNGMediaType:Kw,Path:Vmt,PerformanceModel:zmt,PhongMaterial:vn,PickResult:y7,Plugin:qr,PointLight:kmt,PointerCircle:pS,PointerLens:Bpt,QuadraticBezierCurve:Hmt,Queue:wZ,RGBAFormat:r4,RGBAIntegerFormat:mY,RGBA_ASTC_10x10_Format:OS,RGBA_ASTC_10x5_Format:DS,RGBA_ASTC_10x6_Format:LS,RGBA_ASTC_10x8_Format:FS,RGBA_ASTC_12x10_Format:NS,RGBA_ASTC_12x12_Format:US,RGBA_ASTC_4x4_Format:Gw,RGBA_ASTC_5x4_Format:IS,RGBA_ASTC_5x5_Format:SS,RGBA_ASTC_6x5_Format:PS,RGBA_ASTC_6x6_Format:TS,RGBA_ASTC_8x5_Format:kS,RGBA_ASTC_8x6_Format:RS,RGBA_ASTC_8x8_Format:_S,RGBA_BPTC_Format:Qw,RGBA_ETC2_EAC_Format:jw,RGBA_PVRTC_2BPPV1_Format:ES,RGBA_PVRTC_4BPPV1_Format:Hw,RGBA_S3TC_DXT1_Format:Nw,RGBA_S3TC_DXT3_Format:Uw,RGBA_S3TC_DXT5_Format:l4,RGBFormat:aY,RGB_ETC1_Format:BS,RGB_ETC2_Format:zw,RGB_PVRTC_2BPPV1_Format:MS,RGB_PVRTC_4BPPV1_Format:Vw,RGB_S3TC_DXT1_Format:a4,RGFormat:fY,RGIntegerFormat:AY,ReadableGeometry:yn,RedFormat:hY,RedIntegerFormat:pY,ReflectionMap:_mt,RepeatWrapping:En,SceneModel:I4,SceneModelMesh:JY,SceneModelTransform:e$,SectionPlane:SP,SectionPlanesPlugin:n7t,ShortType:YZ,SpecularMaterial:M1t,SplineCurve:Rw,SpriteMarker:Lmt,Texture:If,TextureTranscoder:Qmt,TilesetLoaderPlugin:Eie,UnsignedByteType:xS,UnsignedInt248Type:sY,UnsignedIntType:eY,UnsignedShort4444Type:nY,UnsignedShort5551Type:oY,UnsignedShortType:XZ,VBOGeometry:OZ,VFC:B$,Viewer:lee,WorkerPool:ZX,XKTDefaultDataSource:$te,XKTLoaderPlugin:u9,buildBoxGeometry:vS,buildBoxLinesGeometry:wS,buildBoxLinesGeometryFromAABB:Eft,buildCylinderGeometry:bf,buildGridGeometry:NZ,buildLineGeometry:VZ,buildPlaneGeometry:CS,buildPolylineGeometry:UZ,buildPolylineGeometryFromCurve:Ift,buildSphereGeometry:xf,buildTorusGeometry:bS,buildVectorTextGeometry:Mf,createCombinedTexture:V3t,createRTCViewMat:Vi,createSkyboxMesh:H3t,createSphereMapMesh:z3t,frustumIntersectsAABB3:kw,getKTX2TextureTranscoder:YX,getPlaneRTCPos:$n,isTriangleMeshSolid:zY,load3DSGeometry:xft,loadOBJGeometry:Mft,math:b,meshSurfaceArea:h4,meshVolume:Pf,os:_P,rtcToWorldPos:Pft,sRGBEncoding:pn,setFrustum:PZ,stats:Pi,utils:At,worldToRTCPos:Ah,worldToRTCPositions:Ow},Symbol.toStringTag,{value:"Module"}));function n1(i){let e=i.substring(1);const t=[];let n=null;for(;e.length>0;)n=e.substring(0,2),e=e.substring(2),t.push(parseInt(n,16)/255);return t}function Bie(i){let e="";return e+=Math.round(i[0]*255).toString(16).padStart(2,"0"),e+=Math.round(i[1]*255).toString(16).padStart(2,"0"),e+=Math.round(i[2]*255).toString(16).padStart(2,"0"),`#${e}`}const u9t={class:"annotations-3d"},Iie=V({__name:"Annotations3D",setup(i){const e=at("$viewer"),{localContext:t}=e,{xeokit:n}=t.viewer,o=n.scene.canvas.canvas,r=xw(),s=Bo(new WeakSet),a=Re(()=>r.value.filter(d=>s.has(d))),l=new Map;ct(r,()=>{r.value.forEach(d=>{if(!l.has(d.id)){const{x:h,y:p,z:A}=d,f=new P4(n.scene,{worldPos:[h,A,p]});l.set(d.id,f);const[g,m]=f.canvasPos;f.style=ae(`left: ${g}px; top: ${m}px;`),f.on("canvasPos",([w,x])=>{f.style.value=`left: ${w}px; top: ${x}px;`}),f.on("visible",w=>w?s.add(d):s.delete(d)),f.on("destroyed",()=>{e.state.hub.off(y),e.state.hub.off(v)});const v=e.state.hub.on("annotation-updated",({annotation:w})=>{if(w.id===d.id){const{x,y:M,z:B}=w;f.worldPos=[x,B,M],f._update(),n.scene._renderer._occlusionTester._occlusionTestListDirty=!0}}),y=e.state.hub.on("annotation-removed",({annotation:w})=>{w.id===d.id&&(l.delete(d.id),f.destroy())})}})},{flush:"sync"});const c=(d,h)=>{const{clientX:p,clientY:A}=h,{x:f,y:g}=o.getBoundingClientRect(),m=n.scene.pick({pickSurface:!0,canvasPos:[p-f,A-g]});if(m){const[v,y,w]=m.worldPos;Object.assign(d,{x:v,y:w,z:y})}},u=d=>l.get(d.id).style.value;return(d,h)=>(E(),L("div",u9t,[(E(!0),L($e,null,Mt(a.value,p=>(E(),K(Mw,{key:p.instanceId,annotation:p,canvas:nt(o),style:ce(u(p)),onAnnotationDrag:A=>c(p,A)},null,8,["annotation","canvas","style","onAnnotationDrag"]))),128))]))}},[["__scopeId","data-v-10ceb001"]]),d9t={setup(){const i=at("$viewer"),e=i.localContext.pluginComponentInstances.get("viewer3d"),{math:t}=e.xeokitSdk,n=()=>{const s=e.xeokit,a=[0,0,-1],l=s.scene.aabb,c=t.getAABB3Diag(l),u=t.vec3();t.getAABB3Center(l,u);const d=45,h=Math.abs(c/Math.tan(d*t.DEGTORAD));s.cameraControl.pivotPos=u,s.cameraFlight.jumpTo({look:u,eye:[u[0]-h*a[0],u[1]-h*a[1],u[2]-h*a[2]],up:[0,1,0],orthoScale:c*1.1,fitFOV:d})},o=()=>{const s=i.localContext.loadedModels.flatMap(a=>a.objects.filter(l=>l.visible===!1).map(l=>l.id));i.state.showObjects(s)};return{onClick:()=>{n(),o(),e.reintegrateObjects()}}}};function h9t(i,e,t,n,o,r){const s=P("BIMDataIconHome"),a=P("BIMDataButton");return E(),K(a,{color:"default",ghost:"",rounded:"",icon:"",onClick:n.onClick},{default:U(()=>[k(s,{size:"xs"})]),_:1},8,["onClick"])}const p9t=V(d9t,[["render",h9t]]),f9t={computed:{active(){return this.$viewer.localContext.pluginComponentInstances.has("navigationVersionsModel")?this.$viewer.localContext.pluginComponentInstances.get("navigationVersionsModel").isOpen.value:!1}},methods:{onClick(){this.$viewer.localContext.pluginComponentInstances.get("navigationVersionsModel").toggle()}}};function A9t(i,e,t,n,o,r){const s=P("BIMDataIcon"),a=P("BIMDataButton"),l=P("BIMDataTooltip");return E(),K(l,{text:i.$t("navigationVersionsModel.tooltip")},{default:U(()=>[k(a,{class:le(["bimdata-navigation-versions-model",{active:r.active}]),color:"primary",ghost:"",rounded:"",icon:"",onClick:r.onClick},{default:U(()=>[k(s,{name:"versioning",fill:"",color:"primary",size:"xxs"})]),_:1},8,["class","onClick"])]),_:1},8,["text"])}const m9t=V(f9t,[["render",A9t],["__scopeId","data-v-ced27a96"]]),g9t={key:0,width:"159",height:"116",viewBox:"0 0 159 116",fill:"none",xmlns:"http://www.w3.org/2000/svg"},y9t={key:1,width:"159",height:"116",viewBox:"0 0 159 116",fill:"none",xmlns:"http://www.w3.org/2000/svg"},v9t={__name:"KeyboardNavigate",setup(i){const t=at("$viewer").i18n.locale==="fr";return(n,o)=>t?(E(),L("svg",g9t,[...o[0]||(o[0]=[ss('<path d="M79 0L87 11H71L79 0Z" fill="#2F374A"></path><path d="M159 79.1111L148 87.1111L148 71.1111L159 79.1111Z" fill="#2F374A"></path><path d="M9.5399e-08 79.1111L11 71.1111L11 87.1111L9.5399e-08 79.1111Z" fill="#2F374A"></path><path d="M79 115.222L71 104.222L87 104.222L79 115.222Z" fill="#2F374A"></path><rect x="61.3333" y="18" width="36.1112" height="36.1112" rx="5" fill="#D8D8D8"></rect><path d="M82.5998 38.834V40H76.6759V38.834H82.5998ZM82.465 32.377L77.2209 40H76.2365V39.0684L81.4982 31.4688H82.465V32.377ZM81.9201 31.4688V32.6406H76.2716V31.4688H81.9201Z" fill="#6B6B6B"></path><rect x="104.667" y="61" width="36.1112" height="36.1112" rx="5" fill="#D8D8D8"></rect><path d="M122.148 83.1111H120.326L120.338 81.9451H122.148C122.676 81.9451 123.117 81.8298 123.473 81.5994C123.832 81.3689 124.101 81.0388 124.281 80.6091C124.465 80.1794 124.557 79.6677 124.557 79.074V78.6111C124.557 78.1501 124.504 77.7419 124.398 77.3865C124.297 77.031 124.144 76.7322 123.941 76.49C123.742 76.2478 123.496 76.0642 123.203 75.9392C122.914 75.8142 122.58 75.7517 122.201 75.7517H120.291V74.5798H122.201C122.767 74.5798 123.285 74.6755 123.754 74.8669C124.223 75.0544 124.627 75.3259 124.967 75.6814C125.31 76.0369 125.574 76.4626 125.758 76.9587C125.941 77.4548 126.033 78.0095 126.033 78.6228V79.074C126.033 79.6873 125.941 80.2419 125.758 80.738C125.574 81.2341 125.31 81.6599 124.967 82.0154C124.623 82.3669 124.213 82.6384 123.736 82.8298C123.264 83.0173 122.734 83.1111 122.148 83.1111ZM121.141 74.5798V83.1111H119.67V74.5798H121.141Z" fill="#6B6B6B"></path><rect x="18" y="61" width="36.1112" height="36.1112" rx="5" fill="#D8D8D8"></rect><path d="M37.3036 81.9744L39.5478 83.7556L38.5927 84.5935L36.3896 82.8298L37.3036 81.9744ZM39.5653 78.6111V79.0798C39.5653 79.7244 39.4814 80.3025 39.3134 80.8142C39.1454 81.3259 38.9052 81.7615 38.5927 82.1208C38.2802 82.4802 37.9071 82.7556 37.4735 82.947C37.04 83.1345 36.5595 83.2283 36.0321 83.2283C35.5087 83.2283 35.0302 83.1345 34.5966 82.947C34.1669 82.7556 33.7939 82.4802 33.4775 82.1208C33.161 81.7615 32.915 81.3259 32.7392 80.8142C32.5673 80.3025 32.4814 79.7244 32.4814 79.0798V78.6111C32.4814 77.9666 32.5673 77.3904 32.7392 76.8826C32.911 76.3708 33.1532 75.9353 33.4657 75.5759C33.7821 75.2126 34.1552 74.9373 34.5849 74.7498C35.0185 74.5583 35.497 74.4626 36.0204 74.4626C36.5478 74.4626 37.0282 74.5583 37.4618 74.7498C37.8993 74.9373 38.2743 75.2126 38.5868 75.5759C38.8993 75.9353 39.1396 76.3708 39.3075 76.8826C39.4794 77.3904 39.5653 77.9666 39.5653 78.6111ZM38.0888 79.0798V78.5994C38.0888 78.1228 38.0419 77.7029 37.9482 77.3396C37.8583 76.9724 37.7235 76.6658 37.5439 76.4197C37.3681 76.1697 37.1513 75.9822 36.8935 75.8572C36.6396 75.7283 36.3485 75.6638 36.0204 75.6638C35.7001 75.6638 35.413 75.7283 35.1591 75.8572C34.9052 75.9822 34.6884 76.1697 34.5087 76.4197C34.329 76.6658 34.1923 76.9724 34.0985 77.3396C34.0048 77.7029 33.9579 78.1228 33.9579 78.5994V79.0798C33.9579 79.5564 34.0048 79.9783 34.0985 80.3455C34.1923 80.7126 34.329 81.0232 34.5087 81.2771C34.6923 81.5271 34.911 81.7166 35.165 81.8455C35.4228 81.9705 35.7118 82.033 36.0321 82.033C36.3603 82.033 36.6513 81.9705 36.9052 81.8455C37.1591 81.7166 37.3739 81.5271 37.5497 81.2771C37.7255 81.0232 37.8583 80.7126 37.9482 80.3455C38.0419 79.9783 38.0888 79.5564 38.0888 79.0798Z" fill="#6B6B6B"></path><rect x="61.3333" y="61.1112" width="36.1112" height="36.1112" rx="5" fill="#D8D8D8"></rect><path d="M81.1115 81.025C81.1115 80.8492 81.0841 80.693 81.0295 80.5563C80.9787 80.4196 80.8869 80.2946 80.7541 80.1813C80.6213 80.068 80.4338 79.9586 80.1916 79.8531C79.9533 79.7438 79.6486 79.6324 79.2775 79.5192C78.8713 79.3942 78.4963 79.2555 78.1525 79.1031C77.8127 78.9469 77.5158 78.7672 77.2619 78.5641C77.008 78.3571 76.8107 78.1207 76.6701 77.8551C76.5295 77.5856 76.4591 77.275 76.4591 76.9235C76.4591 76.5758 76.5314 76.2594 76.6759 75.9742C76.8244 75.6891 77.0334 75.443 77.3029 75.236C77.5763 75.025 77.8986 74.8629 78.2697 74.7496C78.6408 74.6324 79.0509 74.5739 79.5002 74.5739C80.133 74.5739 80.6779 74.691 81.1349 74.9254C81.5959 75.1598 81.9494 75.4742 82.1955 75.8688C82.4455 76.2633 82.5705 76.6989 82.5705 77.1754H81.1115C81.1115 76.8942 81.0509 76.6461 80.9298 76.4313C80.8127 76.2125 80.633 76.0406 80.3908 75.9156C80.1525 75.7906 79.8498 75.7281 79.4826 75.7281C79.1349 75.7281 78.8459 75.7809 78.6154 75.8864C78.3849 75.9918 78.213 76.1344 78.0998 76.3141C77.9865 76.4938 77.9298 76.6969 77.9298 76.9235C77.9298 77.0836 77.967 77.2301 78.0412 77.3629C78.1154 77.4918 78.2287 77.6129 78.381 77.7262C78.5334 77.8356 78.7248 77.9391 78.9552 78.0367C79.1857 78.1344 79.4572 78.2281 79.7697 78.318C80.2423 78.4586 80.6545 78.6149 81.006 78.7867C81.3576 78.9547 81.6505 79.1461 81.8849 79.361C82.1193 79.5758 82.2951 79.8199 82.4123 80.0934C82.5295 80.3629 82.588 80.6696 82.588 81.0133C82.588 81.3727 82.5158 81.6969 82.3713 81.986C82.2267 82.2711 82.0197 82.5153 81.7502 82.7184C81.4845 82.9176 81.1642 83.0719 80.7892 83.1813C80.4181 83.2867 80.0041 83.3395 79.547 83.3395C79.1369 83.3395 78.7326 83.2848 78.3341 83.1754C77.9396 83.066 77.5802 82.9 77.256 82.6774C76.9318 82.4508 76.674 82.1696 76.4826 81.8336C76.2912 81.4938 76.1955 81.0973 76.1955 80.6442H77.6662C77.6662 80.9215 77.713 81.1578 77.8068 81.3531C77.9045 81.5485 78.0392 81.7086 78.2111 81.8336C78.383 81.9547 78.5822 82.0446 78.8088 82.1031C79.0392 82.1617 79.2853 82.191 79.547 82.191C79.8908 82.191 80.1779 82.1422 80.4084 82.0446C80.6427 81.9469 80.8185 81.8102 80.9357 81.6344C81.0529 81.4586 81.1115 81.2555 81.1115 81.025Z" fill="#6B6B6B"></path>',12)])])):(E(),L("svg",y9t,[...o[1]||(o[1]=[ss('<path d="M79 0L87 11H71L79 0Z" fill="#2F374A"></path><path d="M159 79.1111L148 87.1111L148 71.1111L159 79.1111Z" fill="#2F374A"></path><path d="M9.5399e-08 79.1111L11 71.1111L11 87.1111L9.5399e-08 79.1111Z" fill="#2F374A"></path><path d="M79 115.222L71 104.222L87 104.222L79 115.222Z" fill="#2F374A"></path><rect x="61.3333" y="18" width="36.1112" height="36.1112" rx="5" fill="#D8D8D8"></rect><path d="M77.1095 38.084L78.8088 31.4688H79.6994L79.5998 33.1738L77.7834 40H76.8576L77.1095 38.084ZM75.838 31.4688L77.215 38.0312L77.338 40H76.3537L74.3791 31.4688H75.838ZM81.6271 38.0137L82.9865 31.4688H84.4513L82.4767 40H81.4923L81.6271 38.0137ZM80.0451 31.4688L81.7267 38.1016L81.9728 40H81.047L79.2599 33.1738L79.1662 31.4688H80.0451Z" fill="#6B6B6B"></path><rect x="104.667" y="61" width="36.1112" height="36.1112" rx="5" fill="#D8D8D8"></rect><path d="M122.148 83.1111H120.326L120.338 81.9451H122.148C122.676 81.9451 123.117 81.8298 123.473 81.5994C123.832 81.3689 124.101 81.0388 124.281 80.6091C124.465 80.1794 124.557 79.6677 124.557 79.074V78.6111C124.557 78.1501 124.504 77.7419 124.398 77.3865C124.297 77.031 124.144 76.7322 123.941 76.49C123.742 76.2478 123.496 76.0642 123.203 75.9392C122.914 75.8142 122.58 75.7517 122.201 75.7517H120.291V74.5798H122.201C122.767 74.5798 123.285 74.6755 123.754 74.8669C124.223 75.0544 124.627 75.3259 124.967 75.6814C125.31 76.0369 125.574 76.4626 125.758 76.9587C125.941 77.4548 126.033 78.0095 126.033 78.6228V79.074C126.033 79.6873 125.941 80.2419 125.758 80.738C125.574 81.2341 125.31 81.6599 124.967 82.0154C124.623 82.3669 124.213 82.6384 123.736 82.8298C123.264 83.0173 122.734 83.1111 122.148 83.1111ZM121.141 74.5798V83.1111H119.67V74.5798H121.141Z" fill="#6B6B6B"></path><rect x="18" y="61" width="36.1112" height="36.1112" rx="5" fill="#D8D8D8"></rect><path d="M36.2665 75.7166L33.7177 83.1111H32.1767L35.3876 74.5798H36.372L36.2665 75.7166ZM38.3993 83.1111L35.8446 75.7166L35.7333 74.5798H36.7235L39.9462 83.1111H38.3993ZM38.2763 79.947V81.113H33.6357V79.947H38.2763Z" fill="#6B6B6B"></path><rect x="61.3333" y="61.1112" width="36.1112" height="36.1112" rx="5" fill="#D8D8D8"></rect><path d="M81.1115 81.025C81.1115 80.8492 81.0841 80.693 81.0295 80.5563C80.9787 80.4196 80.8869 80.2946 80.7541 80.1813C80.6213 80.068 80.4338 79.9586 80.1916 79.8531C79.9533 79.7438 79.6486 79.6324 79.2775 79.5192C78.8713 79.3942 78.4963 79.2555 78.1525 79.1031C77.8127 78.9469 77.5158 78.7672 77.2619 78.5641C77.008 78.3571 76.8107 78.1207 76.6701 77.8551C76.5295 77.5856 76.4591 77.275 76.4591 76.9235C76.4591 76.5758 76.5314 76.2594 76.6759 75.9742C76.8244 75.6891 77.0334 75.443 77.3029 75.236C77.5763 75.025 77.8986 74.8629 78.2697 74.7496C78.6408 74.6324 79.0509 74.5739 79.5002 74.5739C80.133 74.5739 80.6779 74.691 81.1349 74.9254C81.5959 75.1598 81.9494 75.4742 82.1955 75.8688C82.4455 76.2633 82.5705 76.6989 82.5705 77.1754H81.1115C81.1115 76.8942 81.0509 76.6461 80.9298 76.4313C80.8127 76.2125 80.633 76.0406 80.3908 75.9156C80.1525 75.7906 79.8498 75.7281 79.4826 75.7281C79.1349 75.7281 78.8459 75.7809 78.6154 75.8864C78.3849 75.9918 78.213 76.1344 78.0998 76.3141C77.9865 76.4938 77.9298 76.6969 77.9298 76.9235C77.9298 77.0836 77.967 77.2301 78.0412 77.3629C78.1154 77.4918 78.2287 77.6129 78.381 77.7262C78.5334 77.8356 78.7248 77.9391 78.9552 78.0367C79.1857 78.1344 79.4572 78.2281 79.7697 78.318C80.2423 78.4586 80.6545 78.6149 81.006 78.7867C81.3576 78.9547 81.6505 79.1461 81.8849 79.361C82.1193 79.5758 82.2951 79.8199 82.4123 80.0934C82.5295 80.3629 82.588 80.6696 82.588 81.0133C82.588 81.3727 82.5158 81.6969 82.3713 81.986C82.2267 82.2711 82.0197 82.5153 81.7502 82.7184C81.4845 82.9176 81.1642 83.0719 80.7892 83.1813C80.4181 83.2867 80.0041 83.3395 79.547 83.3395C79.1369 83.3395 78.7326 83.2848 78.3341 83.1754C77.9396 83.066 77.5802 82.9 77.256 82.6774C76.9318 82.4508 76.674 82.1696 76.4826 81.8336C76.2912 81.4938 76.1955 81.0973 76.1955 80.6442H77.6662C77.6662 80.9215 77.713 81.1578 77.8068 81.3531C77.9045 81.5485 78.0392 81.7086 78.2111 81.8336C78.383 81.9547 78.5822 82.0446 78.8088 82.1031C79.0392 82.1617 79.2853 82.191 79.547 82.191C79.8908 82.191 80.1779 82.1422 80.4084 82.0446C80.6427 81.9469 80.8185 81.8102 80.9357 81.6344C81.0529 81.4586 81.1115 81.2555 81.1115 81.025Z" fill="#6B6B6B"></path>',12)])]))}},w9t={key:0,width:"37",height:"129",viewBox:"0 0 37 129",fill:"none",xmlns:"http://www.w3.org/2000/svg"},C9t={key:1,width:"37",height:"129",viewBox:"0 0 37 129",fill:"none",xmlns:"http://www.w3.org/2000/svg"},b9t={__name:"KeyboardStorey",setup(i){const e=at("$viewer"),t=Re(()=>e.i18n.locale==="fr");return(n,o)=>t.value?(E(),L("svg",w9t,[...o[0]||(o[0]=[ss('<rect y="25" width="36.1112" height="36.1112" rx="5" fill="#D8D8D8"></rect><path d="M16.2509 38.4688L18.0614 41.5801L19.872 38.4688H21.5653L18.9872 42.6934L21.6298 47H19.9189L18.0614 43.8301L16.204 47H14.4872L17.1357 42.6934L14.5517 38.4688H16.2509Z" fill="#6B6B6B"></path><rect y="68.1112" width="36.1112" height="36.1112" rx="5" fill="#D8D8D8"></rect><path d="M15.7763 88.3063L17.4755 81.691H18.3661L18.2665 83.3961L16.4501 90.2223H15.5243L15.7763 88.3063ZM14.5048 81.691L15.8817 88.2535L16.0048 90.2223H15.0204L13.0458 81.691H14.5048ZM20.2939 88.236L21.6532 81.691H23.1181L21.1435 90.2223H20.1591L20.2939 88.236ZM18.7118 81.691L20.3935 88.3239L20.6396 90.2223H19.7138L17.9267 83.3961L17.8329 81.691H18.7118Z" fill="#6B6B6B"></path><path d="M18 0L26 11H10L18 0Z" fill="#2F374A"></path><rect x="14" y="13" width="8" height="2" fill="#2F374A"></rect><rect x="14" y="17" width="8" height="4" fill="#2F374A"></rect><path d="M18 129L10 118L26 118L18 129Z" fill="#2F374A"></path><rect x="22" y="116" width="8" height="2" transform="rotate(-180 22 116)" fill="#2F374A"></rect><rect x="22" y="112" width="8" height="4" transform="rotate(-180 22 112)" fill="#2F374A"></rect>',10)])])):(E(),L("svg",C9t,[...o[1]||(o[1]=[ss('<rect y="25" width="36.1112" height="36.1112" rx="5" fill="#D8D8D8"></rect><path d="M16.2509 38.4688L18.0614 41.5801L19.872 38.4688H21.5653L18.9872 42.6934L21.6298 47H19.9189L18.0614 43.8301L16.204 47H14.4872L17.1357 42.6934L14.5517 38.4688H16.2509Z" fill="#6B6B6B"></path><rect y="68.1112" width="36.1112" height="36.1112" rx="5" fill="#D8D8D8"></rect><path d="M21.2665 89.0563V90.2223H15.3427V89.0563H21.2665ZM21.1317 82.5992L15.8876 90.2223H14.9032V89.2906L20.165 81.691H21.1317V82.5992ZM20.5868 81.691V82.8629H14.9384V81.691H20.5868Z" fill="#6B6B6B"></path><path d="M18 0L26 11H10L18 0Z" fill="#2F374A"></path><rect x="14" y="13" width="8" height="2" fill="#2F374A"></rect><rect x="14" y="17" width="8" height="4" fill="#2F374A"></rect><path d="M18 129L10 118L26 118L18 129Z" fill="#2F374A"></path><rect x="22" y="116" width="8" height="2" transform="rotate(-180 22 116)" fill="#2F374A"></rect><rect x="22" y="112" width="8" height="4" transform="rotate(-180 22 112)" fill="#2F374A"></rect>',10)])]))}},x9t={},M9t={width:"174",height:"130",viewBox:"0 0 174 130",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function E9t(i,e){return E(),L("svg",M9t,[...e[0]||(e[0]=[ss('<path d="M33.1118 0.382324H131.606L141.853 99.4882H23.4L33.1118 0.382324Z" fill="#F2F2F2"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M22.9412 99.8706H142.235L131.988 0.305882V0H32.8059L23.0176 99.4882L22.9412 99.8706ZM141.394 99.1059H23.7823L33.4941 0.764706H131.3L141.394 99.1059Z" fill="#9E9E9E"></path><path d="M62.1705 9.86475L60.7941 46.953H103.771V9.86475H62.1705Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M60.4117 47.3354H104.153H104.229V9.48242H61.8647L60.4117 47.3354ZM103.388 46.5707H61.1764L62.5529 10.2471H103.388V46.5707Z" fill="#9E9E9E"></path><path d="M60.7942 46.9529L64.5412 61.7882H100.1L103.771 46.9529H60.7942Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M64.2353 62.1706H100.406L104.306 46.5706H60.3353L64.2353 62.1706ZM99.7942 61.4059H64.8471L61.3294 47.3353H103.312L99.7942 61.4059Z" fill="#9E9E9E"></path><path d="M85.2648 34.7939L85.0354 53.8351L90.0825 49.0175L97.806 49.5528L85.2648 34.7939Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M83.8118 57.5823L83.7354 31.5823L100.406 51.4646L90.3883 49.9352L83.8118 57.5823ZM85.8765 37.3176L85.953 51.9235L89.6236 47.6411L95.2824 48.4823L85.8765 37.3176Z" fill="black"></path><path d="M26.3059 128.241H25.9236C17.5883 128.241 10.7059 121.359 10.7059 113.024V100.253C10.7059 91.9178 17.5883 85.0354 25.9236 85.0354H26.3059C34.6412 85.0354 41.5236 91.9178 41.5236 100.253V113.024C41.5236 121.359 34.6412 128.241 26.3059 128.241Z" fill="white"></path><path d="M137.188 128.241H136.806C128.471 128.241 121.588 121.359 121.588 113.024V100.253C121.588 91.9178 128.471 85.0354 136.806 85.0354H137.188C145.524 85.0354 152.406 91.9178 152.406 100.253V113.024C152.406 121.359 145.524 128.241 137.188 128.241Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M25.4647 129.159H26.9942C35.6353 129.159 42.6706 122.2 42.5942 113.559V99.6413C42.5942 91.0766 35.6353 84.0413 26.9942 84.0413H25.4647C16.9 84.0413 9.86475 91.0001 9.86475 99.6413V113.559C9.86475 122.124 16.8236 129.159 25.4647 129.159ZM12.1589 99.5648C12.1589 92.2236 18.1236 86.2589 25.4647 86.2589H26.9942C34.3353 86.2589 40.3 92.2236 40.3 99.5648V113.482C40.3 120.824 34.3353 126.788 26.9942 126.788H25.4647C18.1236 126.788 12.1589 120.824 12.1589 113.482V99.5648Z" fill="#30374B"></path><path d="M26.3823 104.459C25.5411 104.459 24.8529 103.771 24.8529 102.929V98.4176C24.8529 97.5764 25.5411 96.8882 26.3823 96.8882C27.2235 96.8882 27.9117 97.5764 27.9117 98.4176V102.929C27.9117 103.771 27.2235 104.459 26.3823 104.459Z" fill="#30374B"></path><path d="M15.3706 84.1177C14.8353 84.1177 14.3765 83.6589 14.3765 83.1236V75.4765C14.3765 74.9412 14.8353 74.4824 15.3706 74.4824C15.9059 74.4824 16.3647 74.9412 16.3647 75.4765V83.1236C16.3647 83.6589 15.9059 84.1177 15.3706 84.1177Z" fill="#F8C62C"></path><path d="M9.63529 90.3884C9.63529 90.9237 9.17647 91.3825 8.64118 91.3825H0.994118C0.458824 91.3825 0 90.9237 0 90.3884C0 89.8531 0.458824 89.3943 0.994118 89.3943H8.64118C9.17647 89.3943 9.63529 89.8531 9.63529 90.3884Z" fill="#F8C62C"></path><path d="M11.9294 86.4117C11.5471 86.7941 10.8589 86.7941 10.4765 86.4117L3.74709 79.6823C3.36474 79.3 3.36474 78.6117 3.74709 78.2294C4.12944 77.847 4.81768 77.847 5.20003 78.2294L11.9294 84.9588C12.3118 85.3412 12.3118 86.0294 11.9294 86.4117Z" fill="#F8C62C"></path><path d="M87.7117 105.682H82.9706V100.941H80.8294V105.682H76.1647V107.747H80.8294V112.488H82.9706V107.747H87.7117V105.682Z" fill="#F8C62C"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M136.194 129.159H137.724C146.365 129.159 153.4 122.2 153.324 113.559V99.6413C153.324 91.0766 146.365 84.0413 137.724 84.0413H136.194C127.629 84.0413 120.594 91.0001 120.594 99.6413V113.559C120.594 122.124 127.553 129.159 136.194 129.159ZM122.888 99.5648C122.888 92.2236 128.853 86.2589 136.194 86.2589H137.724C145.065 86.2589 151.029 92.2236 151.029 99.5648V113.482C151.029 120.824 145.065 126.788 137.724 126.788H136.194C128.853 126.788 122.888 120.824 122.888 113.482V99.5648Z" fill="#30374B"></path><path d="M137.112 104.459C136.271 104.459 135.582 103.771 135.582 102.929V98.4176C135.582 97.5764 136.271 96.8882 137.112 96.8882C137.953 96.8882 138.641 97.5764 138.641 98.4176V102.929C138.641 103.771 137.953 104.459 137.112 104.459Z" fill="#30374B"></path><path d="M102.776 106.753L108.129 101.4C108.588 100.941 108.588 100.253 108.129 99.7941C107.671 99.3352 106.982 99.3352 106.524 99.7941L100.406 105.912C100.176 106.141 100.1 106.447 100.1 106.753C100.1 107.059 100.176 107.365 100.406 107.594L106.524 113.712C106.982 114.171 107.671 114.171 108.129 113.712C108.588 113.253 108.588 112.565 108.129 112.106L102.776 106.753Z" fill="#F8C62C"></path><path d="M171.218 106.753L165.865 101.4C165.406 100.941 165.406 100.253 165.865 99.7941C166.324 99.3352 167.012 99.3352 167.471 99.7941L173.588 105.912C173.818 106.141 173.894 106.447 173.894 106.753C173.894 107.059 173.818 107.365 173.588 107.594L167.471 113.712C167.012 114.171 166.324 114.171 165.865 113.712C165.406 113.253 165.406 112.565 165.865 112.106L171.218 106.753Z" fill="#F8C62C"></path>',20)])])}const B9t=V(x9t,[["render",E9t]]),I9t={},S9t={width:"42",height:"55",viewBox:"0 0 42 55",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function P9t(i,e){return E(),L("svg",S9t,[...e[0]||(e[0]=[ss('<path d="M1.7192 47.4914L0.501465 10.6013H40.8298L40.3284 47.4914H1.7192Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M1.36104 47.8495H40.6866L41.188 10.2432H0.143311L1.36104 47.8495ZM39.9703 47.1332H2.07735L0.859623 10.9595H40.4717L39.9703 47.1332Z" fill="#9E9E9E"></path><path d="M4.29792 0.429688L0.501465 10.6013H40.8298L37.5348 0.429688H4.29792Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M0 10.9596H41.3312L37.7496 0H4.01135L0 10.9596ZM40.3284 10.2433H1.00284L4.51277 0.716312H37.2482L40.3284 10.2433Z" fill="#9E9E9E"></path><path d="M18.9312 23.0255C19.4326 23.0255 19.8624 22.5957 19.8624 22.0943V14.9312C19.8624 14.4298 19.4326 14 18.9312 14C18.4298 14 18 14.4298 18 14.9312V22.0943C18 22.5957 18.4298 23.0255 18.9312 23.0255Z" fill="#F8C62C"></path><path d="M24.3035 28.9708C24.3035 29.4722 24.7333 29.902 25.2347 29.902H32.3978C32.8992 29.902 33.329 29.4722 33.329 28.9708C33.329 28.4693 32.8992 28.0395 32.3978 28.0395H25.2347C24.7333 27.9679 24.3035 28.3977 24.3035 28.9708Z" fill="#F8C62C"></path><path d="M22.1546 25.2461C22.5128 25.6043 23.1575 25.6043 23.5156 25.2461L29.8192 18.9426C30.1773 18.5844 30.1773 17.9398 29.8192 17.5816C29.461 17.2234 28.8163 17.2234 28.4582 17.5816L22.1546 23.8852C21.7248 24.2433 21.7248 24.8164 22.1546 25.2461Z" fill="#F8C62C"></path><path d="M21.5855 31.4087L21.3477 51.0688L26.5798 46.0745L34.5865 46.6294L21.5855 31.4087Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M20.0793 54.9534L20 28L37.2819 48.6114L26.8969 47.0259L20.0793 54.9534ZM22.2197 33.9456L22.299 49.087L26.1041 44.6477L31.9705 45.5197L22.2197 33.9456Z" fill="black"></path>',9)])])}const T9t=V(I9t,[["render",P9t]]),k9t={},R9t={width:"124",height:"152",viewBox:"0 0 124 152",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function _9t(i,e){return E(),L("svg",R9t,[...e[0]||(e[0]=[ss('<path d="M10.5436 0.396484H112.649L123.272 103.216H0.475708L10.5436 0.396484Z" fill="#F2F2F2"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M0 103.612H123.668L113.046 0.317098V0H10.2264L0.0792746 103.216L0 103.612ZM122.876 102.819H0.951324L10.9399 0.792766H112.332L122.876 102.819Z" fill="#9E9E9E"></path><path d="M40.7472 10.2266L39.241 48.6747H83.7933V10.2266H40.7472Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M38.8446 49.071H84.1897H84.269V9.83008H40.3508L38.8446 49.071ZM83.4762 48.2783H39.7166L41.0643 10.6228H83.4762V48.2783Z" fill="#9E9E9E"></path><path d="M39.2408 48.6748L43.1253 64.0541H79.988L83.7932 48.6748H39.2408Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M42.8083 64.4503H80.3052L84.3482 48.2783H38.7653L42.8083 64.4503ZM79.671 63.6576H43.4425L39.7958 49.0711H83.3176L79.671 63.6576Z" fill="#9E9E9E"></path><path d="M64.6088 36.1494L64.371 55.8095L69.6031 50.8152L77.6098 51.3701L64.6088 36.1494Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M63.1026 59.6938L63.0233 32.7405L80.3052 53.3519L69.9202 51.7664L63.1026 59.6938ZM65.243 38.6861L65.3223 53.8275L69.1275 49.3881L74.9938 50.2602L65.243 38.6861Z" fill="black"></path><path d="M61.7549 130.724H61.3585C52.7176 130.724 45.5829 123.589 45.5829 114.948V101.709C45.5829 93.0686 52.7176 85.9338 61.3585 85.9338H61.7549C70.3958 85.9338 77.5306 93.0686 77.5306 101.709V114.948C77.5306 123.589 70.4751 130.724 61.7549 130.724Z" fill="white"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M44.7902 114.79C44.7902 124.144 52.4005 131.754 61.7549 131.754C71.1093 131.754 78.7197 124.065 78.7197 114.79V101.947C78.7197 92.5928 71.1093 84.9824 61.7549 84.9824C52.4005 84.9824 44.7902 92.5928 44.7902 101.947V114.79ZM47.1684 101.868C47.1684 93.8612 53.6689 87.2814 61.7549 87.2814C69.7617 87.2814 76.3415 93.7819 76.3415 101.868V114.71C76.3415 122.717 69.8409 129.297 61.7549 129.297C53.7482 129.297 47.1684 122.796 47.1684 114.71V101.868Z" fill="#30374B"></path><path d="M61.8341 106.069C60.9621 106.069 60.2487 105.356 60.2487 104.484V100.996C60.2487 100.124 60.9621 99.4104 61.8341 99.4104C62.7062 99.4104 63.4196 100.124 63.4196 100.996V104.484C63.4196 105.356 62.7062 106.069 61.8341 106.069Z" fill="#30374B"></path><path d="M61.8341 97.7457C60.9621 97.7457 60.2487 97.0322 60.2487 96.1602C60.2487 95.2882 60.9621 94.5747 61.8341 94.5747C62.7062 94.5747 63.4196 95.2882 63.4196 96.1602C63.4196 97.0322 62.7062 97.7457 61.8341 97.7457Z" fill="#30374B"></path><path d="M61.8341 110.826C60.9621 110.826 60.2487 110.113 60.2487 109.241C60.2487 108.369 60.9621 107.655 61.8341 107.655C62.7062 107.655 63.4196 108.369 63.4196 109.241C63.4196 110.113 62.7062 110.826 61.8341 110.826Z" fill="#30374B"></path><path d="M61.8342 142.298L67.3834 136.749C67.859 136.273 68.5725 136.273 69.0481 136.749C69.5238 137.224 69.5238 137.938 69.0481 138.414L62.7062 144.756C62.4684 144.993 62.1513 145.073 61.8342 145.073C61.5171 145.073 61.2 144.993 60.9621 144.756L54.6202 138.414C54.1445 137.938 54.1445 137.224 54.6202 136.749C55.0958 136.273 55.8093 136.273 56.2849 136.749L61.8342 142.298Z" fill="#F8C62C"></path><path d="M61.8342 149.195L67.3834 143.646C67.859 143.17 68.5725 143.17 69.0481 143.646C69.5238 144.121 69.5238 144.835 69.0481 145.311L62.7062 151.653C62.4684 151.89 62.1513 151.97 61.8342 151.97C61.5171 151.97 61.2 151.89 60.9621 151.653L54.6202 145.311C54.1445 144.835 54.1445 144.121 54.6202 143.646C55.0958 143.17 55.8093 143.17 56.2849 143.646L61.8342 149.195Z" fill="#F8C62C"></path>',15)])])}const D9t={name:"FirstPersonViewHelper",components:{KeyboardNavigate:v9t,KeyboardStorey:b9t,MouseMove:B9t,MouseStorey:T9t,MouseZoom:V(k9t,[["render",_9t]])},emits:["close"],methods:{close(){this.$emit("close")},clear(){localStorage.setItem("firstPersonViewHelper","false"),this.close()}}},L9t={class:"bimdata-first-person-view-helper"},F9t={class:"bimdata-first-person-view-helper__header"},O9t={class:"bimdata-first-person-view-helper__content"},N9t={class:"bimdata-first-person-view-helper__content__main"},U9t={class:"bimdata-first-person-view-helper__content__main__left"},V9t={class:"bimdata-first-person-view-helper__content__main__left__element"},H9t={class:"bimdata-first-person-view-helper__content__main__left__element__picture"},z9t={class:"bimdata-first-person-view-helper__content__main__left__element__text"},j9t={class:"bimdata-first-person-view-helper__content__main__left__element__text__tilte"},G9t={class:"bimdata-first-person-view-helper__content__main__left__element__text__list"},Q9t={class:"bimdata-first-person-view-helper__content__main__left__element"},q9t={class:"bimdata-first-person-view-helper__content__main__left__element__picture"},K9t={class:"bimdata-first-person-view-helper__content__main__left__element__text"},J9t={class:"bimdata-first-person-view-helper__content__main__left__element__text__tilte"},W9t={class:"bimdata-first-person-view-helper__content__main__left__element__text__list"},Z9t={class:"bimdata-first-person-view-helper__content__main__left__element"},Y9t={class:"bimdata-first-person-view-helper__content__main__left__element__picture"},X9t={class:"bimdata-first-person-view-helper__content__main__left__element__text"},$9t={class:"bimdata-first-person-view-helper__content__main__left__element__text__tilte"},eCt={class:"bimdata-first-person-view-helper__content__main__left__element__text__list"},tCt={class:"bimdata-first-person-view-helper__content__main__right"},iCt={class:"bimdata-first-person-view-helper__content__main__right__title"},nCt={class:"bimdata-first-person-view-helper__content__main__right__content"},oCt={class:"bimdata-first-person-view-helper__content__main__right__content__picture"},sCt={class:"bimdata-first-person-view-helper__content__main__right__content__picture__element"},rCt={class:"bimdata-first-person-view-helper__content__main__right__content__picture__element"},aCt={class:"bimdata-first-person-view-helper__content__main__right__content__text"},lCt={class:"bimdata-first-person-view-helper__content__footer"},cCt={class:"bimdata-first-person-view-helper__footer-buttons"};function uCt(i,e,t,n,o,r){const s=P("KeyboardNavigate"),a=P("MouseMove"),l=P("MouseZoom"),c=P("MouseStorey"),u=P("KeyboardStorey"),d=P("BIMDataButton");return E(),L("div",L9t,[C("h1",F9t,G(i.$t("viewer3d.firstPersonViewHelper.title")),1),C("div",O9t,[C("div",N9t,[C("div",U9t,[C("div",V9t,[C("div",H9t,[k(s)]),C("div",z9t,[C("h4",j9t,G(i.$t("viewer3d.firstPersonViewHelper.keyboardUsage")),1),C("ul",G9t,[C("li",null,G(i.$t("viewer3d.firstPersonViewHelper.forward")),1),C("li",null,G(i.$t("viewer3d.firstPersonViewHelper.backward")),1),C("li",null,G(i.$t("viewer3d.firstPersonViewHelper.left")),1),C("li",null,G(i.$t("viewer3d.firstPersonViewHelper.right")),1)])])]),C("div",Q9t,[C("div",q9t,[k(a)]),C("div",K9t,[C("h4",J9t,G(i.$t("viewer3d.firstPersonViewHelper.mouseOrientation")),1),C("ul",W9t,[C("li",null,G(i.$t("viewer3d.firstPersonViewHelper.pressLeft")),1),C("li",null,G(i.$t("viewer3d.firstPersonViewHelper.mouseMove")),1),C("li",null,G(i.$t("viewer3d.firstPersonViewHelper.mouseVertical")),1)])])]),C("div",Z9t,[C("div",Y9t,[k(l)]),C("div",X9t,[C("h4",$9t,G(i.$t("viewer3d.firstPersonViewHelper.mouseZoom")),1),C("ul",eCt,[C("li",null,G(i.$t("viewer3d.firstPersonViewHelper.mouseWheelForward")),1),C("li",null,G(i.$t("viewer3d.firstPersonViewHelper.mouseWheelBackward")),1)])])])]),C("div",tCt,[C("h4",iCt,G(i.$t("viewer3d.firstPersonViewHelper.changeStorey")),1),C("div",nCt,[C("div",oCt,[C("div",sCt,[k(c)]),C("div",rCt,[k(u)])]),C("div",aCt,[C("ul",null,[C("li",null,G(i.$t("viewer3d.firstPersonViewHelper.storeyClick")),1),C("li",null,G(i.$t("viewer3d.firstPersonViewHelper.moveCameraToObject")),1)]),C("ul",null,[C("li",null,G(i.$t("viewer3d.firstPersonViewHelper.keyboardStoreyChange")),1)])])])])]),C("div",lCt,G(i.$t("viewer3d.firstPersonViewHelper.contentFooter")),1)]),C("div",cCt,[k(d,{color:"primary",fill:"",radius:"",width:"200px",onClick:r.close},{default:U(()=>[We(G(i.$t("viewer3d.firstPersonViewHelper.understand")),1)]),_:1},8,["onClick"]),k(d,{color:"primary",outline:"",radius:"",width:"200px",onClick:r.clear},{default:U(()=>[We(G(i.$t("viewer3d.firstPersonViewHelper.noRecall")),1)]),_:1},8,["onClick"])])])}const Sie=V(D9t,[["render",uCt],["__scopeId","data-v-77cce9d5"]]),dCt={components:{ShortcutsModal:bw,FirstPersonViewHelper:Sie},data(){const i=this.$t;return{tabs:[{id:0,get label(){return i("viewer3d.modals.3d")}},{id:1,get label(){return i("viewer3d.modals.firstPerson")}}],activeTab:0,elements:[{image:"shortcutRotate",title:this.$t("shortcuts-helper.title_rotate"),text:this.$t("shortcuts-helper.text_rotate")},{image:"shortcutZoom",title:this.$t("shortcuts-helper.title_zoom"),text:this.$t("shortcuts-helper.text_zoom")},{image:"shortcutOpen",title:this.$t("shortcuts-helper.title_open"),text:this.$t("shortcuts-helper.text_open")}],shortcuts:[{letter:"F",text:this.$t("context_menu.fit_view")},{letter:"C",text:this.$t("context_menu.select_all")},{letter:"V",text:this.$t("context_menu.deselect_all")},{letter:"H",text:this.$t("context_menu.hide")},{letter:"Y",text:this.$t("context_menu.select_similar")},{letter:"I",text:this.$t("context_menu.isolate")},{letter:"U",text:this.$t("context_menu.reintegrate")},{letter:"R",text:this.$t("context_menu.show_all")},{letter:"1",text:this.$t("shortcuts-helper.shortcut_1")},{letter:"2",text:this.$t("shortcuts-helper.shortcut_2")},{letter:"3",text:this.$t("shortcuts-helper.shortcut_3")},{letter:"4",text:this.$t("shortcuts-helper.shortcut_4")},{letter:"5",text:this.$t("shortcuts-helper.shortcut_5")},{letter:"6",text:this.$t("shortcuts-helper.shortcut_6")},{maj:!0,text:this.$t("shortcuts-helper.shortcut_pan"),illustration:"click"},{alt:!0,text:this.$t("shortcuts-helper.shortcut_open"),illustration:"click"},{shift:!0,text:this.$t("shortcuts-helper.shortcut_multiselect"),illustration:"click"}]}}},hCt={class:"bimdata-shortcuts-helper__header"};function pCt(i,e,t,n,o,r){const s=P("BIMDataTabs"),a=P("ShortcutsModal"),l=P("FirstPersonViewHelper");return E(),L("div",null,[C("div",hCt,[k(s,{tabs:o.tabs,width:"490px",height:"44px",tabSize:"245",onTabSelected:e[0]||(e[0]=c=>o.activeTab=o.tabs.indexOf(c)),selected:o.activeTab},null,8,["tabs","selected"])]),o.activeTab===0?(E(),K(a,{key:0,elements:o.elements,shortcuts:o.shortcuts,onClose:e[1]||(e[1]=c=>i.$emit("close"))},{title:U(()=>[We(G(i.$t("shortcuts-helper.title_modal")),1)]),_:1},8,["elements","shortcuts"])):(E(),K(l,{key:1,onClose:e[2]||(e[2]=c=>i.$emit("close"))}))])}const fCt=V(dCt,[["render",pCt],["__scopeId","data-v-a26872a0"]]),ACt="data:image/svg+xml,%3csvg%20width='44'%20height='44'%20viewBox='0%200%2044%2044'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3ccircle%20cx='22'%20cy='22'%20r='2'%20fill='%232F374A'/%3e%3cpath%20d='M1.20102%2023.5V24.5H2.20102H10.261C11.4116%2029.9278%2016.2295%2034%2022%2034C27.7705%2034%2032.5884%2029.9278%2033.739%2024.5H41.799H42.799V23.5V20.5V19.5H41.799H33.739C32.5884%2014.0722%2027.7705%2010%2022%2010C16.2295%2010%2011.4116%2014.0722%2010.261%2019.5H2.20102H1.20102V20.5V23.5ZM14.619%2022C14.619%2017.9236%2017.9236%2014.619%2022%2014.619C26.0764%2014.619%2029.381%2017.9236%2029.381%2022C29.381%2026.0764%2026.0764%2029.381%2022%2029.381C17.9236%2029.381%2014.619%2026.0764%2014.619%2022Z'%20fill='%232F374A'%20stroke='white'%20stroke-width='2'/%3e%3c/svg%3e",mCt="data:image/svg+xml,%3csvg%20width='44'%20height='44'%20viewBox='0%200%2044%2044'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3ccircle%20cx='22'%20cy='22'%20r='2'%20fill='%232F374A'/%3e%3cpath%20d='M6.23222%2034.2322L5.52512%2034.9393L6.23222%2035.6464L8.35354%2037.7678L9.06065%2038.4749L9.76776%2037.7678L15.4677%2032.0678C17.3477%2033.2898%2019.592%2034%2022%2034C24.408%2034%2026.6523%2033.2898%2028.5323%2032.0678L34.2322%2037.7678L34.9393%2038.4749L35.6464%2037.7678L37.7678%2035.6465L38.4749%2034.9393L37.7678%2034.2322L32.0678%2028.5323C33.2898%2026.6523%2034%2024.408%2034%2022C34%2019.592%2033.2898%2017.3477%2032.0678%2015.4677L37.7678%209.76776L38.4749%209.06065L37.7678%208.35354L35.6464%206.23222L34.9393%205.52512L34.2322%206.23222L28.5322%2011.9322C26.6523%2010.7102%2024.408%2010%2022%2010C19.592%2010%2017.3477%2010.7102%2015.4677%2011.9322L9.76776%206.23224L9.06065%205.52513L8.35354%206.23224L6.23222%208.35356L5.52512%209.06066L6.23222%209.76777L11.9322%2015.4678C10.7102%2017.3477%2010%2019.592%2010%2022C10%2024.408%2010.7102%2026.6523%2011.9322%2028.5323L6.23222%2034.2322ZM14.619%2022C14.619%2017.9236%2017.9236%2014.6191%2022%2014.6191C26.0764%2014.6191%2029.381%2017.9236%2029.381%2022C29.381%2026.0764%2026.0764%2029.381%2022%2029.381C17.9236%2029.381%2014.619%2026.0764%2014.619%2022Z'%20fill='%232F374A'%20stroke='white'%20stroke-width='2'/%3e%3c/svg%3e",gCt="data:image/svg+xml,%3csvg%20width='44'%20height='44'%20viewBox='0%200%2044%2044'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3ccircle%20cx='22'%20cy='22'%20r='2'%20fill='%232F374A'/%3e%3cpath%20d='M14.619%2022C14.619%2017.9236%2017.9236%2014.619%2022%2014.619C26.0764%2014.619%2029.381%2017.9236%2029.381%2022C29.381%2026.0764%2026.0764%2029.381%2022%2029.381C17.9236%2029.381%2014.619%2026.0764%2014.619%2022ZM22%2010C15.3726%2010%2010%2015.3726%2010%2022C10%2028.6274%2015.3726%2034%2022%2034C28.6274%2034%2034%2028.6274%2034%2022C34%2015.3726%2028.6274%2010%2022%2010Z'%20fill='%232F374A'%20stroke='white'%20stroke-width='2'/%3e%3c/svg%3e",yCt="data:image/svg+xml,%3csvg%20width='44'%20height='44'%20viewBox='0%200%2044%2044'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M14.619%2022C14.619%2017.9236%2017.9236%2014.619%2022%2014.619C23.8642%2014.619%2025.5667%2015.3094%2026.8665%2016.4504L14.7593%2023.4405C14.6673%2022.9751%2014.619%2022.4935%2014.619%2022ZM29.381%2022C29.381%2026.0764%2026.0764%2029.381%2022%2029.381C20.0879%2029.381%2018.3459%2028.6547%2017.0341%2027.4608L29.2136%2020.4289C29.3232%2020.9347%2029.381%2021.4602%2029.381%2022ZM22%2010C15.3726%2010%2010%2015.3726%2010%2022C10%2028.6274%2015.3726%2034%2022%2034C28.6274%2034%2034%2028.6274%2034%2022C34%2015.3726%2028.6274%2010%2022%2010Z'%20fill='%232F374A'%20stroke='white'%20stroke-width='2'/%3e%3c/svg%3e",vCt="data:image/svg+xml,%3csvg%20width='33'%20height='33'%20viewBox='0%200%2033%2033'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M1.70001%2016.8667V17.3667H2.20001H7.33335H7.83335V16.8667V16.1333V15.6333H7.33335L2.20001%2015.6333H1.70001V16.1333L1.70001%2016.8667ZM30.8%2017.3667H31.3V16.8667V16.1333V15.6333H30.8L25.6667%2015.6333H25.1667V16.1333V16.8667V17.3667H25.6667H30.8Z'%20fill='%232F374A'%20stroke='white'/%3e%3cpath%20d='M16.1333%201.70001L15.6333%201.70001L15.6333%202.20001L15.6333%207.33335L15.6333%207.83335L16.1333%207.83335L16.8667%207.83335L17.3667%207.83335L17.3667%207.33335L17.3667%202.20001L17.3667%201.70001L16.8667%201.70001L16.1333%201.70001ZM15.6333%2030.8L15.6333%2031.3L16.1333%2031.3L16.8667%2031.3L17.3667%2031.3L17.3667%2030.8L17.3667%2025.6667L17.3667%2025.1667L16.8667%2025.1667L16.1333%2025.1667L15.6333%2025.1667L15.6333%2025.6667L15.6333%2030.8Z'%20fill='%232F374A'%20stroke='white'/%3e%3c/svg%3e",wCt={0:{positions:[36.5625,31.640625,36.5625,19.51171875,36.42067337036133,16.11605453491211,35.99519348144531,13.020120620727539,35.28605651855469,10.223917961120605,34.293270111083984,7.727446556091309,33.01683044433594,5.530706882476807,30.959993362426758,3.3593661785125732,28.725576400756836,1.6479235887527466,26.31357765197754,.39637935161590576,23.723995208740234,-.39526674151420593,20.956830978393555,-.7270146012306213,20.3203125,-.73828125,17.307449340820312,-.5108020901679993,14.569392204284668,.17163534462451935,12.106142044067383,1.3090311288833618,9.917699813842773,2.9013850688934326,8.174575805664062,5.153988838195801,6.733142375946045,7.555612087249756,5.593398094177246,10.106253623962402,4.755343437194824,12.805914878845215,4.218978404998779,15.654594421386719,3.9843032360076904,18.652292251586914,3.97265625,19.51171875,3.97265625,31.640625,4.115384578704834,35.0230827331543,4.543569564819336,38.11090850830078,5.257210731506348,40.904109954833984,6.256308555603027,43.40268325805664,7.540863037109375,45.606624603271484,9.608292579650879,47.79111099243164,11.846480369567871,49.51402282714844,14.255425453186035,50.775352478027344,16.835128784179688,51.57510757446289,19.585588455200195,51.91328811645508,20.25,51.92578125,23.26165771484375,51.697608947753906,25.997068405151367,51.013092041015625,28.456228256225586,49.872230529785156,30.639141082763672,48.2750244140625,32.375572204589844,46.0158576965332,33.81153869628906,43.60895538330078,34.947044372558594,41.0543212890625,35.78208923339844,38.35194778442383,36.31666946411133,35.5018424987793,36.55078887939453,32.50400161743164,36.5625,31.640625,29.63671875,18.10546875,29.63671875,33.1171875,29.450082778930664,36.561954498291016,28.89017677307129,39.497215270996094,27.956998825073242,41.92298126220703,25.967069625854492,44.22639083862305,23.724157333374023,45.72625732421875,21.228260040283203,46.422576904296875,20.25,46.4765625,17.354780197143555,46.07659912109375,14.97888469696045,44.876708984375,13.33356761932373,42.470394134521484,12.110569953918457,39.9057731628418,11.309891700744629,37.1828498840332,10.931534767150879,34.30161666870117,10.8984375,33.1171875,10.8984375,18.10546875,11.085087776184082,14.669450759887695,11.645040512084961,11.733874320983887,12.578293800354004,9.298736572265625,14.569818496704102,6.974865436553955,16.804428100585938,5.454482555389404,19.282119750976562,4.737586975097656,20.3203125,4.67578125,23.212167739868164,5.077450752258301,25.581016540527344,6.282459735870361,27.21183204650879,8.69408893585205,28.425546646118164,11.263723373413086,29.2221622467041,13.991360664367676,29.6016788482666,16.877002716064453],indices:[0,2,1,2,4,3,4,6,5,6,8,7,8,10,9,10,12,11,12,14,13,14,16,15,16,18,17,18,20,19,20,22,21,22,24,23,24,63,62,61,24,62,24,26,25,26,28,27,28,30,29,30,32,31,32,34,33,34,36,35,36,38,37,38,40,39,40,42,41,42,44,43,44,0,45,0,4,2,4,8,6,8,12,10,12,16,14,16,20,18,20,24,22,24,64,63,60,24,61,24,28,26,28,32,30,32,36,34,36,40,38,40,44,42,44,4,0,4,12,8,12,20,16,20,64,24,59,24,60,24,32,28,32,40,36,40,4,44,20,65,64,58,24,59,20,66,65,57,24,58,12,66,20,57,32,24,12,67,66,56,32,57,12,68,67,55,32,56,12,69,68,54,32,55,12,70,69,53,32,54,12,71,70,53,40,32,4,71,12,52,40,53,4,72,71,51,40,52,4,73,72,50,40,51,4,74,73,49,40,50,4,75,74,48,40,49,4,76,75,47,40,48,40,76,4,76,40,47],width:32.58984375},1:{positions:[23.94140625,51.1875,23.94140625,0,17.015625,0,17.015625,44.4375,6.5390625,44.296875,6.5390625,49.2890625],indices:[0,2,1,3,5,4,0,3,2,3,0,5],width:17.40234375},2:{positions:[37.3359375,5.4140625,37.3359375,0,4.1484375,0,4.1484375,4.74609375,20.91796875,23.37890625,23.33412742614746,26.180971145629883,25.239078521728516,28.61744499206543,26.632823944091797,30.68832778930664,27.938528060913086,33.606327056884766,28.560094833374023,36.34145736694336,28.6171875,37.40625,28.23740577697754,40.36100769042969,27.09806251525879,42.90309143066406,24.87748908996582,45.0150146484375,22.4631290435791,46.19827651977539,20.4609375,46.4765625,17.237478256225586,46.17487716674805,14.632962226867676,45.26981735229492,12.647390365600586,43.76138687133789,11.200069427490234,41.599464416503906,10.360716819763184,38.91020965576172,10.125,36.10546875,3.48046875,36.10546875,3.41015625,36.31640625,3.580944538116455,39.24900436401367,4.255249977111816,41.95781326293945,5.433072566986084,44.442840576171875,7.114412784576416,46.704078674316406,9.256887435913086,48.52997589111328,11.61109447479248,49.96455383300781,14.177034378051758,51.007816314697266,16.954708099365234,51.659759521484375,19.944114685058594,51.920387268066406,20.4609375,51.92578125,23.575925827026367,51.698787689208984,26.37569808959961,51.01780319213867,28.86025619506836,49.88283157348633,31.029598236083984,48.29386901855469,32.93091583251953,46.07616424560547,34.31552505493164,43.65195846557617,35.18342971801758,41.0212516784668,35.53462600708008,38.18403625488281,35.54296875,37.65234375,35.271297454833984,34.8802490234375,34.45627975463867,32.10430145263672,33.097923278808594,29.324501037597656,31.655981063842773,27.067161560058594,29.948768615722656,24.73398208618164,27.976285934448242,22.324962615966797,26.12109375,20.25,12.65625,5.58984375,12.7265625,5.4140625],indices:[51,1,0,1,3,2,20,22,21,22,24,23,24,26,25,26,28,27,28,30,29,30,32,31,32,34,33,34,36,35,36,38,37,38,40,39,40,42,41,42,44,43,44,46,45,46,48,47,48,50,49,51,3,1,19,22,20,22,26,24,26,30,28,30,34,32,34,38,36,38,42,40,42,46,44,46,50,48,50,3,51,18,22,19,22,30,26,30,38,34,38,46,42,46,3,50,18,30,22,46,4,3,17,30,18,46,5,4,16,30,17,46,6,5,15,30,16,46,7,6,14,30,15,46,8,7,13,30,14,38,8,46,13,38,30,38,9,8,12,38,13,38,10,9,11,38,12,38,11,10],width:33.92578125},3:{positions:[13.640625,23.37890625,13.640625,28.79296875,19.6875,28.79296875,22.903934478759766,29.15167236328125,25.282482147216797,30.227783203125,26.954715728759766,32.621280670166016,27.896883010864258,35.25688171386719,28.125,37.51171875,27.781084060668945,40.67007064819336,26.749338150024414,43.162776947021484,24.544097900390625,45.051876068115234,22.03769302368164,46.1552734375,19.51171875,46.4765625,16.51466941833496,46.0916633605957,14.03652286529541,44.93696212768555,12.056009292602539,42.62509536743164,10.906388282775879,40.13740539550781,10.58203125,37.79296875,3.9375,37.79296875,3.8671875,38.00390625,4.073190689086914,40.847023010253906,4.870357036590576,43.464176177978516,6.258687496185303,45.85536193847656,8.649903297424316,47.949581146240234,11.105090141296387,49.6024169921875,13.624245643615723,50.81385803222656,16.207372665405273,51.58391189575195,18.854469299316406,51.912574768066406,19.51171875,51.92578125,22.69034194946289,51.71705627441406,25.550539016723633,51.090885162353516,28.09231185913086,50.04726028442383,30.315656661987305,48.58618927001953,32.206153869628906,46.54783248901367,33.6175651550293,44.22849655151367,34.54988479614258,41.62818145751953,35.00312423706055,38.74688720703125,35.05078125,37.37109375,34.68306350708008,34.60222244262695,33.579917907714844,31.84009552001953,31.788928985595703,29.416330337524414,29.652488708496094,27.526569366455078,27.38671875,26.26171875,30.2706241607666,24.998523712158203,32.5009765625,23.31671142578125,34.190120697021484,20.399517059326172,35.28596115112305,17.665790557861328,35.78849792480469,15.115530967712402,35.82421875,14.2734375,35.583168029785156,11.223187446594238,34.860015869140625,8.486950874328613,33.65475845336914,6.064727306365967,31.9674015045166,3.9565165042877197,29.64410972595215,2.185784339904785,27.159265518188477,.8323085308074951,24.512863159179688,-.10391119122505188,21.704906463623047,-.6228747963905334,19.51171875,-.73828125,16.397254943847656,-.535150945186615,13.541664123535156,.07424008101224899,10.9449462890625,1.089891791343689,8.607102394104004,2.5118041038513184,6.504549980163574,4.569301605224609,4.957869052886963,6.847413539886475,3.9670591354370117,9.34614086151123,3.5321204662323,12.065483093261719,3.515625,13.2890625,3.62109375,13.5,10.23046875,13.5,10.628458976745605,10.52513313293457,11.822431564331055,8.080921173095703,14.14232063293457,6.207763671875,16.670166015625,5.072887420654297,19.405969619750977,4.6762919425964355,19.51171875,4.67578125,22.593053817749023,5.02486515045166,25.119962692260742,6.072116374969482,27.08766746520996,8.277663230895996,28.33972930908203,10.727699279785156,28.876150131225586,13.422224998474121,28.8984375,14.1328125,28.579307556152344,17.37627601623535,27.621917724609375,19.90043067932129,25.462261199951172,21.754257202148438,22.976253509521484,22.91082000732422,20.163896560668945,23.3701229095459,19.6875,23.37890625],indices:[86,1,0,16,18,17,18,20,19,20,22,21,22,24,23,24,26,25,26,28,27,28,30,29,30,32,31,32,34,33,34,36,35,36,38,37,38,40,39,40,42,41,42,44,43,44,46,45,46,48,47,48,50,49,50,52,51,52,54,53,54,56,55,56,58,57,58,60,59,60,62,61,62,64,63,64,66,65,66,68,67,85,1,86,15,18,16,18,22,20,22,26,24,26,30,28,30,34,32,34,38,36,38,42,40,42,46,44,46,50,48,50,54,52,54,58,56,58,62,60,62,66,64,66,69,68,84,1,85,14,18,15,18,26,22,26,34,30,34,42,38,42,50,46,50,58,54,58,66,62,66,70,69,83,1,84,14,26,18,58,70,66,83,2,1,13,26,14,58,71,70,82,2,83,12,26,13,58,72,71,82,3,2,11,26,12,58,73,72,82,4,3,10,26,11,58,74,73,81,4,82,10,34,26,58,75,74,9,34,10,50,75,58,8,34,9,50,76,75,7,34,8,50,77,76,6,34,7,50,78,77,5,34,6,50,79,78,5,42,34,50,80,79,4,42,5,50,81,80,81,42,4,42,81,50],width:32.30859375},4:{positions:[31.81640625,51.1875,31.81640625,17.2265625,38.8828125,17.2265625,38.8828125,11.8125,31.81640625,11.8125,31.81640625,0,24.92578125,0,24.92578125,11.8125,1.93359375,11.8125,1.93359375,15.71484375,24.50390625,51.1875,31.81640625,51.1875,24.046875,39.515625,9.31640625,17.2265625,24.92578125,17.2265625,24.92578125,41.23828125,24.71484375,41.2734375],indices:[1,3,2,4,6,5,7,9,8,9,14,13,16,13,12,13,10,9,10,1,0,1,4,3,4,7,6,7,14,9,16,10,13,10,4,1,4,14,7,15,10,16,4,15,14,15,4,10],width:36.94921875},5:{positions:[11.91796875,22.5,6.15234375,23.09765625,9.10546875,51.1875,34.734375,51.1875,34.734375,45.03515625,14.9765625,45.03515625,13.2890625,30.65625,14.99853515625,31.75048828125,16.892578125,32.642578125,19.03271484375,33.25341796875,21.48046875,33.50390625,21.48046875,33.50390625,24.524171829223633,33.29277038574219,27.260135650634766,32.595733642578125,29.6883602142334,31.412792205810547,31.808847427368164,29.743946075439453,33.53106689453125,27.481525421142578,34.8779411315918,25.034576416015625,35.84947204589844,22.40309715270996,36.44565963745117,19.58709144592285,36.66650390625,16.586557388305664,36.66796875,16.3125,36.47660446166992,13.1383056640625,35.90251541137695,10.244234085083008,34.94569778442383,7.630287170410156,33.60615158081055,5.296463966369629,31.54420280456543,3.2312631607055664,29.28870391845703,1.597025990486145,26.839656829833984,.3937528729438782,24.197057723999023,-.3785564601421356,21.360912322998047,-.7199019193649292,20.49609375,-.73828125,17.404800415039062,-.5199803113937378,14.58151912689209,.13492262363433838,12.026251792907715,1.226427435874939,9.738997459411621,2.7545342445373535,7.902623653411865,4.662389278411865,6.586172580718994,6.943535327911377,5.78964376449585,9.59797191619873,5.513038158416748,12.625699043273926,5.51953125,13.25390625,5.58984375,13.46484375,11.84765625,13.46484375,12.231374740600586,10.424592018127441,13.382529258728027,7.983725547790527,15.769926071166992,6.059262275695801,18.29474449157715,4.960567474365234,20.49609375,4.67578125,23.407373428344727,5.077446937561035,25.80744171142578,6.282444000244141,27.603513717651367,8.744783401489258,28.85628890991211,11.317317962646484,29.565767288208008,14.000046730041504,29.7421875,16.2421875,29.464466094970703,19.35067367553711,28.631298065185547,22.06241226196289,26.50613021850586,24.628503799438477,24.30402374267578,26.380647659301758,22.024982452392578,27.31884002685547,20.49609375,27.4921875,17.11406707763672,27.2115478515625,14.758378028869629,26.369632720947266,13.049945831298828,24.7330322265625],indices:[2,4,3,6,8,7,12,14,13,14,16,15,16,18,17,18,20,19,20,22,21,22,24,23,24,26,25,26,28,27,28,30,29,30,32,31,32,34,33,34,36,35,36,38,37,38,40,39,40,42,41,2,5,4,6,9,8,12,16,14,16,20,18,20,24,22,24,28,26,28,32,30,32,36,34,36,40,38,40,43,42,1,5,2,12,20,16,20,28,24,28,36,32,36,43,40,1,6,5,36,44,43,1,9,6,36,45,44,28,45,36,28,46,45,28,47,46,28,48,47,28,49,48,20,49,28,20,50,49,20,51,50,20,52,51,20,53,52,20,54,53,20,55,54,12,55,20,12,56,55,12,57,56,12,58,57,12,59,58,12,60,59,12,61,60,1,11,9,11,61,12,62,1,0,1,61,11,61,1,62],width:31.154930591583252},6:{positions:[23.73046875,51.92578125,23.73046875,51.92578125,26.35400390625,51.7763671875,28.951171875,51.328125,31.31103515625,50.6513671875,33.22265625,49.81640625,33.22265625,49.81640625,31.74609375,44.5078125,29.98388671875,45.30322265625,28.142578125,45.931640625,26.09912109375,46.34033203125,23.73046875,46.4765625,23.73046875,46.4765625,20.900758743286133,46.15056610107422,18.386611938476562,45.17258071899414,16.18802833557129,43.5426025390625,14.465424537658691,41.076210021972656,13.138894081115723,38.50679397583008,12.208439826965332,35.8343505859375,11.67405891418457,33.05888366699219,11.53125,30.62109375,11.53125,29.8125,13.904020309448242,31.542055130004883,16.591995239257812,32.85417938232422,19.408527374267578,33.66147994995117,22.372249603271484,33.98829650878906,22.921875,33.99609375,25.913307189941406,33.7476806640625,28.614002227783203,33.002437591552734,31.023962020874023,31.7603702545166,33.143184661865234,30.021472930908203,34.91127014160156,27.67707633972168,36.273963928222656,25.183759689331055,37.23126983642578,22.541519165039062,37.783180236816406,19.750356674194336,37.93359375,17.2265625,37.749637603759766,14.08007526397705,37.19777297973633,11.182336807250977,36.27799606323242,8.533347129821777,34.99031066894531,6.1331071853637695,32.81218719482422,3.8232548236846924,30.5310001373291,1.9849358797073364,28.146751403808594,.6181499361991882,25.65943717956543,-.2771027684211731,23.069063186645508,-.7008222937583923,22.0078125,-.73828125,19.07733154296875,-.5163767337799072,16.358732223510742,.14933684468269348,13.852017402648926,1.2588595151901245,11.557185173034668,2.8121912479400635,9.638298988342285,5.0737128257751465,8.030496597290039,7.450648784637451,6.733777046203613,9.942998886108398,5.748140335083008,12.550763130187988,5.073586463928223,15.273941993713379,4.710115432739258,18.112533569335938,4.640625,20.07421875,4.640625,29.84765625,4.791966915130615,33.015262603759766,5.245992183685303,35.97719955444336,6.0027008056640625,38.73346710205078,7.062093257904053,41.28406524658203,8.424168586730957,43.62899398803711,10.08892822265625,45.768253326416016,12.196839332580566,47.81597900390625,14.478988647460938,49.4511604309082,16.93537712097168,50.673797607421875,19.56600570678711,51.483890533447266,22.370872497558594,51.881439208984375,21.375,28.828125,21.375,28.828125,18.29266357421875,28.514667510986328,15.669046401977539,27.57429313659668,13.216089248657227,25.754901885986328,11.53125,23.5546875,11.53125,23.5546875,11.53125,19.40625,11.72034740447998,16.05575180053711,12.287637710571289,13.114592552185059,13.233122825622559,10.582772254943848,15.422850608825684,7.959404945373535,17.641748428344727,6.1007585525512695,19.889812469482422,5.006833076477051,22.0078125,4.67578125,24.755970001220703,5.117502212524414,27.043012619018555,6.4426655769348145,28.768321990966797,9.139809608459473,30.00419807434082,11.825053215026855,30.75064468383789,14.498397827148438,31.007658004760742,17.15984344482422,31.0078125,17.2265625,30.737268447875977,20.334959030151367,29.925634384155273,23.062726974487305,28.57291030883789,25.409866333007812,26.557069778442383,27.331403732299805,24.112672805786133,28.470571517944336],indices:[2,4,3,21,23,22,23,25,24,25,27,26,27,29,28,29,31,30,31,33,32,33,35,34,35,37,36,37,39,38,39,41,40,41,43,42,43,45,44,45,47,46,47,49,48,49,51,50,51,53,52,53,55,54,55,57,56,57,59,58,59,61,60,61,63,62,63,65,64,65,67,66,21,25,23,25,29,27,29,33,31,33,37,35,37,41,39,41,45,43,45,49,47,49,53,51,53,57,55,57,61,59,61,65,63,65,68,67,21,29,25,29,37,33,37,45,41,45,53,49,57,65,61,57,68,65,73,57,74,68,2,1,2,6,4,6,8,7,53,75,57,72,57,73,68,6,2,6,9,8,53,76,75,71,57,72,68,9,6,53,77,76,70,57,71,68,10,9,53,78,77,68,12,10,53,79,78,68,13,12,45,79,53,68,14,13,45,80,79,68,15,14,45,81,80,57,15,68,45,82,81,57,16,15,45,83,82,57,17,16,45,84,83,57,18,17,37,84,45,57,19,18,37,85,84,57,20,19,37,86,85,57,21,20,37,87,86,70,21,57,37,88,87,70,29,21,37,89,88,95,29,70,37,90,89,94,29,95,29,90,37,93,29,94,29,91,90,92,29,93,29,92,91],width:33.29296875},7:{positions:[37.3359375,51.1875,37.3359375,45.73828125,35.06884002685547,42.96620559692383,32.99747848510742,40.27573776245117,31.121856689453125,37.666873931884766,29.441970825195312,35.13961410522461,27.957822799682617,32.6939582824707,26.669410705566406,30.329906463623047,25.576738357543945,28.047460556030273,24.585519790649414,25.34857940673828,23.679515838623047,22.592660903930664,22.85872459411621,19.779708862304688,22.123149871826172,16.909719467163086,21.47278594970703,13.982696533203125,20.907638549804688,10.998638153076172,20.427703857421875,7.957544803619385,20.109375,5.51953125,19.546875,0,12.62109375,0,13.18359375,5.51953125,13.624162673950195,8.682632446289062,14.162458419799805,11.7554292678833,14.798481941223145,14.737921714782715,15.532232284545898,17.630107879638672,16.363710403442383,20.431991577148438,17.29291534423828,23.14356803894043,18.319847106933594,25.764841079711914,19.59184455871582,28.50404167175293,20.94556999206543,31.184146881103516,22.381019592285156,33.80515670776367,23.898197174072266,36.367069244384766,25.497098922729492,38.86988830566406,27.17772674560547,41.31361389160156,28.940080642700195,43.6982421875,30.55078125,45.73828125,2.70703125,45.73828125,2.70703125,51.1875],indices:[36,1,0,16,18,17,18,20,19,20,22,21,22,24,23,24,26,25,26,28,27,28,30,29,30,32,31,32,34,33,34,36,35,15,18,16,18,22,20,22,26,24,26,30,28,30,34,32,34,1,36,14,18,15,18,26,22,26,34,30,34,2,1,13,18,14,18,34,26,34,3,2,12,18,13,34,4,3,11,18,12,34,5,4,10,18,11,34,6,5,9,18,10,34,7,6,8,18,9,34,8,7,8,34,18],width:34.62890625},8:{positions:[35.5078125,37.828125,35.5078125,37.828125,35.171749114990234,34.87995147705078,34.16355895996094,32.23108673095703,32.111854553222656,29.74087905883789,29.926387786865234,27.833354949951172,27.60715675354004,26.50851058959961,27.17578125,26.33203125,29.95149040222168,25.094419479370117,32.32651901245117,23.460092544555664,34.43555450439453,20.72713279724121,35.900413513183594,18.128986358642578,36.721099853515625,15.665656089782715,36.9140625,13.8515625,36.669769287109375,10.764041900634766,35.936893463134766,8.031349182128906,34.71543502807617,5.653482913970947,33.00539016723633,3.630444288253784,30.672534942626953,1.9876797199249268,28.159135818481445,.7305349111557007,25.465194702148438,-.14099019765853882,22.590709686279297,-.6268956065177917,20.28515625,-.73828125,17.073928833007812,-.5518752932548523,14.154998779296875,.007342617027461529,11.52836799621582,.9393724799156189,9.194035530090332,2.2442142963409424,7.087226867675781,4.249664306640625,5.474374294281006,6.483748912811279,4.355478763580322,8.946466445922852,3.730539560317993,11.637818336486816,3.5859375,13.8515625,3.9077277183532715,16.76708984375,4.873098373413086,19.430402755737305,6.983664512634277,21.999971389770508,9.1663179397583,24.03520965576172,11.421058654785156,25.536113739013672,13.21875,26.33203125,10.521642684936523,27.690086364746094,8.310940742492676,29.498327255249023,6.554880142211914,32.2148551940918,5.462681293487549,34.86786651611328,5.034343719482422,37.45735549926758,5.02734375,37.828125,5.274991512298584,40.936737060546875,6.0179338455200195,43.679622650146484,7.256171703338623,46.056785583496094,8.989704132080078,48.0682258605957,11.195730209350586,49.67716598510742,13.679861068725586,50.85453796386719,16.442096710205078,51.60033416748047,19.482437133789062,51.914554595947266,20.21484375,51.92578125,23.33972930908203,51.71018600463867,26.17371940612793,51.06340789794922,28.716812133789062,49.98543930053711,30.96900749206543,48.476287841796875,32.855812072753906,46.481101989746094,34.23870849609375,44.16929626464844,35.11769485473633,41.54087829589844,35.49277114868164,38.5958366394043,30.0234375,13.9921875,30.0234375,13.9921875,29.64218521118164,16.91078758239746,28.498428344726562,19.414352416992188,26.08045768737793,21.54735565185547,23.622779846191406,22.934738159179688,21.125396728515625,23.576496124267578,20.21484375,23.625,17.24955177307129,23.25731658935547,14.728343963623047,22.15427017211914,12.576437950134277,19.76153564453125,11.184748649597168,17.31914710998535,10.553275108337402,14.827102661132812,10.51171875,13.9921875,10.887092590332031,10.988458633422852,12.013215065002441,8.51321792602539,14.405669212341309,6.533318519592285,16.906885147094727,5.263905048370361,19.516860961914062,4.704977512359619,20.28515625,4.67578125,23.29867172241211,5.026233196258545,25.858081817626953,6.077588081359863,28.013742446899414,8.338984489440918,29.392438888549805,10.737264633178711,29.994173049926758,13.27242660522461,28.58203125,37.6875,28.58203125,37.6875,28.174694061279297,40.610374450683594,26.952680587768555,43.08668899536133,24.61227035522461,45.108375549316406,22.137697219848633,46.228328704833984,20.21484375,46.4765625,17.313322067260742,46.03565979003906,14.926724433898926,44.71294403076172,13.154691696166992,42.36640930175781,12.172061920166016,39.77567672729492,11.953125,37.6875,12.353304862976074,34.70274353027344,13.553845405578613,32.25563430786133,15.877814292907715,30.335918426513672,18.399682998657227,29.288454055786133,20.28515625,29.07421875,23.187891006469727,29.511512756347656,25.59459114074707,30.82339859008789,27.39614486694336,33.1435661315918,28.379940032958984,35.7212028503418],indices:[96,43,97,43,45,44,45,47,46,47,49,48,49,51,50,51,53,52,53,55,54,55,57,56,57,59,58,59,1,60,1,3,2,3,5,4,5,7,6,7,9,8,9,11,10,11,13,12,13,15,14,15,17,16,17,19,18,19,21,20,21,23,22,23,25,24,25,27,26,27,29,28,29,31,30,31,75,74,73,31,74,31,33,32,33,35,34,35,37,36,37,39,38,39,41,40,41,43,42,43,98,97,95,43,96,43,47,45,47,51,49,51,55,53,55,59,57,59,3,1,3,7,5,7,11,9,11,15,13,15,19,17,19,23,21,23,27,25,27,31,29,31,76,75,72,31,73,31,35,33,37,41,39,41,98,43,94,43,95,43,51,47,51,59,55,59,7,3,7,15,11,15,23,19,23,31,27,31,77,76,71,31,72,31,37,35,37,98,41,94,51,43,23,77,31,70,31,71,37,99,98,93,51,94,23,78,77,70,37,31,37,100,99,92,51,93,23,79,78,69,37,70,37,101,100,91,51,92,23,80,79,68,37,69,37,102,101,90,51,91,23,81,80,67,37,68,37,103,102,89,51,90,15,81,23,66,37,67,89,59,51,15,82,81,66,103,37,88,59,89,15,83,82,65,103,66,87,59,88,15,84,83,64,103,65,106,59,87,15,85,84,64,104,103,105,59,106,15,62,85,63,104,64,104,59,105,15,63,62,104,7,59,7,63,15,63,7,104],width:33.328125},9:{positions:[17.96484375,4.67578125,17.96484375,4.67578125,20.832611083984375,5.023819923400879,23.333181381225586,6.067935943603516,25.466554641723633,7.80812931060791,26.91764259338379,9.993691444396973,28.0020751953125,12.483912467956543,28.7198543548584,15.278792381286621,29.070980072021484,18.378332138061523,29.109375,19.8984375,29.109375,22.21875,27.17138671875,20.02587890625,24.802734375,18.439453125,22.097061157226562,17.482282638549805,19.10603904724121,17.156333923339844,19.0546875,17.15625,15.962648391723633,17.374753952026367,13.161947250366211,18.030263900756836,10.65258502960205,19.12278175354004,8.43455982208252,20.652305603027344,6.556478023529053,22.870075225830078,5.067807197570801,25.25521469116211,3.968548536300659,27.80772590637207,3.2587015628814697,30.527606964111328,2.9382660388946533,33.414859771728516,2.91796875,34.3828125,3.1171858310699463,37.45964050292969,3.7148373126983643,40.29710006713867,4.710922718048096,42.89520263671875,6.105442523956299,45.253936767578125,8.45276927947998,47.5704231262207,10.840720176696777,49.39479446411133,13.269293785095215,50.72705078125,15.738492012023926,51.56719207763672,18.248313903808594,51.915218353271484,18.7734375,51.92578125,21.87710189819336,51.72084045410156,24.703197479248047,51.10601806640625,27.25172233581543,50.0813102722168,29.52267837524414,48.646724700927734,31.40683364868164,46.456634521484375,32.97002410888672,44.11880111694336,34.212249755859375,41.63322067260742,35.133514404296875,38.99989700317383,35.73381423950195,36.21882629394531,36.01314926147461,33.29001235961914,36.03515625,32.16796875,36.03515625,19.96875,35.885276794433594,16.642547607421875,35.435638427734375,13.59611988067627,34.686241149902344,10.8294677734375,33.6370849609375,8.34259033203125,32.28816604614258,6.135488033294678,30.066654205322266,3.964623212814331,27.738887786865234,2.2044835090637207,25.30486488342285,.8550683259963989,22.764589309692383,-.08362190425395966,20.118059158325195,-.6115872859954834,17.96484375,-.73828125,15.23583984375,-.61083984375,12.462890625,-.228515625,9.81298828125,.41748046875,7.453125,1.3359375,7.453125,1.3359375,8.5078125,6.64453125,10.62158203125,5.71728515625,12.814453125,5.115234375,15.21826171875,4.78564453125,17.96484375,4.67578125,19.0546875,22.5703125,19.0546875,22.5703125,22.15691566467285,22.88543701171875,24.769695281982422,23.830808639526367,27.256725311279297,25.793380737304688,28.883312225341797,27.970977783203125,29.109375,28.44140625,29.109375,32.87109375,28.917926788330078,36.28435516357422,28.34358024597168,39.213134765625,27.386337280273438,41.657432556152344,25.37175941467285,43.94849395751953,23.127288818359375,45.50687026977539,20.652921676635742,46.33256530761719,18.984375,46.4765625,16.33090591430664,46.012935638427734,13.984920501708984,44.62206268310547,12.139910697937012,42.07911682128906,10.835031509399414,39.48687744140625,10.070281982421875,36.84534454345703,9.84375,34.3828125,10.09748363494873,31.21339988708496,10.858684539794922,28.454280853271484,12.127352714538574,26.105453491210938,14.162574768066406,24.085222244262695,16.57485580444336,22.90838050842285],indices:[60,63,61,63,65,64,10,12,11,12,14,13,14,16,15,16,18,17,18,20,19,20,22,21,22,24,23,24,89,25,88,25,89,25,27,26,27,29,28,29,31,30,31,33,32,33,35,34,35,37,36,37,39,38,39,41,40,41,43,42,43,45,44,45,47,46,47,49,48,49,51,50,51,53,52,53,55,54,55,57,56,57,59,58,59,63,60,63,66,65,10,14,12,14,18,16,18,22,20,22,89,24,87,25,88,25,29,27,29,33,31,33,37,35,37,41,39,41,45,43,45,49,47,49,53,51,53,57,55,57,63,59,63,67,66,10,18,14,18,89,22,86,25,87,25,33,29,33,41,37,41,49,45,49,57,53,57,67,63,18,90,89,85,25,86,57,1,67,18,91,90,85,33,25,57,2,1,18,92,91,84,33,85,57,3,2,18,93,92,83,33,84,49,3,57,18,94,93,82,33,83,49,4,3,18,70,94,81,33,82,49,5,4,10,70,18,80,33,81,49,6,5,10,71,70,80,41,33,49,7,6,10,72,71,79,41,80,41,7,49,10,73,72,78,41,79,41,8,7,10,74,73,77,41,78,41,9,8,10,75,74,76,41,77,41,10,9,75,41,76,41,75,10],width:33.1171875},".":{positions:[12.5859375,7.1015625,12.5859375,0,5.66015625,0,5.66015625,7.1015625],indices:[3,1,0,1,3,2],width:6.92578125},m:{positions:[5.02734375,38.0390625,11.21484375,38.0390625,11.70703125,33.046875,13.634581565856934,35.28191375732422,15.986680030822754,37.00302505493164,18.700471878051758,38.111698150634766,21.567134857177734,38.6696662902832,23.09765625,38.7421875,26.139192581176758,38.42292022705078,28.791221618652344,37.465118408203125,31.15591812133789,35.599586486816406,32.90284729003906,33.37240219116211,33.71484375,31.7109375,35.408084869384766,34.171592712402344,37.503177642822266,36.16951370239258,40.22900390625,37.6488037109375,42.961280822753906,38.50468063354492,45.3515625,38.7421875,48.32835006713867,38.446842193603516,50.9460334777832,37.5608024597168,53.204620361328125,36.084068298339844,54.8843879699707,33.86517333984375,56.19401931762695,31.434070587158203,57.133506774902344,28.79076385498047,57.70286178588867,25.93524932861328,57.90207290649414,22.867528915405273,57.90234375,22.74609375,57.90234375,0,50.9765625,0,50.9765625,22.81640625,50.74445724487305,26.319555282592773,50.04814529418945,29.033550262451172,47.956382751464844,31.33014678955078,45.659942626953125,32.691036224365234,43.27734375,33.1171875,40.4267463684082,32.6451530456543,38.09538650512695,31.229045867919922,36.33670425415039,28.815231323242188,35.26606750488281,26.190664291381836,34.9453125,24.43359375,34.9453125,24.15234375,34.9453125,0,27.984375,0,27.984375,22.81640625,27.73810386657715,26.2243709564209,26.99928855895996,28.921852111816406,24.89556121826172,31.278352737426758,22.623031616210938,32.67652893066406,20.28515625,33.1171875,17.40234375,32.7919921875,15.08203125,31.81640625,13.2802734375,30.251953125,11.953125,28.16015625,11.953125,28.16015625,11.953125,0,5.02734375,0],indices:[55,1,0,2,4,3,4,6,5,6,8,7,8,10,9,10,12,11,12,14,13,14,16,15,16,18,17,18,20,19,20,22,21,22,24,23,24,26,25,26,28,27,40,42,41,54,1,55,2,6,4,6,10,8,12,16,14,16,20,18,20,24,22,24,28,26,39,42,40,54,2,1,2,10,6,12,20,16,20,28,24,38,42,39,20,29,28,38,43,42,20,30,29,37,43,38,20,31,30,36,43,37,20,32,31,36,44,43,20,33,32,35,44,36,20,34,33,35,45,44,12,34,20,12,35,34,12,45,35,10,45,12,10,46,45,10,47,46,10,48,47,2,48,10,2,49,48,2,50,49,2,51,50,2,53,51,53,2,54],width:52.875},c:{positions:[20.49609375,4.67578125,20.49609375,4.67578125,23.36757469177246,5.087423801422119,25.919267654418945,6.322350978851318,28.055252075195312,8.557517051696777,29.08038330078125,10.95840835571289,29.1796875,12.0234375,35.40234375,12.0234375,35.47265625,11.8125,35.209197998046875,9.178794860839844,34.224666595458984,6.713964939117432,32.519065856933594,4.418010711669922,29.943574905395508,2.4374680519104004,27.361528396606445,.9345490336418152,24.772926330566406,-.0907462015748024,22.177766799926758,-.6384177803993225,20.49609375,-.73828125,17.386640548706055,-.5293084979057312,14.578433990478516,.09760986268520355,12.071474075317383,1.142473816871643,9.86575984954834,2.605283260345459,7.9612932205200195,4.4860382080078125,6.3618083000183105,6.765913009643555,5.107275009155273,9.241913795471191,4.197693824768066,11.914040565490723,3.633063793182373,14.782294273376465,3.4133858680725098,17.8466739654541,3.41015625,18.28125,3.41015625,19.7578125,3.5838754177093506,22.87480926513672,4.105032920837402,25.780019760131836,4.973628997802734,28.473445892333984,6.189663410186768,30.95508575439453,7.753136157989502,33.22494125366211,9.646564483642578,35.16857147216797,11.828062057495117,36.69178771972656,14.297628402709961,37.79460144042969,17.05526351928711,38.47700500488281,20.100967407226562,38.73899841308594,20.49609375,38.7421875,23.570213317871094,38.5140495300293,26.36119842529297,37.82963943481445,28.869049072265625,36.6889533996582,31.093765258789062,35.09199523925781,33.085479736328125,32.87481689453125,34.484825134277344,30.467679977416992,35.29180145263672,27.87058448791504,35.5078125,25.13671875,35.4375,24.92578125,29.1796875,24.92578125,28.72093391418457,27.737882614135742,27.34467315673828,30.163320541381836,24.98297119140625,32.04195022583008,22.43872833251953,33.074039459228516,20.49609375,33.29296875,17.510202407836914,32.94111633300781,15.082853317260742,31.88556480407715,13.214049339294434,30.12630844116211,11.89155101776123,27.541250228881836,10.979540824890137,24.808610916137695,10.478017807006836,21.928388595581055,10.37109375,19.7578125,10.37109375,18.28125,10.565627098083496,15.065240859985352,11.149227142333984,12.176401138305664,12.121894836425781,9.614731788635254,13.855029106140137,7.324370861053467,15.960027694702148,5.741883754730225,18.4368896484375,4.867271423339844],indices:[5,7,6,7,9,8,9,11,10,11,13,12,13,15,14,15,17,16,17,19,18,19,21,20,21,23,22,23,25,24,25,27,26,27,29,28,29,31,30,31,33,32,33,35,34,35,37,36,37,39,38,39,41,40,41,43,42,43,45,44,45,47,46,47,49,48,4,7,5,7,11,9,11,15,13,15,19,17,19,23,21,23,27,25,27,31,29,31,35,33,35,39,37,39,43,41,43,47,45,47,50,49,3,7,4,7,15,11,15,23,19,23,31,27,31,39,35,39,47,43,47,51,50,3,15,7,39,51,47,2,15,3,39,52,51,39,53,52,39,54,53,39,55,54,31,55,39,31,56,55,31,57,56,31,58,57,23,58,31,23,59,58,23,60,59,23,61,60,23,62,61,23,63,62,23,64,63,23,65,64,23,66,65,15,66,23,15,67,66,15,68,67,15,1,68,1,15,2],width:32.09765625},k:{positions:[28.828125,0,16.48828125,17.54296875,11.98828125,17.54296875,11.98828125,0,5.0625,0,5.0625,54.84375,11.98828125,54.84375,11.98828125,23.0625,16.41796875,23.0625,26.82421875,38.0390625,35.12109375,38.0390625,22.11328125,20.7421875,36.984375,0],indices:[12,1,0,2,4,3,4,6,5,8,10,9,11,1,12,4,7,6,8,11,10,11,2,1,2,7,4,7,11,8,11,7,2],width:31.921875},t:{positions:[0,0,30,0],indices:[0,2,1],width:30}," ":{width:16,positions:[],indices:[]}};function CCt({text:i,size:e=1,zOffset:t=0}){const n=[],o=[];let r=0,s=0;const a=10;e/=100;for(const l of i){const c=wCt[l];if(!c)throw new Error("Unknown character: "+l);const u=s;for(let h=0;h<c.positions.length;h+=2)n.push(c.positions[h]*e+u,c.positions[h+1]*e,t);const d=r===0?0:r+1;for(const h of c.indices)o.push(h+d),r=Math.max(r,h+d);s+=(c.width+a)*e}return{positions:n,indices:o,primitive:"triangles"}}function Pie(i,{content:e,size:t,matrix:n,offset:o=0}){const{material:r,origin:s,plugin:a}=i,{textSizeRatio:l,textBottomMarginRatio:c,xeokitSdk:u,viewer:d}=a,{Mesh:h,VBOGeometry:p,math:A}=u,{scene:f}=d,{primitive:g,positions:m,indices:v}=CCt({text:e,size:t*l,zOffset:o});let y=m[0],w=m[0];for(let R=0;R<m.length;R+=3){const T=m[R];T<y&&(y=T),T>w&&(w=T)}const M=-(w-y)/2,B=A.mat4(),S=A.translationMat4v([M,t*c,0]);A.mulMat4(n,A.rotationMat4v(Math.PI,[0,1,0],A.mat4()),B),A.mulMat4(n,S),A.mulMat4(B,S);const I=new p(f,{primitive:g,positions:m,indices:v});return[new h(f,{geometry:I,material:r,pickable:!1,origin:s,matrix:n}),new h(f,{geometry:I,material:r,pickable:!1,origin:s,matrix:B})]}class bCt{constructor(e,t,n){this.plugin=e;const{viewer:o}=e;this.line=null,this.texts=null,this.length=0;const{math:r,worldToRTCPos:s,Node:a,PhongMaterial:l}=e.xeokitSdk,c=r.vec3(),u=r.vec3();s(t,u,c),this.material=new l(o.scene,{emissive:n1(e.defaultColor)}),this.node=new a(o.scene,{pickable:!1,origin:u,children:[]}),this.origin=u,this.p1=c,this.normal=n}move(e,t){const{arrowSizeRatio:n,offsetRatio:o,xeokitSdk:r,viewer:s}=this.plugin,{math:a,Mesh:l,VBOGeometry:c}=r,{scene:u}=s,d=this.p1;this.p2=a.subVec3(e,this.origin),this.node.removeChildren(),this.line?.destroy();const h=a.subVec3(e,d,a.vec3());if(h.every(me=>me===0))return;const p=a.normalizeVec3(h,a.vec3()),A=a.mulVec3Scalar(p,-1,a.vec3()),f=a.lenVec3(h);this.length=f;const g=o*f;let m=0;const v=a.mulVec3Scalar(h,.5,a.vec3()),y=a.addVec3(d,v,a.vec3());let w=a.normalizeVec3(a.cross3Vec3(t,a.normalizeVec3(h,a.vec3()),a.vec3()));const x=a.dotVec3(t,this.normal)>.999,M=a.vec3([0,1,0]),B=a.dotVec3(p,M);if(x){const me=Math.abs(B)<.01;m=g;let _e=null;if(me){const{look:De,up:ve,eye:ge}=u.camera,Ie=a.normalizeVec3(a.subVec3(De,ge,a.vec3())),Ne=a.cross3Vec3(Ie,ve);_e=a.dotVec3(p,Ne)}else{const De=a.cross3Vec3(M,t,a.vec3());_e=a.dotVec3(p,De)}_e<0&&(w=a.negateVec3(w),m=-m)}else if(Math.abs(B)>.99){const{look:_e,eye:De}=u.camera,ve=a.normalizeVec3(a.subVec3(_e,De,a.vec3()));w=a.normalizeVec3(a.cross3Vec3(p,ve,a.vec3())),t=a.normalizeVec3(a.cross3Vec3(w,p,a.vec3()))}else t=a.normalizeVec3(a.cross3Vec3(M,p,a.vec3())),w=a.normalizeVec3(a.cross3Vec3(p,t,a.vec3())),a.dotVec3(w,M)<0&&(w=a.negateVec3(w));const S=a.negateVec3(w,a.vec3()),I=a.mulVec3Scalar(w,f*n,a.vec3()),R=a.mulVec3Scalar(S,f*n,a.vec3()),T=a.addVec3(d,I,a.vec3()),_=a.addVec3(d,R,a.vec3()),F=a.addVec3(e,I,a.vec3()),N=a.addVec3(e,R,a.vec3()),z=a.mulVec3Scalar(a.normalizeVec3(a.addVec3(w,p,a.vec3())),f*n*Math.SQRT2),j=a.addVec3(d,z,a.vec3()),W=a.mulVec3Scalar(a.normalizeVec3(a.addVec3(S,p,a.vec3())),f*n*Math.SQRT2),J=a.addVec3(d,W,a.vec3()),$=a.mulVec3Scalar(a.normalizeVec3(a.addVec3(w,A,a.vec3())),f*n*Math.SQRT2),ue=a.addVec3(e,$,a.vec3()),Ee=a.mulVec3Scalar(a.normalizeVec3(a.addVec3(S,A,a.vec3())),f*n*Math.SQRT2),Be=a.addVec3(e,Ee,a.vec3()),ze=a.translationMat4v(a.mulVec3Scalar(t,g,a.vec3()));this.line=new l(s.scene,{geometry:new c(s.scene,{primitive:"lines",positions:[...d,...e,...T,..._,...F,...N,...j,...J,...ue,...Be],indices:[0,1,0,2,0,3,0,6,0,7,1,4,1,5,1,8,1,9]}),material:this.material,matrix:ze,pickable:!1,origin:this.origin}),this.node.addChild(this.line),this.texts?.forEach(me=>me.destroy());const Qe=a.mat4([...p,0,...w,0,...t,0,...y,1]);this.texts=this._makeTexts(f.toFixed(2)+" m",f,Qe,m),this.texts.forEach(me=>this.node.addChild(me))}_makeTexts(e,t,n,o=0){return Pie(this,{content:e,size:t,matrix:n,offset:o})}destroy(){this.node.destroy(),this.line?.destroy(),this.texts?.forEach(e=>e.destroy()),this.plugin.measurements=this.plugin.measurements.filter(e=>e!==this)}get visible(){return this.node.visible}set visible(e){this.node.visible=e}get color(){return Bie(this.material.emissive)}set color(e=this.plugin.defaultColor){this.material.emissive=n1(e)}}class Tie{constructor(e,t,n={}){this.viewer=e,this.xeokitSdk=t,this.arrowSizeRatio=n.arrowSizeRatio??.04,this.textSizeRatio=n.textSizeRatio??.1,this.textBottomMarginRatio=n.textBottomMarginRatio??.02,this.offsetRatio=n.offsetRatio??.003,this.snapPickRadius=n.snapPickRadius??15,this.defaultColor=n.defaultColor??"#ffffff";const o=document.createElement("img"),r=e.scene.canvas.canvas;r.parentNode.insertBefore(o,r),o.style.width="28px",o.style.height="28px",o.style.position="absolute",o.style.pointerEvents="none",o.style.transform="translate(-50%, -50%)",o.style.display="none",this.imgElement=o,this.measurements=[],this.measurementEndCallbackId=0,this.measurementEndCallbacks={},this.control=new xCt(this)}on(e,t){if(e==="measurementEnd")return this.measurementEndCallbacks[this.measurementEndCallbackId++]=t,this.measurementEndCallbackId}off(e){this.measurementEndCallbacks[e]=null}}class xCt{constructor(e){this.plugin=e,this.currentMeasurement=null,this.lastPosition=null,this.mouseDown=!1,this.dragging=!1,this.activated=!1}_updateCursor(e){const{imgElement:t,viewer:n}=this.plugin,{scene:o}=n;o.canvas.canvas.style.cursor=`url("${vCt}") 16 16, auto`;const r=o.pick({canvasPos:e,snapRadius:this.plugin.snapPickRadius,snapToEdge:!0,snapToVertex:!0});if(r?.snappedWorldPos||r?.worldPos){if(r.snappedCanvasPos)t.style.left=`${r.snappedCanvasPos[0]}px`,t.style.top=`${r.snappedCanvasPos[1]}px`,t.src=r.snapType==="vertex"?mCt:ACt;else{const s=r.canvasPos;t.style.left=`${s[0]}px`,t.style.top=`${s[1]}px`,t.src=gCt}this.lastPosition=r.snappedWorldPos??r.worldPos,this.lastPosition.worldNormal=r.snappedWorldNormal??r.worldNormal}else t.style.left=`${e[0]}px`,t.style.top=`${e[1]}px`,t.src=yCt,this.lastPosition=null}_onMouseMove(e){this.mouseDown&&(this.dragging=!0),e.preventDefault(),this._updateCursor([e.offsetX,e.offsetY]),this.lastPosition&&this.currentMeasurement?.move(this.lastPosition,this.lastPosition.worldNormal)}_onMouseDown(){this.mouseDown=!0}_onMouseUp(){this.mouseDown=!1;const e=this.dragging;this.dragging=!1,!e&&this.lastPosition&&(this.currentMeasurement?(this.plugin.measurements.push(this.currentMeasurement),Object.values(this.plugin.measurementEndCallbacks).forEach(t=>t?.(this.currentMeasurement)),this.currentMeasurement=null):this.currentMeasurement=new bCt(this.plugin,this.lastPosition,this.lastPosition.worldNormal))}activate(){if(this.activated)return;const{canvas:e}=this.plugin.viewer.scene.canvas;this.plugin.imgElement.style.display="block";const t=this._onMouseMove.bind(this),n=this._onMouseDown.bind(this),o=this._onMouseUp.bind(this);e.addEventListener("mousemove",t),e.addEventListener("mousedown",n),document.addEventListener("mouseup",o),this._unsubscribe=()=>{e.removeEventListener("mousemove",t),e.removeEventListener("mousedown",n),document.removeEventListener("mouseup",o)},this.activated=!0}deactivate(){this.activated&&(this._unsubscribe?.(),this.currentMeasurement?.destroy(),this.currentMeasurement=null,this.lastPosition=null,this.plugin.imgElement.style.display="none",this.activated=!1)}}class MCt{constructor(e,t){this.plugin=e;const{xeokitSdk:n,viewer:o}=e,{Mesh:r,ReadableGeometry:s,buildSphereGeometry:a,PhongMaterial:l,Node:c,math:u,worldToRTCPos:d}=n,h=u.vec3(),p=u.vec3();this._length=0;const{entity:A,worldPos:f}=t;d(f,p,h);const g=new l(o.scene,{emissive:n1(e.defaultColor),diffuse:[0,0,0]}),m=(M=!0)=>new r(o.scene,{geometry:new s(o.scene,a({radius:.03})),material:g,pickable:!1,visible:M,origin:p}),v=m(),y=m(!1),w=new r(o.scene,{geometry:new s(o.scene,{primitive:"lines",positions:[0,0,0,0,0,0],indices:[0,1]}),material:g,pickable:!1,visible:!1,origin:p}),x=new c(o.scene,{pickable:!1,visible:!0,position:h,origin:p,children:[v,w,y]});this.origin=p,this.modelId=A.model.id,this.node=x,this.toSphere=y,this.fromSphere=v,this.line=w,this.material=g}show(e){const{node:t,fromSphere:n,toSphere:o,line:r,texts:s,plugin:a}=this,{math:l}=a.xeokitSdk;t.position=l.subVec3(e.worldPos,t.origin,l.vec3()),t.visible=!0;const{viewer:c}=a,u=c.scene.pick({pickSurface:!0,origin:e.worldPos,direction:e.worldNormal});if(s&&(s.forEach(d=>d.destroy()),this.texts=null),u){o.visible=!0,r.visible=!0,o.position=l.subVec3(u.worldPos,o.origin,l.vec3()),o.position=l.subVec3(o.position,t.position,l.vec3()),r.position=l.vec3().set(t.position),r.geometry.positions=[0,0,0,...o.position];const d=l.lenVec3(o.position);this._length=d;const h=n.position,p=o.position,A=l.subVec3(p,h,l.vec3()),f=l.normalizeVec3(A,l.vec3()),g=l.mulVec3Scalar(A,.5,l.vec3()),m=l.addVec3(h,g,l.vec3()),v=[0,1,0],y=l.dotVec3(f,v),w=Math.abs(y)>.9;let x;if(w){const M=l.normalizeVec3(l.subVec3(c.scene.camera.eye,c.scene.camera.look,l.vec3()),l.vec3()),B=l.normalizeVec3(l.cross3Vec3(M,f,l.vec3()),l.vec3()),S=l.normalizeVec3(l.cross3Vec3(B,f,l.vec3()),l.vec3());x=l.mat4([...f,0,...B,0,...S,0,...m,1])}else{const M=l.normalizeVec3(l.cross3Vec3(v,f,l.vec3()),l.vec3()),B=l.normalizeVec3(l.cross3Vec3(f,M,l.vec3()),l.vec3());x=l.mat4([...f,0,...B,0,...M,0,...m,1])}this.texts=this._makeTexts(d.toFixed(2)+" m",d,x),this.texts.forEach(M=>t.addChild(M))}else o.visible=!1,r.visible=!1,this._length=0}hide(){this.node.visible=!1}destroy(){this.node.destroy(),this.line.destroy(),this.fromSphere.destroy(),this.toSphere.destroy(),this.texts?.forEach(e=>e.destroy())}set length(e){this._length=e}get length(){return this.visible?this._length:0}get visible(){return this.node.visible===!0}set visible(e){this.node.visible=!!e}get color(){return Bie(this.material.emissive)}set color(e=this.plugin.defaultColor){this.material.emissive=n1(e)}_makeTexts(e,t,n){return Pie(this,{content:e,size:t,matrix:n})}}class kie{constructor(e,t,n={}){this.viewer=e,this.xeokitSdk=t,this.textSizeRatio=n.textSizeRatio??.1,this.textBottomMarginRatio=n.textBottomMarginRatio??.01,this.defaultColor=n.defaultColor??"#ffffff",this.measurements=[],this.measurementEndCallbackId=0,this.measurementEndCallbacks={},this.control=new ECt(this)}on(e,t){if(e==="measurementEnd")return this.measurementEndCallbacks[this.measurementEndCallbackId++]=t,this.measurementEndCallbackId}off(e){this.measurementEndCallbacks[e]=null}}class ECt{constructor(e){this.plugin=e,this.currentMeasure=null,this.pickedSpaceMeasureSubscription=null,this.hitHelperMouseMoveSubscription=null}activate(){const{plugin:e}=this,{viewer:t}=e;this.pickedSpaceMeasureSubscription=t.scene.input.on("mouseclicked",()=>{if(!this.currentMeasure?.length)return;const n=this.currentMeasure;this.currentMeasure=null,Object.values(this.plugin.measurementEndCallbacks).forEach(o=>o(n))}),this.hitHelperMouseMoveSubscription=t.scene.input.on("mousemove",n=>{const o=t.scene.pick({canvasPos:n,pickSurface:!0});o?.entity?.model&&(o?((!this.currentMeasure||this.currentMeasure.modelId!==o.entity.model.id)&&(this.currentMeasure?.destroy(),this.currentMeasure=new MCt(this.plugin,o)),this.currentMeasure.show(o)):this.currentMeasure?.hide())})}deactivate(){const{viewer:e}=this.plugin;this.currentMeasure?.destroy(),this.currentMeasure=null,e.scene.input.off(this.pickedSpaceMeasureSubscription),e.scene.input.off(this.hitHelperMouseMoveSubscription)}}const BCt=`onmessage = async event => {
|
|
1389
1389
|
const sources = event.data;
|
|
1390
1390
|
for (const source of sources) {
|
|
1391
1391
|
const response = await fetch(source);
|
|
@@ -6435,5 +6435,5 @@ void main() {
|
|
|
6435
6435
|
--bimdata-local-context-width: ${n.width}px;
|
|
6436
6436
|
--bimdata-local-context-center-width: ${n.centerWidth}px;
|
|
6437
6437
|
--bimdata-local-context-resolution: ${n.resolution};
|
|
6438
|
-
`),onMouseenter:e[0]||(e[0]=(...h)=>n.onMouseEnter&&n.onMouseEnter(...h)),onMouseleave:e[1]||(e[1]=(...h)=>n.onMouseLeave&&n.onMouseLeave(...h))},[k(s,{ref:"modalManagerTemplateRef"},null,512),C("div",Oti,[n.windowPlugins.leftSidePanel?(E(),K(a,{key:0,plugin:n.windowPlugins.leftSidePanel},null,8,["plugin"])):te("",!0),C("div",Nti,[(E(!0),L($e,null,Mt(n.windowPlugins.free,h=>(E(),K(l,{key:h.name,class:le({"window-container__content__center__viewer":h.isViewer}),plugin:h},null,8,["class","plugin"]))),128)),k(c,{position:"left",plugins:n.windowPlugins.leftButtonColumn},null,8,["plugins"]),k(c,{position:"right",plugins:n.windowPlugins.rightButtonColumn},null,8,["plugins"])]),n.windowPlugins.rightSidePanel?(E(),K(a,{key:1,plugin:n.windowPlugins.rightSidePanel},null,8,["plugin"])):te("",!0)]),n.loading?(E(),L("div",Uti,[n.spinner&&n.spinner.component?(E(),K(Pn(n.spinner.component),Rr(Es({key:0},n.spinner.props)),null,16)):(E(),K(u,{key:1,size:"20px",border:"3px"}))])):te("",!0),n.layoutSettingsDisplayed?(E(),L("div",Vti,[k(d)])):te("",!0)],36)}const zti=V(Fti,[["render",Hti],["__scopeId","data-v-485f288e"]]);class jti{constructor(e=!0){const t=_ei(Yz,null,{resizable:e});t.registerContent("default",zti),this.settings=Bo({edit:!1,swap:!1,full:!1}),this.areas=t}get resizable(){return this.areas.resizable}set resizable(e){this.areas.resizable=e}apply(e=null){this.areas.layout=e?Dei(e):null}copy(e,t=!0){return Lei(this.areas.layout,e,t)}open({ratio:e,direction:t,insertAfter:n,windowName:o=null,windowState:r=null,localContextId:s=null}={}){const a=o?{options:{windowName:o,windowState:r}}:null;return s===null?this.areas.splitLayout(e,t,n,a):this.areas.split(s,e,t,n,a)}swap(e,t){return this.areas.swap(e,t)}close(e){return this.areas.delete(e)}compare(e,t){if(!e&&!t)return!0;if(!e||!t)return!1;if(typeof e=="string"&&typeof t=="string")return e===t;if(typeof e=="string"||typeof t=="string")return!1;if(e.windowName&&t.windowName){if(e.windowName!==t.windowName)return!1;const n=new Set(e.windowState?.modelIds),o=new Set(t.windowState?.modelIds);return n.size===o.size&&[...n].every(s=>o.has(s))}return e.windowName||t.windowName||e.direction!==t.direction||e.children.length!==t.children.length?!1:e.children.every((n,o)=>this.compare(n,t.children[o]))}}const Gti={version:"2.16.2-beta.2"};let Qti=1;class qti{constructor({plugins:e,api:t,ui:n,locale:o="fr"}){this.instanceId=Qti++,this.pluginManager=new eYt(e),this.windowManager=new iYt,this.windowManager.registerAndAddPluginsToWindows([...this.pluginManager.registeredPlugins.values()]),this.api=new U$t(t),this.globalContext=new d6e(this),this.state=X$t(this),this.shortcutManager=Zme(this.state),this.uiSettings=n||{},this.i18n=new c6e(o),this._contextMenu=null,this.layout=new jti(this.uiSettings.resizable!==!1),this._darkTheme=ae(n?.darkTheme??!1),this.localContext=null,window.$viewer=this}get darkTheme(){return this._darkTheme.value}set darkTheme(e){this._darkTheme.value=e}get version(){return Gti.version}get locale(){return this.i18n.locale}get contextMenu(){return this._contextMenu||Jme}set contextMenu(e){this._contextMenu=e}get registeredWindows(){return[...this.windowManager.registeredWindows.keys()]}get registeredPlugins(){return[...this.pluginManager.registeredPlugins.keys()]}get pluginsCfg(){return this.pluginManager.cfg}registerPlugin(e){this.pluginManager.registerPlugin(e),this.windowManager.registerAndAddPluginsToWindows([e])}}function Kti(i,e={}){e.backgroundColor&&(i.style.setProperty("--bimdata-viewer-background-color",e.backgroundColor),e.backgroundColor==="transparent"&&i.style.setProperty("--areas-separator-color","transparent")),e.colorPrimary&&i.style.setProperty("--color-primary",e.colorPrimary),e.colorPrimaryLighter&&i.style.setProperty("--color-primary-lighter",e.colorPrimaryLighter),e.colorPrimaryLight&&i.style.setProperty("--color-primary-light",e.colorPrimaryLight),e.colorPrimaryDark&&i.style.setProperty("--color-primary-dark",e.colorPrimaryDark),e.colorSecondary&&i.style.setProperty("--color-secondary",e.colorSecondary),e.colorSecondaryLighter&&i.style.setProperty("--color-secondary-lighter",e.colorSecondaryLighter),e.colorSecondaryLight&&i.style.setProperty("--color-secondary-light",e.colorSecondaryLight),e.colorSecondaryDark&&i.style.setProperty("--color-secondary-dark",e.colorSecondaryDark),e.colorSilverLight&&i.style.setProperty("--color-silver-light",e.colorSilverLight),e.colorSilver&&i.style.setProperty("--color-silver",e.colorSilver),e.colorSilverDark&&i.style.setProperty("--color-silver-dark",e.colorSilverDark),e.colorGraniteLight&&i.style.setProperty("--color-granite-light",e.colorGraniteLight),e.colorGranite&&i.style.setProperty("--color-granite",e.colorGranite),e.colorSuccess&&i.style.setProperty("--color-success",e.colorSuccess),e.colorSuccessLighter&&i.style.setProperty("--color-success-Lighter",e.colorSuccessLighter),e.colorSuccessLight&&i.style.setProperty("--color-success-Light",e.colorSuccessLight),e.colorSuccessDark&&i.style.setProperty("--color-success-Dark",e.colorSuccessDark),e.colorWarning&&i.style.setProperty("--color-warning",e.colorWarning),e.colorWarningLighter&&i.style.setProperty("--color-warning-Lighter",e.colorWarningLighter),e.colorWarningLight&&i.style.setProperty("--color-warning-Light",e.colorWarningLight),e.colorWarningDark&&i.style.setProperty("--color-warning-Dark",e.colorWarningDark),e.colorHigh&&i.style.setProperty("--color-high",e.colorHigh),e.colorHighLighter&&i.style.setProperty("--color-high-lighter",e.colorHighLighter),e.colorHighLight&&i.style.setProperty("--color-high-light",e.colorHighLight),e.colorHighDark&&i.style.setProperty("--color-high-dark",e.colorHighDark),e.colorText&&i.style.setProperty("--color-text",e.colorText),(!e.backgroundColor||e.backgroundColor!=="transparent")&&i.style.setProperty("--areas-separator-color","rgba(216, 216, 216, 1)"),e.headerHeight!=null&&i.style.setProperty("--bimdata-viewer-header-height",e.headerHeight),i.style.setProperty("--areas-background-color","transparent")}const Jti=Object.freeze({25:"GUEST",50:"USER",100:"ADMIN"}),fg=Object.freeze({READ:"read",WRITE:"write"});function A2e(i){const e={};return i.forEach(t=>{const[n,o]=t.split(":");e[n]?e[n].push(o):e[n]=[o]}),e}const Wti={token_scopes:[],usable_scopes:[],user_role:25};function m2e(i=Wti){const e=A2e(i.token_scopes),t=A2e(i.usable_scopes);return{...eJ(i),tokenScopes:e,usableScopes:t,userRole:Jti[i.user_role],user:i.user?eJ(i.user):null,hasBcfReadPermission:t.bcf?.includes(fg.READ)??!1,hasBcfWritePermission:t.bcf?.includes(fg.WRITE)??!1,hasModelReadPermission:t.model?.includes(fg.READ)??!1,hasModelWritePermission:t.model?.includes(fg.WRITE)??!1,hasDocReadPermission:t.document?.includes(fg.READ)??!1,hasDocWritePermission:t.document?.includes(fg.WRITE)??!1}}const Zti={de:{BcfComponents:{back:"Zurück",BcfFilters:{filtersButton:"Filter",filtersTitle:"Filter",priorityLabel:"Priorität",statusLabel:"Status",stageLabel:"Phase",assignedToLabel:"Zugewiesen an",creatorsLabel:"Erstellt von",tagsLabel:"Tags",resetButton:"Zurücksetzen",searchButton:"Suchen",undefined:"Nicht definiert",datePlaceholder:"Erstellungsdatum"},BcfSettings:{title:"BCF-Parameter",text:"Erstellen, füllen und listen Sie die BCF-Einstellungen auf, die Sie für dieses Projekt haben möchten.",validateButton:"Die BCF-Parameter anerkennen"},BcfStatistics:{emptyText:"Fügen Sie Fragen hinzu, um zugehörige Statistiken hier anzuzeigen.",issues:"Probleme",extension:{Priority:"Priorität",PriorityNotDefined:"Keine Priorität",PriorityTitle:"Prioritäten",Status:"Status",StatusNotDefined:"Kein Status",StatusTitle:"Status"}},BcfTopicCard:{priority:"Priorität",noPriority:"Keine",assignedTo:"Zugewiesen an",elements:"Elemente",notSpecified:"Nicht definiert",see:"Anzeigen"},BcfTopicCreationCard:{text:"Ein neues BCF-Thema erstellen",createBcfSideTitle:"Ein Problem melden"},BcfTopicForm:{dragDropImageText:"Bitte wählen Sie eine Datei aus.",addObjectButton:"Objekt",addAnnotationButton:"Annotation",annotationButtonTooltip:"Zu diesem Thema gibt es derzeit keine Ansichten.",addPictureButton:"Fügen Sie ein Bild hinzu.",titlePlaceholder:"Titel *",titleErrorMessage:"Titel fehlt",typeLabel:"Typ",priorityLabel:"Priorität",statusLabel:"Status",stageLabel:"Phase",assignedToLabel:"Zugewiesen an",dueDateLabel:"Fälligkeitsdatum (TT.MM.JJJJ)",descriptionLabel:"Beschreibung",labelsLabel:"Tags",createButton:"Bestätigen",updateButton:"Änderungen übernehmen",modalText:"Sie sind dabei, die Bearbeitung der Ausgabe {Name} zu beenden, aber es gibt noch ungespeicherte Änderungen.",cancelButton:"Änderungen verwerfen",continueButton:"Änderungen fortsetzen",createTitle:"Ein Problem melden",dragDropImageTextTablet:"Foto machen",takeSnapshot:"Mach einen Schnappschuss",importFile:"Eine Datei importieren",searchPlaceholder:"Suchen",emptySearch:"kein Ergebnis",documentsLabel:"Dokumente",documentsCount:"Dokumente – {count} ausgewählte Dokumente",groupsLabel:"Berechtigungen",groupsCount:"Berechtigungen – {count} ausgewählte Gruppen",groupsText:"Wählen Sie die Benutzergruppen aus, die dieses Thema sehen und damit interagieren dürfen.",validate:"Bestätigen"},BcfTopicOverview:{openViewer:"Im Viewer öffnen",openViewerNoModels:"Es sind keine Vorlagen zur Ansicht bereit",elements:"{count} Elemente",noElements:"kein Element",type:"Typ",noTypeSpecified:"Kein Typ angegeben",description:"Beschreibung",noDescriptionProvided:"Keine Beschreibung angegeben",assignedTo:"Zugeteilt an",notAssigned:"Nicht zugewiesen",dueDate:"Fälligkeitsdatum",noDueDate:"Kein Fälligkeitsdatum",informations:"Informationen",status:"Status",noStatusSpecified:"Kein Status angegeben",stage:"Phase",noStageProvided:"Keine Phase angegeben",priority:"Priorität",priorityNotDefined:"Nicht definiert",tags:"Tags",noTags:"Keine Tags",commentButton:"Ein Kommentar veröffentlichen",deleteText:"Sie löschen jetzt {Name}",deleteBcfButton:"Dieses BCF löschen",keepBcfButton:"Dieses BCF beibehalten",author:"Autor"},BcfTopicsTable:{headers:{index:"#",priority:"Priorität",status:"Status",title:"Titel",creator:"Autor",date:"Datum"}},BcfTopicActionsCell:{seeButton:"Anzeigen"},BcfTopicComments:{commentButton:"Ein Kommentar verfassen",commentLabel:"Ein Kommentar verfassen",commentText:"Kommentar",cancelButton:"Abbrechen",publishButton:"Veröffentlichen",commentsText:"Kommentare",deleteCommentText:"Diesen Kommentar löschen?",deleteButton:"Löschen",takeSnapshot:"Mach einen Schnappschuss",edited:"bearbeitet"},BcfTopicPriorityCell:{noPriority:"Keine"},SettingCard:{addButton:"ein Element hinzufügen",cancelButton:"Abbrechen",validateButton:"Bestätigen",deleteExtensionText:"Diesen Parameter löschen",deleteButton:"Löschen",title:{Priority:"Prioritäten",Label:"Tags",Status:"Status",Type:"Typen",Stage:"Phasen"},input:{Priority:"Eine neue Priorität hinzufügen",Label:"Ein neues Etikett hinzufügen",Status:"Einen neuen Status hinzufügen",Type:"Einen neuen Typ hinzufügen",Stage:"Eine neue Phase hinzufügen"},text:{Priority:"Liste der Prioritäten",Label:"Liste von Tags",Status:"Liste der Status",Type:"Liste der Typen",Stage:"Liste der Phasen"}}}},en:{BcfComponents:{back:"Back",BcfFilters:{filtersButton:"Filters",filtersTitle:"Filters",priorityLabel:"Priority",statusLabel:"Status",stageLabel:"Stage",assignedToLabel:"Assigned to",creatorsLabel:"Created by",tagsLabel:"Tags",resetButton:"Reset",searchButton:"Search",undefined:"Not defined",datePlaceholder:"Creation date"},BcfSettings:{title:"BCF Settings",text:"Create, enter in, and list the BCF settings you would like to have for this project",validateButton:"Validate BCF settings"},BcfStatistics:{emptyText:"Add BCF Topics to start to have some stats here.",issues:"issues",extension:{Priority:"Priority",PriorityNotDefined:"No priority",PriorityTitle:"Priorities",Status:"Status",StatusNotDefined:"No status",StatusTitle:"Status"}},BcfTopicCard:{priority:"Priority",noPriority:"None",assignedTo:"Assigned to",elements:"Elements",notSpecified:"Not specified",see:"See"},BcfTopicCreationCard:{text:"Create a new BCF topic",createBcfSideTitle:"Report a problem"},BcfTopicForm:{dragDropImageText:"Please select a file",addObjectButton:"Object",addAnnotationButton:"Annotation",annotationButtonTooltip:"This topic has no viewpoint",addPictureButton:"Add a picture",titlePlaceholder:"Title *",titleErrorMessage:"Missing title",typeLabel:"Type",priorityLabel:"Priority",statusLabel:"Status",stageLabel:"Stage",assignedToLabel:"Assigned to",dueDateLabel:"Due date",descriptionLabel:"Description",labelsLabel:"Tags",createButton:"Validate",updateButton:"Modify this BCF",modalText:"You are about to quit editing issue {name} but there are unsaved changes.",cancelButton:"Discard changes",continueButton:"Continue editing",createTitle:"Report a problem",dragDropImageTextTablet:"Take a picture",takeSnapshot:"Take a snapshot",importFile:"Import a file",searchPlaceholder:"Search",emptySearch:"No result",documentsLabel:"Add a file",documentsCount:"Files - {count} selected files",groupsLabel:"Permissions",groupsCount:"Permissions - {count} selected groups",groupsText:"You are now setting the access rights: choose the user group(s) that will be exclusively authorized to see and interact with this topic.",validate:"Validate"},BcfTopicOverview:{openViewer:"Open in viewer",openViewerNoModels:"No model to open",elements:"{count} Elements",noElements:"No element",type:"Type",noTypeSpecified:"No type specified",description:"Description",noDescriptionProvided:"No description provided",assignedTo:"Assigned to",notAssigned:"Not assigned",dueDate:"Due date",noDueDate:"No due date",informations:"Informations",status:"Status",noStatusSpecified:"No status specified",stage:"Stage",noStageProvided:"No stage provided",priority:"Priority",priorityNotDefined:"Not defined",tags:"Tags",noTags:"No tags",commentButton:"Post a comment",deleteText:"You are about to delete {name}",deleteBcfButton:"Delete this BCF",keepBcfButton:"Keep this BCF",author:"Author"},BcfTopicsTable:{headers:{index:"#",priority:"Priority",status:"Status",title:"Title",creator:"Author",date:"Date"}},BcfTopicActionsCell:{seeButton:"See"},BcfTopicComments:{commentButton:"Post a comment",commentLabel:"Post a comment",commentText:"Comment",cancelButton:"Cancel",publishButton:"Publish",commentsText:"Comments",deleteCommentText:"Delete this comment ?",deleteButton:"Delete",takeSnapshot:"Take a snapshot",edited:"edited"},BcfTopicPriorityCell:{noPriority:"None"},SettingCard:{addButton:"add an element",cancelButton:"Cancel",validateButton:"Validate",deleteExtensionText:"Remove this setting",deleteButton:"Delete",title:{Priority:"Priorities",Label:"Labels",Status:"Status",Type:"Types",Stage:"Stages"},input:{Priority:"Add a new priority",Label:"Add a new label",Status:"Add new status",Type:"Add a new type",Stage:"Add a new stage"},text:{Priority:"Priority list",Label:"Labels list",Status:"Status list",Type:"Type list",Stage:"Stage list"}}}},es:{BcfComponents:{back:"Volver",BcfFilters:{filtersButton:"Filtros",filtersTitle:"Filtros",priorityLabel:"Prioridad",statusLabel:"Estado",stageLabel:"Fase",assignedToLabel:"Asignado a",creatorsLabel:"Creado por",tagsLabel:"Etiquetas:",resetButton:"Restablecer",searchButton:"Buscar en",undefined:"No definido",datePlaceholder:"Fecha de creación"},BcfSettings:{title:"Parámetros del BCF",text:"Cree, rellene y enumere los parámetros del BCF que desea tener en este proyecto",validateButton:"Validar los parámetros del BCF"},BcfStatistics:{emptyText:"Añada preguntas para ver las estadísticas asociadas aquí.",issues:"problemas",extension:{Priority:"Prioridad",PriorityNotDefined:"Sin prioridad",PriorityTitle:"Prioridades",Status:"Estado",StatusNotDefined:"Sin estado",StatusTitle:"Estatutos"}},BcfTopicCard:{priority:"Prioridad",noPriority:"Sin",assignedTo:"Asignado a",elements:"Elementos",notSpecified:"No definido",see:"Ver"},BcfTopicCreationCard:{text:"Crear un nuevo tema BCF",createBcfSideTitle:"Informar de un problema"},BcfTopicForm:{dragDropImageText:"Seleccione un archivo",addObjectButton:"Objeto",addAnnotationButton:"Anotación",annotationButtonTooltip:"Actualmente este tema no posee ningún punto de vista",addPictureButton:"Añadir una imagen",titlePlaceholder:"Título *",titleErrorMessage:"Falta el título",typeLabel:"Tipo",priorityLabel:"Prioridad",statusLabel:"Estado",stageLabel:"Fase",assignedToLabel:"Asignado a",dueDateLabel:"Fecha de vencimiento (DD/MM/AAAA)",descriptionLabel:"Descripción",labelsLabel:"Etiquetas",createButton:"Validar",updateButton:"Modificar este BCF",modalText:"Está a punto de salir de la edición del problema de {name} pero hay cambios sin guardar.",cancelButton:"Cancelar los cambios",continueButton:"Continuar con los cambios",createTitle:"Informar de un problema",dragDropImageTextTablet:"Tomar una fotografía",takeSnapshot:"Tomar un snapshot",importFile:"Importar un archivo",searchPlaceholder:"Buscar",emptySearch:"No hay resultados"},BcfTopicOverview:{openViewer:"Abrir en el visor",openViewerNoModels:"No hay ningún modelo listo para la visualización",elements:"{count} Elementos",noElements:"Ningún elemento",type:"Tipo",noTypeSpecified:"No se especifica el tipo",description:"Descripción",noDescriptionProvided:"No hay descripción",assignedTo:"Asignado a",notAssigned:"No asignado",dueDate:"Plazo",noDueDate:"Sin fecha de vencimiento",informations:"Información",status:"Estado",noStatusSpecified:"No se especifica el estado",stage:"Fase",noStageProvided:"No se indica ninguna fase",priority:"Prioridad",priorityNotDefined:"No definido",tags:"Etiquetas",noTags:"Sin etiquetas",commentButton:"Publicar un comentario",deleteText:"Estás a punto de borrar {name}",deleteBcfButton:"Borrar este BCF",keepBcfButton:"Mantenga este BCF",author:"Autor"},BcfTopicsTable:{headers:{index:"#",priority:"Prioridad",status:"Estado",title:"Título",creator:"Autor",date:"Fecha"}},BcfTopicActionsCell:{seeButton:"Ver"},BcfTopicComments:{commentButton:"Publicar un comentario",commentLabel:"Publicar un comentario",commentText:"Comentario",cancelButton:"Cancelar",publishButton:"Publicar",commentsText:"comentarios",deleteCommentText:"¿Borrar este comentario?",deleteButton:"Borrar",takeSnapshot:"Tomar un snapshot"},BcfTopicPriorityCell:{noPriority:"Sin"},SettingCard:{addButton:"añadir un elemento",cancelButton:"Cancelar",validateButton:"Validar",deleteExtensionText:"Borrar esta configuración",deleteButton:"Borrar",title:{Priority:"Prioridades",Label:"Etiquetas:",Status:"Estatutos",Type:"Tipos",Stage:"Fases"},input:{Priority:"Añadir una nueva prioridad",Label:"Añadir una nueva etiqueta",Status:"Añadir un nuevo estado",Type:"Añadir un nuevo tipo",Stage:"Añadir una nueva fase"},text:{Priority:"Lista de prioridades",Label:"Lista de etiquetas",Status:"Lista de estatutos",Type:"Lista de tipos",Stage:"Lista de fases"}}}},fr:{BcfComponents:{back:"Retour",BcfFilters:{filtersButton:"Filtres",filtersTitle:"Filtres",priorityLabel:"Priorité",statusLabel:"Statut",stageLabel:"Phase",assignedToLabel:"Assigné à",creatorsLabel:"Créé par",tagsLabel:"Tags",resetButton:"Réinitialiser",searchButton:"Rechercher",undefined:"Non défini",datePlaceholder:"Date de création"},BcfSettings:{title:"Paramètres BCF",text:"Créez, renseignez et listez les paramètres BCF que vous souhaitez avoir sur ce projet",validateButton:"Valider les paramètres BCF"},BcfStatistics:{emptyText:"Ajoutez des questions pour voir les statistiques associées ici.",issues:"problèmes",extension:{Priority:"Priorité",PriorityNotDefined:"Aucune priorité",PriorityTitle:"Priorités",Status:"Statut",StatusNotDefined:"Aucun statut",StatusTitle:"Statuts"}},BcfTopicCard:{priority:"Priorité",noPriority:"Aucune",assignedTo:"Assigné à",elements:"{n} Élements",notSpecified:"Non défini",see:"Voir"},BcfTopicCreationCard:{text:"Créer un nouveau topic BCF",createBcfSideTitle:"Signaler un problème"},BcfTopicForm:{dragDropImageText:"Veuillez sélectionner un fichier",addObjectButton:"Objet",addAnnotationButton:"Annotation",annotationButtonTooltip:"Ce topic ne possède actuellement aucun point de vue",addPictureButton:"Ajouter une image",titlePlaceholder:"Titre *",titleErrorMessage:"Titre manquant",typeLabel:"Type",priorityLabel:"Priorité",statusLabel:"Statut",stageLabel:"Phase",assignedToLabel:"Assigné à",dueDateLabel:"Date d'échéance",descriptionLabel:"Description",labelsLabel:"Tags",createButton:"Valider",updateButton:"Modifier ce BCF",modalText:"Vous êtes sur le point de quitter l'édition de l'issue {name} mais il y'a des modifications non enregistrées.",cancelButton:"Annuler les modifications",continueButton:"Continuer les modifications",createTitle:"Signaler un problème",dragDropImageTextTablet:"Prendre une photo",takeSnapshot:"Prendre un snapshot",importFile:"Importer un fichier",searchPlaceholder:"Rechercher",emptySearch:"Pas de résultat",documentsLabel:"Documents",documentsCount:"Documents - {count} documents sélectionnés",groupsLabel:"Permissions",groupsCount:"Permissions - {count} groupes sélectionnés",groupsText:"Sélectionner les groupes utilisateur qui peuvent voir ce topic et intéragir avec.",validate:"Valider"},BcfTopicOverview:{openViewer:"Ouvrir dans le viewer",openViewerNoModels:"Il n'y a aucun modèle prêt pour une visualisation",elements:"{count} Élements",noElements:"Aucun élément concerné",type:"Type",noTypeSpecified:"Pas de type spécifié",description:"Description",noDescriptionProvided:"Pas de description renseignée",assignedTo:"Assigné à",notAssigned:"Non assigné",dueDate:"Échéance",noDueDate:"Pas de date d'échéance",informations:"Informations",status:"Statut",noStatusSpecified:"Pas de statut spécifié",stage:"Phase",noStageProvided:"Pas de phase renseignée",priority:"Priorité",priorityNotDefined:"Non défini",tags:"Tags",noTags:"Pas de tags",commentButton:"Poster un commentaire",deleteText:"Vous êtes sur le point de supprimer {name}",deleteBcfButton:"Supprimer ce BCF",keepBcfButton:"Conserver ce BCF",author:"Auteur"},BcfTopicsTable:{headers:{index:"#",priority:"Priorité",status:"Statut",title:"Titre",creator:"Auteur",date:"Date"}},BcfTopicActionsCell:{seeButton:"Voir"},BcfTopicComments:{commentButton:"Poster un commentaire",commentLabel:"Poster un commentaire",commentText:"Commentaire",cancelButton:"Annuler",publishButton:"Publier",commentsText:"commentaires",deleteCommentText:"Supprimer ce commentaire ?",deleteButton:"Supprimer",takeSnapshot:"Prendre un snapshot",edited:"edité"},BcfTopicPriorityCell:{noPriority:"Aucune"},SettingCard:{addButton:"ajouter un élément",cancelButton:"Annuler",validateButton:"Valider",deleteExtensionText:"Supprimmer ce paramètre",deleteButton:"Supprimer",title:{Priority:"Priorités",Label:"Tags",Status:"Statuts",Type:"Types",Stage:"Phases"},input:{Priority:"Ajouter une nouvelle priorité",Label:"Ajouter un nouveau label",Status:"Ajouter un nouveau statut",Type:"Ajouter un nouveau type",Stage:"Ajouter une nouvelle phase"},text:{Priority:"Liste des priorités",Label:"Liste des tags",Status:"Liste des statuts",Type:"Liste des types",Stage:"Liste des phases"}}}},it:{BcfComponents:{back:"Indietro",BcfFilters:{filtersButton:"Filtri",filtersTitle:"Filtri",priorityLabel:"Priorità",statusLabel:"Stato",stageLabel:"Fase",datePlaceholder:"Data di creazione",assignedToLabel:"Assegnato a",creatorsLabel:"Creato da",tagsLabel:"Etichette",resetButton:"Ripristina",searchButton:"Cerca",undefined:"Non definito"},BcfSettings:{title:"Parametri BCF",text:"Creare, notificare e elencare i parametri BCF che si desidera avere su questo progetto",validateButton:"Conferma i parametri BCF"},BcfStatistics:{emptyText:"Aggiungi delle domande per vedere le statistiche associate qui.",issues:"problemi",extension:{Priority:"Priorità",PriorityNotDefined:"Nessuna priorità",PriorityTitle:"Priorità",Status:"Stato",StatusNotDefined:"Nessuno stato",StatusTitle:"Stati"}},BcfTopicCard:{priority:"Priorità",noPriority:"Nessuno",assignedTo:"Assegnato a",elements:"Elementi",noElements:"0 elementi",notSpecified:"Non definito",see:"Visualizza"},BcfTopicCreationCard:{text:"Crea un nuovo topic BCF",createBcfSideTitle:"Segnala un problema"},BcfTopicForm:{dragDropImageText:"Selezionare un file",addObjectButton:"Oggetto",addAnnotationButton:"Annotazione",annotationButtonTooltip:"Attualmente questo argomento non presenta alcun punto di vista",addPictureButton:"Aggiungere un'immagine",titlePlaceholder:"Titolo *",titleErrorMessage:"Titolo mancante",typeLabel:"Tipo",priorityLabel:"Priorità",statusLabel:"Stato",stageLabel:"Fase",assignedToLabel:"Assegnato a",dueDateLabel:"Data di scadenza",descriptionLabel:"Descrizione",labelsLabel:"Tag",createButton:"Conferma",updateButton:"Modificare questo BCF",modalText:"State per abbandonare la modifica di {name} ma ci sono modifiche non salvate.",cancelButton:"Annullare le modifiche",continueButton:"Continuare le modifiche",createTitle:"Segnala un problema"},BcfTopicOverview:{openViewer:"Apri nel visualizzatore",openViewerNoModels:"Non esistono modelli pronti per la visualizzazione",elements:"{count} Elementi",noElements:"Nessun elemento",type:"Tipo",noTypeSpecified:"Nessun tipo specificato",description:"Descrizione",noDescriptionProvided:"Nessuna descrizione inserita",assignedTo:"Assegnato a",notAssigned:"Non assegnato",dueDate:"Scadenza",noDueDate:"Nessuna data di scadenza",informations:"Informazioni",status:"Stato",noStatusSpecified:"Nessuno stato specificato",stage:"Fase",noStageProvided:"Nessuna fase inserita",priority:"Priorità",priorityNotDefined:"Non definita",tags:"Etichette",noTags:"Nessuna etichetta",commentButton:"Pubblica un commento",deleteText:"Stai per eliminare {name}",deleteBcfButton:"Elimina questo BCF",keepBcfButton:"Conserva questo BCF",author:"Autore"},BcfTopicsTable:{headers:{index:"#",priority:"Priorità",status:"Stato",title:"Titolo",creator:"Autore",date:"Data"}},BcfTopicActionsCell:{seeButton:"Visualizza"},BcfTopicComments:{commentButton:"Pubblica un commento",commentLabel:"Pubblica un commento",commentText:"Commento",cancelButton:"Annulla",publishButton:"Pubblica",commentsText:"commenti",deleteCommentText:"Eliminare questo commento?",deleteButton:"Elimina"},BcfTopicPriorityCell:{noPriority:"Nessuno"},SettingCard:{addButton:"aggiungi un elemento",cancelButton:"Annulla",validateButton:"Conferma",deleteExtensionText:"Elimina questo parametro",deleteButton:"Elimina",title:{Priority:"Priorità",Label:"Etichette",Status:"Stati",Type:"Tipi",Stage:"Fasi"},input:{Priority:"Aggiungi una nuova priorità",Label:"Aggiungi una nuova etichetta",Status:"Aggiungi un nuovo stato",Type:"Aggiungi un nuovo tipo",Stage:"Aggiungi una nuova fase"},text:{Priority:"Elenco delle priorità",Label:"Elenco delle etichette",Status:"Elenco degli stati",Type:"Elenco dei tipi",Stage:"Elenco delle fasi"}}}}},Yti=({apiClient:i,fetchUsers:e,i18nPlugin:t}={})=>({install(n){i?Li.setup({apiClient:i,fetchUsers:e}):console.error("[BCF Components Plugin] No api client provided. You must provide an api client for the components to work properly."),t?Object.entries(Zti).forEach(([o,r])=>{t.global.mergeLocaleMessage(o,r)}):console.warn("[BCF Components Plugin] No i18n instance provided. You should either provide an i18n instance or define your own translations in order have text displayed properly."),Object.entries(cCe).forEach(([o,r])=>{n.component(o,r)})}}),Xti={de:{BuildingMaker:{title:"Building Maker",back:"Zurück",list:{text:"Erstellen und bearbeiten Sie die Etagen und laden Sie anschließend Ihre PDFs herunter.",createButton:"Neues Projekt",updateButton:"Umbenennen",deleteButton:"Löschen"},form:{text:"Erstellen und bearbeiten Sie die Etagen und laden Sie anschließend Ihre PDFs herunter.",input:"Name des Gebäudes",error:"Ungültiger Name",createButton:"Erstellen",updateButton:"Bestätigen"},view:{addStoreyButton:"Etage",addPlanButton:"Grundriss",closeButton:"Fertigstellen",submitFilesButton:"Bestätigen"},storeyForm:{title:"Neue Etage",input:"Name",error:"Ungültiger Name",cancelButton:"Abbrechen",submitButton:"Bestätigen"}},FileManager:{creationFormTitle:"Ordner erstellen",renameFormPlaceholder:"Datei- / Ordnernam",nameInputPlaceholder:"Ordnername",emptyFolder:"Dieser Ordner ist leer",newFolderSuccess:"Neuer Ordner erstellt",renameFolderSuccess:"Umbenannter Ordner",deleteFolderSuccess:"Ordner gelöscht",newFileSuccess:"Datei hinzugefügt",renameFileSuccess:"Umbenannte Datei",deleteFileSuccess:"Datei gelöscht",nameInputErrorMessage:"Ungültiger name",cancel:"Abbrechen",submit:"Bestätigen",buttonText:"Neuer Ordner",addFileButtonText:"Datei laden",rename:"Umbenennen",view:"Sehen",download:"Herunterladen",delete:"Löschen",deleteTitle:"Dateien löschen",deleteDetail:"Sie sind im Begriff, die folgenden Dateien / Ordner endgültig zu löschen"}},en:{BIMDataComponents:{t:{back:"Back",cancel:"Cancel",create:"Create",delete:"Delete",download:"Download",finish:"Finish",rename:"Rename",search:"Search",see:"View",storey:"Storey",validate:"Validate"}},BuildingMaker:{title:"Building Maker",list:{text:"Create and edit storeys, then download your PDFs.",new:"New project"},form:{input:"Building name",error:"Invalid"},view:{addStorey:"Add Storey",addFile:"Add File",addPlan:"Add Plan"},storeyForm:{title:"New storey",input:"Name",error:"Invalid name"}},FileManager:{creationFormTitle:"Create folder",renameFormPlaceholder:"Folder/File name",nameInputPlaceholder:"Folder name",emptyFolder:"This folder is empty",newFolderSuccess:"New folder created",renameFolderSuccess:"Folder renamed",deleteFolderSuccess:"Folder deleted",newFileSuccess:"File added",renameFileSuccess:"File renamed",deleteFileSuccess:"File deleted",nameInputErrorMessage:"Invalid name",buttonText:"New folder",addFileButtonText:"Upload a file",deleteTitle:"Deleting Files",deleteDetail:"You are about to permanently delete the following files / folders",dmsRoot:"Root of the project's DMS",pdfPageSelectorTitle:"Select a page"},MetaBuildingStructure:{title:"Meta-Building Structure",tab:{structure:"Structure",zones:"Zones",equipments:"Equipments"},StoreySelector:{placeholder:"Select a storey"}},PhotosphereBuilding:{title:"Photosphere Building"}},es:{BuildingMaker:{title:"Building Maker",back:"Vuelta",list:{text:"Cree y edite los pisos después cargue los PDF.",createButton:"Nuevo proyecto",updateButton:"Renombrar",deleteButton:"Suprimir"},form:{text:"Cree y edite los pisos después cargue los PDF.",input:"Nombre del edificio",error:"Nombre no válido",createButton:"Crear",updateButton:"Validar"},view:{addStoreyButton:"Piso",addPlanButton:"Plano",closeButton:"Terminar",submitFilesButton:"Validar"},storeyForm:{title:"Nuevo piso",input:"Nombre",error:"Nombre no válido",cancelButton:"Anular",submitButton:"Validar"}},FileManager:{creationFormTitle:"Crear un archivo",renameFormPlaceholder:"Nombre de archivo / carpeta",nameInputPlaceholder:"Nombre de la carpeta",emptyFolder:"Esta carpeta está vacía",newFolderSuccess:"Nueva carpeta creada",renameFolderSuccess:"Carpeta renombrada",deleteFolderSuccess:"Carpeta eliminada",newFileSuccess:"Archivo agregado",renameFileSuccess:"Archivo renombrado",deleteFileSuccess:"Archivo eliminado",nameInputErrorMessage:"Nombre inválida",cancel:"Cancelar",submit:"Validar",buttonText:"Carpeta nueva",addFileButtonText:"Cargar un archivo",rename:"Renombrar",view:"Ver",download:"Descargar",delete:"Borrar",deleteTitle:"Eliminar archivos",deleteDetail:"Está a punto de eliminar permanentemente los siguientes archivos / carpetas"}},fr:{BIMDataComponents:{t:{back:"Retour",cancel:"Annuler",create:"Créer",delete:"Supprimer",download:"Télécharger",finish:"Terminer",rename:"Renommer",search:"Rechercher",see:"Voir",storey:"Étage",validate:"Valider"}},BuildingMaker:{title:"Building Maker",list:{text:"Créez et éditez les étages puis téléchagez vos PDF.",new:"Nouveau projet"},form:{input:"Nom du bâtiment",error:"Nom invalide"},view:{addStorey:"Ajouter un Étage",addFile:"Ajouter un fichier",addPlan:"Ajouter un plan"},storeyForm:{title:"Nouvel étage",input:"Nom",error:"Nom invalide"}},FileManager:{creationFormTitle:"Créer un dossier",renameFormPlaceholder:"Nom du fichier/dosier",nameInputPlaceholder:"Nom du dossier",emptyFolder:"Ce dossier est vide",newFolderSuccess:"Nouveau dossier créé",renameFolderSuccess:"Dossier renommé",deleteFolderSuccess:"Dossier supprimé",newFileSuccess:"Fichier ajouté",renameFileSuccess:"Fichier renommé",deleteFileSuccess:"Fichier supprimé",nameInputErrorMessage:"Nom invalide",buttonText:"Nouveau dossier",addFileButtonText:"Charger un fichier",deleteTitle:"Supression de fichiers",deleteDetail:"Vous êtes sur le point de supprimer définitivement les fichiers/dossiers suivants",dmsRoot:"Racine de la GED du projet",pdfPageSelectorTitle:"Sélectionner une page"},MetaBuildingStructure:{title:"Structure Méta-Building",tab:{structure:"Structure",zones:"Zones",equipments:"Équipements"},StoreySelector:{placeholder:"Sélectionner un étage"}},PhotosphereBuilding:{title:"Photosphère Building"}},it:{BuildingMaker:{title:"Building Maker",back:"Reso",list:{text:"Crea e modifica i piani e poi scarica i tuoi PDF.",createButton:"Nuovo progetto",updateButton:"Rinominare",deleteButton:"Eliminare"},form:{text:"Crea e modifica i piani e poi scarica i tuoi PDF.",input:"Nome della costruzione",error:"Nome non corretto",createButton:"Creare",updateButton:"Convalidare"},view:{addStoreyButton:"Piano",addPlanButton:"Mappa",closeButton:"Finire",submitFilesButton:"Convalidare"},storeyForm:{title:"Nuovo piano",input:"Nome",error:"Nome non corretto",cancelButton:"Annullare",submitButton:"Convalidare"}},FileManager:{creationFormTitle:"Crea una cartella",renameFormPlaceholder:"Nome file/cartella",nameInputPlaceholder:"Nome della cartella",emptyFolder:"Questa cartella è vuota",newFolderSuccess:"Nuova cartella creata",renameFolderSuccess:"Cartella rinominata",deleteFolderSuccess:"Cartella eliminata",newFileSuccess:"File aggiunto",renameFileSuccess:"File rinominato",deleteFileSuccess:"File cancellato",nameInputErrorMessage:"Nome non valido",cancel:"Annulla",submit:"Invia",buttonText:"Nuova cartella",addFileButtonText:"Carica un file",rename:"Rinominare",view:"Vedere",download:"Scaricare",delete:"Cancellare",deleteTitle:"Eliminazione di file",deleteDetail:"Stai per eliminare definitivamente i seguenti file/cartelle"}}},$ti=({i18nPlugin:i}={})=>({install(e){i?Object.entries(Xti).forEach(([t,n])=>{i.global.mergeLocaleMessage(t,n)}):console.warn("[BIMData Components Plugin] No i18n instance provided. You should either provide an i18n instance or define your own translations in order have text displayed properly."),Object.entries(cLt).forEach(([t,n])=>{e.component(t,n)})}}),eii=Object.freeze(Object.defineProperty({__proto__:null,BIMDataClickAway:el,BIMDataClickInputAway:{beforeMount(i,e){if(typeof e.value!="function")throw Error(`click away directive needs function, got ${typeof e.value}`);i.clickAwayHandler=t=>{(t.path||t.composedPath&&t.composedPath()).find(o=>o===i)||e.value()},window.addEventListener("mousedown",i.clickAwayHandler,!0)},unmounted(i){window.removeEventListener("mousedown",i.clickAwayHandler,!0),delete i.clickAwayHandler}}},Symbol.toStringTag,{value:"Module"})),tii=i=>({install(e){Object.entries(yJe).forEach(([t,n])=>{e.component(t,n)}),Object.entries(eii).forEach(([t,n])=>e.directive(t.split("BIMData")[1],n))}}),iii={name:"LiWrapper",render(){return gn("li",this.$slots.default())}};function nii(i,e){var t=new Set([]);return i.forEach(n=>{e.has(n)||t.add(n)}),t}const Dl=es("id"),oii=({contextMenu:i,objects:e=[],state:t=i.$viewer.state,pictos:n})=>[{name:"selectAll",get group(){return i.groupPositions.select},position:1,get label(){return i.$t("context_menu.select_all")},get picto(){return n.get(this.name)},execute:()=>t.selectObjects(e.filter(Ua(Si("visible"),wd("selected"))).map(Dl)),predicate:()=>e.some(Ua(Si("visible"),wd("selected")))},{name:"deselectAll",get group(){return i.groupPositions.select},position:2,get label(){return i.$t("context_menu.deselect_all")},get picto(){return n.get(this.name)},execute:()=>t.deselectObjects(e.filter(Si("selected")).map(Dl)),predicate:()=>e.some(Si("selected"))},{name:"selectSimilar",get group(){return i.groupPositions.select},position:3,get label(){return i.$t("context_menu.select_similar")},get picto(){return n.get(this.name)},execute(){const o=e.filter(r=>r.visible&&r.type===this.selectedObject.type&&r.id!==this.selectedObject.id).map(Dl);t.selectObjects(o)},selectedObject:null,predicate(){const o=e.filter(Ua(Si("visible"),Si("selected")));return o.length===1&&o[0].type!==void 0?(this.selectedObject=o[0],!0):(this.selectedObject=null,!1)}},{name:"reverseSelection",get label(){return i.$t("context_menu.reverse_selection")},get group(){return i.groupPositions.select},position:4,execute:()=>{const o=new Set(e.filter(Si("selected")).map(Dl)),r=new Set(e.filter(Si("visible")).map(Dl));t.selectObjects(Array.from(nii(r,o)),{exclusive:!0})},predicate:()=>e.some(Ua(wd("selected"),Si("visible")))&&e.some(Ua(Si("selected"),Si("visible")))},{name:"showAll",get group(){return i.groupPositions.visibility},position:1,get label(){return i.$t("context_menu.show_all")},get picto(){return n.get(this.name)},execute:()=>t.showObjects(e.filter(wd("visible")).map(Dl)),predicate:()=>e.some(wd("visible"))},{name:"hide",get group(){return i.groupPositions.visibility},position:2,get label(){return i.$t("context_menu.hide")},get picto(){return n.get(this.name)},objectsToHide:null,execute(){const o=this.objectsToHide.filter(Si("selected"));o.length>0&&t.deselectObjects(o.map(Dl)),t.hideObjects(this.objectsToHide.map(Dl))},predicate(){return this.objectsToHide=e.filter(Ua(Si("selected"),Si("visible"))),this.objectsToHide.length>0}},{name:"hideAll",get group(){return i.groupPositions.visibility},position:3,get label(){return i.$t("context_menu.hide_all")},execute:()=>{const o=e.filter(Si("visible"));o.some(Si("selected"))&&t.deselectObjects(o.filter(Si("selected")).map(Dl)),t.hideObjects(o.map(Dl))},predicate:()=>e.some(Si("visible"))}].filter(o=>o.predicate()),sii={components:{LiWrapper:iii},inject:["$viewer"],data(){return{defaultPrevented:!1,displayed:!1,top:null,bottom:null,left:null,width:200,nextCommandId:1,currentCommands:[],contextCommands:[],registeredCommands:[],groupPositions:{select:10,visibility:20},asyncPredicateRunning:!1}},computed:{position(){return{top:this.top?this.top+"px":"unset",bottom:this.bottom?this.bottom+"px":"unset",left:this.left+"px",width:this.width+"px"}}},watch:{displayed(i){i?document.addEventListener("keydown",this.onKeyDown):document.removeEventListener("keydown",this.onKeyDown)}},created(){this.$viewer.contextMenu=this,this.asyncPredicates=new Set},methods:{onKeyDown(i){i.key==="Escape"&&this.away()},setPosition(i){const t=(document.fullscreenElement?document.fullscreenElement:this.$parent.$el).getBoundingClientRect();this.left=i.clientX-t.left,this.top=i.clientY-t.top,this.left+this.width>t.width&&(this.left=this.left-this.width),i.clientY>t.top+t.height/2?(this.bottom=t.height-this.top,this.top=null):this.bottom=null},typeCheckCommand(i={}){let e=null;if((!i.execute||typeof i.execute!="function")&!i.component&&(e="Cannot register context menu command. A command must have an execute function or a component property."),i.label||(e="Cannot register context menu command. A command must have a label."),e)throw console.error(e),new Error(e);return i.id=this.nextCommandId++,i},open(i){this.currentCommands=[],this.setPosition(i),this.originEvent=i,i.preventDefault(),this.setCurrentCommands(),this.groupCurrentCommands(),this.defaultPrevented=!1,this.displayed=!0,document.fullscreenElement?(this.$el.parentElement.removeChild(this.$el),this.adoptiveParent=document.fullscreenElement,this.adoptiveParent.appendChild(this.$el)):this.adoptiveParent&&this.adoptiveParent!==this.$viewer.globalContext.el&&(this.adoptiveParent.removeChild(this.$el),this.$viewer.globalContext.el.appendChild(this.$el),this.adoptiveParent=null)},setCurrentCommands(){this.asyncPredicates.clear(),this.asyncPredicateRunning=!1,this.defaultPrevented||this.registeredCommands.forEach(async i=>{if(typeof i.predicate=="function"){const e=i.predicate(this.$viewer.globalContext.activeLocalContext);if(e===!0)this.currentCommands.push(i);else if(typeof e?.then=="function"){this.asyncPredicates.add(e),this.asyncPredicateRunning=!0;const t=await e;this.asyncPredicates.has(e)&&(this.asyncPredicates.delete(e),this.asyncPredicateRunning=this.asyncPredicates.size>0,t===!0&&this.currentCommands.push(i))}}else this.currentCommands.push(i)}),this.currentCommands.push(...this.contextCommands),this.contextCommands=[]},getDefaultCommands({objects:i=[],state:e=this.$viewer.state,context:t=null}){const n=new Map;return t&&this.$viewer.shortcutManager.getShortcuts(t).forEach(o=>n.set(o.name,o.key)),oii({contextMenu:this,objects:i,state:e,pictos:n})},executeCommand(i){if(i.execute&&(i.execute(this.originEvent),this.displayed=!1),i.component&&!i.menu)throw new Error("Command with component property must have a `menu` property")},away(){this.displayed=!1},groupCurrentCommands(){const i=new Map;this.currentCommands.forEach(n=>{(n.group===null||n.group===void 0)&&(n.group=0),i.has(n.group)?i.get(n.group).push(n):i.set(n.group,[n])}),i.forEach(n=>n.sort((o,r)=>(o.position=o.position||0,r.position=r.position||0,o.position-r.position)));const t=[...i.keys()].sort((n,o)=>n-o).map(n=>i.get(n)).flat();this.currentCommands=t},isGroupIntersection(i){if(i===0)return!1;const e=this.currentCommands[i-1],t=this.currentCommands[i];return e.group<t.group},registerContextCommand(i){const e=this.typeCheckCommand(i);return this.contextCommands.push(e),i.id},registerCommand(i){const e=this.typeCheckCommand(i);return this.registeredCommands.push(e),i.id},unregisterCommand(i){return this.registeredCommands.find(e=>e.id===i)?(this.registeredCommands=this.registeredCommands.filter(e=>e.id!==i),!0):!1},preventDefault(){this.defaultPrevented=!0}}},rii={key:0,class:"separator"},aii={class:"menu-text"},lii={key:1,class:"menu-picto"},cii={key:0,class:"context-menu__spinner"};function uii(i,e,t,n,o,r){const s=P("BIMDataIconChevron"),a=P("LiWrapper"),l=P("BIMDataSpinner"),c=ai("click-away");return o.displayed&&(o.currentCommands.length||o.asyncPredicateRunning)?yt((E(),L("ul",{key:0,class:"bimdata-list context-menu",style:ce(r.position)},[(E(!0),L($e,null,Mt(o.currentCommands,(u,d)=>(E(),K(a,{key:u.label,class:"context-menu__element",onClick:h=>r.executeCommand(u)},{default:U(()=>[r.isGroupIntersection(d)?(E(),L("div",rii)):te("",!0),C("div",aii,G(u.label),1),!u.component&&u.picto?(E(),L("span",lii,G(u.picto),1)):u.component?(E(),K(s,{key:2,size:"xxs",class:"fill-primary"})):te("",!0)]),_:2},1032,["onClick"]))),128)),o.asyncPredicateRunning?(E(),L("li",cii,[k(l)])):te("",!0)],4)),[[c,r.away]]):te("",!0)}const dii=V(sii,[["render",uii],["__scopeId","data-v-5b87d4a3"]]),hii={name:"ViewerHeader",inject:["$viewer"],props:{visible:{type:Boolean,default:!0}},setup(){const i=at("$viewer"),e=Bo(new Map),t=o=>{if(!o.name)throw new TypeError("[Viewer Header] Content must have a name");if(e.has(o.name))throw new Error(`[Viewer Header] Content with name ${o.name} already exists`);e.set(o.name,o)},n=o=>e.has(o)?(e.delete(o),!0):!1;return{logo:i.uiSettings.bimdataLogo!==!1,version:i.uiSettings.version!==!1?i.version:null,headerContent:e,headerRightContentComponents:Re(()=>Array.from(e.values()).filter(o=>o.position==="right").sort((o,r)=>o.order-r.order).map(o=>o.component)),headerLeftContentComponents:Re(()=>Array.from(e.values()).filter(o=>o.position==="left").sort((o,r)=>o.order-r.order).map(o=>o.component)),addContent:t,removeContent:n}}},pii={class:"viewer-header"},fii={class:"viewer-header__content"},Aii={class:"viewer-header__content__left"},mii={class:"viewer-header__content__right"},gii={key:0,class:"m-l-6 flex items-center"},yii={key:1,class:"viewer-header__version"};function vii(i,e,t,n,o,r){const s=P("BIMDataIllustration");return yt((E(),L("div",pii,[C("div",fii,[C("div",Aii,[(E(!0),L($e,null,Mt(n.headerLeftContentComponents,a=>(E(),K(Pn(a),{key:a.name}))),128))]),C("div",mii,[(E(!0),L($e,null,Mt(n.headerRightContentComponents,a=>(E(),K(Pn(a),{key:a.name}))),128))])]),n.logo||n.version?(E(),L("div",gii,[n.logo?(E(),K(s,{key:0,name:"logo",width:"30px",height:"30px"})):te("",!0),n.version?(E(),L("div",yii,G(n.version),1)):te("",!0)])):te("",!0)],512)),[[jt,t.visible]])}const wii=V(hii,[["render",vii],["__scopeId","data-v-5c9ea6b6"]]),Cii={emits:["resize"],setup(i,{emit:e}){return{onResizerMousedown:n=>{n.preventDefault();let o=n.clientX;const r=a=>{a.preventDefault();const l=a.clientX-o;o=a.clientX,e("resize",l)},s=a=>{a.preventDefault(),window.removeEventListener("mousemove",r),window.removeEventListener("mouseup",s)};window.addEventListener("mousemove",r),window.addEventListener("mouseup",s)}}}},bii={class:"bimdata-separator"};function xii(i,e,t,n,o,r){return E(),L("div",bii,[e[1]||(e[1]=C("div",{class:"bimdata-separator__line"},null,-1)),C("div",{class:"bimdata-separator__resizer",onMousedown:e[0]||(e[0]=(...s)=>n.onResizerMousedown&&n.onResizerMousedown(...s))},null,32)])}const Mii={components:{Separator:V(Cii,[["render",xii],["__scopeId","data-v-79a3b3af"]])},props:{position:{type:String,required:!0,validator(i){return["left","right"].includes(i)}},sidePanel:{type:Object,required:!0,validator(i){if(i.width&&(typeof i.width!="number"||i.width<0))return console.error(`[GlobalSidePanel] sidePanel.width must be a strictly positive number, received ${typeof i.width}`),!1;const e=typeof i?.component=="object";return e||console.error("[GlobalSidePanel] sidePanel must have a component property"),e}}},setup(i){const e=ae(null),t=ae(i.sidePanel.width??400),n=(o,r=1)=>{const s=t.value+o*r;t.value=Math.max(0,s)};return ct(()=>i.sidePanel,()=>{Object.defineProperty(i.sidePanel,"width",{get(){return t.value},set(o){if(typeof o!="number"||o<=0){console.error(`[GlobalSidePanel] sidePanel.width must be a strictly positive number, received ${typeof o}`);return}t.value=o}}),Object.defineProperty(i.sidePanel,"componentInstance",{get(){return e.value},enumerable:!0})},{immediate:!0}),{componentInstance:e,width:t,onResize:n}}},Eii={class:"bimdata-global-side-panel__component"};function Bii(i,e,t,n,o,r){const s=P("Separator");return E(),L("div",{class:"bimdata-global-side-panel",style:ce(`width: ${n.width}px`)},[t.sidePanel.resizable&&t.position==="right"?(E(),K(s,{key:0,onResize:e[0]||(e[0]=a=>n.onResize(a,-1))})):te("",!0),C("div",Eii,[(E(),K(Pn(t.sidePanel.component),{ref:"componentInstance"},null,512))]),t.sidePanel.resizable&&t.position==="left"?(E(),K(s,{key:1,onResize:e[1]||(e[1]=a=>n.onResize(a))})):te("",!0)],4)}const Iii={name:"BimdataViewer",components:{ContextMenu:dii,ViewerHeader:wii,ModalManager:h2e,GlobalSidePanel:V(Mii,[["render",Bii],["__scopeId","data-v-82d0d4cb"]])},setup(){const i=at("$viewer"),{globalContext:e,shortcutManager:t}=i;bi(()=>{t&&t.destroy(),e.hub.clear()}),ci(()=>{i.pluginManager.runPluginsScripts(i)});const n=Re(()=>i.uiSettings.bimdataLogo!==!1&&(e.localContexts.length!==1||e.localContexts[0].window?.logoAndVersion)),o=Re(()=>i.uiSettings.version!==!1&&(e.localContexts.length!==1||e.localContexts[0].window?.logoAndVersion)?i.version:null),r=Re(()=>e.leftSidePanel),s=Re(()=>e.rightSidePanel),a=Re(()=>{const p=i.uiSettings.header!==!1,A=e.localContexts.length===1&&e.localContexts[0].window?.header===!1,f=!!(r.value||s.value);return p&&(!A||f)}),l=i.uiSettings.contextMenu!==!1,c=ae(null);function u(p){l&&c.value.open(p)}function d(){i.shortcutManager.active=!0}function h(){i.shortcutManager.active=!1}return{Layout:i.layout.areas.component,onContextMenu:u,onMouseenter:d,onMouseleave:h,isHeaderVisible:a,viewerTemplateRef:e.templateRef,modalManagerTemplateRef:e.modalManagerTemplateRef,headerTemplateRef:e.headerTemplateRef,contextMenuTemplateRef:c,contextMenuEnabled:l,bimdataLogoOnSingleWindow:n,viewerVersionOnSingleWindow:o,version:i.version,loading:Re(()=>e.loading),spinner:Re(()=>e.spinner),leftSidePanel:r,rightSidePanel:s}}},Sii={key:1,class:"bimdata-context-loading-overlay",style:{"z-index":"3"}},Pii={key:2,class:"viewer__logo"},Tii={key:1,class:"version m-t-6"};function kii(i,e,t,n,o,r){const s=P("ModalManager"),a=P("ContextMenu"),l=P("ViewerHeader"),c=P("GlobalSidePanel"),u=P("BIMDataSpinner"),d=P("BIMDataIllustration");return E(),L("div",{id:"bimdata-viewer",ref:"viewerTemplateRef",class:"bimdata-viewer bimdata-design-system bimdata-scrollbar",onContextmenu:e[0]||(e[0]=(...h)=>n.onContextMenu&&n.onContextMenu(...h)),onMouseenter:e[1]||(e[1]=(...h)=>n.onMouseenter&&n.onMouseenter(...h)),onMouseleave:e[2]||(e[2]=(...h)=>n.onMouseleave&&n.onMouseleave(...h))},[k(s,{ref:"modalManagerTemplateRef"},null,512),n.contextMenuEnabled?(E(),K(a,{key:0,ref:"contextMenuTemplateRef"},null,512)):te("",!0),k(l,{ref:"headerTemplateRef",visible:n.isHeaderVisible},null,8,["visible"]),C("div",{class:"bimdata-viewer__content",style:ce(n.isHeaderVisible?"height: calc(100% - var(--bimdata-viewer-header-height, 40px))":"height: 100%")},[n.leftSidePanel?(E(),K(c,{key:0,"side-panel":n.leftSidePanel,position:"left"},null,8,["side-panel"])):te("",!0),(E(),K(Pn(n.Layout),{style:"height: 100%; flex-grow: 1;"})),n.rightSidePanel?(E(),K(c,{key:1,"side-panel":n.rightSidePanel,position:"right"},null,8,["side-panel"])):te("",!0)],4),n.loading?(E(),L("div",Sii,[n.spinner&&n.spinner.component?(E(),K(Pn(n.spinner.component),Rr(Es({key:0},n.spinner.props)),null,16)):(E(),K(u,{key:1,size:"40px",border:"5px"}))])):te("",!0),!n.isHeaderVisible&&(n.bimdataLogoOnSingleWindow||n.viewerVersionOnSingleWindow)?(E(),L("div",Pii,[n.bimdataLogoOnSingleWindow?(E(),K(d,{key:0,name:"logo"})):te("",!0),n.viewerVersionOnSingleWindow?(E(),L("div",Tii,G(n.version),1)):te("",!0)])):te("",!0)],544)}const Rii=V(Iii,[["render",kii],["__scopeId","data-v-0c1c941a"]]),_ii=["src"],Dii={class:"bimdata-models__header"},Lii={key:0,class:"bimdata-models__header__loader"},Fii={class:"bimdata-models__header__picto"},Oii={class:"bimdata-models__header__name"},Nii={key:0,class:"bimdata-models__header__name--empty"},Uii={key:1,class:"bimdata-models__header__name--empty"},Vii={key:3},Hii=["onMousemove","onClick"],g2e=V({__name:"Models",props:{preview:{type:Boolean,default:!1},windowPositioning:{type:Boolean,default:!0},customFilter:{type:Function,default:null},width:{type:String,default:"350px"}},setup(i){const e=i,t=at("$viewer"),n=ae(),o=ae(0),r=ae(0),s=ae(),a=Ai([]),l=ae(!1),c=Re(()=>t.localContext.loadedModels),u=Re(()=>t.localContext.loadedModelIds),d=Re(()=>t.localContext.loadingModelIds),h=Re(()=>t.localContext.multiModel),p=Re(()=>(e.customFilter?a.value.filter(e.customFilter):a.value).map(B=>c.value.find(S=>S.document?.head_id!=null&&S.document.head_id===B.document.id)??B)),A=M=>u.value.includes(M),f=M=>d.value.includes(M),g=Re(()=>{const{x:M,y:B}=s.value?.getBoundingClientRect()??{x:0,y:0};return`top:${r.value-B}px; left:${o.value-M}px;`}),m=M=>{!h.value&&A(M.id)||d.value.length>0||(t.localContext.loadedModelIds.includes(M.id)?t.localContext.unloadModels([M.id]):t.localContext.loadModels([M.id]))},v=M=>{switch(M){case"C":return"success";case"E":return"failed";case"P":case"I":return"sandglass"}},y=(M,B)=>{M?.viewer_360_file&&(o.value=B.clientX,r.value=B.clientY),n.value=M?.viewer_360_file},w=async M=>{l.value=!0;try{return(await t.api.apiClient.modelApi.getModels(t.api.cloudId,t.api.projectId,void 0,void 0,M)).filter(S=>t.state.models.some(I=>I.archived)||!S.archived).sort(sl("updated_at",!1))}catch(B){console.error("[Models] Cannot get project models. Error: ",B)}finally{l.value=!1}return[]},x=M=>M.children?.some(B=>A(B.id))??!1;return w(t.localContext.modelTypes).then(M=>{a.value=M}),(M,B)=>{const S=P("BIMDataSpinner"),I=P("BIMDataIconModel3D"),R=P("BIMDataTextbox"),T=P("BIMDataCheckbox"),_=P("BIMDataRadio"),F=P("BIMDataIcon"),N=P("BIMDataDropdownList");return E(),L("div",{ref_key:"templateRef",ref:s,class:le(["bimdata-models",{"bimdata-models--window-positioning":i.windowPositioning}])},[n.value?(E(),L("div",{key:0,class:"bimdata-models__preview",style:ce(g.value)},[C("img",{src:n.value},null,8,_ii)],4)):te("",!0),k(N,{style:ce(`--bimdata-models-width: ${i.width};`),width:i.width,list:p.value,"element-key":"id","per-page":40,loading:l.value,class:"bimdata-models__list",disabled:p.value.length===0,onElementClick:m},{header:U(({isOpen:z})=>[C("div",Dii,[l.value||d.value.length>0?(E(),L("div",Lii,[k(S)])):(E(),L($e,{key:1},[C("div",Fii,[k(I)]),C("div",{class:le(["bimdata-models__header__number bimdata-info-length",{"bimdata-models__header__number--empty":u.value.length===0}])},[C("span",null,G(u.value.length),1)],2),C("div",Oii,[p.value.length===0?(E(),L("span",Nii,G(M.$t("model.no_model")),1)):u.value.length===0?(E(),L("span",Uii,G(M.$t("model.no_loaded_model")),1)):u.value.length===1?(E(),K(R,{key:2,text:c.value[0].name,tooltip:!z},null,8,["text","tooltip"])):u.value.length>1?(E(),L("span",Vii,G(M.$t("model.selected_models")),1)):te("",!0)])],64))])]),element:U(({element:z,close:j})=>[C("div",{class:"bimdata-models__model",onMousemove:W=>i.preview&&y(z,W),onMouseout:B[0]||(B[0]=W=>i.preview&&y()),onClick:()=>{!h.value&&!A(z.id)&&j()}},[h.value?(E(),K(T,{key:0,"model-value":A(z.id)||x(z),disabled:z.status!=="C"||d.value.length>0},null,8,["model-value","disabled"])):(E(),K(_,{key:1,"model-value":A(z.id)||x(z),disabled:z.status!=="C"||d.value.length>0},null,8,["model-value","disabled"])),k(F,{margin:"0 calc(var(--spacing-unit) / 2)",name:v(z.status),size:"xs",class:le({"fill-success":z.status==="C","fill-high":z.status==="E"})},null,8,["name","class"]),k(R,{class:le({"bimdata-models__model__name":!0,"bimdata-models__model__name--disabled":z.status!=="C"||d.value.length>0}),text:z.name,width:`calc(100% -
|
|
6438
|
+
`),onMouseenter:e[0]||(e[0]=(...h)=>n.onMouseEnter&&n.onMouseEnter(...h)),onMouseleave:e[1]||(e[1]=(...h)=>n.onMouseLeave&&n.onMouseLeave(...h))},[k(s,{ref:"modalManagerTemplateRef"},null,512),C("div",Oti,[n.windowPlugins.leftSidePanel?(E(),K(a,{key:0,plugin:n.windowPlugins.leftSidePanel},null,8,["plugin"])):te("",!0),C("div",Nti,[(E(!0),L($e,null,Mt(n.windowPlugins.free,h=>(E(),K(l,{key:h.name,class:le({"window-container__content__center__viewer":h.isViewer}),plugin:h},null,8,["class","plugin"]))),128)),k(c,{position:"left",plugins:n.windowPlugins.leftButtonColumn},null,8,["plugins"]),k(c,{position:"right",plugins:n.windowPlugins.rightButtonColumn},null,8,["plugins"])]),n.windowPlugins.rightSidePanel?(E(),K(a,{key:1,plugin:n.windowPlugins.rightSidePanel},null,8,["plugin"])):te("",!0)]),n.loading?(E(),L("div",Uti,[n.spinner&&n.spinner.component?(E(),K(Pn(n.spinner.component),Rr(Es({key:0},n.spinner.props)),null,16)):(E(),K(u,{key:1,size:"20px",border:"3px"}))])):te("",!0),n.layoutSettingsDisplayed?(E(),L("div",Vti,[k(d)])):te("",!0)],36)}const zti=V(Fti,[["render",Hti],["__scopeId","data-v-485f288e"]]);class jti{constructor(e=!0){const t=_ei(Yz,null,{resizable:e});t.registerContent("default",zti),this.settings=Bo({edit:!1,swap:!1,full:!1}),this.areas=t}get resizable(){return this.areas.resizable}set resizable(e){this.areas.resizable=e}apply(e=null){this.areas.layout=e?Dei(e):null}copy(e,t=!0){return Lei(this.areas.layout,e,t)}open({ratio:e,direction:t,insertAfter:n,windowName:o=null,windowState:r=null,localContextId:s=null}={}){const a=o?{options:{windowName:o,windowState:r}}:null;return s===null?this.areas.splitLayout(e,t,n,a):this.areas.split(s,e,t,n,a)}swap(e,t){return this.areas.swap(e,t)}close(e){return this.areas.delete(e)}compare(e,t){if(!e&&!t)return!0;if(!e||!t)return!1;if(typeof e=="string"&&typeof t=="string")return e===t;if(typeof e=="string"||typeof t=="string")return!1;if(e.windowName&&t.windowName){if(e.windowName!==t.windowName)return!1;const n=new Set(e.windowState?.modelIds),o=new Set(t.windowState?.modelIds);return n.size===o.size&&[...n].every(s=>o.has(s))}return e.windowName||t.windowName||e.direction!==t.direction||e.children.length!==t.children.length?!1:e.children.every((n,o)=>this.compare(n,t.children[o]))}}const Gti={version:"2.16.2-beta.3"};let Qti=1;class qti{constructor({plugins:e,api:t,ui:n,locale:o="fr"}){this.instanceId=Qti++,this.pluginManager=new eYt(e),this.windowManager=new iYt,this.windowManager.registerAndAddPluginsToWindows([...this.pluginManager.registeredPlugins.values()]),this.api=new U$t(t),this.globalContext=new d6e(this),this.state=X$t(this),this.shortcutManager=Zme(this.state),this.uiSettings=n||{},this.i18n=new c6e(o),this._contextMenu=null,this.layout=new jti(this.uiSettings.resizable!==!1),this._darkTheme=ae(n?.darkTheme??!1),this.localContext=null,window.$viewer=this}get darkTheme(){return this._darkTheme.value}set darkTheme(e){this._darkTheme.value=e}get version(){return Gti.version}get locale(){return this.i18n.locale}get contextMenu(){return this._contextMenu||Jme}set contextMenu(e){this._contextMenu=e}get registeredWindows(){return[...this.windowManager.registeredWindows.keys()]}get registeredPlugins(){return[...this.pluginManager.registeredPlugins.keys()]}get pluginsCfg(){return this.pluginManager.cfg}registerPlugin(e){this.pluginManager.registerPlugin(e),this.windowManager.registerAndAddPluginsToWindows([e])}}function Kti(i,e={}){e.backgroundColor&&(i.style.setProperty("--bimdata-viewer-background-color",e.backgroundColor),e.backgroundColor==="transparent"&&i.style.setProperty("--areas-separator-color","transparent")),e.colorPrimary&&i.style.setProperty("--color-primary",e.colorPrimary),e.colorPrimaryLighter&&i.style.setProperty("--color-primary-lighter",e.colorPrimaryLighter),e.colorPrimaryLight&&i.style.setProperty("--color-primary-light",e.colorPrimaryLight),e.colorPrimaryDark&&i.style.setProperty("--color-primary-dark",e.colorPrimaryDark),e.colorSecondary&&i.style.setProperty("--color-secondary",e.colorSecondary),e.colorSecondaryLighter&&i.style.setProperty("--color-secondary-lighter",e.colorSecondaryLighter),e.colorSecondaryLight&&i.style.setProperty("--color-secondary-light",e.colorSecondaryLight),e.colorSecondaryDark&&i.style.setProperty("--color-secondary-dark",e.colorSecondaryDark),e.colorSilverLight&&i.style.setProperty("--color-silver-light",e.colorSilverLight),e.colorSilver&&i.style.setProperty("--color-silver",e.colorSilver),e.colorSilverDark&&i.style.setProperty("--color-silver-dark",e.colorSilverDark),e.colorGraniteLight&&i.style.setProperty("--color-granite-light",e.colorGraniteLight),e.colorGranite&&i.style.setProperty("--color-granite",e.colorGranite),e.colorSuccess&&i.style.setProperty("--color-success",e.colorSuccess),e.colorSuccessLighter&&i.style.setProperty("--color-success-Lighter",e.colorSuccessLighter),e.colorSuccessLight&&i.style.setProperty("--color-success-Light",e.colorSuccessLight),e.colorSuccessDark&&i.style.setProperty("--color-success-Dark",e.colorSuccessDark),e.colorWarning&&i.style.setProperty("--color-warning",e.colorWarning),e.colorWarningLighter&&i.style.setProperty("--color-warning-Lighter",e.colorWarningLighter),e.colorWarningLight&&i.style.setProperty("--color-warning-Light",e.colorWarningLight),e.colorWarningDark&&i.style.setProperty("--color-warning-Dark",e.colorWarningDark),e.colorHigh&&i.style.setProperty("--color-high",e.colorHigh),e.colorHighLighter&&i.style.setProperty("--color-high-lighter",e.colorHighLighter),e.colorHighLight&&i.style.setProperty("--color-high-light",e.colorHighLight),e.colorHighDark&&i.style.setProperty("--color-high-dark",e.colorHighDark),e.colorText&&i.style.setProperty("--color-text",e.colorText),(!e.backgroundColor||e.backgroundColor!=="transparent")&&i.style.setProperty("--areas-separator-color","rgba(216, 216, 216, 1)"),e.headerHeight!=null&&i.style.setProperty("--bimdata-viewer-header-height",e.headerHeight),i.style.setProperty("--areas-background-color","transparent")}const Jti=Object.freeze({25:"GUEST",50:"USER",100:"ADMIN"}),fg=Object.freeze({READ:"read",WRITE:"write"});function A2e(i){const e={};return i.forEach(t=>{const[n,o]=t.split(":");e[n]?e[n].push(o):e[n]=[o]}),e}const Wti={token_scopes:[],usable_scopes:[],user_role:25};function m2e(i=Wti){const e=A2e(i.token_scopes),t=A2e(i.usable_scopes);return{...eJ(i),tokenScopes:e,usableScopes:t,userRole:Jti[i.user_role],user:i.user?eJ(i.user):null,hasBcfReadPermission:t.bcf?.includes(fg.READ)??!1,hasBcfWritePermission:t.bcf?.includes(fg.WRITE)??!1,hasModelReadPermission:t.model?.includes(fg.READ)??!1,hasModelWritePermission:t.model?.includes(fg.WRITE)??!1,hasDocReadPermission:t.document?.includes(fg.READ)??!1,hasDocWritePermission:t.document?.includes(fg.WRITE)??!1}}const Zti={de:{BcfComponents:{back:"Zurück",BcfFilters:{filtersButton:"Filter",filtersTitle:"Filter",priorityLabel:"Priorität",statusLabel:"Status",stageLabel:"Phase",assignedToLabel:"Zugewiesen an",creatorsLabel:"Erstellt von",tagsLabel:"Tags",resetButton:"Zurücksetzen",searchButton:"Suchen",undefined:"Nicht definiert",datePlaceholder:"Erstellungsdatum"},BcfSettings:{title:"BCF-Parameter",text:"Erstellen, füllen und listen Sie die BCF-Einstellungen auf, die Sie für dieses Projekt haben möchten.",validateButton:"Die BCF-Parameter anerkennen"},BcfStatistics:{emptyText:"Fügen Sie Fragen hinzu, um zugehörige Statistiken hier anzuzeigen.",issues:"Probleme",extension:{Priority:"Priorität",PriorityNotDefined:"Keine Priorität",PriorityTitle:"Prioritäten",Status:"Status",StatusNotDefined:"Kein Status",StatusTitle:"Status"}},BcfTopicCard:{priority:"Priorität",noPriority:"Keine",assignedTo:"Zugewiesen an",elements:"Elemente",notSpecified:"Nicht definiert",see:"Anzeigen"},BcfTopicCreationCard:{text:"Ein neues BCF-Thema erstellen",createBcfSideTitle:"Ein Problem melden"},BcfTopicForm:{dragDropImageText:"Bitte wählen Sie eine Datei aus.",addObjectButton:"Objekt",addAnnotationButton:"Annotation",annotationButtonTooltip:"Zu diesem Thema gibt es derzeit keine Ansichten.",addPictureButton:"Fügen Sie ein Bild hinzu.",titlePlaceholder:"Titel *",titleErrorMessage:"Titel fehlt",typeLabel:"Typ",priorityLabel:"Priorität",statusLabel:"Status",stageLabel:"Phase",assignedToLabel:"Zugewiesen an",dueDateLabel:"Fälligkeitsdatum (TT.MM.JJJJ)",descriptionLabel:"Beschreibung",labelsLabel:"Tags",createButton:"Bestätigen",updateButton:"Änderungen übernehmen",modalText:"Sie sind dabei, die Bearbeitung der Ausgabe {Name} zu beenden, aber es gibt noch ungespeicherte Änderungen.",cancelButton:"Änderungen verwerfen",continueButton:"Änderungen fortsetzen",createTitle:"Ein Problem melden",dragDropImageTextTablet:"Foto machen",takeSnapshot:"Mach einen Schnappschuss",importFile:"Eine Datei importieren",searchPlaceholder:"Suchen",emptySearch:"kein Ergebnis",documentsLabel:"Dokumente",documentsCount:"Dokumente – {count} ausgewählte Dokumente",groupsLabel:"Berechtigungen",groupsCount:"Berechtigungen – {count} ausgewählte Gruppen",groupsText:"Wählen Sie die Benutzergruppen aus, die dieses Thema sehen und damit interagieren dürfen.",validate:"Bestätigen"},BcfTopicOverview:{openViewer:"Im Viewer öffnen",openViewerNoModels:"Es sind keine Vorlagen zur Ansicht bereit",elements:"{count} Elemente",noElements:"kein Element",type:"Typ",noTypeSpecified:"Kein Typ angegeben",description:"Beschreibung",noDescriptionProvided:"Keine Beschreibung angegeben",assignedTo:"Zugeteilt an",notAssigned:"Nicht zugewiesen",dueDate:"Fälligkeitsdatum",noDueDate:"Kein Fälligkeitsdatum",informations:"Informationen",status:"Status",noStatusSpecified:"Kein Status angegeben",stage:"Phase",noStageProvided:"Keine Phase angegeben",priority:"Priorität",priorityNotDefined:"Nicht definiert",tags:"Tags",noTags:"Keine Tags",commentButton:"Ein Kommentar veröffentlichen",deleteText:"Sie löschen jetzt {Name}",deleteBcfButton:"Dieses BCF löschen",keepBcfButton:"Dieses BCF beibehalten",author:"Autor"},BcfTopicsTable:{headers:{index:"#",priority:"Priorität",status:"Status",title:"Titel",creator:"Autor",date:"Datum"}},BcfTopicActionsCell:{seeButton:"Anzeigen"},BcfTopicComments:{commentButton:"Ein Kommentar verfassen",commentLabel:"Ein Kommentar verfassen",commentText:"Kommentar",cancelButton:"Abbrechen",publishButton:"Veröffentlichen",commentsText:"Kommentare",deleteCommentText:"Diesen Kommentar löschen?",deleteButton:"Löschen",takeSnapshot:"Mach einen Schnappschuss",edited:"bearbeitet"},BcfTopicPriorityCell:{noPriority:"Keine"},SettingCard:{addButton:"ein Element hinzufügen",cancelButton:"Abbrechen",validateButton:"Bestätigen",deleteExtensionText:"Diesen Parameter löschen",deleteButton:"Löschen",title:{Priority:"Prioritäten",Label:"Tags",Status:"Status",Type:"Typen",Stage:"Phasen"},input:{Priority:"Eine neue Priorität hinzufügen",Label:"Ein neues Etikett hinzufügen",Status:"Einen neuen Status hinzufügen",Type:"Einen neuen Typ hinzufügen",Stage:"Eine neue Phase hinzufügen"},text:{Priority:"Liste der Prioritäten",Label:"Liste von Tags",Status:"Liste der Status",Type:"Liste der Typen",Stage:"Liste der Phasen"}}}},en:{BcfComponents:{back:"Back",BcfFilters:{filtersButton:"Filters",filtersTitle:"Filters",priorityLabel:"Priority",statusLabel:"Status",stageLabel:"Stage",assignedToLabel:"Assigned to",creatorsLabel:"Created by",tagsLabel:"Tags",resetButton:"Reset",searchButton:"Search",undefined:"Not defined",datePlaceholder:"Creation date"},BcfSettings:{title:"BCF Settings",text:"Create, enter in, and list the BCF settings you would like to have for this project",validateButton:"Validate BCF settings"},BcfStatistics:{emptyText:"Add BCF Topics to start to have some stats here.",issues:"issues",extension:{Priority:"Priority",PriorityNotDefined:"No priority",PriorityTitle:"Priorities",Status:"Status",StatusNotDefined:"No status",StatusTitle:"Status"}},BcfTopicCard:{priority:"Priority",noPriority:"None",assignedTo:"Assigned to",elements:"Elements",notSpecified:"Not specified",see:"See"},BcfTopicCreationCard:{text:"Create a new BCF topic",createBcfSideTitle:"Report a problem"},BcfTopicForm:{dragDropImageText:"Please select a file",addObjectButton:"Object",addAnnotationButton:"Annotation",annotationButtonTooltip:"This topic has no viewpoint",addPictureButton:"Add a picture",titlePlaceholder:"Title *",titleErrorMessage:"Missing title",typeLabel:"Type",priorityLabel:"Priority",statusLabel:"Status",stageLabel:"Stage",assignedToLabel:"Assigned to",dueDateLabel:"Due date",descriptionLabel:"Description",labelsLabel:"Tags",createButton:"Validate",updateButton:"Modify this BCF",modalText:"You are about to quit editing issue {name} but there are unsaved changes.",cancelButton:"Discard changes",continueButton:"Continue editing",createTitle:"Report a problem",dragDropImageTextTablet:"Take a picture",takeSnapshot:"Take a snapshot",importFile:"Import a file",searchPlaceholder:"Search",emptySearch:"No result",documentsLabel:"Add a file",documentsCount:"Files - {count} selected files",groupsLabel:"Permissions",groupsCount:"Permissions - {count} selected groups",groupsText:"You are now setting the access rights: choose the user group(s) that will be exclusively authorized to see and interact with this topic.",validate:"Validate"},BcfTopicOverview:{openViewer:"Open in viewer",openViewerNoModels:"No model to open",elements:"{count} Elements",noElements:"No element",type:"Type",noTypeSpecified:"No type specified",description:"Description",noDescriptionProvided:"No description provided",assignedTo:"Assigned to",notAssigned:"Not assigned",dueDate:"Due date",noDueDate:"No due date",informations:"Informations",status:"Status",noStatusSpecified:"No status specified",stage:"Stage",noStageProvided:"No stage provided",priority:"Priority",priorityNotDefined:"Not defined",tags:"Tags",noTags:"No tags",commentButton:"Post a comment",deleteText:"You are about to delete {name}",deleteBcfButton:"Delete this BCF",keepBcfButton:"Keep this BCF",author:"Author"},BcfTopicsTable:{headers:{index:"#",priority:"Priority",status:"Status",title:"Title",creator:"Author",date:"Date"}},BcfTopicActionsCell:{seeButton:"See"},BcfTopicComments:{commentButton:"Post a comment",commentLabel:"Post a comment",commentText:"Comment",cancelButton:"Cancel",publishButton:"Publish",commentsText:"Comments",deleteCommentText:"Delete this comment ?",deleteButton:"Delete",takeSnapshot:"Take a snapshot",edited:"edited"},BcfTopicPriorityCell:{noPriority:"None"},SettingCard:{addButton:"add an element",cancelButton:"Cancel",validateButton:"Validate",deleteExtensionText:"Remove this setting",deleteButton:"Delete",title:{Priority:"Priorities",Label:"Labels",Status:"Status",Type:"Types",Stage:"Stages"},input:{Priority:"Add a new priority",Label:"Add a new label",Status:"Add new status",Type:"Add a new type",Stage:"Add a new stage"},text:{Priority:"Priority list",Label:"Labels list",Status:"Status list",Type:"Type list",Stage:"Stage list"}}}},es:{BcfComponents:{back:"Volver",BcfFilters:{filtersButton:"Filtros",filtersTitle:"Filtros",priorityLabel:"Prioridad",statusLabel:"Estado",stageLabel:"Fase",assignedToLabel:"Asignado a",creatorsLabel:"Creado por",tagsLabel:"Etiquetas:",resetButton:"Restablecer",searchButton:"Buscar en",undefined:"No definido",datePlaceholder:"Fecha de creación"},BcfSettings:{title:"Parámetros del BCF",text:"Cree, rellene y enumere los parámetros del BCF que desea tener en este proyecto",validateButton:"Validar los parámetros del BCF"},BcfStatistics:{emptyText:"Añada preguntas para ver las estadísticas asociadas aquí.",issues:"problemas",extension:{Priority:"Prioridad",PriorityNotDefined:"Sin prioridad",PriorityTitle:"Prioridades",Status:"Estado",StatusNotDefined:"Sin estado",StatusTitle:"Estatutos"}},BcfTopicCard:{priority:"Prioridad",noPriority:"Sin",assignedTo:"Asignado a",elements:"Elementos",notSpecified:"No definido",see:"Ver"},BcfTopicCreationCard:{text:"Crear un nuevo tema BCF",createBcfSideTitle:"Informar de un problema"},BcfTopicForm:{dragDropImageText:"Seleccione un archivo",addObjectButton:"Objeto",addAnnotationButton:"Anotación",annotationButtonTooltip:"Actualmente este tema no posee ningún punto de vista",addPictureButton:"Añadir una imagen",titlePlaceholder:"Título *",titleErrorMessage:"Falta el título",typeLabel:"Tipo",priorityLabel:"Prioridad",statusLabel:"Estado",stageLabel:"Fase",assignedToLabel:"Asignado a",dueDateLabel:"Fecha de vencimiento (DD/MM/AAAA)",descriptionLabel:"Descripción",labelsLabel:"Etiquetas",createButton:"Validar",updateButton:"Modificar este BCF",modalText:"Está a punto de salir de la edición del problema de {name} pero hay cambios sin guardar.",cancelButton:"Cancelar los cambios",continueButton:"Continuar con los cambios",createTitle:"Informar de un problema",dragDropImageTextTablet:"Tomar una fotografía",takeSnapshot:"Tomar un snapshot",importFile:"Importar un archivo",searchPlaceholder:"Buscar",emptySearch:"No hay resultados"},BcfTopicOverview:{openViewer:"Abrir en el visor",openViewerNoModels:"No hay ningún modelo listo para la visualización",elements:"{count} Elementos",noElements:"Ningún elemento",type:"Tipo",noTypeSpecified:"No se especifica el tipo",description:"Descripción",noDescriptionProvided:"No hay descripción",assignedTo:"Asignado a",notAssigned:"No asignado",dueDate:"Plazo",noDueDate:"Sin fecha de vencimiento",informations:"Información",status:"Estado",noStatusSpecified:"No se especifica el estado",stage:"Fase",noStageProvided:"No se indica ninguna fase",priority:"Prioridad",priorityNotDefined:"No definido",tags:"Etiquetas",noTags:"Sin etiquetas",commentButton:"Publicar un comentario",deleteText:"Estás a punto de borrar {name}",deleteBcfButton:"Borrar este BCF",keepBcfButton:"Mantenga este BCF",author:"Autor"},BcfTopicsTable:{headers:{index:"#",priority:"Prioridad",status:"Estado",title:"Título",creator:"Autor",date:"Fecha"}},BcfTopicActionsCell:{seeButton:"Ver"},BcfTopicComments:{commentButton:"Publicar un comentario",commentLabel:"Publicar un comentario",commentText:"Comentario",cancelButton:"Cancelar",publishButton:"Publicar",commentsText:"comentarios",deleteCommentText:"¿Borrar este comentario?",deleteButton:"Borrar",takeSnapshot:"Tomar un snapshot"},BcfTopicPriorityCell:{noPriority:"Sin"},SettingCard:{addButton:"añadir un elemento",cancelButton:"Cancelar",validateButton:"Validar",deleteExtensionText:"Borrar esta configuración",deleteButton:"Borrar",title:{Priority:"Prioridades",Label:"Etiquetas:",Status:"Estatutos",Type:"Tipos",Stage:"Fases"},input:{Priority:"Añadir una nueva prioridad",Label:"Añadir una nueva etiqueta",Status:"Añadir un nuevo estado",Type:"Añadir un nuevo tipo",Stage:"Añadir una nueva fase"},text:{Priority:"Lista de prioridades",Label:"Lista de etiquetas",Status:"Lista de estatutos",Type:"Lista de tipos",Stage:"Lista de fases"}}}},fr:{BcfComponents:{back:"Retour",BcfFilters:{filtersButton:"Filtres",filtersTitle:"Filtres",priorityLabel:"Priorité",statusLabel:"Statut",stageLabel:"Phase",assignedToLabel:"Assigné à",creatorsLabel:"Créé par",tagsLabel:"Tags",resetButton:"Réinitialiser",searchButton:"Rechercher",undefined:"Non défini",datePlaceholder:"Date de création"},BcfSettings:{title:"Paramètres BCF",text:"Créez, renseignez et listez les paramètres BCF que vous souhaitez avoir sur ce projet",validateButton:"Valider les paramètres BCF"},BcfStatistics:{emptyText:"Ajoutez des questions pour voir les statistiques associées ici.",issues:"problèmes",extension:{Priority:"Priorité",PriorityNotDefined:"Aucune priorité",PriorityTitle:"Priorités",Status:"Statut",StatusNotDefined:"Aucun statut",StatusTitle:"Statuts"}},BcfTopicCard:{priority:"Priorité",noPriority:"Aucune",assignedTo:"Assigné à",elements:"{n} Élements",notSpecified:"Non défini",see:"Voir"},BcfTopicCreationCard:{text:"Créer un nouveau topic BCF",createBcfSideTitle:"Signaler un problème"},BcfTopicForm:{dragDropImageText:"Veuillez sélectionner un fichier",addObjectButton:"Objet",addAnnotationButton:"Annotation",annotationButtonTooltip:"Ce topic ne possède actuellement aucun point de vue",addPictureButton:"Ajouter une image",titlePlaceholder:"Titre *",titleErrorMessage:"Titre manquant",typeLabel:"Type",priorityLabel:"Priorité",statusLabel:"Statut",stageLabel:"Phase",assignedToLabel:"Assigné à",dueDateLabel:"Date d'échéance",descriptionLabel:"Description",labelsLabel:"Tags",createButton:"Valider",updateButton:"Modifier ce BCF",modalText:"Vous êtes sur le point de quitter l'édition de l'issue {name} mais il y'a des modifications non enregistrées.",cancelButton:"Annuler les modifications",continueButton:"Continuer les modifications",createTitle:"Signaler un problème",dragDropImageTextTablet:"Prendre une photo",takeSnapshot:"Prendre un snapshot",importFile:"Importer un fichier",searchPlaceholder:"Rechercher",emptySearch:"Pas de résultat",documentsLabel:"Documents",documentsCount:"Documents - {count} documents sélectionnés",groupsLabel:"Permissions",groupsCount:"Permissions - {count} groupes sélectionnés",groupsText:"Sélectionner les groupes utilisateur qui peuvent voir ce topic et intéragir avec.",validate:"Valider"},BcfTopicOverview:{openViewer:"Ouvrir dans le viewer",openViewerNoModels:"Il n'y a aucun modèle prêt pour une visualisation",elements:"{count} Élements",noElements:"Aucun élément concerné",type:"Type",noTypeSpecified:"Pas de type spécifié",description:"Description",noDescriptionProvided:"Pas de description renseignée",assignedTo:"Assigné à",notAssigned:"Non assigné",dueDate:"Échéance",noDueDate:"Pas de date d'échéance",informations:"Informations",status:"Statut",noStatusSpecified:"Pas de statut spécifié",stage:"Phase",noStageProvided:"Pas de phase renseignée",priority:"Priorité",priorityNotDefined:"Non défini",tags:"Tags",noTags:"Pas de tags",commentButton:"Poster un commentaire",deleteText:"Vous êtes sur le point de supprimer {name}",deleteBcfButton:"Supprimer ce BCF",keepBcfButton:"Conserver ce BCF",author:"Auteur"},BcfTopicsTable:{headers:{index:"#",priority:"Priorité",status:"Statut",title:"Titre",creator:"Auteur",date:"Date"}},BcfTopicActionsCell:{seeButton:"Voir"},BcfTopicComments:{commentButton:"Poster un commentaire",commentLabel:"Poster un commentaire",commentText:"Commentaire",cancelButton:"Annuler",publishButton:"Publier",commentsText:"commentaires",deleteCommentText:"Supprimer ce commentaire ?",deleteButton:"Supprimer",takeSnapshot:"Prendre un snapshot",edited:"edité"},BcfTopicPriorityCell:{noPriority:"Aucune"},SettingCard:{addButton:"ajouter un élément",cancelButton:"Annuler",validateButton:"Valider",deleteExtensionText:"Supprimmer ce paramètre",deleteButton:"Supprimer",title:{Priority:"Priorités",Label:"Tags",Status:"Statuts",Type:"Types",Stage:"Phases"},input:{Priority:"Ajouter une nouvelle priorité",Label:"Ajouter un nouveau label",Status:"Ajouter un nouveau statut",Type:"Ajouter un nouveau type",Stage:"Ajouter une nouvelle phase"},text:{Priority:"Liste des priorités",Label:"Liste des tags",Status:"Liste des statuts",Type:"Liste des types",Stage:"Liste des phases"}}}},it:{BcfComponents:{back:"Indietro",BcfFilters:{filtersButton:"Filtri",filtersTitle:"Filtri",priorityLabel:"Priorità",statusLabel:"Stato",stageLabel:"Fase",datePlaceholder:"Data di creazione",assignedToLabel:"Assegnato a",creatorsLabel:"Creato da",tagsLabel:"Etichette",resetButton:"Ripristina",searchButton:"Cerca",undefined:"Non definito"},BcfSettings:{title:"Parametri BCF",text:"Creare, notificare e elencare i parametri BCF che si desidera avere su questo progetto",validateButton:"Conferma i parametri BCF"},BcfStatistics:{emptyText:"Aggiungi delle domande per vedere le statistiche associate qui.",issues:"problemi",extension:{Priority:"Priorità",PriorityNotDefined:"Nessuna priorità",PriorityTitle:"Priorità",Status:"Stato",StatusNotDefined:"Nessuno stato",StatusTitle:"Stati"}},BcfTopicCard:{priority:"Priorità",noPriority:"Nessuno",assignedTo:"Assegnato a",elements:"Elementi",noElements:"0 elementi",notSpecified:"Non definito",see:"Visualizza"},BcfTopicCreationCard:{text:"Crea un nuovo topic BCF",createBcfSideTitle:"Segnala un problema"},BcfTopicForm:{dragDropImageText:"Selezionare un file",addObjectButton:"Oggetto",addAnnotationButton:"Annotazione",annotationButtonTooltip:"Attualmente questo argomento non presenta alcun punto di vista",addPictureButton:"Aggiungere un'immagine",titlePlaceholder:"Titolo *",titleErrorMessage:"Titolo mancante",typeLabel:"Tipo",priorityLabel:"Priorità",statusLabel:"Stato",stageLabel:"Fase",assignedToLabel:"Assegnato a",dueDateLabel:"Data di scadenza",descriptionLabel:"Descrizione",labelsLabel:"Tag",createButton:"Conferma",updateButton:"Modificare questo BCF",modalText:"State per abbandonare la modifica di {name} ma ci sono modifiche non salvate.",cancelButton:"Annullare le modifiche",continueButton:"Continuare le modifiche",createTitle:"Segnala un problema"},BcfTopicOverview:{openViewer:"Apri nel visualizzatore",openViewerNoModels:"Non esistono modelli pronti per la visualizzazione",elements:"{count} Elementi",noElements:"Nessun elemento",type:"Tipo",noTypeSpecified:"Nessun tipo specificato",description:"Descrizione",noDescriptionProvided:"Nessuna descrizione inserita",assignedTo:"Assegnato a",notAssigned:"Non assegnato",dueDate:"Scadenza",noDueDate:"Nessuna data di scadenza",informations:"Informazioni",status:"Stato",noStatusSpecified:"Nessuno stato specificato",stage:"Fase",noStageProvided:"Nessuna fase inserita",priority:"Priorità",priorityNotDefined:"Non definita",tags:"Etichette",noTags:"Nessuna etichetta",commentButton:"Pubblica un commento",deleteText:"Stai per eliminare {name}",deleteBcfButton:"Elimina questo BCF",keepBcfButton:"Conserva questo BCF",author:"Autore"},BcfTopicsTable:{headers:{index:"#",priority:"Priorità",status:"Stato",title:"Titolo",creator:"Autore",date:"Data"}},BcfTopicActionsCell:{seeButton:"Visualizza"},BcfTopicComments:{commentButton:"Pubblica un commento",commentLabel:"Pubblica un commento",commentText:"Commento",cancelButton:"Annulla",publishButton:"Pubblica",commentsText:"commenti",deleteCommentText:"Eliminare questo commento?",deleteButton:"Elimina"},BcfTopicPriorityCell:{noPriority:"Nessuno"},SettingCard:{addButton:"aggiungi un elemento",cancelButton:"Annulla",validateButton:"Conferma",deleteExtensionText:"Elimina questo parametro",deleteButton:"Elimina",title:{Priority:"Priorità",Label:"Etichette",Status:"Stati",Type:"Tipi",Stage:"Fasi"},input:{Priority:"Aggiungi una nuova priorità",Label:"Aggiungi una nuova etichetta",Status:"Aggiungi un nuovo stato",Type:"Aggiungi un nuovo tipo",Stage:"Aggiungi una nuova fase"},text:{Priority:"Elenco delle priorità",Label:"Elenco delle etichette",Status:"Elenco degli stati",Type:"Elenco dei tipi",Stage:"Elenco delle fasi"}}}}},Yti=({apiClient:i,fetchUsers:e,i18nPlugin:t}={})=>({install(n){i?Li.setup({apiClient:i,fetchUsers:e}):console.error("[BCF Components Plugin] No api client provided. You must provide an api client for the components to work properly."),t?Object.entries(Zti).forEach(([o,r])=>{t.global.mergeLocaleMessage(o,r)}):console.warn("[BCF Components Plugin] No i18n instance provided. You should either provide an i18n instance or define your own translations in order have text displayed properly."),Object.entries(cCe).forEach(([o,r])=>{n.component(o,r)})}}),Xti={de:{BuildingMaker:{title:"Building Maker",back:"Zurück",list:{text:"Erstellen und bearbeiten Sie die Etagen und laden Sie anschließend Ihre PDFs herunter.",createButton:"Neues Projekt",updateButton:"Umbenennen",deleteButton:"Löschen"},form:{text:"Erstellen und bearbeiten Sie die Etagen und laden Sie anschließend Ihre PDFs herunter.",input:"Name des Gebäudes",error:"Ungültiger Name",createButton:"Erstellen",updateButton:"Bestätigen"},view:{addStoreyButton:"Etage",addPlanButton:"Grundriss",closeButton:"Fertigstellen",submitFilesButton:"Bestätigen"},storeyForm:{title:"Neue Etage",input:"Name",error:"Ungültiger Name",cancelButton:"Abbrechen",submitButton:"Bestätigen"}},FileManager:{creationFormTitle:"Ordner erstellen",renameFormPlaceholder:"Datei- / Ordnernam",nameInputPlaceholder:"Ordnername",emptyFolder:"Dieser Ordner ist leer",newFolderSuccess:"Neuer Ordner erstellt",renameFolderSuccess:"Umbenannter Ordner",deleteFolderSuccess:"Ordner gelöscht",newFileSuccess:"Datei hinzugefügt",renameFileSuccess:"Umbenannte Datei",deleteFileSuccess:"Datei gelöscht",nameInputErrorMessage:"Ungültiger name",cancel:"Abbrechen",submit:"Bestätigen",buttonText:"Neuer Ordner",addFileButtonText:"Datei laden",rename:"Umbenennen",view:"Sehen",download:"Herunterladen",delete:"Löschen",deleteTitle:"Dateien löschen",deleteDetail:"Sie sind im Begriff, die folgenden Dateien / Ordner endgültig zu löschen"}},en:{BIMDataComponents:{t:{back:"Back",cancel:"Cancel",create:"Create",delete:"Delete",download:"Download",finish:"Finish",rename:"Rename",search:"Search",see:"View",storey:"Storey",validate:"Validate"}},BuildingMaker:{title:"Building Maker",list:{text:"Create and edit storeys, then download your PDFs.",new:"New project"},form:{input:"Building name",error:"Invalid"},view:{addStorey:"Add Storey",addFile:"Add File",addPlan:"Add Plan"},storeyForm:{title:"New storey",input:"Name",error:"Invalid name"}},FileManager:{creationFormTitle:"Create folder",renameFormPlaceholder:"Folder/File name",nameInputPlaceholder:"Folder name",emptyFolder:"This folder is empty",newFolderSuccess:"New folder created",renameFolderSuccess:"Folder renamed",deleteFolderSuccess:"Folder deleted",newFileSuccess:"File added",renameFileSuccess:"File renamed",deleteFileSuccess:"File deleted",nameInputErrorMessage:"Invalid name",buttonText:"New folder",addFileButtonText:"Upload a file",deleteTitle:"Deleting Files",deleteDetail:"You are about to permanently delete the following files / folders",dmsRoot:"Root of the project's DMS",pdfPageSelectorTitle:"Select a page"},MetaBuildingStructure:{title:"Meta-Building Structure",tab:{structure:"Structure",zones:"Zones",equipments:"Equipments"},StoreySelector:{placeholder:"Select a storey"}},PhotosphereBuilding:{title:"Photosphere Building"}},es:{BuildingMaker:{title:"Building Maker",back:"Vuelta",list:{text:"Cree y edite los pisos después cargue los PDF.",createButton:"Nuevo proyecto",updateButton:"Renombrar",deleteButton:"Suprimir"},form:{text:"Cree y edite los pisos después cargue los PDF.",input:"Nombre del edificio",error:"Nombre no válido",createButton:"Crear",updateButton:"Validar"},view:{addStoreyButton:"Piso",addPlanButton:"Plano",closeButton:"Terminar",submitFilesButton:"Validar"},storeyForm:{title:"Nuevo piso",input:"Nombre",error:"Nombre no válido",cancelButton:"Anular",submitButton:"Validar"}},FileManager:{creationFormTitle:"Crear un archivo",renameFormPlaceholder:"Nombre de archivo / carpeta",nameInputPlaceholder:"Nombre de la carpeta",emptyFolder:"Esta carpeta está vacía",newFolderSuccess:"Nueva carpeta creada",renameFolderSuccess:"Carpeta renombrada",deleteFolderSuccess:"Carpeta eliminada",newFileSuccess:"Archivo agregado",renameFileSuccess:"Archivo renombrado",deleteFileSuccess:"Archivo eliminado",nameInputErrorMessage:"Nombre inválida",cancel:"Cancelar",submit:"Validar",buttonText:"Carpeta nueva",addFileButtonText:"Cargar un archivo",rename:"Renombrar",view:"Ver",download:"Descargar",delete:"Borrar",deleteTitle:"Eliminar archivos",deleteDetail:"Está a punto de eliminar permanentemente los siguientes archivos / carpetas"}},fr:{BIMDataComponents:{t:{back:"Retour",cancel:"Annuler",create:"Créer",delete:"Supprimer",download:"Télécharger",finish:"Terminer",rename:"Renommer",search:"Rechercher",see:"Voir",storey:"Étage",validate:"Valider"}},BuildingMaker:{title:"Building Maker",list:{text:"Créez et éditez les étages puis téléchagez vos PDF.",new:"Nouveau projet"},form:{input:"Nom du bâtiment",error:"Nom invalide"},view:{addStorey:"Ajouter un Étage",addFile:"Ajouter un fichier",addPlan:"Ajouter un plan"},storeyForm:{title:"Nouvel étage",input:"Nom",error:"Nom invalide"}},FileManager:{creationFormTitle:"Créer un dossier",renameFormPlaceholder:"Nom du fichier/dosier",nameInputPlaceholder:"Nom du dossier",emptyFolder:"Ce dossier est vide",newFolderSuccess:"Nouveau dossier créé",renameFolderSuccess:"Dossier renommé",deleteFolderSuccess:"Dossier supprimé",newFileSuccess:"Fichier ajouté",renameFileSuccess:"Fichier renommé",deleteFileSuccess:"Fichier supprimé",nameInputErrorMessage:"Nom invalide",buttonText:"Nouveau dossier",addFileButtonText:"Charger un fichier",deleteTitle:"Supression de fichiers",deleteDetail:"Vous êtes sur le point de supprimer définitivement les fichiers/dossiers suivants",dmsRoot:"Racine de la GED du projet",pdfPageSelectorTitle:"Sélectionner une page"},MetaBuildingStructure:{title:"Structure Méta-Building",tab:{structure:"Structure",zones:"Zones",equipments:"Équipements"},StoreySelector:{placeholder:"Sélectionner un étage"}},PhotosphereBuilding:{title:"Photosphère Building"}},it:{BuildingMaker:{title:"Building Maker",back:"Reso",list:{text:"Crea e modifica i piani e poi scarica i tuoi PDF.",createButton:"Nuovo progetto",updateButton:"Rinominare",deleteButton:"Eliminare"},form:{text:"Crea e modifica i piani e poi scarica i tuoi PDF.",input:"Nome della costruzione",error:"Nome non corretto",createButton:"Creare",updateButton:"Convalidare"},view:{addStoreyButton:"Piano",addPlanButton:"Mappa",closeButton:"Finire",submitFilesButton:"Convalidare"},storeyForm:{title:"Nuovo piano",input:"Nome",error:"Nome non corretto",cancelButton:"Annullare",submitButton:"Convalidare"}},FileManager:{creationFormTitle:"Crea una cartella",renameFormPlaceholder:"Nome file/cartella",nameInputPlaceholder:"Nome della cartella",emptyFolder:"Questa cartella è vuota",newFolderSuccess:"Nuova cartella creata",renameFolderSuccess:"Cartella rinominata",deleteFolderSuccess:"Cartella eliminata",newFileSuccess:"File aggiunto",renameFileSuccess:"File rinominato",deleteFileSuccess:"File cancellato",nameInputErrorMessage:"Nome non valido",cancel:"Annulla",submit:"Invia",buttonText:"Nuova cartella",addFileButtonText:"Carica un file",rename:"Rinominare",view:"Vedere",download:"Scaricare",delete:"Cancellare",deleteTitle:"Eliminazione di file",deleteDetail:"Stai per eliminare definitivamente i seguenti file/cartelle"}}},$ti=({i18nPlugin:i}={})=>({install(e){i?Object.entries(Xti).forEach(([t,n])=>{i.global.mergeLocaleMessage(t,n)}):console.warn("[BIMData Components Plugin] No i18n instance provided. You should either provide an i18n instance or define your own translations in order have text displayed properly."),Object.entries(cLt).forEach(([t,n])=>{e.component(t,n)})}}),eii=Object.freeze(Object.defineProperty({__proto__:null,BIMDataClickAway:el,BIMDataClickInputAway:{beforeMount(i,e){if(typeof e.value!="function")throw Error(`click away directive needs function, got ${typeof e.value}`);i.clickAwayHandler=t=>{(t.path||t.composedPath&&t.composedPath()).find(o=>o===i)||e.value()},window.addEventListener("mousedown",i.clickAwayHandler,!0)},unmounted(i){window.removeEventListener("mousedown",i.clickAwayHandler,!0),delete i.clickAwayHandler}}},Symbol.toStringTag,{value:"Module"})),tii=i=>({install(e){Object.entries(yJe).forEach(([t,n])=>{e.component(t,n)}),Object.entries(eii).forEach(([t,n])=>e.directive(t.split("BIMData")[1],n))}}),iii={name:"LiWrapper",render(){return gn("li",this.$slots.default())}};function nii(i,e){var t=new Set([]);return i.forEach(n=>{e.has(n)||t.add(n)}),t}const Dl=es("id"),oii=({contextMenu:i,objects:e=[],state:t=i.$viewer.state,pictos:n})=>[{name:"selectAll",get group(){return i.groupPositions.select},position:1,get label(){return i.$t("context_menu.select_all")},get picto(){return n.get(this.name)},execute:()=>t.selectObjects(e.filter(Ua(Si("visible"),wd("selected"))).map(Dl)),predicate:()=>e.some(Ua(Si("visible"),wd("selected")))},{name:"deselectAll",get group(){return i.groupPositions.select},position:2,get label(){return i.$t("context_menu.deselect_all")},get picto(){return n.get(this.name)},execute:()=>t.deselectObjects(e.filter(Si("selected")).map(Dl)),predicate:()=>e.some(Si("selected"))},{name:"selectSimilar",get group(){return i.groupPositions.select},position:3,get label(){return i.$t("context_menu.select_similar")},get picto(){return n.get(this.name)},execute(){const o=e.filter(r=>r.visible&&r.type===this.selectedObject.type&&r.id!==this.selectedObject.id).map(Dl);t.selectObjects(o)},selectedObject:null,predicate(){const o=e.filter(Ua(Si("visible"),Si("selected")));return o.length===1&&o[0].type!==void 0?(this.selectedObject=o[0],!0):(this.selectedObject=null,!1)}},{name:"reverseSelection",get label(){return i.$t("context_menu.reverse_selection")},get group(){return i.groupPositions.select},position:4,execute:()=>{const o=new Set(e.filter(Si("selected")).map(Dl)),r=new Set(e.filter(Si("visible")).map(Dl));t.selectObjects(Array.from(nii(r,o)),{exclusive:!0})},predicate:()=>e.some(Ua(wd("selected"),Si("visible")))&&e.some(Ua(Si("selected"),Si("visible")))},{name:"showAll",get group(){return i.groupPositions.visibility},position:1,get label(){return i.$t("context_menu.show_all")},get picto(){return n.get(this.name)},execute:()=>t.showObjects(e.filter(wd("visible")).map(Dl)),predicate:()=>e.some(wd("visible"))},{name:"hide",get group(){return i.groupPositions.visibility},position:2,get label(){return i.$t("context_menu.hide")},get picto(){return n.get(this.name)},objectsToHide:null,execute(){const o=this.objectsToHide.filter(Si("selected"));o.length>0&&t.deselectObjects(o.map(Dl)),t.hideObjects(this.objectsToHide.map(Dl))},predicate(){return this.objectsToHide=e.filter(Ua(Si("selected"),Si("visible"))),this.objectsToHide.length>0}},{name:"hideAll",get group(){return i.groupPositions.visibility},position:3,get label(){return i.$t("context_menu.hide_all")},execute:()=>{const o=e.filter(Si("visible"));o.some(Si("selected"))&&t.deselectObjects(o.filter(Si("selected")).map(Dl)),t.hideObjects(o.map(Dl))},predicate:()=>e.some(Si("visible"))}].filter(o=>o.predicate()),sii={components:{LiWrapper:iii},inject:["$viewer"],data(){return{defaultPrevented:!1,displayed:!1,top:null,bottom:null,left:null,width:200,nextCommandId:1,currentCommands:[],contextCommands:[],registeredCommands:[],groupPositions:{select:10,visibility:20},asyncPredicateRunning:!1}},computed:{position(){return{top:this.top?this.top+"px":"unset",bottom:this.bottom?this.bottom+"px":"unset",left:this.left+"px",width:this.width+"px"}}},watch:{displayed(i){i?document.addEventListener("keydown",this.onKeyDown):document.removeEventListener("keydown",this.onKeyDown)}},created(){this.$viewer.contextMenu=this,this.asyncPredicates=new Set},methods:{onKeyDown(i){i.key==="Escape"&&this.away()},setPosition(i){const t=(document.fullscreenElement?document.fullscreenElement:this.$parent.$el).getBoundingClientRect();this.left=i.clientX-t.left,this.top=i.clientY-t.top,this.left+this.width>t.width&&(this.left=this.left-this.width),i.clientY>t.top+t.height/2?(this.bottom=t.height-this.top,this.top=null):this.bottom=null},typeCheckCommand(i={}){let e=null;if((!i.execute||typeof i.execute!="function")&!i.component&&(e="Cannot register context menu command. A command must have an execute function or a component property."),i.label||(e="Cannot register context menu command. A command must have a label."),e)throw console.error(e),new Error(e);return i.id=this.nextCommandId++,i},open(i){this.currentCommands=[],this.setPosition(i),this.originEvent=i,i.preventDefault(),this.setCurrentCommands(),this.groupCurrentCommands(),this.defaultPrevented=!1,this.displayed=!0,document.fullscreenElement?(this.$el.parentElement.removeChild(this.$el),this.adoptiveParent=document.fullscreenElement,this.adoptiveParent.appendChild(this.$el)):this.adoptiveParent&&this.adoptiveParent!==this.$viewer.globalContext.el&&(this.adoptiveParent.removeChild(this.$el),this.$viewer.globalContext.el.appendChild(this.$el),this.adoptiveParent=null)},setCurrentCommands(){this.asyncPredicates.clear(),this.asyncPredicateRunning=!1,this.defaultPrevented||this.registeredCommands.forEach(async i=>{if(typeof i.predicate=="function"){const e=i.predicate(this.$viewer.globalContext.activeLocalContext);if(e===!0)this.currentCommands.push(i);else if(typeof e?.then=="function"){this.asyncPredicates.add(e),this.asyncPredicateRunning=!0;const t=await e;this.asyncPredicates.has(e)&&(this.asyncPredicates.delete(e),this.asyncPredicateRunning=this.asyncPredicates.size>0,t===!0&&this.currentCommands.push(i))}}else this.currentCommands.push(i)}),this.currentCommands.push(...this.contextCommands),this.contextCommands=[]},getDefaultCommands({objects:i=[],state:e=this.$viewer.state,context:t=null}){const n=new Map;return t&&this.$viewer.shortcutManager.getShortcuts(t).forEach(o=>n.set(o.name,o.key)),oii({contextMenu:this,objects:i,state:e,pictos:n})},executeCommand(i){if(i.execute&&(i.execute(this.originEvent),this.displayed=!1),i.component&&!i.menu)throw new Error("Command with component property must have a `menu` property")},away(){this.displayed=!1},groupCurrentCommands(){const i=new Map;this.currentCommands.forEach(n=>{(n.group===null||n.group===void 0)&&(n.group=0),i.has(n.group)?i.get(n.group).push(n):i.set(n.group,[n])}),i.forEach(n=>n.sort((o,r)=>(o.position=o.position||0,r.position=r.position||0,o.position-r.position)));const t=[...i.keys()].sort((n,o)=>n-o).map(n=>i.get(n)).flat();this.currentCommands=t},isGroupIntersection(i){if(i===0)return!1;const e=this.currentCommands[i-1],t=this.currentCommands[i];return e.group<t.group},registerContextCommand(i){const e=this.typeCheckCommand(i);return this.contextCommands.push(e),i.id},registerCommand(i){const e=this.typeCheckCommand(i);return this.registeredCommands.push(e),i.id},unregisterCommand(i){return this.registeredCommands.find(e=>e.id===i)?(this.registeredCommands=this.registeredCommands.filter(e=>e.id!==i),!0):!1},preventDefault(){this.defaultPrevented=!0}}},rii={key:0,class:"separator"},aii={class:"menu-text"},lii={key:1,class:"menu-picto"},cii={key:0,class:"context-menu__spinner"};function uii(i,e,t,n,o,r){const s=P("BIMDataIconChevron"),a=P("LiWrapper"),l=P("BIMDataSpinner"),c=ai("click-away");return o.displayed&&(o.currentCommands.length||o.asyncPredicateRunning)?yt((E(),L("ul",{key:0,class:"bimdata-list context-menu",style:ce(r.position)},[(E(!0),L($e,null,Mt(o.currentCommands,(u,d)=>(E(),K(a,{key:u.label,class:"context-menu__element",onClick:h=>r.executeCommand(u)},{default:U(()=>[r.isGroupIntersection(d)?(E(),L("div",rii)):te("",!0),C("div",aii,G(u.label),1),!u.component&&u.picto?(E(),L("span",lii,G(u.picto),1)):u.component?(E(),K(s,{key:2,size:"xxs",class:"fill-primary"})):te("",!0)]),_:2},1032,["onClick"]))),128)),o.asyncPredicateRunning?(E(),L("li",cii,[k(l)])):te("",!0)],4)),[[c,r.away]]):te("",!0)}const dii=V(sii,[["render",uii],["__scopeId","data-v-5b87d4a3"]]),hii={name:"ViewerHeader",inject:["$viewer"],props:{visible:{type:Boolean,default:!0}},setup(){const i=at("$viewer"),e=Bo(new Map),t=o=>{if(!o.name)throw new TypeError("[Viewer Header] Content must have a name");if(e.has(o.name))throw new Error(`[Viewer Header] Content with name ${o.name} already exists`);e.set(o.name,o)},n=o=>e.has(o)?(e.delete(o),!0):!1;return{logo:i.uiSettings.bimdataLogo!==!1,version:i.uiSettings.version!==!1?i.version:null,headerContent:e,headerRightContentComponents:Re(()=>Array.from(e.values()).filter(o=>o.position==="right").sort((o,r)=>o.order-r.order).map(o=>o.component)),headerLeftContentComponents:Re(()=>Array.from(e.values()).filter(o=>o.position==="left").sort((o,r)=>o.order-r.order).map(o=>o.component)),addContent:t,removeContent:n}}},pii={class:"viewer-header"},fii={class:"viewer-header__content"},Aii={class:"viewer-header__content__left"},mii={class:"viewer-header__content__right"},gii={key:0,class:"m-l-6 flex items-center"},yii={key:1,class:"viewer-header__version"};function vii(i,e,t,n,o,r){const s=P("BIMDataIllustration");return yt((E(),L("div",pii,[C("div",fii,[C("div",Aii,[(E(!0),L($e,null,Mt(n.headerLeftContentComponents,a=>(E(),K(Pn(a),{key:a.name}))),128))]),C("div",mii,[(E(!0),L($e,null,Mt(n.headerRightContentComponents,a=>(E(),K(Pn(a),{key:a.name}))),128))])]),n.logo||n.version?(E(),L("div",gii,[n.logo?(E(),K(s,{key:0,name:"logo",width:"30px",height:"30px"})):te("",!0),n.version?(E(),L("div",yii,G(n.version),1)):te("",!0)])):te("",!0)],512)),[[jt,t.visible]])}const wii=V(hii,[["render",vii],["__scopeId","data-v-5c9ea6b6"]]),Cii={emits:["resize"],setup(i,{emit:e}){return{onResizerMousedown:n=>{n.preventDefault();let o=n.clientX;const r=a=>{a.preventDefault();const l=a.clientX-o;o=a.clientX,e("resize",l)},s=a=>{a.preventDefault(),window.removeEventListener("mousemove",r),window.removeEventListener("mouseup",s)};window.addEventListener("mousemove",r),window.addEventListener("mouseup",s)}}}},bii={class:"bimdata-separator"};function xii(i,e,t,n,o,r){return E(),L("div",bii,[e[1]||(e[1]=C("div",{class:"bimdata-separator__line"},null,-1)),C("div",{class:"bimdata-separator__resizer",onMousedown:e[0]||(e[0]=(...s)=>n.onResizerMousedown&&n.onResizerMousedown(...s))},null,32)])}const Mii={components:{Separator:V(Cii,[["render",xii],["__scopeId","data-v-79a3b3af"]])},props:{position:{type:String,required:!0,validator(i){return["left","right"].includes(i)}},sidePanel:{type:Object,required:!0,validator(i){if(i.width&&(typeof i.width!="number"||i.width<0))return console.error(`[GlobalSidePanel] sidePanel.width must be a strictly positive number, received ${typeof i.width}`),!1;const e=typeof i?.component=="object";return e||console.error("[GlobalSidePanel] sidePanel must have a component property"),e}}},setup(i){const e=ae(null),t=ae(i.sidePanel.width??400),n=(o,r=1)=>{const s=t.value+o*r;t.value=Math.max(0,s)};return ct(()=>i.sidePanel,()=>{Object.defineProperty(i.sidePanel,"width",{get(){return t.value},set(o){if(typeof o!="number"||o<=0){console.error(`[GlobalSidePanel] sidePanel.width must be a strictly positive number, received ${typeof o}`);return}t.value=o}}),Object.defineProperty(i.sidePanel,"componentInstance",{get(){return e.value},enumerable:!0})},{immediate:!0}),{componentInstance:e,width:t,onResize:n}}},Eii={class:"bimdata-global-side-panel__component"};function Bii(i,e,t,n,o,r){const s=P("Separator");return E(),L("div",{class:"bimdata-global-side-panel",style:ce(`width: ${n.width}px`)},[t.sidePanel.resizable&&t.position==="right"?(E(),K(s,{key:0,onResize:e[0]||(e[0]=a=>n.onResize(a,-1))})):te("",!0),C("div",Eii,[(E(),K(Pn(t.sidePanel.component),{ref:"componentInstance"},null,512))]),t.sidePanel.resizable&&t.position==="left"?(E(),K(s,{key:1,onResize:e[1]||(e[1]=a=>n.onResize(a))})):te("",!0)],4)}const Iii={name:"BimdataViewer",components:{ContextMenu:dii,ViewerHeader:wii,ModalManager:h2e,GlobalSidePanel:V(Mii,[["render",Bii],["__scopeId","data-v-82d0d4cb"]])},setup(){const i=at("$viewer"),{globalContext:e,shortcutManager:t}=i;bi(()=>{t&&t.destroy(),e.hub.clear()}),ci(()=>{i.pluginManager.runPluginsScripts(i)});const n=Re(()=>i.uiSettings.bimdataLogo!==!1&&(e.localContexts.length!==1||e.localContexts[0].window?.logoAndVersion)),o=Re(()=>i.uiSettings.version!==!1&&(e.localContexts.length!==1||e.localContexts[0].window?.logoAndVersion)?i.version:null),r=Re(()=>e.leftSidePanel),s=Re(()=>e.rightSidePanel),a=Re(()=>{const p=i.uiSettings.header!==!1,A=e.localContexts.length===1&&e.localContexts[0].window?.header===!1,f=!!(r.value||s.value);return p&&(!A||f)}),l=i.uiSettings.contextMenu!==!1,c=ae(null);function u(p){l&&c.value.open(p)}function d(){i.shortcutManager.active=!0}function h(){i.shortcutManager.active=!1}return{Layout:i.layout.areas.component,onContextMenu:u,onMouseenter:d,onMouseleave:h,isHeaderVisible:a,viewerTemplateRef:e.templateRef,modalManagerTemplateRef:e.modalManagerTemplateRef,headerTemplateRef:e.headerTemplateRef,contextMenuTemplateRef:c,contextMenuEnabled:l,bimdataLogoOnSingleWindow:n,viewerVersionOnSingleWindow:o,version:i.version,loading:Re(()=>e.loading),spinner:Re(()=>e.spinner),leftSidePanel:r,rightSidePanel:s}}},Sii={key:1,class:"bimdata-context-loading-overlay",style:{"z-index":"3"}},Pii={key:2,class:"viewer__logo"},Tii={key:1,class:"version m-t-6"};function kii(i,e,t,n,o,r){const s=P("ModalManager"),a=P("ContextMenu"),l=P("ViewerHeader"),c=P("GlobalSidePanel"),u=P("BIMDataSpinner"),d=P("BIMDataIllustration");return E(),L("div",{id:"bimdata-viewer",ref:"viewerTemplateRef",class:"bimdata-viewer bimdata-design-system bimdata-scrollbar",onContextmenu:e[0]||(e[0]=(...h)=>n.onContextMenu&&n.onContextMenu(...h)),onMouseenter:e[1]||(e[1]=(...h)=>n.onMouseenter&&n.onMouseenter(...h)),onMouseleave:e[2]||(e[2]=(...h)=>n.onMouseleave&&n.onMouseleave(...h))},[k(s,{ref:"modalManagerTemplateRef"},null,512),n.contextMenuEnabled?(E(),K(a,{key:0,ref:"contextMenuTemplateRef"},null,512)):te("",!0),k(l,{ref:"headerTemplateRef",visible:n.isHeaderVisible},null,8,["visible"]),C("div",{class:"bimdata-viewer__content",style:ce(n.isHeaderVisible?"height: calc(100% - var(--bimdata-viewer-header-height, 40px))":"height: 100%")},[n.leftSidePanel?(E(),K(c,{key:0,"side-panel":n.leftSidePanel,position:"left"},null,8,["side-panel"])):te("",!0),(E(),K(Pn(n.Layout),{style:"height: 100%; flex-grow: 1;"})),n.rightSidePanel?(E(),K(c,{key:1,"side-panel":n.rightSidePanel,position:"right"},null,8,["side-panel"])):te("",!0)],4),n.loading?(E(),L("div",Sii,[n.spinner&&n.spinner.component?(E(),K(Pn(n.spinner.component),Rr(Es({key:0},n.spinner.props)),null,16)):(E(),K(u,{key:1,size:"40px",border:"5px"}))])):te("",!0),!n.isHeaderVisible&&(n.bimdataLogoOnSingleWindow||n.viewerVersionOnSingleWindow)?(E(),L("div",Pii,[n.bimdataLogoOnSingleWindow?(E(),K(d,{key:0,name:"logo"})):te("",!0),n.viewerVersionOnSingleWindow?(E(),L("div",Tii,G(n.version),1)):te("",!0)])):te("",!0)],544)}const Rii=V(Iii,[["render",kii],["__scopeId","data-v-0c1c941a"]]),_ii=["src"],Dii={class:"bimdata-models__header"},Lii={key:0,class:"bimdata-models__header__loader"},Fii={class:"bimdata-models__header__picto"},Oii={class:"bimdata-models__header__name"},Nii={key:0,class:"bimdata-models__header__name--empty"},Uii={key:1,class:"bimdata-models__header__name--empty"},Vii={key:3},Hii=["onMousemove","onClick"],g2e=V({__name:"Models",props:{preview:{type:Boolean,default:!1},windowPositioning:{type:Boolean,default:!0},customFilter:{type:Function,default:null},width:{type:String,default:"350px"}},setup(i){const e=i,t=at("$viewer"),n=ae(),o=ae(0),r=ae(0),s=ae(),a=Ai([]),l=ae(!1),c=Re(()=>t.localContext.loadedModels),u=Re(()=>t.localContext.loadedModelIds),d=Re(()=>t.localContext.loadingModelIds),h=Re(()=>t.localContext.multiModel),p=Re(()=>(e.customFilter?a.value.filter(e.customFilter):a.value).map(B=>c.value.find(S=>S.document?.head_id!=null&&S.document.head_id===B.document.id)??B)),A=M=>u.value.includes(M),f=M=>d.value.includes(M),g=Re(()=>{const{x:M,y:B}=s.value?.getBoundingClientRect()??{x:0,y:0};return`top:${r.value-B}px; left:${o.value-M}px;`}),m=M=>{!h.value&&A(M.id)||d.value.length>0||(t.localContext.loadedModelIds.includes(M.id)?t.localContext.unloadModels([M.id]):t.localContext.loadModels([M.id]))},v=M=>{switch(M){case"C":return"success";case"E":return"failed";case"P":case"I":return"sandglass"}},y=(M,B)=>{M?.viewer_360_file&&(o.value=B.clientX,r.value=B.clientY),n.value=M?.viewer_360_file},w=async M=>{l.value=!0;try{return(await t.api.apiClient.modelApi.getModels(t.api.cloudId,t.api.projectId,void 0,void 0,M)).filter(S=>t.state.models.some(I=>I.archived)||!S.archived).sort(sl("updated_at",!1))}catch(B){console.error("[Models] Cannot get project models. Error: ",B)}finally{l.value=!1}return[]},x=M=>M.children?.some(B=>A(B.id))??!1;return w(t.localContext.modelTypes).then(M=>{a.value=M}),(M,B)=>{const S=P("BIMDataSpinner"),I=P("BIMDataIconModel3D"),R=P("BIMDataTextbox"),T=P("BIMDataCheckbox"),_=P("BIMDataRadio"),F=P("BIMDataIcon"),N=P("BIMDataDropdownList");return E(),L("div",{ref_key:"templateRef",ref:s,class:le(["bimdata-models",{"bimdata-models--window-positioning":i.windowPositioning}])},[n.value?(E(),L("div",{key:0,class:"bimdata-models__preview",style:ce(g.value)},[C("img",{src:n.value},null,8,_ii)],4)):te("",!0),k(N,{style:ce(`--bimdata-models-width: ${i.width};`),width:i.width,list:p.value,"element-key":"id","per-page":40,loading:l.value,class:"bimdata-models__list",disabled:p.value.length===0,onElementClick:m},{header:U(({isOpen:z})=>[C("div",Dii,[l.value||d.value.length>0?(E(),L("div",Lii,[k(S)])):(E(),L($e,{key:1},[C("div",Fii,[k(I)]),C("div",{class:le(["bimdata-models__header__number bimdata-info-length",{"bimdata-models__header__number--empty":u.value.length===0}])},[C("span",null,G(u.value.length),1)],2),C("div",Oii,[p.value.length===0?(E(),L("span",Nii,G(M.$t("model.no_model")),1)):u.value.length===0?(E(),L("span",Uii,G(M.$t("model.no_loaded_model")),1)):u.value.length===1?(E(),K(R,{key:2,text:c.value[0].name,tooltip:!z},null,8,["text","tooltip"])):u.value.length>1?(E(),L("span",Vii,G(M.$t("model.selected_models")),1)):te("",!0)])],64))])]),element:U(({element:z,close:j})=>[C("div",{class:"bimdata-models__model",onMousemove:W=>i.preview&&y(z,W),onMouseout:B[0]||(B[0]=W=>i.preview&&y()),onClick:()=>{!h.value&&!A(z.id)&&j()}},[h.value?(E(),K(T,{key:0,"model-value":A(z.id)||x(z),disabled:z.status!=="C"||d.value.length>0},null,8,["model-value","disabled"])):(E(),K(_,{key:1,"model-value":A(z.id)||x(z),disabled:z.status!=="C"||d.value.length>0},null,8,["model-value","disabled"])),k(F,{margin:"0 calc(var(--spacing-unit) / 2)",name:v(z.status),size:"xs",class:le({"fill-success":z.status==="C","fill-high":z.status==="E"})},null,8,["name","class"]),k(R,{class:le({"bimdata-models__model__name":!0,"bimdata-models__model__name--disabled":z.status!=="C"||d.value.length>0}),text:z.name,width:`calc(100% -
|
|
6439
6439
|
${h.value?13:23}px - 2 * 6px - 16px)`},null,8,["class","text","width"]),z.document&&!z.document.is_head_version?(E(),K(F,{key:2,name:"versioning",fill:"",color:"default",size:"xs",margin:"0 0 0 6px"})):te("",!0)],40,Hii),f(z.id)?(E(),K(S,{key:0,class:"bimdata-models__model__spinner"})):te("",!0)]),_:1},8,["style","width","list","loading","disabled"])],2)}}},[["__scopeId","data-v-34c2cf79"]]),zii="data:image/svg+xml,%3csvg%20width='16'%20height='21'%20viewBox='0%200%2016%2021'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M7.47193%202.76644C7.65699%202.84439%207.77716%203.02565%207.777%203.22661L7.77339%207.94624C7.77318%208.22238%207.54916%208.44655%207.27301%208.44693L2.4192%208.45366C2.21569%208.45394%202.03258%208.33085%201.95617%208.1424C1.87975%207.95394%201.92528%207.73773%202.07129%207.59566L6.92872%202.86931C7.0729%202.72902%207.28688%202.6885%207.47193%202.76644ZM3.65141%207.45195L6.77378%207.44762L6.7761%204.41157L3.65141%207.45195ZM5.81657%200.893911L6.02338%200.893274L13.3879%200.870595C14.679%200.866619%2015.7208%201.91642%2015.722%203.20083L15.2221%203.20237L15.722%203.20052L15.722%203.20083L15.745%2017.8999L15.745%2017.9002C15.7462%2019.1846%2014.7063%2020.2408%2013.4153%2020.2448L2.35929%2020.2788C1.07114%2020.2828%200.0171799%2019.2362%200.0159721%2017.9486L0.00563138%206.92409L0.00543684%206.71668L0.152103%206.56972L5.67032%201.04045L5.81657%200.893911ZM6.23113%201.89264L1.00582%207.12841L1.01597%2017.9455C1.01666%2018.6791%201.62068%2019.2811%202.35835%2019.2788L13.4143%2019.2448C14.1484%2019.2425%2014.7456%2018.6402%2014.745%2017.9035C14.745%2017.9034%2014.745%2017.9033%2014.745%2017.9033L14.722%203.20423L14.722%203.20391C14.7213%202.46716%2014.123%201.86833%2013.3888%201.87059L6.23113%201.89264Z'%20fill='%232F374A'/%3e%3c/svg%3e",jii=["src"],Gii={key:0,class:"bimdata-multi-model-loader__header-container"},Qii={key:0,class:"bimdata-multi-model-loader__header__loader"},qii={class:"bimdata-multi-model-loader__header__picto"},Kii=["src"],Jii={class:"bimdata-multi-model-loader__header__name"},Wii={key:0,class:"bimdata-multi-model-loader__header__name--empty"},Zii={key:1,class:"bimdata-multi-model-loader__header__name--empty"},Yii={key:3},Xii={key:1,class:"bimdata-multi-model-loader__main"},$ii=["onMousemove","onClick"],eni=V({__name:"BIMDataMultiModelLoader",props:{preview:{type:Boolean,default:!1},windowPositioning:{type:Boolean,default:!0},customFilter:{type:Function,default:null},width:{type:String,default:"350px"}},setup(i){const e=i,t=at("$viewer"),n=ae(),o=ae(0),r=ae(0),s=ae(),a=Ai([]),l=ae(!1),c=ae(!0),u=F=>{F.key==="Escape"?c.value=!0:F.key==="Enter"&&S()};ct(c,F=>{F?(window.removeEventListener("keydown",u),y.clear(),v.clear(),n.value=null):window.addEventListener("keydown",u)});const d=Re(()=>t.localContext.loadedModels),h=Re(()=>t.localContext.loadedModelIds),p=Re(()=>t.localContext.loadingModelIds),A=Re(()=>t.localContext.multiModel),f=Re(()=>(e.customFilter?a.value.filter(e.customFilter):a.value).map(N=>d.value.find(z=>z.document?.head_id!=null&&z.document.head_id===N.document.id)??N)),g=F=>h.value.includes(F),m=F=>p.value.includes(F),v=Bo(new Set),y=Bo(new Set),w=F=>F.children?.some(N=>g(N.id))??!1,x=F=>(g(F.id)||w(F)||v.has(F))&&!y.has(F),M=Re(()=>{const{x:F,y:N}=s.value.getBoundingClientRect();return`top:${r.value-N}px; left:${o.value-F}px;`}),B=F=>{F.status==="C"&&(!A.value&&g(F.id)||(g(F.id)?y.has(F)?y.delete(F):y.add(F):v.has(F)?v.delete(F):v.add(F)))},S=()=>{v.size>0&&t.localContext.loadModels(Array.from(v).map(F=>F.id)),y.size>0&&t.localContext.unloadModels(Array.from(y).map(F=>F.id)),c.value=!0},I=F=>{switch(F){case"C":return"success";case"E":return"failed";case"P":case"I":return"sandglass"}},R=F=>F.document&&!F.document.is_head_version,T=(F,N)=>{!e.preview||c.value||(F?.viewer_360_file&&(o.value=N.clientX,r.value=N.clientY),n.value=F?.viewer_360_file)};return(async F=>{l.value=!0;try{return(await t.api.apiClient.modelApi.getModels(t.api.cloudId,t.api.projectId,void 0,void 0,F)).filter(z=>t.state.models.some(j=>j.archived)||!z.archived).sort(sl("updated_at",!1))}catch(N){console.error("[Models] Cannot get project models. Error: ",N)}finally{l.value=!1}return[]})(t.localContext.modelTypes).then(F=>{a.value=F}),(F,N)=>{const z=P("BIMDataSpinner"),j=P("BIMDataTextbox"),W=P("BIMDataIconChevron"),J=P("BIMDataButton"),$=P("BIMDataIconFileIfcPolychrome"),ue=P("BIMDataCheckbox"),Ee=P("BIMDataRadio"),Be=P("BIMDataIcon"),ze=P("BIMDataPaginatedList"),Qe=ai("click-away");return E(),L("div",{ref_key:"templateRef",ref:s,class:le(["bimdata-multi-model-loader",{"bimdata-multi-model-loader--window-positioning":i.windowPositioning}])},[n.value?(E(),L("div",{key:0,class:"bimdata-multi-model-loader__preview",style:ce(M.value)},[C("img",{src:n.value},null,8,jii)],4)):te("",!0),k(mi,{name:"fade",mode:"out-in"},{default:U(()=>[c.value?(E(),L("div",Gii,[pt(F.$slots,"left",{},void 0,!0),C("div",{class:"bimdata-multi-model-loader__header",onClick:N[0]||(N[0]=me=>c.value=!1)},[l.value||p.value.length>0?(E(),L("div",Qii,[k(z)])):(E(),L($e,{key:1},[C("div",qii,[C("img",{src:nt(zii),alt:"file icon"},null,8,Kii)]),C("div",{class:le(["bimdata-multi-model-loader__header__number bimdata-info-length",{"bimdata-multi-model-loader__header__number--empty":h.value.length===0}])},[C("span",null,G(h.value.length),1)],2),C("div",Jii,[f.value.length===0?(E(),L("span",Wii,G(F.$t("model.no_model")),1)):h.value.length===0?(E(),L("span",Zii,G(F.$t("model.no_loaded_model")),1)):h.value.length===1?(E(),K(j,{key:2,text:d.value[0].name,tooltip:c.value,width:"233px"},null,8,["text","tooltip"])):h.value.length>1?(E(),L("span",Yii,G(F.$t("model.selected_models")),1)):te("",!0)]),k(J,{color:"default",icon:"",radius:"",fill:"",width:"21px",height:"21px"},{default:U(()=>[k(W,{size:"xxxs"})]),_:1})],64))]),pt(F.$slots,"right",{},void 0,!0)])):yt((E(),L("div",Xii,[k(ze,{list:f.value,"per-page":10},{element:U(({element:me})=>[C("div",{class:le(["bimdata-multi-model-loader__main__model",{"bimdata-multi-model-loader__main__model--disabled":me.status!=="C"}]),onMousemove:_e=>T(me,_e),onMouseout:N[1]||(N[1]=_e=>T()),onClick:_e=>B(me)},[k($,{fill:"",color:"default",size:"xs"}),A.value?(E(),K(ue,{key:0,"model-value":x(me),disabled:me.status!=="C"},null,8,["model-value","disabled"])):(E(),K(Ee,{key:1,"model-value":x(me),disabled:me.status!=="C"},null,8,["model-value","disabled"])),k(j,{class:le({"bimdata-multi-model-loader__main__model__name":!0,"bimdata-multi-model-loader__main__model__name--disabled":me.status!=="C"}),text:me.name,width:R(me)?"333px":"363px"},null,8,["class","text","width"]),R(me)?(E(),K(Be,{key:2,name:"versioning",fill:"",color:"default",size:"xs",margin:"0 0 0 6px"})):te("",!0),m(me.id)?(E(),K(z,{key:3,class:"bimdata-multi-model-loader__main__model__spinner"})):(E(),K(Be,{key:4,name:I(me.status),size:"xs",class:le({"fill-success":me.status==="C","fill-high":me.status==="E"})},null,8,["name","class"]))],42,$ii)]),_:1},8,["list"]),k(J,{class:"bimdata-multi-model-loader__main__validate",width:"93px",color:"primary",fill:"",radius:"",disabled:nt(v).size===0&&nt(y).size===0,onClick:S},{default:U(()=>[We(G(F.$t("global.validate")),1)]),_:1},8,["disabled"])])),[[Qe,()=>c.value=!0]])]),_:3})],2)}}},[["__scopeId","data-v-44e6af66"]]),tni={data(){return{shown:!1}},mounted(){setTimeout(()=>{this.shown=!0},500)}};function ini(i,e,t,n,o,r){const s=P("BIMDataIllustration");return E(),L("div",{class:"bimdata__no-model",style:ce({"--no-model--opacity":o.shown?1:0})},[k(s,{name:"emptyViewer",x:"90",y:"90"}),C("span",null,G(i.$t("model.select_model")),1)],4)}const y2e=V(tni,[["render",ini],["__scopeId","data-v-5ffd9bc0"]]);window.BIMDataViewerVue=Yz;class nni{constructor(e={}){const{api:t={},ui:n}=e;this.uiCfg=n,t.apiUrl||(console.info("[BIMData Viewer] INFO - Viewer config - `apiUrl` not set, use 'https://api.bimdata.io' by default."),t.apiUrl="https://api.bimdata.io"),t.archiveUrl||(console.info("[BIMData Viewer] INFO - Viewer config - `archiveUrl` not set, use 'https://archive.bimdata.io' by default."),t.archiveUrl="https://archive.bimdata.io"),t.pdfBackendUrl||(console.info("[BIMData Viewer] INFO - Viewer config - `pdfBackendUrl` not set, use 'https://pdf-backend.bimdata.io' by default."),t.pdfBackendUrl="https://pdf-backend.bimdata.io"),t.ifcIds&&(console.warn("[BIMData Viewer] DEPRECATED - Viewer config - please use the `modelIds` property instead of `ifcIds`."),t.modelIds===void 0&&(t.modelIds=t.ifcIds)),t.modelIds||(t.modelIds=[]),t.offline?.dataFile&&(t.offline.data=t.offline.dataFile),this.$viewer=new qti(e),t.offline?.enabled?this.$viewer.api.enableOfflineMode(t.offline.data,t.offline.options).then(()=>this.state.loadModels(t.modelIds)):(this.$viewer.globalContext.loadingProcessStart(),this.state.loadModels(t.modelIds).finally(()=>this.$viewer.globalContext.loadingProcessEnd())),this.vueApp=null}get state(){return this.$viewer.state}get api(){return this.$viewer.api}async mount(e,t="3d"){const{$viewer:n}=this;await n.api.ready;try{const u=await n.api.apiClient.collaborationApi.checkProjectAccess(n.api.cloudId,n.api.projectId);n.api.permissions=m2e(u)}catch{n.api.permissions=m2e()}const o=this.api.accessToken,{i18n:r}=n;r.registerTranslations(n.pluginManager.pluginTranslations),n.layout.apply(t);const s={i18n:r.i18nVuePlugin,data(){return{accessToken:o}},render(){return gn(Rii,{style:"height: 100%"})}},a=jg(s).use(r.i18nVuePlugin).use(tii()).use($ti({i18nPlugin:r.i18nVuePlugin})).use(Yti({apiClient:n.api.apiClient,i18nPlugin:r.i18nVuePlugin}));a.provide("$viewer",n),a.provide("BIMDATA_DESIGN_SYSTEM_DARK_THEME",Re(()=>n.darkTheme)),a.component("BIMDataModelLoader",g2e),a.component("BIMDataMultiModelLoader",eni),a.component("BIMDataNoModelWindowPlaceHolder",y2e),a.component("BIMDataStoreySelector",dS),a.component("ModelsLoader",g2e),a.component("NoModelWindowPlaceHolder",y2e);const l=e instanceof HTMLElement?e:document.querySelector(e);l&&(l.style.height="100%");const c=a.mount(e);return c.$viewer=n,Kti(c.$el,this.uiCfg?.style),typeof window<"u"&&(window.bimdataViewer=c),this.vueApp=a,c}destroy(){this.vueApp?.unmount()}setLocale(e){if(!Aj.includes(e))throw new Error(`Viewer available locales are ${Aj.join(", ")}.`);this.$viewer.i18n.locale=e}registerPlugin(e){this.$viewer.registerPlugin(e)}registerWindow(e){return this.$viewer.windowManager.registerWindow(e)}unregisterWindow(e){return this.$viewer.windowManager.unregisterWindow(e)}setAccessToken(e){this.api.accessToken=e}async loadModels(e){this.$viewer.globalContext.loadingProcessStart();const t=await this.state.loadModels(e);return this.$viewer.globalContext.loadingProcessEnd(),t}loadIfcs(e){return console.warn("[BIMData Viewer] DEPRECATED - Viewer - please use the loadModels method instead of loadIfcs."),this.loadModels(e)}}const v2e=(i={})=>new nni(i);return window.makeBIMDataViewer=v2e,v2e}));
|