@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.
@@ -1375,7 +1375,7 @@ Fragment shader:
1375
1375
  } catch (error) {
1376
1376
  console.error(error);
1377
1377
  throw error;
1378
- }`}function JZ(t,e=!0,i){const o=i||new Set;if(t){if(ZZ(t))o.add(t);else if(ZZ(t.buffer))o.add(t.buffer);else if(!ArrayBuffer.isView(t)&&e&&typeof t=="object")for(const r in t)JZ(t[r],e,o)}return i===void 0?Array.from(o):[]}function ZZ(t){return t?t instanceof ArrayBuffer||typeof MessagePort<"u"&&t instanceof MessagePort||typeof ImageBitmap<"u"&&t instanceof ImageBitmap||typeof OffscreenCanvas<"u"&&t instanceof OffscreenCanvas:!1}const QB=()=>{};class GB{name;source;url;terminated=!1;worker;onMessage;onError;_loadableURL="";static isSupported(){return typeof Worker<"u"&&Ca||typeof HB<"u"&&!Ca}constructor(e){const{name:i,source:o,url:r}=e;Zl(o||r),this.name=i,this.source=o,this.url=r,this.onMessage=QB,this.onError=n=>console.log(n),this.worker=Ca?this._createBrowserWorker():this._createNodeWorker()}destroy(){this.onMessage=QB,this.onError=QB,this.worker.terminate(),this.terminated=!0}get isRunning(){return!!this.onMessage}postMessage(e,i){i=i||JZ(e),this.worker.postMessage(e,i)}_getErrorFromErrorEvent(e){let i="Failed to load ";return i+=`worker ${this.name} from ${this.url}. `,e.message&&(i+=`${e.message} in `),e.lineno&&(i+=`:${e.lineno}:${e.colno}`),new Error(i)}_createBrowserWorker(){this._loadableURL=bBt({source:this.source,url:this.url});const e=new Worker(this._loadableURL,{name:this.name});return e.onmessage=i=>{i.data?this.onMessage(i.data):this.onError(new Error("No data received"))},e.onerror=i=>{this.onError(this._getErrorFromErrorEvent(i)),this.terminated=!0},e.onmessageerror=i=>console.error(i),e}_createNodeWorker(){let e;if(this.url){const i=this.url.includes(":/")||this.url.startsWith("/")?this.url:`./${this.url}`;e=new HB(i,{eval:!1})}else if(this.source)e=new HB(this.source,{eval:!0});else throw new Error("no worker");return e.on("message",i=>{this.onMessage(i)}),e.on("error",i=>{this.onError(i)}),e.on("exit",i=>{}),e}}class xBt{name="unnamed";source;url;maxConcurrency=1;maxMobileConcurrency=1;onDebug=()=>{};reuseWorkers=!0;props={};jobQueue=[];idleQueue=[];count=0;isDestroyed=!1;static isSupported(){return GB.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,i=(r,n,a)=>r.done(a),o=(r,n)=>r.error(n)){const r=new Promise(n=>(this.jobQueue.push({name:e,onMessage:i,onError:o,onStart:n}),this));return this._startQueuedJob(),await r}async _startQueuedJob(){if(!this.jobQueue.length)return;const e=this._getAvailableWorker();if(!e)return;const i=this.jobQueue.shift();if(i){this.onDebug({message:"Starting job",name:i.name,workerThread:e,backlog:this.jobQueue.length});const o=new yBt(i.name,e);e.onMessage=r=>i.onMessage(o,r.type,r.payload),e.onError=r=>i.onError(o,r),i.onStart(o);try{await o.result}catch(r){console.error(`Worker exception: ${r}`)}finally{this.returnWorkerToQueue(e)}}}returnWorkerToQueue(e){!Ca||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 GB({name:e,source:this.source,url:this.url})}return null}_getMaxConcurrency(){return vBt?this.maxMobileConcurrency:this.maxConcurrency}}const kBt={maxConcurrency:3,maxMobileConcurrency:1,reuseWorkers:!0,onDebug:()=>{}};class Ud{props;workerPools=new Map;static _workerFarm;static isSupported(){return GB.isSupported()}static getWorkerFarm(e={}){return Ud._workerFarm=Ud._workerFarm||new Ud({}),Ud._workerFarm.setProps(e),Ud._workerFarm}constructor(e){this.props={...kBt},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 i of this.workerPools.values())i.setProps(this._getWorkerPoolProps())}getWorkerPool(e){const{name:i,source:o,url:r}=e;let n=this.workerPools.get(i);return n||(n=new xBt({name:i,source:o,url:r}),n.setProps(this._getWorkerPoolProps()),this.workerPools.set(i,n)),n}_getWorkerPoolProps(){return{maxConcurrency:this.props.maxConcurrency,maxMobileConcurrency:this.props.maxMobileConcurrency,reuseWorkers:this.props.reuseWorkers,onDebug:this.props.onDebug}}}function MBt(t,e={}){const i=e[t.id]||{},o=Ca?`${t.id}-worker.js`:`${t.id}-worker-node.js`;let r=i.workerUrl;if(!r&&t.id==="compression"&&(r=e.workerUrl),e._workerType==="test"&&(Ca?r=`modules/${t.module}/dist/${o}`:r=`modules/${t.module}/src/workers/${t.id}-worker-node.ts`),!r){let n=t.version;n==="latest"&&(n=gBt);const a=n?`@${n}`:"";r=`https://unpkg.com/@loaders.gl/${t.module}${a}/dist/${o}`}return Zl(r),r}function EBt(t,e=QZ){Zl(t,"no worker provided");const i=t.version;return!(!e||!i)}const KB={};async function Lu(t,e=null,i={},o=null){return e&&(t=BBt(t,e,i,o)),KB[t]=KB[t]||PBt(t),await KB[t]}function BBt(t,e,i={},o=null){if(!i.useLocalLibraries&&t.startsWith("http"))return t;o=o||t;const r=i.modules||{};return r[o]?r[o]:Ca?i.CDN?(Zl(i.CDN.startsWith("http")),`${i.CDN}/${e}@${QZ}/dist/libs/${o}`):zB?`../src/libs/${o}`:`modules/${e}/src/libs/${o}`:`modules/${e}/dist/libs/${o}`}async function PBt(t){if(t.endsWith("wasm"))return await SBt(t);if(!Ca)try{const{requireFromFile:i}=globalThis.loaders||{};return await i?.(t)}catch(i){return console.error(i),null}if(zB)return importScripts(t);const e=await TBt(t);return IBt(e,t)}function IBt(t,e){if(!Ca){const{requireFromString:o}=globalThis.loaders||{};return o?.(t,e)}if(zB)return eval.call(globalThis,t),null;const i=document.createElement("script");i.id=e;try{i.appendChild(document.createTextNode(t))}catch{i.text=t}return document.body.appendChild(i),null}async function SBt(t){const{readFileAsArrayBuffer:e}=globalThis.loaders||{};return Ca||!e||t.startsWith("http")?await(await fetch(t)).arrayBuffer():await e(t)}async function TBt(t){const{readFileAsText:e}=globalThis.loaders||{};return Ca||!e||t.startsWith("http")?await(await fetch(t)).text():await e(t)}function DBt(t,e){return!Ud.isSupported()||!Ca&&!e?._nodeWorkers?!1:t.worker&&e?.worker}async function RBt(t,e,i,o,r){const n=t.id,a=MBt(t,i),s=Ud.getWorkerFarm(i).getWorkerPool({name:n,url:a});i=JSON.parse(JSON.stringify(i)),o=JSON.parse(JSON.stringify(o||{}));const l=await s.startJob("process-on-worker",LBt.bind(null,r));return l.postMessage("process",{input:e,options:i,context:o}),await(await l.result).result}async function LBt(t,e,i,o){switch(i){case"done":e.done(o);break;case"error":e.error(new Error(o.error));break;case"process":const{id:r,input:n,options:a}=o;try{const s=await t(n,a);e.postMessage("done",{id:r,result:s})}catch(s){const l=s instanceof Error?s.message:"unknown error";e.postMessage("error",{id:r,error:l})}break;default:console.warn(`parse-with-worker unknown message ${i}`)}}function _Bt(t,e=5){return typeof t=="string"?t.slice(0,e):ArrayBuffer.isView(t)?WZ(t.buffer,t.byteOffset,e):t instanceof ArrayBuffer?WZ(t,0,e):""}function WZ(t,e,i){if(t.byteLength<=e+i)return"";const o=new DataView(t);let r="";for(let n=0;n<i;n++)r+=String.fromCharCode(o.getUint8(e+n));return r}function FBt(t){try{return JSON.parse(t)}catch{throw new Error(`Failed to parse JSON from data starting with "${_Bt(t)}"`)}}function OBt(t,e,i){if(i=i||t.byteLength,t.byteLength<i||e.byteLength<i)return!1;const o=new Uint8Array(t),r=new Uint8Array(e);for(let n=0;n<o.length;++n)if(o[n]!==r[n])return!1;return!0}function UBt(...t){return NBt(t)}function NBt(t){const e=t.map(n=>n instanceof ArrayBuffer?new Uint8Array(n):n),i=e.reduce((n,a)=>n+a.byteLength,0),o=new Uint8Array(i);let r=0;for(const n of e)o.set(n,r),r+=n.byteLength;return o.buffer}function YZ(t,e,i){const o=i!==void 0?new Uint8Array(t).subarray(e,e+i):new Uint8Array(t).subarray(e);return new Uint8Array(o).buffer}function Vv(t,e){return Jl(t>=0),Jl(e>0),t+(e-1)&-4}function jBt(t,e,i){let o;if(t instanceof ArrayBuffer)o=new Uint8Array(t);else{const r=t.byteOffset,n=t.byteLength;o=new Uint8Array(t.buffer||t.arrayBuffer,r,n)}return e.set(o,i),i+Vv(o.byteLength,4)}async function VBt(t){const e=[];for await(const i of t)e.push(i);return UBt(...e)}let zBt="";const XZ={};function HBt(t){for(const e in XZ)if(t.startsWith(e)){const i=XZ[e];t=t.replace(e,i)}return!t.startsWith("http://")&&!t.startsWith("https://")&&(t=`${zBt}${t}`),t}function qBt(t){return t&&typeof t=="object"&&t.isBuffer}function $Z(t){if(qBt(t)||t instanceof ArrayBuffer)return t;if(ArrayBuffer.isView(t))return t.byteOffset===0&&t.byteLength===t.buffer.byteLength?t.buffer:t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength);if(typeof t=="string"){const e=t;return new TextEncoder().encode(e).buffer}if(t&&typeof t=="object"&&t._toArrayBuffer)return t._toArrayBuffer();throw new Error("toArrayBuffer")}function eW(t){const e=t?t.lastIndexOf("/"):-1;return e>=0?t.substr(e+1):""}function QBt(t){const e=t?t.lastIndexOf("/"):-1;return e>=0?t.substr(0,e):""}const GBt=t=>typeof t=="boolean",zv=t=>typeof t=="function",Hv=t=>t!==null&&typeof t=="object",tW=t=>Hv(t)&&t.constructor==={}.constructor,KBt=t=>!!t&&typeof t[Symbol.iterator]=="function",JBt=t=>t&&typeof t[Symbol.asyncIterator]=="function",_u=t=>typeof Response<"u"&&t instanceof Response||t&&t.arrayBuffer&&t.text&&t.json,Xp=t=>typeof Blob<"u"&&t instanceof Blob,ZBt=t=>t&&typeof t=="object"&&t.isBuffer,WBt=t=>typeof ReadableStream<"u"&&t instanceof ReadableStream||Hv(t)&&zv(t.tee)&&zv(t.cancel)&&zv(t.getReader),YBt=t=>Hv(t)&&zv(t.read)&&zv(t.pipe)&&GBt(t.readable),iW=t=>WBt(t)||YBt(t);class XBt extends Error{constructor(e,i){super(e),this.reason=i.reason,this.url=i.url,this.response=i.response}reason;url;response}const $Bt=/^data:([-\w.]+\/[-\w.+]+)(;|,)/,ePt=/^([-\w.]+\/[-\w.+]+)/;function oW(t,e){return t.toLowerCase()===e.toLowerCase()}function tPt(t){const e=ePt.exec(t);return e?e[1]:t}function rW(t){const e=$Bt.exec(t);return e?e[1]:""}const nW=/\?.*/;function iPt(t){const e=t.match(nW);return e&&e[0]}function JB(t){return t.replace(nW,"")}function oPt(t){if(t.length<50)return t;const e=t.slice(t.length-15);return`${t.substr(0,32)}...${e}`}function i7(t){return _u(t)?t.url:Xp(t)?t.name||"":typeof t=="string"?t:""}function ZB(t){if(_u(t)){const e=t,i=e.headers.get("content-type")||"",o=JB(e.url);return tPt(i)||rW(o)}return Xp(t)?t.type||"":typeof t=="string"?rW(t):""}function rPt(t){return _u(t)?t.headers["content-length"]||-1:Xp(t)?t.size:typeof t=="string"?t.length:t instanceof ArrayBuffer||ArrayBuffer.isView(t)?t.byteLength:-1}async function aW(t){if(_u(t))return t;const e={},i=rPt(t);i>=0&&(e["content-length"]=String(i));const o=i7(t),r=ZB(t);r&&(e["content-type"]=r);const n=await sPt(t);n&&(e["x-first-bytes"]=n),typeof t=="string"&&(t=new TextEncoder().encode(t));const a=new Response(t,{headers:e});return Object.defineProperty(a,"url",{value:o}),a}async function nPt(t){if(!t.ok)throw await aPt(t)}async function aPt(t){const e=oPt(t.url);let i=`Failed to fetch resource (${t.status}) ${t.statusText}: ${e}`;i=i.length>100?`${i.slice(0,100)}...`:i;const o={reason:t.statusText,url:t.url,response:t};try{const r=t.headers.get("Content-Type");o.reason=!t.bodyUsed&&r?.includes("application/json")?await t.json():await t.text()}catch{}return new XBt(i,o)}async function sPt(t){if(typeof t=="string")return`data:,${t.slice(0,5)}`;if(t instanceof Blob){const e=t.slice(0,5);return await new Promise(i=>{const o=new FileReader;o.onload=r=>i(r?.target?.result),o.readAsDataURL(e)})}if(t instanceof ArrayBuffer){const e=t.slice(0,5);return`data:base64,${lPt(e)}`}return null}function lPt(t){let e="";const i=new Uint8Array(t);for(let o=0;o<i.byteLength;o++)e+=String.fromCharCode(i[o]);return btoa(e)}function cPt(t){return!dPt(t)&&!uPt(t)}function dPt(t){return t.startsWith("http:")||t.startsWith("https:")}function uPt(t){return t.startsWith("data:")}async function sW(t,e){if(typeof t=="string"){const i=HBt(t);return cPt(i)&&globalThis.loaders?.fetchNode?globalThis.loaders?.fetchNode(i,e):await fetch(i,e)}return await aW(t)}const lW=new jB({id:"loaders.gl"});class hPt{log(){return()=>{}}info(){return()=>{}}warn(){return()=>{}}error(){return()=>{}}}class pPt{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 cW={fetch:null,mimeType:void 0,nothrow:!1,log:new pPt,useLocalLibraries:!1,CDN:"https://unpkg.com/@loaders.gl",worker:!0,maxConcurrency:3,maxMobileConcurrency:1,reuseWorkers:e7,_nodeWorkers:!1,_workerType:"",limit:0,_limitMB:0,batchSize:"auto",batchDebounceMs:0,metadata:!1,transforms:[]},fPt={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 dW(){globalThis.loaders=globalThis.loaders||{};const{loaders:t}=globalThis;return t._state||(t._state={}),t._state}function uW(){const t=dW();return t.globalOptions=t.globalOptions||{...cW},t.globalOptions}function APt(t,e,i,o){return i=i||[],i=Array.isArray(i)?i:[i],gPt(t,i),vPt(e,t,o)}function gPt(t,e){hW(t,null,cW,fPt,e);for(const i of e){const o=t&&t[i.id]||{},r=i.options&&i.options[i.id]||{},n=i.deprecatedOptions&&i.deprecatedOptions[i.id]||{};hW(o,i.id,r,n,e)}}function hW(t,e,i,o,r){const n=e||"Top level",a=e?`${e}.`:"";for(const s in t){const l=!e&&Hv(t[s]),c=s==="baseUri"&&!e,d=s==="workerUrl"&&e;if(!(s in i)&&!c&&!d){if(s in o)lW.warn(`${n} loader option '${a}${s}' no longer supported, use '${o[s]}'`)();else if(!l){const u=mPt(s,r);lW.warn(`${n} loader option '${a}${s}' not recognized. ${u}`)()}}}}function mPt(t,e){const i=t.toLowerCase();let o="";for(const r of e)for(const n in r.options){if(t===n)return`Did you mean '${r.id}.${n}'?`;const a=n.toLowerCase();(i.startsWith(a)||a.startsWith(i))&&(o=o||`Did you mean '${r.id}.${n}'?`)}return o}function vPt(t,e,i){const o={...t.options||{}};return yPt(o,i),o.log===null&&(o.log=new hPt),pW(o,uW()),pW(o,e),o}function pW(t,e){for(const i in e)if(i in e){const o=e[i];tW(o)&&tW(t[i])?t[i]={...t[i],...e[i]}:t[i]=e[i]}}function yPt(t,e){e&&!("baseUri"in t)&&(t.baseUri=e)}function fW(t){return t?(Array.isArray(t)&&(t=t[0]),Array.isArray(t?.extensions)):!1}function AW(t){Jl(t,"null loader"),Jl(fW(t),"invalid loader");let e;return Array.isArray(t)&&(e=t[1],t=t[0],t={...t,options:{...t.options,...e}}),(t?.parseTextSync||t?.parseText)&&(t.text=!0),t.text||(t.binary=!0),t}const bPt=()=>{const t=dW();return t.loaderRegistry=t.loaderRegistry||[],t.loaderRegistry};function wPt(){return bPt()}const CPt=/\.([^.]+)$/;async function xPt(t,e=[],i,o){if(!mW(t))return null;let r=gW(t,e,{...i,nothrow:!0},o);if(r)return r;if(Xp(t)&&(t=await t.slice(0,10).arrayBuffer(),r=gW(t,e,i,o)),!r&&!i?.nothrow)throw new Error(vW(t));return r}function gW(t,e=[],i,o){if(!mW(t))return null;if(e&&!Array.isArray(e))return AW(e);let r=[];e&&(r=r.concat(e)),i?.ignoreRegisteredLoaders||r.push(...wPt()),MPt(r);const n=kPt(t,r,i,o);if(!n&&!i?.nothrow)throw new Error(vW(t));return n}function kPt(t,e,i,o){const r=i7(t),n=ZB(t),a=JB(r)||o?.url;let s=null,l="";return i?.mimeType&&(s=WB(e,i?.mimeType),l=`match forced by supplied MIME type ${i?.mimeType}`),s=s||EPt(e,a),l=l||(s?`matched url ${a}`:""),s=s||WB(e,n),l=l||(s?`matched MIME type ${n}`:""),s=s||PPt(e,t),l=l||(s?`matched initial data ${bW(t)}`:""),i?.fallbackMimeType&&(s=s||WB(e,i?.fallbackMimeType),l=l||(s?`matched fallback MIME type ${n}`:"")),l&&hBt.log(1,`selectLoader selected ${s?.name}: ${l}.`),s}function mW(t){return!(t instanceof Response&&t.status===204)}function vW(t){const e=i7(t),i=ZB(t);let o="No valid loader found (";o+=e?`${eW(e)}, `:"no url provided, ",o+=`MIME type: ${i?`"${i}"`:"not provided"}, `;const r=t?bW(t):"";return o+=r?` first bytes: "${r}"`:"first bytes: not available",o+=")",o}function MPt(t){for(const e of t)AW(e)}function EPt(t,e){const i=e&&CPt.exec(e),o=i&&i[1];return o?BPt(t,o):null}function BPt(t,e){e=e.toLowerCase();for(const i of t)for(const o of i.extensions)if(o.toLowerCase()===e)return i;return null}function WB(t,e){for(const i of t)if(i.mimeTypes?.some(o=>oW(e,o))||oW(e,`application/x.${i.id}`))return i;return null}function PPt(t,e){if(!e)return null;for(const i of t)if(typeof e=="string"){if(IPt(e,i))return i}else if(ArrayBuffer.isView(e)){if(yW(e.buffer,e.byteOffset,i))return i}else if(e instanceof ArrayBuffer&&yW(e,0,i))return i;return null}function IPt(t,e){return e.testText?e.testText(t):(Array.isArray(e.tests)?e.tests:[e.tests]).some(i=>t.startsWith(i))}function yW(t,e,i){return(Array.isArray(i.tests)?i.tests:[i.tests]).some(o=>SPt(t,e,i,o))}function SPt(t,e,i,o){if(o instanceof ArrayBuffer)return OBt(o,t,o.byteLength);switch(typeof o){case"function":return o(t);case"string":const r=YB(t,e,o.length);return o===r;default:return!1}}function bW(t,e=5){return typeof t=="string"?t.slice(0,e):ArrayBuffer.isView(t)?YB(t.buffer,t.byteOffset,e):t instanceof ArrayBuffer?YB(t,0,e):""}function YB(t,e,i){if(t.byteLength<e+i)return"";const o=new DataView(t);let r="";for(let n=0;n<i;n++)r+=String.fromCharCode(o.getUint8(e+n));return r}const TPt=256*1024;function*DPt(t,e){const i=e?.chunkSize||TPt;let o=0;const r=new TextEncoder;for(;o<t.length;){const n=Math.min(t.length-o,i),a=t.slice(o,o+n);o+=n,yield r.encode(a)}}const RPt=256*1024;function*LPt(t,e={}){const{chunkSize:i=RPt}=e;let o=0;for(;o<t.byteLength;){const r=Math.min(t.byteLength-o,i),n=new ArrayBuffer(r),a=new Uint8Array(t,o,r);new Uint8Array(n).set(a),o+=r,yield n}}const _Pt=1024*1024;async function*FPt(t,e){const i=e?.chunkSize||_Pt;let o=0;for(;o<t.size;){const r=o+i,n=await t.slice(o,r).arrayBuffer();o=r,yield n}}function wW(t,e){return e7?OPt(t,e):UPt(t)}async function*OPt(t,e){const i=t.getReader();let o;try{for(;;){const r=o||i.read();e?._streamReadAhead&&(o=i.read());const{done:n,value:a}=await r;if(n)return;yield $Z(a)}}catch{i.releaseLock()}}async function*UPt(t,e){for await(const i of t)yield $Z(i)}function NPt(t,e){if(typeof t=="string")return DPt(t,e);if(t instanceof ArrayBuffer)return LPt(t,e);if(Xp(t))return FPt(t,e);if(iW(t))return wW(t,e);if(_u(t))return wW(t.body,e);throw new Error("makeIterator")}const CW="Cannot convert supplied data type";function jPt(t,e,i){if(e.text&&typeof t=="string")return t;if(ZBt(t)&&(t=t.buffer),t instanceof ArrayBuffer){const o=t;return e.text&&!e.binary?new TextDecoder("utf8").decode(o):o}if(ArrayBuffer.isView(t)){if(e.text&&!e.binary)return new TextDecoder("utf8").decode(t);let o=t.buffer;const r=t.byteLength||t.length;return(t.byteOffset!==0||r!==o.byteLength)&&(o=o.slice(t.byteOffset,t.byteOffset+r)),o}throw new Error(CW)}async function VPt(t,e,i){const o=t instanceof ArrayBuffer||ArrayBuffer.isView(t);if(typeof t=="string"||o)return jPt(t,e);if(Xp(t)&&(t=await aW(t)),_u(t)){const r=t;return await nPt(r),e.binary?await r.arrayBuffer():await r.text()}if(iW(t)&&(t=NPt(t,i)),KBt(t)||JBt(t))return VBt(t);throw new Error(CW)}function zPt(t,e){const i=uW(),o=t||i;return typeof o.fetch=="function"?o.fetch:Hv(o.fetch)?r=>sW(r,o.fetch):e?.fetch?e?.fetch:sW}function HPt(t,e,i){if(i)return i;const o={fetch:zPt(e,t),...t};if(o.url){const r=JB(o.url);o.baseUrl=r,o.queryString=iPt(o.url),o.filename=eW(r),o.baseUrl=QBt(r)}return Array.isArray(o.loaders)||(o.loaders=null),o}function qPt(t,e){if(t&&!Array.isArray(t))return t;let i;if(t&&(i=Array.isArray(t)?t:[t]),e&&e.loaders){const o=Array.isArray(e.loaders)?e.loaders:[e.loaders];i=i?[...i,...o]:o}return i&&i.length?i:void 0}async function XB(t,e,i,o){e&&!Array.isArray(e)&&!fW(e)&&(o=void 0,i=e,e=void 0),t=await t,i=i||{};const r=i7(t),n=qPt(e,o),a=await xPt(t,n,i);return a?(i=APt(i,a,n,r),o=HPt({url:r,_parse:XB,loaders:n},i,o||null),await QPt(a,t,i,o)):null}async function QPt(t,e,i,o){if(EBt(t),i=pBt(t.options,i),_u(e)){const n=e,{ok:a,redirected:s,status:l,statusText:c,type:d,url:u}=n,h=Object.fromEntries(n.headers.entries());o.response={headers:h,ok:a,redirected:s,status:l,statusText:c,type:d,url:u}}e=await VPt(e,t,i);const r=t;if(r.parseTextSync&&typeof e=="string")return r.parseTextSync(e,i,o);if(DBt(t,i))return await RBt(t,e,i,o,XB);if(r.parseText&&typeof e=="string")return await r.parseText(e,i,o);if(r.parse)return await r.parse(e,i,o);throw Zl(!r.parseSync),new Error(`${t.id} loader - no parser found and worker is disabled`)}function GPt(t){switch(t.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 KPt(t){let e=1/0,i=1/0,o=1/0,r=-1/0,n=-1/0,a=-1/0;const s=t.POSITION?t.POSITION.value:[],l=s&&s.length;for(let c=0;c<l;c+=3){const d=s[c],u=s[c+1],h=s[c+2];e=d<e?d:e,i=u<i?u:i,o=h<o?h:o,r=d>r?d:r,n=u>n?u:n,a=h>a?h:a}return[[e,i,o],[r,n,a]]}function JPt(t,e,i){const o=GPt(e.value),r=i||ZPt(e);return{name:t,type:{type:"fixed-size-list",listSize:e.size,children:[{name:"value",type:o}]},nullable:!1,metadata:r}}function ZPt(t){const e={};return"byteOffset"in t&&(e.byteOffset=t.byteOffset.toString(10)),"byteStride"in t&&(e.byteStride=t.byteStride.toString(10)),"normalized"in t&&(e.normalized=t.normalized.toString()),e}const WPt="4.3.3",YPt=globalThis.loaders?.parseImageNode,$B=typeof Image<"u",eP=typeof ImageBitmap<"u",XPt=!!YPt,tP=e7?!0:XPt;function $Pt(t){switch(t){case"auto":return eP||$B||tP;case"imagebitmap":return eP;case"image":return $B;case"data":return tP;default:throw new Error(`@loaders.gl/images: image ${t} not supported in this environment`)}}function eIt(){if(eP)return"imagebitmap";if($B)return"image";if(tP)return"data";throw new Error("Install '@loaders.gl/polyfills' to parse images under Node.js")}function tIt(t){const e=iIt(t);if(!e)throw new Error("Not an image");return e}function xW(t){switch(tIt(t)){case"data":return t;case"image":case"imagebitmap":const e=document.createElement("canvas"),i=e.getContext("2d");if(!i)throw new Error("getImageData");return e.width=t.width,e.height=t.height,i.drawImage(t,0,0),i.getImageData(0,0,t.width,t.height);default:throw new Error("getImageData")}}function iIt(t){return typeof ImageBitmap<"u"&&t instanceof ImageBitmap?"imagebitmap":typeof Image<"u"&&t instanceof Image?"image":t&&typeof t=="object"&&t.data&&t.width&&t.height?"data":null}const oIt=/^data:image\/svg\+xml/,rIt=/\.svg((\?|#).*)?$/;function iP(t){return t&&(oIt.test(t)||rIt.test(t))}function nIt(t,e){if(iP(e)){let i=new TextDecoder().decode(t);try{typeof unescape=="function"&&typeof encodeURIComponent=="function"&&(i=unescape(encodeURIComponent(i)))}catch(o){throw new Error(o.message)}return`data:image/svg+xml;base64,${btoa(i)}`}return kW(t,e)}function kW(t,e){if(iP(e))throw new Error("SVG cannot be parsed directly to imagebitmap");return new Blob([new Uint8Array(t)])}async function MW(t,e,i){const o=nIt(t,i),r=self.URL||self.webkitURL,n=typeof o!="string"&&r.createObjectURL(o);try{return await aIt(n||o,e)}finally{n&&r.revokeObjectURL(n)}}async function aIt(t,e){const i=new Image;return i.src=t,e.image&&e.image.decode&&i.decode?(await i.decode(),i):await new Promise((o,r)=>{try{i.onload=()=>o(i),i.onerror=n=>{const a=n instanceof Error?n.message:"error";r(new Error(a))}}catch(n){r(n)}})}const sIt={};let EW=!0;async function lIt(t,e,i){let o;iP(i)?o=await MW(t,e,i):o=kW(t,i);const r=e&&e.imagebitmap;return await cIt(o,r)}async function cIt(t,e=null){if((dIt(e)||!EW)&&(e=null),e)try{return await createImageBitmap(t,e)}catch(i){console.warn(i),EW=!1}return await createImageBitmap(t)}function dIt(t){for(const e in t||sIt)return!1;return!0}function uIt(t){return!AIt(t,"ftyp",4)||(t[8]&96)===0?null:hIt(t)}function hIt(t){switch(pIt(t,8,12).replace("\0"," ").trim()){case"avif":case"avis":return{extension:"avif",mimeType:"image/avif"};default:return null}}function pIt(t,e,i){return String.fromCharCode(...t.slice(e,i))}function fIt(t){return[...t].map(e=>e.charCodeAt(0))}function AIt(t,e,i=0){const o=fIt(e);for(let r=0;r<o.length;++r)if(o[r]!==t[r+i])return!1;return!0}const Gs=!1,qv=!0;function oP(t){const e=Qv(t);return mIt(e)||bIt(e)||vIt(e)||yIt(e)||gIt(e)}function gIt(t){const e=new Uint8Array(t instanceof DataView?t.buffer:t),i=uIt(e);return i?{mimeType:i.mimeType,width:0,height:0}:null}function mIt(t){const e=Qv(t);return e.byteLength>=24&&e.getUint32(0,Gs)===2303741511?{mimeType:"image/png",width:e.getUint32(16,Gs),height:e.getUint32(20,Gs)}:null}function vIt(t){const e=Qv(t);return e.byteLength>=10&&e.getUint32(0,Gs)===1195984440?{mimeType:"image/gif",width:e.getUint16(6,qv),height:e.getUint16(8,qv)}:null}function yIt(t){const e=Qv(t);return e.byteLength>=14&&e.getUint16(0,Gs)===16973&&e.getUint32(2,qv)===e.byteLength?{mimeType:"image/bmp",width:e.getUint32(18,qv),height:e.getUint32(22,qv)}:null}function bIt(t){const e=Qv(t);if(!(e.byteLength>=3&&e.getUint16(0,Gs)===65496&&e.getUint8(2)===255))return null;const{tableMarkers:i,sofMarkers:o}=wIt();let r=2;for(;r+9<e.byteLength;){const n=e.getUint16(r,Gs);if(o.has(n))return{mimeType:"image/jpeg",height:e.getUint16(r+5,Gs),width:e.getUint16(r+7,Gs)};if(!i.has(n))return null;r+=2,r+=e.getUint16(r,Gs)}return null}function wIt(){const t=new Set([65499,65476,65484,65501,65534]);for(let e=65504;e<65520;++e)t.add(e);return{tableMarkers:t,sofMarkers:new Set([65472,65473,65474,65475,65477,65478,65479,65481,65482,65483,65485,65486,65487,65502])}}function Qv(t){if(t instanceof DataView)return t;if(ArrayBuffer.isView(t))return new DataView(t.buffer);if(t instanceof ArrayBuffer)return new DataView(t);throw new Error("toDataView")}async function CIt(t,e){const{mimeType:i}=oP(t)||{},o=globalThis.loaders?.parseImageNode;return Jl(o),await o(t,i)}async function xIt(t,e,i){e=e||{};const o=(e.image||{}).type||"auto",{url:r}=i||{},n=kIt(o);let a;switch(n){case"imagebitmap":a=await lIt(t,e,r);break;case"image":a=await MW(t,e,r);break;case"data":a=await CIt(t);break;default:Jl(!1)}return o==="data"&&(a=xW(a)),a}function kIt(t){switch(t){case"auto":case"data":return eIt();default:return $Pt(t),t}}const MIt=["png","jpg","jpeg","gif","webp","bmp","ico","svg","avif"],EIt=["image/png","image/jpeg","image/gif","image/webp","image/avif","image/bmp","image/vnd.microsoft.icon","image/svg+xml"],BIt={image:{type:"auto",decode:!0}},PIt={dataType:null,batchType:null,id:"image",module:"images",name:"Images",version:WPt,mimeTypes:EIt,extensions:MIt,parse:xIt,tests:[t=>!!oP(new DataView(t))],options:BIt},rP={};function IIt(t){if(rP[t]===void 0){const e=e7?TIt(t):SIt(t);rP[t]=e}return rP[t]}function SIt(t){const e=["image/png","image/jpeg","image/gif"],i=globalThis.loaders?.imageFormatsNode||e;return!!globalThis.loaders?.parseImageNode&&i.includes(t)}function TIt(t){switch(t){case"image/avif":case"image/webp":return DIt(t);default:return!0}}function DIt(t){try{return document.createElement("canvas").toDataURL(t).indexOf(`data:${t}`)===0}catch{return!1}}function $n(t,e){if(!t)throw new Error(e||"assert failed: gltf")}const BW={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},PW={5120:1,5121:1,5122:2,5123:2,5125:4,5126:4},IW=["SCALAR","VEC2","VEC3","VEC4"],RIt=[[Int8Array,5120],[Uint8Array,5121],[Int16Array,5122],[Uint16Array,5123],[Uint32Array,5125],[Float32Array,5126],[Float64Array,5130]],LIt=new Map(RIt),_It={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},FIt={5120:1,5121:1,5122:2,5123:2,5125:4,5126:4},OIt={5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5126:Float32Array};function SW(t){return IW[t-1]||IW[0]}function o7(t){const e=LIt.get(t.constructor);if(!e)throw new Error("Illegal typed array");return e}function nP(t,e){const i=OIt[t.componentType],o=_It[t.type],r=FIt[t.componentType],n=t.count*o,a=t.count*o*r;$n(a>=0&&a<=e.byteLength);const s=PW[t.componentType],l=BW[t.type];return{ArrayType:i,length:n,byteLength:a,componentByteSize:s,numberOfComponentsInElement:l}}function UIt(t,e,i){const o=t.bufferViews[i];$n(o);const r=o.buffer,n=e[r];$n(n);const a=(o.byteOffset||0)+n.byteOffset;return new Uint8Array(n.arrayBuffer,a,o.byteLength)}function NIt(t,e,i){const o=typeof i=="number"?t.accessors?.[i]:i;if(!o)throw new Error(`No gltf accessor ${JSON.stringify(i)}`);const r=t.bufferViews?.[o.bufferView||0];if(!r)throw new Error(`No gltf buffer view for accessor ${r}`);const{arrayBuffer:n,byteOffset:a}=e[r.buffer],s=(a||0)+(o.byteOffset||0)+(r.byteOffset||0),{ArrayType:l,length:c,componentByteSize:d,numberOfComponentsInElement:u}=nP(o,r),h=d*u,p=r.byteStride||h;if(typeof r.byteStride>"u"||r.byteStride===h)return new l(n,s,c);const A=new l(c);for(let f=0;f<o.count;f++){const m=new l(n,s+f*p,u);A.set(m,f*u)}return A}function jIt(){return{asset:{version:"2.0",generator:"loaders.gl"},buffers:[],extensions:{},extensionsRequired:[],extensionsUsed:[]}}class mr{gltf;sourceBuffers;byteLength;constructor(e){this.gltf={json:e?.json||jIt(),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 i=this.getUsedExtensions().find(r=>r===e),o=this.getRequiredExtensions().find(r=>r===e);return typeof i=="string"||typeof o=="string"}getExtension(e){const i=this.getUsedExtensions().find(r=>r===e),o=this.json.extensions||{};return i?o[e]:null}getRequiredExtension(e){return this.getRequiredExtensions().find(i=>i===e)?this.getExtension(e):null}getRequiredExtensions(){return this.json.extensionsRequired||[]}getUsedExtensions(){return this.json.extensionsUsed||[]}getRemovedExtensions(){return this.json.extensionsRemoved||[]}getObjectExtension(e,i){return(e.extensions||{})[i]}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,i){if(typeof i=="object")return i;const o=this.json[e]&&this.json[e][i];if(!o)throw new Error(`glTF file error: Could not find ${e}[${i}]`);return o}getTypedArrayForBufferView(e){e=this.getBufferView(e);const i=e.buffer,o=this.gltf.buffers[i];$n(o);const r=(e.byteOffset||0)+o.byteOffset;return new Uint8Array(o.arrayBuffer,r,e.byteLength)}getTypedArrayForAccessor(e){const i=this.getAccessor(e);return NIt(this.gltf.json,this.gltf.buffers,i)}getTypedArrayForImageData(e){e=this.getAccessor(e);const i=this.getBufferView(e.bufferView),o=this.getBuffer(i.buffer).data,r=i.byteOffset||0;return new Uint8Array(o,r,i.byteLength)}addApplicationData(e,i){return this.json[e]=i,this}addExtraData(e,i){return this.json.extras=this.json.extras||{},this.json.extras[e]=i,this}addObjectExtension(e,i,o){return e.extensions=e.extensions||{},e.extensions[i]=o,this.registerUsedExtension(i),this}setObjectExtension(e,i,o){const r=e.extensions||{};r[i]=o}removeObjectExtension(e,i){const o=e?.extensions||{};if(o[i]){this.json.extensionsRemoved=this.json.extensionsRemoved||[];const r=this.json.extensionsRemoved;r.includes(i)||r.push(i)}delete o[i]}addExtension(e,i={}){return $n(i),this.json.extensions=this.json.extensions||{},this.json.extensions[e]=i,this.registerUsedExtension(e),i}addRequiredExtension(e,i={}){return $n(i),this.addExtension(e,i),this.registerRequiredExtension(e),i}registerUsedExtension(e){this.json.extensionsUsed=this.json.extensionsUsed||[],this.json.extensionsUsed.find(i=>i===e)||this.json.extensionsUsed.push(e)}registerRequiredExtension(e){this.registerUsedExtension(e),this.json.extensionsRequired=this.json.extensionsRequired||[],this.json.extensionsRequired.find(i=>i===e)||this.json.extensionsRequired.push(e)}removeExtension(e){if(this.json.extensions?.[e]){this.json.extensionsRemoved=this.json.extensionsRemoved||[];const i=this.json.extensionsRemoved;i.includes(e)||i.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:i}=e;return this.json.scenes=this.json.scenes||[],this.json.scenes.push({nodes:i}),this.json.scenes.length-1}addNode(e){const{meshIndex:i,matrix:o}=e;this.json.nodes=this.json.nodes||[];const r={mesh:i};return o&&(r.matrix=o),this.json.nodes.push(r),this.json.nodes.length-1}addMesh(e){const{attributes:i,indices:o,material:r,mode:n=4}=e,a={primitives:[{attributes:this._addAttributes(i),mode:n}]};if(o){const s=this._addIndices(o);a.primitives[0].indices=s}return Number.isFinite(r)&&(a.primitives[0].material=r),this.json.meshes=this.json.meshes||[],this.json.meshes.push(a),this.json.meshes.length-1}addPointCloud(e){const i={primitives:[{attributes:this._addAttributes(e),mode:0}]};return this.json.meshes=this.json.meshes||[],this.json.meshes.push(i),this.json.meshes.length-1}addImage(e,i){const o=oP(e),r=i||o?.mimeType,n={bufferView:this.addBufferView(e),mimeType:r};return this.json.images=this.json.images||[],this.json.images.push(n),this.json.images.length-1}addBufferView(e,i=0,o=this.byteLength){const r=e.byteLength;$n(Number.isFinite(r)),this.sourceBuffers=this.sourceBuffers||[],this.sourceBuffers.push(e);const n={buffer:i,byteOffset:o,byteLength:r};return this.byteLength+=Vv(r,4),this.json.bufferViews=this.json.bufferViews||[],this.json.bufferViews.push(n),this.json.bufferViews.length-1}addAccessor(e,i){const o={bufferView:e,type:SW(i.size),componentType:i.componentType,count:i.count,max:i.max,min:i.min};return this.json.accessors=this.json.accessors||[],this.json.accessors.push(o),this.json.accessors.length-1}addBinaryBuffer(e,i={size:3}){const o=this.addBufferView(e);let r={min:i.min,max:i.max};(!r.min||!r.max)&&(r=this._getAccessorMinMax(e,i.size));const n={size:i.size,componentType:o7(e),count:Math.round(e.length/i.size),min:r.min,max:r.max};return this.addAccessor(o,Object.assign(n,i))}addTexture(e){const{imageIndex:i}=e,o={source:i};return this.json.textures=this.json.textures||[],this.json.textures.push(o),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,i=new ArrayBuffer(e),o=new Uint8Array(i);let r=0;for(const n of this.sourceBuffers||[])r=jBt(n,o,r);this.json?.buffers?.[0]?this.json.buffers[0].byteLength=e:this.json.buffers=[{byteLength:e}],this.gltf.binary=i,this.sourceBuffers=[i],this.gltf.buffers=[{arrayBuffer:i,byteOffset:0,byteLength:i.byteLength}]}_removeStringFromArray(e,i){let o=!0;for(;o;){const r=e.indexOf(i);r>-1?e.splice(r,1):o=!1}}_addAttributes(e={}){const i={};for(const o in e){const r=e[o],n=this._getGltfAttributeName(o),a=this.addBinaryBuffer(r.value,r);i[n]=a}return i}_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,i){const o={min:null,max:null};if(e.length<i)return o;o.min=[],o.max=[];const r=e.subarray(0,i);for(const n of r)o.min.push(n),o.max.push(n);for(let n=i;n<e.length;n+=i)for(let a=0;a<i;a++)o.min[0+a]=Math.min(o.min[0+a],e[n+a]),o.max[0+a]=Math.max(o.max[0+a],e[n+a]);return o}}function TW(t){return(t%1+1)%1}const DW={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16,BOOLEAN:1,STRING:1,ENUM:1},VIt={INT8:Int8Array,UINT8:Uint8Array,INT16:Int16Array,UINT16:Uint16Array,INT32:Int32Array,UINT32:Uint32Array,INT64:BigInt64Array,UINT64:BigUint64Array,FLOAT32:Float32Array,FLOAT64:Float64Array},RW={INT8:1,UINT8:1,INT16:2,UINT16:2,INT32:4,UINT32:4,INT64:8,UINT64:8,FLOAT32:4,FLOAT64:8};function aP(t,e){return RW[e]*DW[t]}function r7(t,e,i,o){if(i!=="UINT8"&&i!=="UINT16"&&i!=="UINT32"&&i!=="UINT64")return null;const r=t.getTypedArrayForBufferView(e),n=n7(r,"SCALAR",i,o+1);return n instanceof BigInt64Array||n instanceof BigUint64Array?null:n}function n7(t,e,i,o=1){const r=DW[e],n=VIt[i],a=RW[i],s=o*r,l=s*a;let c=t.buffer,d=t.byteOffset;return d%a!==0&&(c=new Uint8Array(c).slice(d,d+l).buffer,d=0),new n(c,d,s)}function sP(t,e,i){const o=`TEXCOORD_${e.texCoord||0}`,r=i.attributes[o],n=t.getTypedArrayForAccessor(r),a=t.gltf.json,s=e.index,l=a.textures?.[s]?.source;if(typeof l<"u"){const c=a.images?.[l]?.mimeType,d=t.gltf.images?.[l];if(d&&typeof d.width<"u"){const u=[];for(let h=0;h<n.length;h+=2){const p=zIt(d,c,n,h,e.channels);u.push(p)}return u}}return[]}function LW(t,e,i,o,r){if(!i?.length)return;const n=[];for(const d of i){let u=o.findIndex(h=>h===d);u===-1&&(u=o.push(d)-1),n.push(u)}const a=new Uint32Array(n),s=t.gltf.buffers.push({arrayBuffer:a.buffer,byteOffset:a.byteOffset,byteLength:a.byteLength})-1,l=t.addBufferView(a,s,0),c=t.addAccessor(l,{size:1,componentType:o7(a),count:a.length});r.attributes[e]=c}function zIt(t,e,i,o,r=[0]){const n={r:{offset:0,shift:0},g:{offset:1,shift:8},b:{offset:2,shift:16},a:{offset:3,shift:24}},a=i[o],s=i[o+1];let l=1;e&&(e.indexOf("image/jpeg")!==-1||e.indexOf("image/png")!==-1)&&(l=4);const c=HIt(a,s,t,l);let d=0;for(const u of r){const h=typeof u=="number"?Object.values(n)[u]:n[u],p=c+h.offset,A=xW(t);if(A.data.length<=p)throw new Error(`${A.data.length} <= ${p}`);const f=A.data[p];d|=f<<h.shift}return d}function HIt(t,e,i,o=1){const r=i.width,n=TW(t)*(r-1),a=Math.round(n),s=i.height,l=TW(e)*(s-1),c=Math.round(l),d=i.components?i.components:o;return(c*r+a)*d}function _W(t,e,i,o,r){const n=[];for(let a=0;a<e;a++){const s=i[a],l=i[a+1]-i[a];if(l+s>o)break;const c=s/r,d=l/r;n.push(t.slice(c,c+d))}return n}function FW(t,e,i){const o=[];for(let r=0;r<e;r++){const n=r*i;o.push(t.slice(n,n+i))}return o}function OW(t,e,i,o){if(i)throw new Error("Not implemented - arrayOffsets for strings is specified");if(o){const r=[],n=new TextDecoder("utf8");let a=0;for(let s=0;s<t;s++){const l=o[s+1]-o[s];if(l+a<=e.length){const c=e.subarray(a,l+a),d=n.decode(c);r.push(d),a+=l}}return r}return[]}const $p="EXT_mesh_features",qIt=$p;async function QIt(t,e){const i=new mr(t);KIt(i,e)}function GIt(t,e){const i=new mr(t);return ZIt(i),i.createBinaryChunk(),i.gltf}function KIt(t,e){const i=t.gltf.json;if(i.meshes)for(const o of i.meshes)for(const r of o.primitives)JIt(t,r,e)}function JIt(t,e,i){if(!i?.gltf?.loadBuffers)return;const o=e.extensions?.[$p]?.featureIds;if(o)for(const r of o){let n;if(typeof r.attribute<"u"){const a=`_FEATURE_ID_${r.attribute}`,s=e.attributes[a];n=t.getTypedArrayForAccessor(s)}else typeof r.texture<"u"&&i?.gltf?.loadImages?n=sP(t,r.texture,e):n=[];r.data=n}}function ZIt(t,e){const i=t.gltf.json.meshes;if(i)for(const o of i)for(const r of o.primitives)YIt(t,r)}function WIt(t,e,i,o){e.extensions||(e.extensions={});let r=e.extensions[$p];r||(r={featureIds:[]},e.extensions[$p]=r);const{featureIds:n}=r,a={featureCount:i.length,propertyTable:o,data:i};n.push(a),t.addObjectExtension(e,$p,r)}function YIt(t,e){const i=e.extensions?.[$p];if(!i)return;const o=i.featureIds;o.forEach((r,n)=>{if(r.data){const{accessorKey:a,index:s}=XIt(e.attributes),l=new Uint32Array(r.data);o[n]={featureCount:l.length,propertyTable:r.propertyTable,attribute:s},t.gltf.buffers.push({arrayBuffer:l.buffer,byteOffset:l.byteOffset,byteLength:l.byteLength});const c=t.addBufferView(l),d=t.addAccessor(c,{size:1,componentType:o7(l),count:l.length});e.attributes[a]=d}})}function XIt(t){const e="_FEATURE_ID_",i=Object.keys(t).filter(r=>r.indexOf(e)===0);let o=-1;for(const r of i){const n=Number(r.substring(e.length));n>o&&(o=n)}return o++,{accessorKey:`${e}${o}`,index:o}}const $It=Object.freeze(Object.defineProperty({__proto__:null,createExtMeshFeatures:WIt,decode:QIt,encode:GIt,name:qIt},Symbol.toStringTag,{value:"Module"})),e1="EXT_structural_metadata",eSt=e1;async function tSt(t,e){const i=new mr(t);oSt(i,e)}function iSt(t,e){const i=new mr(t);return ySt(i),i.createBinaryChunk(),i.gltf}function oSt(t,e){if(!e.gltf?.loadBuffers)return;const i=t.getExtension(e1);i&&(e.gltf?.loadImages&&rSt(t,i),nSt(t,i))}function rSt(t,e){const i=e.propertyTextures,o=t.gltf.json;if(i&&o.meshes)for(const r of o.meshes)for(const n of r.primitives)sSt(t,i,n,e)}function nSt(t,e){const i=e.schema;if(!i)return;const o=i.classes,r=e.propertyTables;if(o&&r)for(const n in o){const a=aSt(r,n);a&&cSt(t,i,a)}}function aSt(t,e){for(const i of t)if(i.class===e)return i;return null}function sSt(t,e,i,o){if(!e)return;const r=i.extensions?.[e1]?.propertyTextures;if(r)for(const n of r){const a=e[n];lSt(t,a,i,o)}}function lSt(t,e,i,o){if(!e.properties)return;o.dataAttributeNames||(o.dataAttributeNames=[]);const r=e.class;for(const n in e.properties){const a=`${r}_${n}`,s=e.properties?.[n];if(!s)continue;s.data||(s.data=[]);const l=s.data,c=sP(t,s,i);c!==null&&(LW(t,a,c,l,i),s.data=l,o.dataAttributeNames.push(a))}}function cSt(t,e,i){const o=e.classes?.[i.class];if(!o)throw new Error(`Incorrect data in the EXT_structural_metadata extension: no schema class with name ${i.class}`);const r=i.count;for(const n in o.properties){const a=o.properties[n],s=i.properties?.[n];if(s){const l=dSt(t,e,a,r,s);s.data=l}}}function dSt(t,e,i,o,r){let n=[];const a=r.values,s=t.getTypedArrayForBufferView(a),l=uSt(t,i,r,o),c=hSt(t,r,o);switch(i.type){case"SCALAR":case"VEC2":case"VEC3":case"VEC4":case"MAT2":case"MAT3":case"MAT4":{n=pSt(i,o,s,l);break}case"BOOLEAN":throw new Error(`Not implemented - classProperty.type=${i.type}`);case"STRING":{n=OW(o,s,l,c);break}case"ENUM":{n=fSt(e,i,o,s,l);break}default:throw new Error(`Unknown classProperty type ${i.type}`)}return n}function uSt(t,e,i,o){return e.array&&typeof e.count>"u"&&typeof i.arrayOffsets<"u"?r7(t,i.arrayOffsets,i.arrayOffsetType||"UINT32",o):null}function hSt(t,e,i){return typeof e.stringOffsets<"u"?r7(t,e.stringOffsets,e.stringOffsetType||"UINT32",i):null}function pSt(t,e,i,o){const r=t.array,n=t.count,a=aP(t.type,t.componentType),s=i.byteLength/a;let l;return t.componentType?l=n7(i,t.type,t.componentType,s):l=i,r?o?_W(l,e,o,i.length,a):n?FW(l,e,n):[]:l}function fSt(t,e,i,o,r){const n=e.enumType;if(!n)throw new Error("Incorrect data in the EXT_structural_metadata extension: classProperty.enumType is not set for type ENUM");const a=t.enums?.[n];if(!a)throw new Error(`Incorrect data in the EXT_structural_metadata extension: schema.enums does't contain ${n}`);const s=a.valueType||"UINT16",l=aP(e.type,s),c=o.byteLength/l;let d=n7(o,e.type,s,c);if(d||(d=o),e.array){if(r)return ASt({valuesData:d,numberOfElements:i,arrayOffsets:r,valuesDataBytesLength:o.length,elementSize:l,enumEntry:a});const u=e.count;return u?gSt(d,i,u,a):[]}return lP(d,0,i,a)}function ASt(t){const{valuesData:e,numberOfElements:i,arrayOffsets:o,valuesDataBytesLength:r,elementSize:n,enumEntry:a}=t,s=[];for(let l=0;l<i;l++){const c=o[l],d=o[l+1]-o[l];if(d+c>r)break;const u=c/n,h=d/n,p=lP(e,u,h,a);s.push(p)}return s}function gSt(t,e,i,o){const r=[];for(let n=0;n<e;n++){const a=i*n,s=lP(t,a,i,o);r.push(s)}return r}function lP(t,e,i,o){const r=[];for(let n=0;n<i;n++)if(t instanceof BigInt64Array||t instanceof BigUint64Array)r.push("");else{const a=t[e+n],s=mSt(o,a);s?r.push(s.name):r.push("")}return r}function mSt(t,e){for(const i of t.values)if(i.value===e)return i;return null}const vSt="schemaClassId";function ySt(t,e){const i=t.getExtension(e1);if(i&&i.propertyTables)for(const o of i.propertyTables){const r=o.class,n=i.schema?.classes?.[r];o.properties&&n&&bSt(o,n,t)}}function bSt(t,e,i){for(const o in t.properties){const r=t.properties[o].data;if(r){const n=e.properties[o];if(n){const a=kSt(r,n,i);t.properties[o]=a}}}}function wSt(t,e,i=vSt){let o=t.getExtension(e1);o||(o=t.addExtension(e1)),o.schema=CSt(e,i,o.schema);const r=xSt(e,i,o.schema);return o.propertyTables||(o.propertyTables=[]),o.propertyTables.push(r)-1}function CSt(t,e,i){const o=i??{id:"schema_id"},r={properties:{}};for(const n of t){const a={type:n.elementType,componentType:n.componentType};r.properties[n.name]=a}return o.classes={},o.classes[e]=r,o}function xSt(t,e,i){const o={class:e,count:0};let r=0;const n=i.classes?.[e];for(const a of t){if(r===0&&(r=a.values.length),r!==a.values.length&&a.values.length)throw new Error("Illegal values in attributes");n?.properties[a.name]&&(o.properties||(o.properties={}),o.properties[a.name]={values:0,data:a.values})}return o.count=r,o}function kSt(t,e,i){const o={values:0};if(e.type==="STRING"){const{stringData:r,stringOffsets:n}=BSt(t);o.stringOffsets=cP(n,i),o.values=cP(r,i)}else if(e.type==="SCALAR"&&e.componentType){const r=ESt(t,e.componentType);o.values=cP(r,i)}return o}const MSt={INT8:Int8Array,UINT8:Uint8Array,INT16:Int16Array,UINT16:Uint16Array,INT32:Int32Array,UINT32:Uint32Array,INT64:Int32Array,UINT64:Uint32Array,FLOAT32:Float32Array,FLOAT64:Float64Array};function ESt(t,e){const i=[];for(const r of t)i.push(Number(r));const o=MSt[e];if(!o)throw new Error("Illegal component type");return new o(i)}function BSt(t){const e=new TextEncoder,i=[];let o=0;for(const l of t){const c=e.encode(l);o+=c.length,i.push(c)}const r=new Uint8Array(o),n=[];let a=0;for(const l of i)r.set(l,a),n.push(a),a+=l.length;n.push(a);const s=new Uint32Array(n);return{stringData:r,stringOffsets:s}}function cP(t,e){return e.gltf.buffers.push({arrayBuffer:t.buffer,byteOffset:t.byteOffset,byteLength:t.byteLength}),e.addBufferView(t)}const PSt=Object.freeze(Object.defineProperty({__proto__:null,createExtStructuralMetadata:wSt,decode:tSt,encode:iSt,name:eSt},Symbol.toStringTag,{value:"Module"})),UW="EXT_feature_metadata",ISt=UW;async function SSt(t,e){const i=new mr(t);TSt(i,e)}function TSt(t,e){if(!e.gltf?.loadBuffers)return;const i=t.getExtension(UW);i&&(e.gltf?.loadImages&&DSt(t,i),RSt(t,i))}function DSt(t,e){const i=e.schema;if(!i)return;const o=i.classes,{featureTextures:r}=e;if(o&&r)for(const n in o){const a=o[n],s=_St(r,n);s&&OSt(t,s,a)}}function RSt(t,e){const i=e.schema;if(!i)return;const o=i.classes,r=e.featureTables;if(o&&r)for(const n in o){const a=LSt(r,n);a&&FSt(t,i,a)}}function LSt(t,e){for(const i in t){const o=t[i];if(o.class===e)return o}return null}function _St(t,e){for(const i in t){const o=t[i];if(o.class===e)return o}return null}function FSt(t,e,i){if(!i.class)return;const o=e.classes?.[i.class];if(!o)throw new Error(`Incorrect data in the EXT_structural_metadata extension: no schema class with name ${i.class}`);const r=i.count;for(const n in o.properties){const a=o.properties[n],s=i.properties?.[n];if(s){const l=USt(t,e,a,r,s);s.data=l}}}function OSt(t,e,i){const o=e.class;for(const r in i.properties){const n=e?.properties?.[r];if(n){const a=HSt(t,n,o);n.data=a}}}function USt(t,e,i,o,r){let n=[];const a=r.bufferView,s=t.getTypedArrayForBufferView(a),l=NSt(t,i,r,o),c=jSt(t,i,r,o);return i.type==="STRING"||i.componentType==="STRING"?n=OW(o,s,l,c):VSt(i)&&(n=zSt(i,o,s,l)),n}function NSt(t,e,i,o){return e.type==="ARRAY"&&typeof e.componentCount>"u"&&typeof i.arrayOffsetBufferView<"u"?r7(t,i.arrayOffsetBufferView,i.offsetType||"UINT32",o):null}function jSt(t,e,i,o){return typeof i.stringOffsetBufferView<"u"?r7(t,i.stringOffsetBufferView,i.offsetType||"UINT32",o):null}function VSt(t){const e=["UINT8","INT16","UINT16","INT32","UINT32","INT64","UINT64","FLOAT32","FLOAT64"];return e.includes(t.type)||typeof t.componentType<"u"&&e.includes(t.componentType)}function zSt(t,e,i,o){const r=t.type==="ARRAY",n=t.componentCount,a="SCALAR",s=t.componentType||t.type,l=aP(a,s),c=i.byteLength/l,d=n7(i,a,s,c);return r?o?_W(d,e,o,i.length,l):n?FW(d,e,n):[]:d}function HSt(t,e,i){const o=t.gltf.json;if(!o.meshes)return[];const r=[];for(const n of o.meshes)for(const a of n.primitives)qSt(t,i,e,r,a);return r}function qSt(t,e,i,o,r){const n={channels:i.channels,...i.texture},a=sP(t,n,r);a&&LW(t,e,a,o,r)}const QSt=Object.freeze(Object.defineProperty({__proto__:null,decode:SSt,name:ISt},Symbol.toStringTag,{value:"Module"})),GSt="4.3.3",KSt="4.3.3",a7={TRANSCODER:"basis_transcoder.js",TRANSCODER_WASM:"basis_transcoder.wasm",ENCODER:"basis_encoder.js",ENCODER_WASM:"basis_encoder.wasm"};let NW;async function jW(t){return fBt(t.modules),ABt("basis")||(NW||=JSt(t),await NW)}async function JSt(t){let e=null,i=null;return[e,i]=await Promise.all([await Lu(a7.TRANSCODER,"textures",t),await Lu(a7.TRANSCODER_WASM,"textures",t)]),e=e||globalThis.BASIS,await ZSt(e,i)}function ZSt(t,e){const i={};return e&&(i.wasmBinary=e),new Promise(o=>{t(i).then(r=>{const{BasisFile:n,initializeBasis:a}=r;a(),o({BasisFile:n})})})}let dP;async function VW(t){const e=t.modules||{};return e.basisEncoder?e.basisEncoder:(dP=dP||WSt(t),await dP)}async function WSt(t){let e=null,i=null;return[e,i]=await Promise.all([await Lu(a7.ENCODER,"textures",t),await Lu(a7.ENCODER_WASM,"textures",t)]),e=e||globalThis.BASIS,await YSt(e,i)}function YSt(t,e){const i={};return e&&(i.wasmBinary=e),new Promise(o=>{t(i).then(r=>{const{BasisFile:n,KTX2File:a,initializeBasis:s,BasisEncoder:l}=r;s(),o({BasisFile:n,KTX2File:a,BasisEncoder:l})})})}const t1={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},XSt=["","WEBKIT_","MOZ_"],zW={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 s7=null;function $St(t){if(!s7){t=t||eTt()||void 0,s7=new Set;for(const e of XSt)for(const i in zW)if(t&&t.getExtension(`${e}${i}`)){const o=zW[i];s7.add(o)}}return s7}function eTt(){try{return document.createElement("canvas").getContext("webgl")}catch{return null}}const ea=[171,75,84,88,32,50,48,187,13,10,26,10];function tTt(t){const e=new Uint8Array(t);return!(e.byteLength<ea.length||e[0]!==ea[0]||e[1]!==ea[1]||e[2]!==ea[2]||e[3]!==ea[3]||e[4]!==ea[4]||e[5]!==ea[5]||e[6]!==ea[6]||e[7]!==ea[7]||e[8]!==ea[8]||e[9]!==ea[9]||e[10]!==ea[10]||e[11]!==ea[11])}const iTt={etc1:{basisFormat:0,compressed:!0,format:t1.COMPRESSED_RGB_ETC1_WEBGL},etc2:{basisFormat:1,compressed:!0},bc1:{basisFormat:2,compressed:!0,format:t1.COMPRESSED_RGB_S3TC_DXT1_EXT},bc3:{basisFormat:3,compressed:!0,format:t1.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:t1.COMPRESSED_RGB_PVRTC_4BPPV1_IMG},"pvrtc1-4-rgba":{basisFormat:9,compressed:!0,format:t1.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG},"astc-4x4":{basisFormat:10,compressed:!0,format:t1.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 oTt(t,e){if(e.basis.containerFormat==="auto"){if(tTt(t)){const o=await VW(e);return HW(o.KTX2File,t,e)}const{BasisFile:i}=await jW(e);return uP(i,t,e)}if(e.basis.module==="encoder"){const i=await VW(e);return e.basis.containerFormat==="ktx2"?HW(i.KTX2File,t,e):uP(i.BasisFile,t,e)}else{const{BasisFile:i}=await jW(e);return uP(i,t,e)}}function uP(t,e,i){const o=new t(new Uint8Array(e));try{if(!o.startTranscoding())throw new Error("Failed to start basis transcoding");const r=o.getNumImages(),n=[];for(let a=0;a<r;a++){const s=o.getNumLevels(a),l=[];for(let c=0;c<s;c++)l.push(rTt(o,a,c,i));n.push(l)}return n}finally{o.close(),o.delete()}}function rTt(t,e,i,o){const r=t.getImageWidth(e,i),n=t.getImageHeight(e,i),a=t.getHasAlpha(),{compressed:s,format:l,basisFormat:c}=qW(o,a),d=t.getImageTranscodedSizeInBytes(e,i,c),u=new Uint8Array(d);if(!t.transcodeImage(u,e,i,c,0,0))throw new Error("failed to start Basis transcoding");return{width:r,height:n,data:u,compressed:s,format:l,hasAlpha:a}}function HW(t,e,i){const o=new t(new Uint8Array(e));try{if(!o.startTranscoding())throw new Error("failed to start KTX2 transcoding");const r=o.getLevels(),n=[];for(let a=0;a<r;a++)n.push(nTt(o,a,i));return[n]}finally{o.close(),o.delete()}}function nTt(t,e,i){const{alphaFlag:o,height:r,width:n}=t.getImageLevelInfo(e,0,0),{compressed:a,format:s,basisFormat:l}=qW(i,o),c=t.getImageTranscodedSizeInBytes(e,0,0,l),d=new Uint8Array(c);if(!t.transcodeImage(d,e,0,0,l,0,-1,-1))throw new Error("Failed to transcode KTX2 image");return{width:n,height:r,data:d,compressed:a,levelSize:c,hasAlpha:o,format:s}}function qW(t,e){let i=t&&t.basis&&t.basis.format;return i==="auto"&&(i=QW()),typeof i=="object"&&(i=e?i.alpha:i.noAlpha),i=i.toLowerCase(),iTt[i]}function QW(){const t=$St();return t.has("astc")?"astc-4x4":t.has("dxt")?{alpha:"bc3",noAlpha:"bc1"}:t.has("pvrtc")?{alpha:"pvrtc1-4-rgba",noAlpha:"pvrtc1-4-rgb"}:t.has("etc1")?"etc1":t.has("etc2")?"etc2":"rgb565"}const aTt={dataType:null,batchType:null,name:"Basis",id:"basis",module:"textures",version:KSt,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"}}},sTt={...aTt,parse:oTt},i1=!0,GW=1735152710,hP=12,l7=8,lTt=1313821514,cTt=5130562,dTt=0,uTt=0,hTt=1;function pTt(t,e=0){return`${String.fromCharCode(t.getUint8(e+0))}${String.fromCharCode(t.getUint8(e+1))}${String.fromCharCode(t.getUint8(e+2))}${String.fromCharCode(t.getUint8(e+3))}`}function fTt(t,e=0,i={}){const o=new DataView(t),{magic:r=GW}=i,n=o.getUint32(e,!1);return n===r||n===GW}function ATt(t,e,i=0,o={}){const r=new DataView(e),n=pTt(r,i+0),a=r.getUint32(i+4,i1),s=r.getUint32(i+8,i1);switch(Object.assign(t,{header:{byteOffset:i,byteLength:s,hasBinChunk:!1},type:n,version:a,json:{},binChunks:[]}),i+=hP,t.version){case 1:return gTt(t,r,i);case 2:return mTt(t,r,i,o={});default:throw new Error(`Invalid GLB version ${t.version}. Only supports version 1 and 2.`)}}function gTt(t,e,i){Jl(t.header.byteLength>hP+l7);const o=e.getUint32(i+0,i1),r=e.getUint32(i+4,i1);return i+=l7,Jl(r===dTt),pP(t,e,i,o),i+=o,i+=fP(t,e,i,t.header.byteLength),i}function mTt(t,e,i,o){return Jl(t.header.byteLength>hP+l7),vTt(t,e,i,o),i+t.header.byteLength}function vTt(t,e,i,o){for(;i+8<=t.header.byteLength;){const r=e.getUint32(i+0,i1),n=e.getUint32(i+4,i1);switch(i+=l7,n){case lTt:pP(t,e,i,r);break;case cTt:fP(t,e,i,r);break;case uTt:o.strict||pP(t,e,i,r);break;case hTt:o.strict||fP(t,e,i,r);break}i+=Vv(r,4)}return i}function pP(t,e,i,o){const r=new Uint8Array(e.buffer,i,o),n=new TextDecoder("utf8").decode(r);return t.json=JSON.parse(n),Vv(o,4)}function fP(t,e,i,o){return t.header.hasBinChunk=!0,t.binChunks.push({byteOffset:i,byteLength:o,arrayBuffer:e.buffer}),Vv(o,4)}function KW(t,e){if(t.startsWith("data:")||t.startsWith("http:")||t.startsWith("https:"))return t;const i=e.baseUri||e.uri;if(!i)throw new Error(`'baseUri' must be provided to resolve relative url ${t}`);return i.substr(0,i.lastIndexOf("/")+1)+t}const yTt="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",bTt="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",wTt=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]),CTt=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]),xTt={0:"",1:"meshopt_decodeFilterOct",2:"meshopt_decodeFilterQuat",3:"meshopt_decodeFilterExp",NONE:"",OCTAHEDRAL:"meshopt_decodeFilterOct",QUATERNION:"meshopt_decodeFilterQuat",EXPONENTIAL:"meshopt_decodeFilterExp"},kTt={0:"meshopt_decodeVertexBuffer",1:"meshopt_decodeIndexBuffer",2:"meshopt_decodeIndexSequence",ATTRIBUTES:"meshopt_decodeVertexBuffer",TRIANGLES:"meshopt_decodeIndexBuffer",INDICES:"meshopt_decodeIndexSequence"};async function MTt(t,e,i,o,r,n="NONE"){const a=await ETt();ITt(a,a.exports[kTt[r]],t,e,i,o,a.exports[xTt[n||"NONE"]])}let AP;async function ETt(){return AP||(AP=BTt()),AP}async function BTt(){let t=yTt;WebAssembly.validate(wTt)&&(t=bTt,console.log("Warning: meshopt_decoder is using experimental SIMD support"));const e=await WebAssembly.instantiate(PTt(t),{});return await e.instance.exports.__wasm_call_ctors(),e.instance}function PTt(t){const e=new Uint8Array(t.length);for(let o=0;o<t.length;++o){const r=t.charCodeAt(o);e[o]=r>96?r-71:r>64?r-65:r>47?r+4:r>46?63:62}let i=0;for(let o=0;o<t.length;++o)e[i++]=e[o]<60?CTt[e[o]]:(e[o]-60)*64+e[++o];return e.buffer.slice(0,i)}function ITt(t,e,i,o,r,n,a){const s=t.exports.sbrk,l=o+3&-4,c=s(l*r),d=s(n.length),u=new Uint8Array(t.exports.memory.buffer);u.set(n,d);const h=e(c,o,r,d,n.length);if(h===0&&a&&a(c,l,r),i.set(u.subarray(c,c+o*r)),s(c-s(0)),h!==0)throw new Error(`Malformed buffer data: ${h}`)}const c7="EXT_meshopt_compression",STt=c7;async function TTt(t,e){const i=new mr(t);if(!e?.gltf?.decompressMeshes||!e.gltf?.loadBuffers)return;const o=[];for(const r of t.json.bufferViews||[])o.push(DTt(i,r));await Promise.all(o),i.removeExtension(c7)}async function DTt(t,e){const i=t.getObjectExtension(e,c7);if(i){const{byteOffset:o=0,byteLength:r=0,byteStride:n,count:a,mode:s,filter:l="NONE",buffer:c}=i,d=t.gltf.buffers[c],u=new Uint8Array(d.arrayBuffer,d.byteOffset+o,r),h=new Uint8Array(t.gltf.buffers[e.buffer].arrayBuffer,e.byteOffset,e.byteLength);await MTt(h,a,n,u,s,l),t.removeObjectExtension(e,c7)}}const RTt=Object.freeze(Object.defineProperty({__proto__:null,decode:TTt,name:STt},Symbol.toStringTag,{value:"Module"})),o1="EXT_texture_webp",LTt=o1;function _Tt(t,e){const i=new mr(t);if(!IIt("image/webp")){if(i.getRequiredExtensions().includes(o1))throw new Error(`gltf: Required extension ${o1} not supported by browser`);return}const{json:o}=i;for(const r of o.textures||[]){const n=i.getObjectExtension(r,o1);n&&(r.source=n.source),i.removeObjectExtension(r,o1)}i.removeExtension(o1)}const FTt=Object.freeze(Object.defineProperty({__proto__:null,name:LTt,preprocess:_Tt},Symbol.toStringTag,{value:"Module"})),d7="KHR_texture_basisu",OTt=d7;function UTt(t,e){const i=new mr(t),{json:o}=i;for(const r of o.textures||[]){const n=i.getObjectExtension(r,d7);n&&(r.source=n.source,i.removeObjectExtension(r,d7))}i.removeExtension(d7)}const NTt=Object.freeze(Object.defineProperty({__proto__:null,name:OTt,preprocess:UTt},Symbol.toStringTag,{value:"Module"})),jTt="4.3.3",VTt={dataType:null,batchType:null,name:"Draco",id:"draco",module:"draco",version:jTt,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 zTt(t,e,i){const o=ZW(e.metadata),r=[],n=HTt(e.attributes);for(const a in t){const s=t[a],l=JW(a,s,n[a]);r.push(l)}if(i){const a=JW("indices",i);r.push(a)}return{fields:r,metadata:o}}function HTt(t){const e={};for(const i in t){const o=t[i];e[o.name||"undefined"]=o}return e}function JW(t,e,i){const o=i?ZW(i.metadata):void 0;return JPt(t,e,o)}function ZW(t){Object.entries(t);const e={};for(const i in t)e[`${i}.string`]=JSON.stringify(t[i]);return e}const WW={POSITION:"POSITION",NORMAL:"NORMAL",COLOR:"COLOR_0",TEX_COORD:"TEXCOORD_0"},qTt={1:Int8Array,2:Uint8Array,3:Int16Array,4:Uint16Array,5:Int32Array,6:Uint32Array,9:Float32Array},QTt=4;class GTt{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,i={}){const o=new this.draco.DecoderBuffer;o.Init(new Int8Array(e),e.byteLength),this._disableAttributeTransforms(i);const r=this.decoder.GetEncodedGeometryType(o),n=r===this.draco.TRIANGULAR_MESH?new this.draco.Mesh:new this.draco.PointCloud;try{let a;switch(r){case this.draco.TRIANGULAR_MESH:a=this.decoder.DecodeBufferToMesh(o,n);break;case this.draco.POINT_CLOUD:a=this.decoder.DecodeBufferToPointCloud(o,n);break;default:throw new Error("DRACO: Unknown geometry type.")}if(!a.ok()||!n.ptr){const u=`DRACO decompression failed: ${a.error_msg()}`;throw new Error(u)}const s=this._getDracoLoaderData(n,r,i),l=this._getMeshData(n,s,i),c=KPt(l.attributes),d=zTt(l.attributes,s,l.indices);return{loader:"draco",loaderData:s,header:{vertexCount:n.num_points(),boundingBox:c},...l,schema:d}}finally{this.draco.destroy(o),n&&this.draco.destroy(n)}}_getDracoLoaderData(e,i,o){const r=this._getTopLevelMetadata(e),n=this._getDracoAttributes(e,o);return{geometry_type:i,num_attributes:e.num_attributes(),num_points:e.num_points(),num_faces:e instanceof this.draco.Mesh?e.num_faces():0,metadata:r,attributes:n}}_getDracoAttributes(e,i){const o={};for(let r=0;r<e.num_attributes();r++){const n=this.decoder.GetAttribute(e,r),a=this._getAttributeMetadata(e,r);o[n.unique_id()]={unique_id:n.unique_id(),attribute_type:n.attribute_type(),data_type:n.data_type(),num_components:n.num_components(),byte_offset:n.byte_offset(),byte_stride:n.byte_stride(),normalized:n.normalized(),attribute_index:r,metadata:a};const s=this._getQuantizationTransform(n,i);s&&(o[n.unique_id()].quantization_transform=s);const l=this._getOctahedronTransform(n,i);l&&(o[n.unique_id()].octahedron_transform=l)}return o}_getMeshData(e,i,o){const r=this._getMeshAttributes(i,e,o);if(!r.POSITION)throw new Error("DRACO: No position attribute found.");return e instanceof this.draco.Mesh?o.topology==="triangle-strip"?{topology:"triangle-strip",mode:4,attributes:r,indices:{value:this._getTriangleStripIndices(e),size:1}}:{topology:"triangle-list",mode:5,attributes:r,indices:{value:this._getTriangleListIndices(e),size:1}}:{topology:"point-list",mode:0,attributes:r}}_getMeshAttributes(e,i,o){const r={};for(const n of Object.values(e.attributes)){const a=this._deduceAttributeName(n,o);n.name=a;const s=this._getAttributeValues(i,n);if(s){const{value:l,size:c}=s;r[a]={value:l,size:c,byteOffset:n.byte_offset,byteStride:n.byte_stride,normalized:n.normalized}}}return r}_getTriangleListIndices(e){const i=e.num_faces()*3,o=i*QTt,r=this.draco._malloc(o);try{return this.decoder.GetTrianglesUInt32Array(e,o,r),new Uint32Array(this.draco.HEAPF32.buffer,r,i).slice()}finally{this.draco._free(r)}}_getTriangleStripIndices(e){const i=new this.draco.DracoInt32Array;try{return this.decoder.GetTriangleStripsFromMesh(e,i),ZTt(i)}finally{this.draco.destroy(i)}}_getAttributeValues(e,i){const o=qTt[i.data_type];if(!o)return console.warn(`DRACO: Unsupported attribute type ${i.data_type}`),null;const r=i.num_components,n=e.num_points()*r,a=n*o.BYTES_PER_ELEMENT,s=KTt(this.draco,o);let l;const c=this.draco._malloc(a);try{const d=this.decoder.GetAttribute(e,i.attribute_index);this.decoder.GetAttributeDataArrayForAllPoints(e,d,s,a,c),l=new o(this.draco.HEAPF32.buffer,c,n).slice()}finally{this.draco._free(c)}return{value:l,size:r}}_deduceAttributeName(e,i){const o=e.unique_id;for(const[a,s]of Object.entries(i.extraAttributes||{}))if(s===o)return a;const r=e.attribute_type;for(const a in WW)if(this.draco[a]===r)return WW[a];const n=i.attributeNameEntry||"name";return e.metadata[n]?e.metadata[n].string:`CUSTOM_ATTRIBUTE_${o}`}_getTopLevelMetadata(e){const i=this.decoder.GetMetadata(e);return this._getDracoMetadata(i)}_getAttributeMetadata(e,i){const o=this.decoder.GetAttributeMetadata(e,i);return this._getDracoMetadata(o)}_getDracoMetadata(e){if(!e||!e.ptr)return{};const i={},o=this.metadataQuerier.NumEntries(e);for(let r=0;r<o;r++){const n=this.metadataQuerier.GetEntryName(e,r);i[n]=this._getDracoMetadataField(e,n)}return i}_getDracoMetadataField(e,i){const o=new this.draco.DracoInt32Array;try{this.metadataQuerier.GetIntEntryArray(e,i,o);const r=JTt(o);return{int:this.metadataQuerier.GetIntEntry(e,i),string:this.metadataQuerier.GetStringEntry(e,i),double:this.metadataQuerier.GetDoubleEntry(e,i),intArray:r}}finally{this.draco.destroy(o)}}_disableAttributeTransforms(e){const{quantizedAttributes:i=[],octahedronAttributes:o=[]}=e,r=[...i,...o];for(const n of r)this.decoder.SkipAttributeTransform(this.draco[n])}_getQuantizationTransform(e,i){const{quantizedAttributes:o=[]}=i,r=e.attribute_type();if(o.map(n=>this.decoder[n]).includes(r)){const n=new this.draco.AttributeQuantizationTransform;try{if(n.InitFromAttribute(e))return{quantization_bits:n.quantization_bits(),range:n.range(),min_values:new Float32Array([1,2,3]).map(a=>n.min_value(a))}}finally{this.draco.destroy(n)}}return null}_getOctahedronTransform(e,i){const{octahedronAttributes:o=[]}=i,r=e.attribute_type();if(o.map(n=>this.decoder[n]).includes(r)){const n=new this.draco.AttributeQuantizationTransform;try{if(n.InitFromAttribute(e))return{quantization_bits:n.quantization_bits()}}finally{this.draco.destroy(n)}}return null}}function KTt(t,e){switch(e){case Float32Array:return t.DT_FLOAT32;case Int8Array:return t.DT_INT8;case Int16Array:return t.DT_INT16;case Int32Array:return t.DT_INT32;case Uint8Array:return t.DT_UINT8;case Uint16Array:return t.DT_UINT16;case Uint32Array:return t.DT_UINT32;default:return t.DT_INVALID}}function JTt(t){const e=t.size(),i=new Int32Array(e);for(let o=0;o<e;o++)i[o]=t.GetValue(o);return i}function ZTt(t){const e=t.size(),i=new Int32Array(e);for(let o=0;o<e;o++)i[o]=t.GetValue(o);return i}const WTt="1.5.6",YTt="1.4.1",gP=`https://www.gstatic.com/draco/versioned/decoders/${WTt}`,On={DECODER:"draco_wasm_wrapper.js",DECODER_WASM:"draco_decoder.wasm",FALLBACK_DECODER:"draco_decoder.js",ENCODER:"draco_encoder.js"},mP={[On.DECODER]:`${gP}/${On.DECODER}`,[On.DECODER_WASM]:`${gP}/${On.DECODER_WASM}`,[On.FALLBACK_DECODER]:`${gP}/${On.FALLBACK_DECODER}`,[On.ENCODER]:`https://raw.githubusercontent.com/google/draco/${YTt}/javascript/${On.ENCODER}`};let vP;async function XTt(t){const e=t.modules||{};return e.draco3d?vP||=e.draco3d.createDecoderModule({}).then(i=>({draco:i})):vP||=$Tt(t),await vP}async function $Tt(t){let e,i;return(t.draco&&t.draco.decoderType)==="js"?e=await Lu(mP[On.FALLBACK_DECODER],"draco",t,On.FALLBACK_DECODER):[e,i]=await Promise.all([await Lu(mP[On.DECODER],"draco",t,On.DECODER),await Lu(mP[On.DECODER_WASM],"draco",t,On.DECODER_WASM)]),e=e||globalThis.DracoDecoderModule,await eDt(e,i)}function eDt(t,e){const i={};return e&&(i.wasmBinary=e),new Promise(o=>{t({...i,onModuleLoaded:r=>o({draco:r})})})}const tDt={...VTt,parse:iDt};async function iDt(t,e){const{draco:i}=await XTt(e),o=new GTt(i);try{return o.parseSync(t,e?.draco)}finally{o.destroy()}}function oDt(t){const e={};for(const i in t){const o=t[i];if(i!=="indices"){const r=YW(o);e[i]=r}}return e}function YW(t){const{buffer:e,size:i,count:o}=rDt(t);return{value:e,size:i,byteOffset:0,count:o,type:SW(i),componentType:o7(e)}}function rDt(t){let e=t,i=1,o=0;return t&&t.value&&(e=t.value,i=t.size||1),e&&(ArrayBuffer.isView(e)||(e=nDt(e,Float32Array)),o=e.length/i),{buffer:e,size:i,count:o}}function nDt(t,e,i=!1){return t?Array.isArray(t)?new e(t):i&&!(t instanceof e)?new e(t):t:null}const cd="KHR_draco_mesh_compression",aDt=cd;function sDt(t,e,i){const o=new mr(t);for(const r of XW(o))o.getObjectExtension(r,cd)}async function lDt(t,e,i){if(!e?.gltf?.decompressMeshes)return;const o=new mr(t),r=[];for(const n of XW(o))o.getObjectExtension(n,cd)&&r.push(dDt(o,n,e,i));await Promise.all(r),o.removeExtension(cd)}function cDt(t,e={}){const i=new mr(t);for(const o of i.json.meshes||[])uDt(o),i.addRequiredExtension(cd)}async function dDt(t,e,i,o){const r=t.getObjectExtension(e,cd);if(!r)return;const n=t.getTypedArrayForBufferView(r.bufferView),a=YZ(n.buffer,n.byteOffset),s={...i};delete s["3d-tiles"];const l=await LZ(a,tDt,s,o),c=oDt(l.attributes);for(const[d,u]of Object.entries(c))if(d in e.attributes){const h=e.attributes[d],p=t.getAccessor(h);p?.min&&p?.max&&(u.min=p.min,u.max=p.max)}e.attributes=c,l.indices&&(e.indices=YW(l.indices)),t.removeObjectExtension(e,cd),hDt(e)}function uDt(t,e,i=4,o,r){if(!o.DracoWriter)throw new Error("options.gltf.DracoWriter not provided");const n=o.DracoWriter.encodeSync({attributes:t}),a=r?.parseSync?.({attributes:t}),s=o._addFauxAttributes(a.attributes),l=o.addBufferView(n);return{primitives:[{attributes:s,mode:i,extensions:{[cd]:{bufferView:l,attributes:s}}}]}}function hDt(t){if(!t.attributes&&Object.keys(t.attributes).length>0)throw new Error("glTF: Empty primitive detected: Draco decompression failure?")}function*XW(t){for(const e of t.json.meshes||[])for(const i of e.primitives)yield i}const pDt=Object.freeze(Object.defineProperty({__proto__:null,decode:lDt,encode:cDt,name:aDt,preprocess:sDt},Symbol.toStringTag,{value:"Module"})),fDt={EPSILON:1e-12,debug:!1,precision:4,printTypes:!1,printDegrees:!1,printRowMajor:!0,_cartographicRadians:!1};globalThis.mathgl=globalThis.mathgl||{config:{...fDt}};const xa=globalThis.mathgl.config;function ADt(t,{precision:e=xa.precision}={}){return t=gDt(t),`${parseFloat(t.toPrecision(e))}`}function u7(t){return Array.isArray(t)||ArrayBuffer.isView(t)&&!(t instanceof DataView)}function $W(t,e,i){const o=xa.EPSILON;try{if(t===e)return!0;if(u7(t)&&u7(e)){if(t.length!==e.length)return!1;for(let r=0;r<t.length;++r)if(!$W(t[r],e[r]))return!1;return!0}return t&&t.equals?t.equals(e):e&&e.equals?e.equals(t):typeof t=="number"&&typeof e=="number"?Math.abs(t-e)<=xa.EPSILON*Math.max(1,Math.abs(t),Math.abs(e)):!1}finally{xa.EPSILON=o}}function gDt(t){return Math.round(t/xa.EPSILON)*xa.EPSILON}class eY extends Array{clone(){return new this.constructor().copy(this)}fromArray(e,i=0){for(let o=0;o<this.ELEMENTS;++o)this[o]=e[o+i];return this.check()}toArray(e=[],i=0){for(let o=0;o<this.ELEMENTS;++o)e[i+o]=this[o];return e}toObject(e){return e}from(e){return Array.isArray(e)?this.copy(e):this.fromObject(e)}to(e){return e===this?this:u7(e)?this.toArray(e):this.toObject(e)}toTarget(e){return e?this.to(e):this}toFloat32Array(){return new Float32Array(this)}toString(){return this.formatString(xa)}formatString(e){let i="";for(let o=0;o<this.ELEMENTS;++o)i+=(o>0?", ":"")+ADt(this[o],e);return`${e.printTypes?this.constructor.name:""}[${i}]`}equals(e){if(!e||this.length!==e.length)return!1;for(let i=0;i<this.ELEMENTS;++i)if(!$W(this[i],e[i]))return!1;return!0}exactEquals(e){if(!e||this.length!==e.length)return!1;for(let i=0;i<this.ELEMENTS;++i)if(this[i]!==e[i])return!1;return!0}negate(){for(let e=0;e<this.ELEMENTS;++e)this[e]=-this[e];return this.check()}lerp(e,i,o){if(o===void 0)return this.lerp(this,e,i);for(let r=0;r<this.ELEMENTS;++r){const n=e[r],a=typeof i=="number"?i:i[r];this[r]=n+o*(a-n)}return this.check()}min(e){for(let i=0;i<this.ELEMENTS;++i)this[i]=Math.min(e[i],this[i]);return this.check()}max(e){for(let i=0;i<this.ELEMENTS;++i)this[i]=Math.max(e[i],this[i]);return this.check()}clamp(e,i){for(let o=0;o<this.ELEMENTS;++o)this[o]=Math.min(Math.max(this[o],e[o]),i[o]);return this.check()}add(...e){for(const i of e)for(let o=0;o<this.ELEMENTS;++o)this[o]+=i[o];return this.check()}subtract(...e){for(const i of e)for(let o=0;o<this.ELEMENTS;++o)this[o]-=i[o];return this.check()}scale(e){if(typeof e=="number")for(let i=0;i<this.ELEMENTS;++i)this[i]*=e;else for(let i=0;i<this.ELEMENTS&&i<e.length;++i)this[i]*=e[i];return this.check()}multiplyByScalar(e){for(let i=0;i<this.ELEMENTS;++i)this[i]*=e;return this.check()}check(){if(xa.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 i=0;i<this.ELEMENTS;++i)e=e&&Number.isFinite(this[i]);return e}sub(e){return this.subtract(e)}setScalar(e){for(let i=0;i<this.ELEMENTS;++i)this[i]=e;return this.check()}addScalar(e){for(let i=0;i<this.ELEMENTS;++i)this[i]+=e;return this.check()}subScalar(e){return this.addScalar(-e)}multiplyScalar(e){for(let i=0;i<this.ELEMENTS;++i)this[i]*=e;return this.check()}divideScalar(e){return this.multiplyByScalar(1/e)}clampScalar(e,i){for(let o=0;o<this.ELEMENTS;++o)this[o]=Math.min(Math.max(this[o],e),i);return this.check()}get elements(){return this}}function mDt(t,e){if(t.length!==e)return!1;for(let i=0;i<t.length;++i)if(!Number.isFinite(t[i]))return!1;return!0}function ta(t){if(!Number.isFinite(t))throw new Error(`Invalid number ${JSON.stringify(t)}`);return t}function vDt(t,e,i=""){if(xa.debug&&!mDt(t,e))throw new Error(`math.gl: ${i} some fields set to invalid numbers'`);return t}function tY(t,e){if(!t)throw new Error(`math.gl assertion ${e}`)}class yDt extends eY{get x(){return this[0]}set x(e){this[0]=ta(e)}get y(){return this[1]}set y(e){this[1]=ta(e)}len(){return Math.sqrt(this.lengthSquared())}magnitude(){return this.len()}lengthSquared(){let e=0;for(let i=0;i<this.ELEMENTS;++i)e+=this[i]*this[i];return e}magnitudeSquared(){return this.lengthSquared()}distance(e){return Math.sqrt(this.distanceSquared(e))}distanceSquared(e){let i=0;for(let o=0;o<this.ELEMENTS;++o){const r=this[o]-e[o];i+=r*r}return ta(i)}dot(e){let i=0;for(let o=0;o<this.ELEMENTS;++o)i+=this[o]*e[o];return ta(i)}normalize(){const e=this.magnitude();if(e!==0)for(let i=0;i<this.ELEMENTS;++i)this[i]/=e;return this.check()}multiply(...e){for(const i of e)for(let o=0;o<this.ELEMENTS;++o)this[o]*=i[o];return this.check()}divide(...e){for(const i of e)for(let o=0;o<this.ELEMENTS;++o)this[o]/=i[o];return this.check()}lengthSq(){return this.lengthSquared()}distanceTo(e){return this.distance(e)}distanceToSquared(e){return this.distanceSquared(e)}getComponent(e){return tY(e>=0&&e<this.ELEMENTS,"index is out of range"),ta(this[e])}setComponent(e,i){return tY(e>=0&&e<this.ELEMENTS,"index is out of range"),this[e]=i,this.check()}addVectors(e,i){return this.copy(e).add(i)}subVectors(e,i){return this.copy(e).subtract(i)}multiplyVectors(e,i){return this.copy(e).multiply(i)}addScaledVector(e,i){return this.add(new this.constructor(e).multiplyScalar(i))}}let h7=typeof Float32Array<"u"?Float32Array:Array;function bDt(){const t=new h7(2);return h7!=Float32Array&&(t[0]=0,t[1]=0),t}function wDt(t,e,i){const o=e[0],r=e[1];return t[0]=i[0]*o+i[3]*r+i[6],t[1]=i[1]*o+i[4]*r+i[7],t}(function(){const t=bDt();return function(e,i,o,r,n,a){let s,l;for(i||(i=2),o||(o=0),r?l=Math.min(r*i+o,e.length):l=e.length,s=o;s<l;s+=i)t[0]=e[s],t[1]=e[s+1],n(t,t,a),e[s]=t[0],e[s+1]=t[1];return e}})();function CDt(t,e,i){const o=e[0],r=e[1],n=e[2],a=i[3]*o+i[7]*r+i[11]*n||1;return t[0]=(i[0]*o+i[4]*r+i[8]*n)/a,t[1]=(i[1]*o+i[5]*r+i[9]*n)/a,t[2]=(i[2]*o+i[6]*r+i[10]*n)/a,t}function xDt(t,e,i){const o=e[0],r=e[1];return t[0]=i[0]*o+i[2]*r,t[1]=i[1]*o+i[3]*r,t[2]=e[2],t}function kDt(t,e,i){const o=e[0],r=e[1],n=e[2];return t[0]=i[0]*o+i[3]*r+i[6]*n,t[1]=i[1]*o+i[4]*r+i[7]*n,t[2]=i[2]*o+i[5]*r+i[8]*n,t[3]=e[3],t}function MDt(){const t=new h7(3);return h7!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function EDt(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function BDt(t,e,i){const o=e[0],r=e[1],n=e[2],a=i[0],s=i[1],l=i[2];return t[0]=r*l-n*s,t[1]=n*a-o*l,t[2]=o*s-r*a,t}function PDt(t,e,i){const o=e[0],r=e[1],n=e[2];let a=i[3]*o+i[7]*r+i[11]*n+i[15];return a=a||1,t[0]=(i[0]*o+i[4]*r+i[8]*n+i[12])/a,t[1]=(i[1]*o+i[5]*r+i[9]*n+i[13])/a,t[2]=(i[2]*o+i[6]*r+i[10]*n+i[14])/a,t}function iY(t,e,i){const o=e[0],r=e[1],n=e[2];return t[0]=o*i[0]+r*i[3]+n*i[6],t[1]=o*i[1]+r*i[4]+n*i[7],t[2]=o*i[2]+r*i[5]+n*i[8],t}function IDt(t,e,i){const o=i[0],r=i[1],n=i[2],a=i[3],s=e[0],l=e[1],c=e[2];let d=r*c-n*l,u=n*s-o*c,h=o*l-r*s,p=r*h-n*u,A=n*d-o*h,f=o*u-r*d;const m=a*2;return d*=m,u*=m,h*=m,p*=2,A*=2,f*=2,t[0]=s+d+p,t[1]=l+u+A,t[2]=c+h+f,t}function SDt(t,e,i,o){const r=[],n=[];return r[0]=e[0]-i[0],r[1]=e[1]-i[1],r[2]=e[2]-i[2],n[0]=r[0],n[1]=r[1]*Math.cos(o)-r[2]*Math.sin(o),n[2]=r[1]*Math.sin(o)+r[2]*Math.cos(o),t[0]=n[0]+i[0],t[1]=n[1]+i[1],t[2]=n[2]+i[2],t}function TDt(t,e,i,o){const r=[],n=[];return r[0]=e[0]-i[0],r[1]=e[1]-i[1],r[2]=e[2]-i[2],n[0]=r[2]*Math.sin(o)+r[0]*Math.cos(o),n[1]=r[1],n[2]=r[2]*Math.cos(o)-r[0]*Math.sin(o),t[0]=n[0]+i[0],t[1]=n[1]+i[1],t[2]=n[2]+i[2],t}function DDt(t,e,i,o){const r=[],n=[];return r[0]=e[0]-i[0],r[1]=e[1]-i[1],r[2]=e[2]-i[2],n[0]=r[0]*Math.cos(o)-r[1]*Math.sin(o),n[1]=r[0]*Math.sin(o)+r[1]*Math.cos(o),n[2]=r[2],t[0]=n[0]+i[0],t[1]=n[1]+i[1],t[2]=n[2]+i[2],t}function RDt(t,e){const i=t[0],o=t[1],r=t[2],n=e[0],a=e[1],s=e[2],l=Math.sqrt((i*i+o*o+r*r)*(n*n+a*a+s*s)),c=l&&EDt(t,e)/l;return Math.acos(Math.min(Math.max(c,-1),1))}(function(){const t=MDt();return function(e,i,o,r,n,a){let s,l;for(i||(i=3),o||(o=0),r?l=Math.min(r*i+o,e.length):l=e.length,s=o;s<l;s+=i)t[0]=e[s],t[1]=e[s+1],t[2]=e[s+2],n(t,t,a),e[s]=t[0],e[s+1]=t[1],e[s+2]=t[2];return e}})();const yP=[0,0,0];let p7,LDt=class X1e extends yDt{static get ZERO(){return p7||(p7=new X1e(0,0,0),Object.freeze(p7)),p7}constructor(e=0,i=0,o=0){super(-0,-0,-0),arguments.length===1&&u7(e)?this.copy(e):(xa.debug&&(ta(e),ta(i),ta(o)),this[0]=e,this[1]=i,this[2]=o)}set(e,i,o){return this[0]=e,this[1]=i,this[2]=o,this.check()}copy(e){return this[0]=e[0],this[1]=e[1],this[2]=e[2],this.check()}fromObject(e){return xa.debug&&(ta(e.x),ta(e.y),ta(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]=ta(e)}angle(e){return RDt(this,e)}cross(e){return BDt(this,this,e),this.check()}rotateX({radians:e,origin:i=yP}){return SDt(this,this,i,e),this.check()}rotateY({radians:e,origin:i=yP}){return TDt(this,this,i,e),this.check()}rotateZ({radians:e,origin:i=yP}){return DDt(this,this,i,e),this.check()}transform(e){return this.transformAsPoint(e)}transformAsPoint(e){return PDt(this,this,e),this.check()}transformAsVector(e){return CDt(this,this,e),this.check()}transformByMatrix3(e){return iY(this,this,e),this.check()}transformByMatrix2(e){return xDt(this,this,e),this.check()}transformByQuaternion(e){return IDt(this,this,e),this.check()}};class _Dt extends eY{toString(){let e="[";if(xa.printRowMajor){e+="row-major:";for(let i=0;i<this.RANK;++i)for(let o=0;o<this.RANK;++o)e+=` ${this[o*this.RANK+i]}`}else{e+="column-major:";for(let i=0;i<this.ELEMENTS;++i)e+=` ${this[i]}`}return e+="]",e}getElementIndex(e,i){return i*this.RANK+e}getElement(e,i){return this[i*this.RANK+e]}setElement(e,i,o){return this[i*this.RANK+e]=ta(o),this}getColumn(e,i=new Array(this.RANK).fill(-0)){const o=e*this.RANK;for(let r=0;r<this.RANK;++r)i[r]=this[o+r];return i}setColumn(e,i){const o=e*this.RANK;for(let r=0;r<this.RANK;++r)this[o+r]=i[r];return this}}function FDt(t,e){if(t===e){const i=e[1],o=e[2],r=e[5];t[1]=e[3],t[2]=e[6],t[3]=i,t[5]=e[7],t[6]=o,t[7]=r}else t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8];return t}function ODt(t,e){const i=e[0],o=e[1],r=e[2],n=e[3],a=e[4],s=e[5],l=e[6],c=e[7],d=e[8],u=d*a-s*c,h=-d*n+s*l,p=c*n-a*l;let A=i*u+o*h+r*p;return A?(A=1/A,t[0]=u*A,t[1]=(-d*o+r*c)*A,t[2]=(s*o-r*a)*A,t[3]=h*A,t[4]=(d*i-r*l)*A,t[5]=(-s*i+r*n)*A,t[6]=p*A,t[7]=(-c*i+o*l)*A,t[8]=(a*i-o*n)*A,t):null}function UDt(t){const e=t[0],i=t[1],o=t[2],r=t[3],n=t[4],a=t[5],s=t[6],l=t[7],c=t[8];return e*(c*n-a*l)+i*(-c*r+a*s)+o*(l*r-n*s)}function oY(t,e,i){const o=e[0],r=e[1],n=e[2],a=e[3],s=e[4],l=e[5],c=e[6],d=e[7],u=e[8],h=i[0],p=i[1],A=i[2],f=i[3],m=i[4],g=i[5],y=i[6],v=i[7],b=i[8];return t[0]=h*o+p*a+A*c,t[1]=h*r+p*s+A*d,t[2]=h*n+p*l+A*u,t[3]=f*o+m*a+g*c,t[4]=f*r+m*s+g*d,t[5]=f*n+m*l+g*u,t[6]=y*o+v*a+b*c,t[7]=y*r+v*s+b*d,t[8]=y*n+v*l+b*u,t}function NDt(t,e,i){const o=e[0],r=e[1],n=e[2],a=e[3],s=e[4],l=e[5],c=e[6],d=e[7],u=e[8],h=i[0],p=i[1];return t[0]=o,t[1]=r,t[2]=n,t[3]=a,t[4]=s,t[5]=l,t[6]=h*o+p*a+c,t[7]=h*r+p*s+d,t[8]=h*n+p*l+u,t}function jDt(t,e,i){const o=e[0],r=e[1],n=e[2],a=e[3],s=e[4],l=e[5],c=e[6],d=e[7],u=e[8],h=Math.sin(i),p=Math.cos(i);return t[0]=p*o+h*a,t[1]=p*r+h*s,t[2]=p*n+h*l,t[3]=p*a-h*o,t[4]=p*s-h*r,t[5]=p*l-h*n,t[6]=c,t[7]=d,t[8]=u,t}function rY(t,e,i){const o=i[0],r=i[1];return t[0]=o*e[0],t[1]=o*e[1],t[2]=o*e[2],t[3]=r*e[3],t[4]=r*e[4],t[5]=r*e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t}function VDt(t,e){const i=e[0],o=e[1],r=e[2],n=e[3],a=i+i,s=o+o,l=r+r,c=i*a,d=o*a,u=o*s,h=r*a,p=r*s,A=r*l,f=n*a,m=n*s,g=n*l;return t[0]=1-u-A,t[3]=d-g,t[6]=h+m,t[1]=d+g,t[4]=1-c-A,t[7]=p-f,t[2]=h-m,t[5]=p+f,t[8]=1-c-u,t}var bP;(function(t){t[t.COL0ROW0=0]="COL0ROW0",t[t.COL0ROW1=1]="COL0ROW1",t[t.COL0ROW2=2]="COL0ROW2",t[t.COL1ROW0=3]="COL1ROW0",t[t.COL1ROW1=4]="COL1ROW1",t[t.COL1ROW2=5]="COL1ROW2",t[t.COL2ROW0=6]="COL2ROW0",t[t.COL2ROW1=7]="COL2ROW1",t[t.COL2ROW2=8]="COL2ROW2"})(bP||(bP={}));const zDt=Object.freeze([1,0,0,0,1,0,0,0,1]);let Gv=class extends _Dt{static get IDENTITY(){return qDt()}static get ZERO(){return HDt()}get ELEMENTS(){return 9}get RANK(){return 3}get INDICES(){return bP}constructor(t,...e){super(-0,-0,-0,-0,-0,-0,-0,-0,-0),arguments.length===1&&Array.isArray(t)?this.copy(t):e.length>0?this.copy([t,...e]):this.identity()}copy(t){return this[0]=t[0],this[1]=t[1],this[2]=t[2],this[3]=t[3],this[4]=t[4],this[5]=t[5],this[6]=t[6],this[7]=t[7],this[8]=t[8],this.check()}identity(){return this.copy(zDt)}fromObject(t){return this.check()}fromQuaternion(t){return VDt(this,t),this.check()}set(t,e,i,o,r,n,a,s,l){return this[0]=t,this[1]=e,this[2]=i,this[3]=o,this[4]=r,this[5]=n,this[6]=a,this[7]=s,this[8]=l,this.check()}setRowMajor(t,e,i,o,r,n,a,s,l){return this[0]=t,this[1]=o,this[2]=a,this[3]=e,this[4]=r,this[5]=s,this[6]=i,this[7]=n,this[8]=l,this.check()}determinant(){return UDt(this)}transpose(){return FDt(this,this),this.check()}invert(){return ODt(this,this),this.check()}multiplyLeft(t){return oY(this,t,this),this.check()}multiplyRight(t){return oY(this,this,t),this.check()}rotate(t){return jDt(this,this,t),this.check()}scale(t){return Array.isArray(t)?rY(this,this,t):rY(this,this,[t,t]),this.check()}translate(t){return NDt(this,this,t),this.check()}transform(t,e){let i;switch(t.length){case 2:i=wDt(e||[-0,-0],t,this);break;case 3:i=iY(e||[-0,-0,-0],t,this);break;case 4:i=kDt(e||[-0,-0,-0,-0],t,this);break;default:throw new Error("Illegal vector")}return vDt(i,t.length),i}transformVector(t,e){return this.transform(t,e)}transformVector2(t,e){return this.transform(t,e)}transformVector3(t,e){return this.transform(t,e)}},f7,A7=null;function HDt(){return f7||(f7=new Gv([0,0,0,0,0,0,0,0,0]),Object.freeze(f7)),f7}function qDt(){return A7||(A7=new Gv,Object.freeze(A7)),A7}const g7="KHR_texture_transform",QDt=g7,m7=new LDt,GDt=new Gv,KDt=new Gv;async function JDt(t,e){if(!new mr(t).hasExtension(g7)||!e.gltf?.loadBuffers)return;const i=t.json.materials||[];for(let o=0;o<i.length;o++)ZDt(o,t)}function ZDt(t,e){const i=e.json.materials?.[t],o=[i?.pbrMetallicRoughness?.baseColorTexture,i?.emissiveTexture,i?.normalTexture,i?.occlusionTexture,i?.pbrMetallicRoughness?.metallicRoughnessTexture],r=[];for(const n of o)n&&n?.extensions?.[g7]&&WDt(e,t,n,r)}function WDt(t,e,i,o){const r=YDt(i,o);if(!r)return;const n=t.json.meshes||[];for(const a of n)for(const s of a.primitives){const l=s.material;Number.isFinite(l)&&e===l&&XDt(t,s,r)}}function YDt(t,e){const i=t.extensions?.[g7],{texCoord:o=0}=t,{texCoord:r=o}=i;if(e.findIndex(([n,a])=>n===o&&a===r)===-1){const n=tRt(i);return o!==r&&(t.texCoord=r),e.push([o,r]),{originalTexCoord:o,texCoord:r,matrix:n}}return null}function XDt(t,e,i){const{originalTexCoord:o,texCoord:r,matrix:n}=i,a=e.attributes[`TEXCOORD_${o}`];if(Number.isFinite(a)){const s=t.json.accessors?.[a];if(s&&s.bufferView){const l=t.json.bufferViews?.[s.bufferView];if(l){const{arrayBuffer:c,byteOffset:d}=t.buffers[l.buffer],u=(d||0)+(s.byteOffset||0)+(l.byteOffset||0),{ArrayType:h,length:p}=nP(s,l),A=PW[s.componentType],f=BW[s.type],m=l.byteStride||A*f,g=new Float32Array(p);for(let y=0;y<s.count;y++){const v=new h(c,u+y*m,2);m7.set(v[0],v[1],1),m7.transformByMatrix3(n),g.set([m7[0],m7[1]],y*f)}o===r?$Dt(s,l,t.buffers,g):eRt(r,s,e,t,g)}}}}function $Dt(t,e,i,o){t.componentType=5126,i.push({arrayBuffer:o.buffer,byteOffset:0,byteLength:o.buffer.byteLength}),e.buffer=i.length-1,e.byteLength=o.buffer.byteLength,e.byteOffset=0,delete e.byteStride}function eRt(t,e,i,o,r){o.buffers.push({arrayBuffer:r.buffer,byteOffset:0,byteLength:r.buffer.byteLength});const n=o.json.bufferViews;if(!n)return;n.push({buffer:o.buffers.length-1,byteLength:r.buffer.byteLength,byteOffset:0});const a=o.json.accessors;a&&(a.push({bufferView:n?.length-1,byteOffset:0,componentType:5126,count:e.count,type:"VEC2"}),i.attributes[`TEXCOORD_${t}`]=a.length-1)}function tRt(t){const{offset:e=[0,0],rotation:i=0,scale:o=[1,1]}=t,r=new Gv().set(1,0,0,0,1,0,e[0],e[1],1),n=GDt.set(Math.cos(i),Math.sin(i),0,-Math.sin(i),Math.cos(i),0,0,0,1),a=KDt.set(o[0],0,0,0,o[1],0,0,0,1);return r.multiplyRight(n).multiplyRight(a)}const iRt=Object.freeze(Object.defineProperty({__proto__:null,decode:JDt,name:QDt},Symbol.toStringTag,{value:"Module"})),Fu="KHR_lights_punctual",oRt=Fu;async function rRt(t){const e=new mr(t),{json:i}=e,o=e.getExtension(Fu);o&&(e.json.lights=o.lights,e.removeExtension(Fu));for(const r of i.nodes||[]){const n=e.getObjectExtension(r,Fu);n&&(r.light=n.light),e.removeObjectExtension(r,Fu)}}async function nRt(t){const e=new mr(t),{json:i}=e;if(i.lights){const o=e.addExtension(Fu);$n(!o.lights),o.lights=i.lights,delete i.lights}if(e.json.lights){for(const o of e.json.lights){const r=o.node;e.addObjectExtension(r,Fu,o)}delete e.json.lights}}const aRt=Object.freeze(Object.defineProperty({__proto__:null,decode:rRt,encode:nRt,name:oRt},Symbol.toStringTag,{value:"Module"})),Kv="KHR_materials_unlit",sRt=Kv;async function lRt(t){const e=new mr(t),{json:i}=e;for(const o of i.materials||[])o.extensions&&o.extensions.KHR_materials_unlit&&(o.unlit=!0),e.removeObjectExtension(o,Kv);e.removeExtension(Kv)}function cRt(t){const e=new mr(t),{json:i}=e;if(e.materials)for(const o of i.materials||[])o.unlit&&(delete o.unlit,e.addObjectExtension(o,Kv,{}),e.addExtension(Kv))}const dRt=Object.freeze(Object.defineProperty({__proto__:null,decode:lRt,encode:cRt,name:sRt},Symbol.toStringTag,{value:"Module"})),Jv="KHR_techniques_webgl",uRt=Jv;async function hRt(t){const e=new mr(t),{json:i}=e,o=e.getExtension(Jv);if(o){const r=fRt(o,e);for(const n of i.materials||[]){const a=e.getObjectExtension(n,Jv);a&&(n.technique=Object.assign({},a,r[a.technique]),n.technique.values=ARt(n.technique,e)),e.removeObjectExtension(n,Jv)}e.removeExtension(Jv)}}async function pRt(t,e){}function fRt(t,e){const{programs:i=[],shaders:o=[],techniques:r=[]}=t,n=new TextDecoder;return o.forEach(a=>{if(Number.isFinite(a.bufferView))a.code=n.decode(e.getTypedArrayForBufferView(a.bufferView));else throw new Error("KHR_techniques_webgl: no shader code")}),i.forEach(a=>{a.fragmentShader=o[a.fragmentShader],a.vertexShader=o[a.vertexShader]}),r.forEach(a=>{a.program=i[a.program]}),r}function ARt(t,e){const i=Object.assign({},t.values);return Object.keys(t.uniforms||{}).forEach(o=>{t.uniforms[o].value&&!(o in i)&&(i[o]=t.uniforms[o].value)}),Object.keys(i).forEach(o=>{typeof i[o]=="object"&&i[o].index!==void 0&&(i[o].texture=e.getTexture(i[o].index))}),i}const gRt=Object.freeze(Object.defineProperty({__proto__:null,decode:hRt,encode:pRt,name:uRt},Symbol.toStringTag,{value:"Module"})),nY=[PSt,$It,RTt,FTt,NTt,pDt,aRt,dRt,gRt,iRt,QSt];function mRt(t,e={},i){const o=nY.filter(r=>aY(r.name,e));for(const r of o)r.preprocess?.(t,e,i)}async function vRt(t,e={},i){const o=nY.filter(r=>aY(r.name,e));for(const r of o)await r.decode?.(t,e,i)}function aY(t,e){const i=e?.gltf?.excludeExtensions||{};return!(t in i&&!i[t])}const wP="KHR_binary_glTF";function yRt(t){const e=new mr(t),{json:i}=e;for(const o of i.images||[]){const r=e.getObjectExtension(o,wP);r&&Object.assign(o,r),e.removeObjectExtension(o,wP)}i.buffers&&i.buffers[0]&&delete i.buffers[0].uri,e.removeExtension(wP)}const sY={accessors:"accessor",animations:"animation",buffers:"buffer",bufferViews:"bufferView",images:"image",materials:"material",meshes:"mesh",nodes:"node",samplers:"sampler",scenes:"scene",skins:"skin",textures:"texture"},bRt={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 wRt{idToIndexMap={animations:{},accessors:{},buffers:{},bufferViews:{},images:{},materials:{},meshes:{},nodes:{},samplers:{},scenes:{},skins:{},textures:{}};json;normalize(e,i){this.json=e.json;const o=e.json;switch(o.asset&&o.asset.version){case"2.0":return;case void 0:case"1.0":break;default:console.warn(`glTF: Unknown version ${o.asset.version}`);return}if(!i.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(o),this._convertTopLevelObjectsToArrays(o),yRt(e),this._convertObjectIdsToArrayIndices(o),this._updateObjects(o),this._updateMaterial(o)}_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 i in sY)this._convertTopLevelObjectToArray(e,i)}_convertTopLevelObjectToArray(e,i){const o=e[i];if(!(!o||Array.isArray(o))){e[i]=[];for(const r in o){const n=o[r];n.id=n.id||r;const a=e[i].length;e[i].push(n),this.idToIndexMap[i][r]=a}}}_convertObjectIdsToArrayIndices(e){for(const i in sY)this._convertIdsToIndices(e,i);"scene"in e&&(e.scene=this._convertIdToIndex(e.scene,"scene"));for(const i of e.textures)this._convertTextureIds(i);for(const i of e.meshes)this._convertMeshIds(i);for(const i of e.nodes)this._convertNodeIds(i);for(const i of e.scenes)this._convertSceneIds(i)}_convertTextureIds(e){e.source&&(e.source=this._convertIdToIndex(e.source,"image"))}_convertMeshIds(e){for(const i of e.primitives){const{attributes:o,indices:r,material:n}=i;for(const a in o)o[a]=this._convertIdToIndex(o[a],"accessor");r&&(i.indices=this._convertIdToIndex(r,"accessor")),n&&(i.material=this._convertIdToIndex(n,"material"))}}_convertNodeIds(e){e.children&&(e.children=e.children.map(i=>this._convertIdToIndex(i,"node"))),e.meshes&&(e.meshes=e.meshes.map(i=>this._convertIdToIndex(i,"mesh")))}_convertSceneIds(e){e.nodes&&(e.nodes=e.nodes.map(i=>this._convertIdToIndex(i,"node")))}_convertIdsToIndices(e,i){e[i]||(console.warn(`gltf v1: json doesn't contain attribute ${i}`),e[i]=[]);for(const o of e[i])for(const r in o){const n=o[r],a=this._convertIdToIndex(n,r);o[r]=a}}_convertIdToIndex(e,i){const o=bRt[i];if(o in this.idToIndexMap){const r=this.idToIndexMap[o][e];if(!Number.isFinite(r))throw new Error(`gltf v1: failed to resolve ${i} with id ${e}`);return r}return e}_updateObjects(e){for(const i of this.json.buffers)delete i.type}_updateMaterial(e){for(const i of e.materials){i.pbrMetallicRoughness={baseColorFactor:[1,1,1,1],metallicFactor:1,roughnessFactor:1};const o=i.values?.tex||i.values?.texture2d_0||i.values?.diffuseTex,r=e.textures.findIndex(n=>n.id===o);r!==-1&&(i.pbrMetallicRoughness.baseColorTexture={index:r})}}}function CRt(t,e={}){return new wRt().normalize(t,e)}async function xRt(t,e,i=0,o,r){return kRt(t,e,i,o),CRt(t,{normalize:o?.gltf?.normalize}),mRt(t,o,r),o?.gltf?.loadBuffers&&t.json.buffers&&await MRt(t,o,r),o?.gltf?.loadImages&&await ERt(t,o,r),await vRt(t,o,r),t}function kRt(t,e,i,o){if(o.uri&&(t.baseUri=o.uri),e instanceof ArrayBuffer&&!fTt(e,i,o)&&(e=new TextDecoder().decode(e)),typeof e=="string")t.json=FBt(e);else if(e instanceof ArrayBuffer){const a={};i=ATt(a,e,i,o.glb),$n(a.type==="glTF",`Invalid GLB magic string ${a.type}`),t._glb=a,t.json=a.json}else $n(!1,"GLTF: must be ArrayBuffer or string");const r=t.json.buffers||[];if(t.buffers=new Array(r.length).fill(null),t._glb&&t._glb.header.hasBinChunk){const{binChunks:a}=t._glb;t.buffers[0]={arrayBuffer:a[0].arrayBuffer,byteOffset:a[0].byteOffset,byteLength:a[0].byteLength}}const n=t.json.images||[];t.images=new Array(n.length).fill({})}async function MRt(t,e,i){const o=t.json.buffers||[];for(let r=0;r<o.length;++r){const n=o[r];if(n.uri){const{fetch:a}=i;$n(a);const s=KW(n.uri,e),l=await(await i?.fetch?.(s))?.arrayBuffer?.();t.buffers[r]={arrayBuffer:l,byteOffset:0,byteLength:l.byteLength},delete n.uri}else t.buffers[r]===null&&(t.buffers[r]={arrayBuffer:new ArrayBuffer(n.byteLength),byteOffset:0,byteLength:n.byteLength})}}async function ERt(t,e,i){const o=BRt(t),r=t.json.images||[],n=[];for(const a of o)n.push(PRt(t,r[a],a,e,i));return await Promise.all(n)}function BRt(t){const e=new Set,i=t.json.textures||[];for(const o of i)o.source!==void 0&&e.add(o.source);return Array.from(e).sort()}async function PRt(t,e,i,o,r){let n;if(e.uri&&!e.hasOwnProperty("bufferView")){const s=KW(e.uri,o),{fetch:l}=r;n=await(await l(s)).arrayBuffer(),e.bufferView={data:n}}if(Number.isFinite(e.bufferView)){const s=UIt(t.json,t.buffers,e.bufferView);n=YZ(s.buffer,s.byteOffset,s.byteLength)}$n(n,"glTF image has no data");let a=await LZ(n,[PIt,sTt],{...o,mimeType:e.mimeType,basis:o.basis||{format:QW()}},r);a&&a[0]&&(a={compressed:!0,mipmaps:!1,width:a[0].width,height:a[0].height,data:a[0]}),t.images=t.images||[],t.images[i]=a}const CP={dataType:null,batchType:null,name:"glTF",id:"gltf",module:"gltf",version:GSt,extensions:["gltf","glb"],mimeTypes:["model/gltf+json","model/gltf-binary"],text:!0,binary:!0,tests:["glTF"],parse:IRt,options:{gltf:{normalize:!0,loadBuffers:!0,loadImages:!0,decompressMeshes:!0},log:console}};async function IRt(t,e={},i){e={...CP.options,...e},e.gltf={...CP.options.gltf,...e.gltf};const{byteOffset:o=0}=e;return await xRt({},t,o,e,i)}const SRt={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},TRt={5120:1,5121:1,5122:2,5123:2,5125:4,5126:4},ka={TEXTURE_MAG_FILTER:10240,TEXTURE_MIN_FILTER:10241,TEXTURE_WRAP_S:10242,TEXTURE_WRAP_T:10243,REPEAT:10497,LINEAR:9729,NEAREST_MIPMAP_LINEAR:9986},DRt={magFilter:ka.TEXTURE_MAG_FILTER,minFilter:ka.TEXTURE_MIN_FILTER,wrapS:ka.TEXTURE_WRAP_S,wrapT:ka.TEXTURE_WRAP_T},RRt={[ka.TEXTURE_MAG_FILTER]:ka.LINEAR,[ka.TEXTURE_MIN_FILTER]:ka.NEAREST_MIPMAP_LINEAR,[ka.TEXTURE_WRAP_S]:ka.REPEAT,[ka.TEXTURE_WRAP_T]:ka.REPEAT};function LRt(){return{id:"default-sampler",parameters:RRt}}function _Rt(t){return TRt[t]}function FRt(t){return SRt[t]}class ORt{baseUri="";jsonUnprocessed;json;buffers=[];images=[];postProcess(e,i={}){const{json:o,buffers:r=[],images:n=[]}=e,{baseUri:a=""}=e;return $n(o),this.baseUri=a,this.buffers=r,this.images=n,this.jsonUnprocessed=o,this.json=this._resolveTree(e.json,i),this.json}_resolveTree(e,i={}){const o={...e};return this.json=o,e.bufferViews&&(o.bufferViews=e.bufferViews.map((r,n)=>this._resolveBufferView(r,n))),e.images&&(o.images=e.images.map((r,n)=>this._resolveImage(r,n))),e.samplers&&(o.samplers=e.samplers.map((r,n)=>this._resolveSampler(r,n))),e.textures&&(o.textures=e.textures.map((r,n)=>this._resolveTexture(r,n))),e.accessors&&(o.accessors=e.accessors.map((r,n)=>this._resolveAccessor(r,n))),e.materials&&(o.materials=e.materials.map((r,n)=>this._resolveMaterial(r,n))),e.meshes&&(o.meshes=e.meshes.map((r,n)=>this._resolveMesh(r,n))),e.nodes&&(o.nodes=e.nodes.map((r,n)=>this._resolveNode(r,n)),o.nodes=o.nodes.map((r,n)=>this._resolveNodeChildren(r))),e.skins&&(o.skins=e.skins.map((r,n)=>this._resolveSkin(r,n))),e.scenes&&(o.scenes=e.scenes.map((r,n)=>this._resolveScene(r,n))),typeof this.json.scene=="number"&&o.scenes&&(o.scene=o.scenes[this.json.scene]),o}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,i){if(typeof i=="object")return i;const o=e&&e[i];return o||console.warn(`glTF file error: Could not find ${e}[${i}]`),o}_resolveScene(e,i){return{...e,id:e.id||`scene-${i}`,nodes:(e.nodes||[]).map(o=>this.getNode(o))}}_resolveNode(e,i){const o={...e,id:e?.id||`node-${i}`};return e.mesh!==void 0&&(o.mesh=this.getMesh(e.mesh)),e.camera!==void 0&&(o.camera=this.getCamera(e.camera)),e.skin!==void 0&&(o.skin=this.getSkin(e.skin)),e.meshes!==void 0&&e.meshes.length&&(o.mesh=e.meshes.reduce((r,n)=>{const a=this.getMesh(n);return r.id=a.id,r.primitives=r.primitives.concat(a.primitives),r},{primitives:[]})),o}_resolveNodeChildren(e){return e.children&&(e.children=e.children.map(i=>this.getNode(i))),e}_resolveSkin(e,i){const o=typeof e.inverseBindMatrices=="number"?this.getAccessor(e.inverseBindMatrices):void 0;return{...e,id:e.id||`skin-${i}`,inverseBindMatrices:o}}_resolveMesh(e,i){const o={...e,id:e.id||`mesh-${i}`,primitives:[]};return e.primitives&&(o.primitives=e.primitives.map(r=>{const n={...r,attributes:{},indices:void 0,material:void 0},a=r.attributes;for(const s in a)n.attributes[s]=this.getAccessor(a[s]);return r.indices!==void 0&&(n.indices=this.getAccessor(r.indices)),r.material!==void 0&&(n.material=this.getMaterial(r.material)),n})),o}_resolveMaterial(e,i){const o={...e,id:e.id||`material-${i}`};if(o.normalTexture&&(o.normalTexture={...o.normalTexture},o.normalTexture.texture=this.getTexture(o.normalTexture.index)),o.occlusionTexture&&(o.occlusionTexture={...o.occlusionTexture},o.occlusionTexture.texture=this.getTexture(o.occlusionTexture.index)),o.emissiveTexture&&(o.emissiveTexture={...o.emissiveTexture},o.emissiveTexture.texture=this.getTexture(o.emissiveTexture.index)),o.emissiveFactor||(o.emissiveFactor=o.emissiveTexture?[1,1,1]:[0,0,0]),o.pbrMetallicRoughness){o.pbrMetallicRoughness={...o.pbrMetallicRoughness};const r=o.pbrMetallicRoughness;r.baseColorTexture&&(r.baseColorTexture={...r.baseColorTexture},r.baseColorTexture.texture=this.getTexture(r.baseColorTexture.index)),r.metallicRoughnessTexture&&(r.metallicRoughnessTexture={...r.metallicRoughnessTexture},r.metallicRoughnessTexture.texture=this.getTexture(r.metallicRoughnessTexture.index))}return o}_resolveAccessor(e,i){const o=_Rt(e.componentType),r=FRt(e.type),n=o*r,a={...e,id:e.id||`accessor-${i}`,bytesPerComponent:o,components:r,bytesPerElement:n,value:void 0,bufferView:void 0,sparse:void 0};if(e.bufferView!==void 0&&(a.bufferView=this.getBufferView(e.bufferView)),a.bufferView){const s=a.bufferView.buffer,{ArrayType:l,byteLength:c}=nP(a,a.bufferView),d=(a.bufferView.byteOffset||0)+(a.byteOffset||0)+s.byteOffset;let u=s.arrayBuffer.slice(d,d+c);a.bufferView.byteStride&&(u=this._getValueFromInterleavedBuffer(s,d,a.bufferView.byteStride,a.bytesPerElement,a.count)),a.value=new l(u)}return a}_getValueFromInterleavedBuffer(e,i,o,r,n){const a=new Uint8Array(n*r);for(let s=0;s<n;s++){const l=i+s*o;a.set(new Uint8Array(e.arrayBuffer.slice(l,l+r)),s*r)}return a.buffer}_resolveTexture(e,i){return{...e,id:e.id||`texture-${i}`,sampler:typeof e.sampler=="number"?this.getSampler(e.sampler):LRt(),source:typeof e.source=="number"?this.getImage(e.source):void 0}}_resolveSampler(e,i){const o={id:e.id||`sampler-${i}`,...e,parameters:{}};for(const r in o){const n=this._enumSamplerParameter(r);n!==void 0&&(o.parameters[n]=o[r])}return o}_enumSamplerParameter(e){return DRt[e]}_resolveImage(e,i){const o={...e,id:e.id||`image-${i}`,image:null,bufferView:e.bufferView!==void 0?this.getBufferView(e.bufferView):void 0},r=this.images[i];return r&&(o.image=r),o}_resolveBufferView(e,i){const o=e.buffer,r=this.buffers[o].arrayBuffer;let n=this.buffers[o].byteOffset||0;return e.byteOffset&&(n+=e.byteOffset),{id:`bufferView-${i}`,...e,buffer:this.buffers[o],data:new Uint8Array(r,n,e.byteLength)}}_resolveCamera(e,i){const o={...e,id:e.id||`camera-${i}`};return o.perspective,o.orthographic,o}}function URt(t,e){return new ORt().postProcess(t,e)}class NRt{constructor(e){}load(e,i,o,r,n,a,s){r=r||{},jRt(e,i,o,r,n,function(){no.scheduleTask(function(){n.scene.fire("modelLoaded",n.id),n.fire("loaded",!0,!1)}),a&&a()},function(l){e.error(l),s&&s(l),n.fire("error",l)})}parse(e,i,o,r,n,a,s){r=r||{},xP(e,"",i,o,r,n,function(){n.scene.fire("modelLoaded",n.id),n.fire("loaded",!0,!1),a&&a()},function(l){n.error(l),n.fire("error",l),s&&s(l)})}}function jRt(t,e,i,o,r,n,a){const s=t.viewer.scene.canvas.spinner;s.processes++,e.split(".").pop()==="glb"?t.dataSource.getGLB(e,l=>{o.basePath=lY(e),xP(t,e,l,i,o,r,n,a),s.processes--},l=>{s.processes--,a(l)}):t.dataSource.getGLTF(e,l=>{o.basePath=lY(e),xP(t,e,l,i,o,r,n,a),s.processes--},l=>{s.processes--,a(l)})}function lY(t){const e=t.lastIndexOf("/");return e!==0?t.substring(0,e+1):""}function xP(t,e,i,o,r,n,a,s){const l=t.viewer.scene.canvas.spinner;l.processes++,XB(i,CP,{baseUri:r.basePath}).then(c=>{const d=URt(c),u={entityId:r.entityId,autoMetaModel:r.autoMetaModel,globalizeObjectIds:r.globalizeObjectIds,metaObjects:[],loadBuffer:r.loadBuffer,basePath:r.basePath,handlenode:r.handlenode,backfaces:!!r.backfaces,gltfData:d,scene:n.scene,plugin:t,sceneModel:n,numObjects:0,nextId:0};VRt(u),HRt(u),r.autoMetaModel&&u.metaObjects.push({id:n.id,type:"Default",name:n.id}),GRt(u),n.finalize(),r.autoMetaModel&&t.viewer.metaScene.createMetaModel(n.id,{metaObjects:u.metaObjects}),l.processes--,a()}).catch(c=>{s&&s(c)})}function VRt(t){const e=t.gltfData.textures;if(e)for(let i=0,o=e.length;i<o;i++)zRt(t,e[i])}function zRt(t,e){if(!e.source||!e.source.image)return;const i=`texture-${t.nextId++}`;let o=Pp;switch(e.sampler.minFilter){case 9728:o=Eu;break;case 9729:o=Jr;break;case 9984:o=nv;break;case 9985:o=av;break;case 9986:o=Pp;break;case 9987:o=Ip;break}let r=Jr;switch(e.sampler.magFilter){case 9728:r=Eu;break;case 9729:r=Jr;break}let n=vo;switch(e.sampler.wrapS){case 33071:n=Kr;break;case 33648:n=Nl;break;case 10497:n=vo;break}let a=vo;switch(e.sampler.wrapT){case 33071:a=Kr;break;case 33648:a=Nl;break;case 10497:a=vo;break}let s=vo;switch(e.sampler.wrapR){case 33071:s=Kr;break;case 33648:s=Nl;break;case 10497:s=vo;break}t.sceneModel.createTexture({id:i,image:e.source.image,flipY:!!e.flipY,minFilter:o,magFilter:r,wrapS:n,wrapT:a,wrapR:s,encoding:ao}),e._textureId=i}function HRt(t){const e=t.gltfData.materials;if(e)for(let i=0,o=e.length;i<o;i++){const r=e[i];r._textureSetId=qRt(t,r),r._attributes=QRt(t,r)}}function qRt(t,e){const i={};switch(e.normalTexture&&(i.normalTextureId=e.normalTexture.texture._textureId),e.occlusionTexture&&(i.occlusionTextureId=e.occlusionTexture.texture._textureId),e.emissiveTexture&&(i.emissiveTextureId=e.emissiveTexture.texture._textureId),e.alphaMode){case"OPAQUE":break;case"MASK":const n=e.alphaCutoff;i.alphaCutoff=n!==void 0?n:.5;break}const o=e.pbrMetallicRoughness;if(e.pbrMetallicRoughness){const n=e.pbrMetallicRoughness,a=n.baseColorTexture||n.colorTexture;a&&(a.texture?i.colorTextureId=a.texture._textureId:i.colorTextureId=t.gltfData.textures[a.index]._textureId),o.metallicRoughnessTexture&&(i.metallicRoughnessTextureId=o.metallicRoughnessTexture.texture._textureId)}const r=e.extensions;if(r){const n=r.KHR_materials_pbrSpecularGlossiness;if(n){n.specularTexture;const a=n.specularColorTexture;a!=null&&(i.colorTextureId=t.gltfData.textures[a.index]._textureId)}}return i.normalTextureId!==void 0||i.occlusionTextureId!==void 0||i.emissiveTextureId!==void 0||i.colorTextureId!==void 0||i.metallicRoughnessTextureId!==void 0?(i.id=`textureSet-${t.nextId++};`,t.sceneModel.createTextureSet(i),i.id):null}function QRt(t,e){const i=e.extensions,o={color:new Float32Array([1,1,1,1]),opacity:1,metallic:0,roughness:1,doubleSided:!0};if(i){const n=i.KHR_materials_pbrSpecularGlossiness;if(n){const s=n.diffuseFactor;s!=null&&o.color.set(s)}const a=i.KHR_materials_common;if(a){const s=a.technique,l=a.values||{},c=s==="BLINN",d=s==="PHONG",u=s==="LAMBERT",h=l.diffuse;h&&(c||d||u)&&(mt.isString(h)||o.color.set(h));const p=l.transparency;p!=null&&(o.opacity=p);const A=l.transparent;A!=null&&(o.opacity=A)}}const r=e.pbrMetallicRoughness;if(r){const n=r.baseColorFactor;n&&(o.color[0]=n[0],o.color[1]=n[1],o.color[2]=n[2],o.opacity=n[3]);const a=r.metallicFactor;a!=null&&(o.metallic=a);const s=r.roughnessFactor;s!=null&&(o.roughness=s)}return o.doubleSided=e.doubleSided!==!1,o}function GRt(t){const e=t.gltfData,i=e.scene||e.scenes[0];if(!i){ZRt(t,"glTF has no default scene");return}const o=i.nodes;if(!o)return;(function a(s){s.forEach(l=>{const c=l.mesh;c&&(c.instances||=0,c.instances+=1),l.children&&a(l.children)})})(o);const r=[];let n=null;(function a(s,l,c){s.forEach(d=>{const u=d.name;let h=u!=null&&u||l===0&&"entity-"+t.nextId++;if(h){for(;t.sceneModel.objects[h];)h="entity-"+t.nextId++;r.push(n),n=[]}const p=KRt(d,c);if(d.mesh&&JRt(d,t,p,n),d.children&&a(d.children,l+1,p),h){if(n.length>0){const A=t.globalizeObjectIds?C.globalizeObjectId(t.sceneModel.id,h):h;t.sceneModel.createEntity({id:A,meshIds:n,isObject:!0}),t.autoMetaModel&&t.metaObjects.push({id:A,type:"Default",name:A,parent:t.sceneModel.id})}n=r.pop()}})})(o,0,null)}function KRt(t,e){let i;return t.matrix&&(i=t.matrix,e?e=C.mulMat4(e,i,C.mat4()):e=i),t.translation&&(i=C.translationMat4v(t.translation),e?e=C.mulMat4(e,i,C.mat4()):e=i),t.rotation&&(i=C.quaternionToMat4(t.rotation),e?e=C.mulMat4(e,i,C.mat4()):e=i),t.scale&&(i=C.scalingMat4v(t.scale),e?e=C.mulMat4(e,i,C.mat4()):e=i),e}function JRt(t,e,i,o){const r=t.mesh;if(!r)return;const n=r.primitives.length;if(n>0)for(let a=0;a<n;a++){const s=r.primitives[a];if(s.mode<4)continue;const l={id:e.sceneModel.id+"."+e.numObjects++},c=s.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 d=e.backfaces!==!1||c&&c.doubleSided!==!1;switch(s.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=d?"triangles":"solid";break;case 5:l.primitive=d?"triangles":"solid";break;case 6:l.primitive=d?"triangles":"solid";break;default:l.primitive=d?"triangles":"solid"}const u=s.attributes.POSITION;if(!u)continue;l.localPositions=u.value,l.positions=new Float64Array(l.localPositions.length),s.attributes.NORMAL&&(l.normals=s.attributes.NORMAL.value),s.attributes.TEXCOORD_0&&(l.uv=s.attributes.TEXCOORD_0.value),s.indices&&(l.indices=s.indices.value),i?C.transformPositions3(i,l.localPositions,l.positions):l.positions.set(l.localPositions);const h=C.vec3();Q8(l.positions,l.positions,h)&&(l.origin=h),e.sceneModel.createMesh(l),o.push(l.id)}}function ZRt(t,e){t.plugin.error(e)}const cY={DEFAULT:{}};class kP extends ba{constructor(e,i={}){super("GLTFLoader",e,i),this._sceneModelLoader=new NRt(this,i),this.dataSource=i.dataSource,this.objectDefaults=i.objectDefaults}set dataSource(e){this._dataSource=e||new RZ}get dataSource(){return this._dataSource}set objectDefaults(e){this._objectDefaults=e||cY}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 i=new Pv(this.viewer.scene,mt.apply(e,{isModel:!0,dtxEnabled:e.dtxEnabled})),o=i.id;if(!e.src&&!e.gltf)return this.error("load() param expected: src or gltf"),i;if(e.metaModelSrc||e.metaModelJSON){const r=n=>{this.viewer.metaScene.createMetaModel(o,n,{}),this.viewer.scene.canvas.spinner.processes--,e.src?this._sceneModelLoader.load(this,e.src,n,e,i):this._sceneModelLoader.parse(this,e.gltf,n,e,i)};if(e.metaModelSrc){const n=e.metaModelSrc;this.viewer.scene.canvas.spinner.processes++,this._dataSource.getMetaModel(n,a=>{this.viewer.scene.canvas.spinner.processes--,r(a)},a=>{this.error(`load(): Failed to load model metadata for model '${o} from '${n}' - ${a}`),this.viewer.scene.canvas.spinner.processes--})}else e.metaModelJSON&&r(e.metaModelJSON)}else e.src?this._sceneModelLoader.load(this,e.src,null,e,i):this._sceneModelLoader.parse(this,e.gltf,null,e,i);return i.once("destroyed",()=>{this.viewer.metaScene.destroyMetaModel(o)}),i}destroy(){super.destroy()}}function WRt(t,e,i={}){const o="lightgrey",r=i.hoverColor||"rgba(0,0,0,0.4)",n=i.textColor||"black",a=i.canvasElement||document.body,s=500,l=s+s/3,c=l/24,d=[{boundary:[6,6,6,6],color:i.frontColor||i.color||"#55FF55"},{boundary:[18,6,6,6],color:i.backColor||i.color||"#55FF55"},{boundary:[12,6,6,6],color:i.rightColor||i.color||"#FF5555"},{boundary:[0,6,6,6],color:i.leftColor||i.color||"#FF5555"},{boundary:[6,0,6,6],color:i.topColor||i.color||"#7777FF"},{boundary:[6,12,6,6],color:i.bottomColor||i.color||"#7777FF"}],u=[{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]}];i.frontColor||i.color,i.backColor||i.color,i.rightColor||i.color,i.leftColor||i.color,i.topColor||i.color,i.bottomColor||i.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 y=0,v=u.length;y<v;y++)C.normalizeVec3(u[y].dir,u[y].dir),C.normalizeVec3(u[y].up,u[y].up);for(let y=0,v=h.length;y<v;y++)C.normalizeVec3(h[y].dir,h[y].dir),C.normalizeVec3(h[y].up,h[y].up);var p=h;this._textureCanvas=document.createElement("canvas"),this._textureCanvas.width=l,this._textureCanvas.height=s,this._textureCanvas.style.width=l+"px",this._textureCanvas.style.height=s+"px",this._textureCanvas.style.padding="0",this._textureCanvas.style.margin="0",this._textureCanvas.style.top="0",this._textureCanvas.style.background=o,this._textureCanvas.style.position="absolute",this._textureCanvas.style.opacity="1.0",this._textureCanvas.style.visibility="hidden",this._textureCanvas.style["z-index"]=2e6,a.appendChild(this._textureCanvas);const A=this._textureCanvas.getContext("2d");let f=!1;function m(){for(let k=0,E=d.length;k<E;k++){const B=d[k],P=B.boundary,D=Math.round(P[0]*c),T=Math.round(P[1]*c),R=Math.round(P[2]*c),F=Math.round(P[3]*c);A.fillStyle=B.color,A.fillRect(D,T,R,F)}for(let k=0,E=p.length;k<E;k++){let B,P,D,T;const R=p[k],F=R.boundaries;for(var y=0,v=F.length;y<v;y++){const N=F[y];B=Math.round(N[0]*c),P=Math.round(N[1]*c),D=Math.round(N[2]*c),T=Math.round(N[3]*c),R.highlighted&&(A.fillStyle=R.highlighted?r:R.color||o,A.fillRect(B,P,D,T))}if(R.label){A.fillStyle=n,A.font="60px sans-serif",A.textAlign="center";var b=B+D*.5,x=P+T*.7;A.fillText(g(R.label),b,x,80)}}e.glRedraw()}const g=(function(){const 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"},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"},b={"NavCube.front":"FRONT","NavCube.back":"BACK","NavCube.right":"RIGHT","NavCube.left":"LEFT","NavCube.top":"TOP","NavCube.bottom":"BOTTOM"};return function(x){const k=f?v:y,E=k?k[x]:null;return E?t.localeService.translate(E)||b[E]||E:x}})();this.setZUp=function(){f=!0,p=u,this.clear()},this.setYUp=function(){f=!1,p=h,this.clear()},this.clear=function(){A.fillStyle=o,A.fillRect(0,0,l,s);for(var y=0,v=p.length;y<v;y++){const b=p[y];b.highlighted=!1}m()},this.getArea=function(y){const v=y[0]*l,b=s-y[1]*s;for(var x=0,k=p.length;x<k;x++){const P=p[x].boundaries;for(var E=0,B=P.length;E<B;E++){const D=P[E];if(v>=D[0]*c&&v<=(D[0]+D[2])*c&&b>=D[1]*c&&b<=(D[1]+D[3])*c)return x}}return-1},this.setAreaHighlighted=function(y,v){var b=p[y];if(!b)throw"Area not found: "+y;b.highlighted=!!v,m()},this.getAreaDir=function(y){var v=p[y];if(!v)throw"Unknown area: "+y;return v.dir},this.getAreaUp=function(y){var v=p[y];if(!v)throw"Unknown area: "+y;return v.up},this.getImage=function(){return this._textureCanvas},this.destroy=function(){this._textureCanvas&&(this._textureCanvas.parentNode.removeChild(this._textureCanvas),this._textureCanvas=null)}}const dY=C.vec3(),uY=C.vec3();C.mat4();class MP extends ba{constructor(e,i={}){super("NavCube",e,i),e.navCube=this;try{this._navCubeScene=new Ty(e,{canvasId:i.canvasId,canvasElement:i.canvasElement,transparent:!0}),this._navCubeCanvas=this._navCubeScene.canvas.canvas,this._navCubeScene.input.keyboardEnabled=!1}catch(g){this.error(g);return}const o=this._navCubeScene;o.clearLights(),new Xa(o,{dir:[.4,-.4,.8],color:[.8,1,1],intensity:1,space:"view"}),new Xa(o,{dir:[-.8,-.3,-.4],color:[.8,.8,.8],intensity:1,space:"view"}),new Xa(o,{dir:[.8,-.6,-.8],color:[1,1,1],intensity:1,space:"view"}),this._navCubeCamera=o.camera,this._navCubeCamera.ortho.scale=7,this._navCubeCamera.ortho.near=.1,this._navCubeCamera.ortho.far=2e3,o.edgeMaterial.edgeColor=[.2,.2,.2],o.edgeMaterial.edgeAlpha=.6,this._zUp=!!e.camera.zUp;var r=this;this.setIsProjectNorth(i.isProjectNorth),this.setProjectNorthOffsetAngle(i.projectNorthOffsetAngle);const n=(function(){const g=C.mat4();return function(y,v,b){return C.identityMat4(g),C.rotationMat4v(y*r._projectNorthOffsetAngle*C.DEGTORAD,[0,1,0],g),C.transformVec3(g,v,b)}})();this._synchCamera=(function(){var g=C.rotationMat4c(-90*C.DEGTORAD,1,0,0),y=C.vec3(),v=C.vec3(),b=C.vec3();return function(){var x=e.camera.eye,k=e.camera.look,E=e.camera.up;y=C.mulVec3Scalar(C.normalizeVec3(C.subVec3(x,k,y)),5),r._isProjectNorth&&r._projectNorthOffsetAngle&&(y=n(-1,y,dY),E=n(-1,E,uY)),r._zUp?(C.transformVec3(g,y,v),C.transformVec3(g,E,b),r._navCubeCamera.look=[0,0,0],r._navCubeCamera.eye=C.transformVec3(g,y,v),r._navCubeCamera.up=C.transformPoint3(g,E,b)):(r._navCubeCamera.look=[0,0,0],r._navCubeCamera.eye=y,r._navCubeCamera.up=E)}})(),this._cubeTextureCanvas=new WRt(e,o,i),this._cubeSampler=new Sp(o,{image:this._cubeTextureCanvas.getImage(),flipY:!0,wrapS:Kr,wrapT:Kr}),this._cubeMesh=new Ai(o,{geometry:new uo(o,{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 ho(o,{diffuse:[.4,.4,.4],specular:[.4,.4,.4],emissive:[.6,.6,.6],diffuseMap:this._cubeSampler,emissiveMap:this._cubeSampler}),visible:!0,edges:!0}),this._shadow=i.shadowVisible===!1?null:new Ai(o,{geometry:new uo(o,Mp({center:[0,0,0],radiusTop:.001,radiusBottom:1.4,height:.01,radialSegments:20,heightSegments:1,openEnded:!0})),material:new ho(o,{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",g=>{this._synchProjection&&(this._navCubeCamera.perspective.fov=g)}),this._onCameraProjection=e.camera.on("projection",g=>{this._synchProjection&&(this._navCubeCamera.projection=g==="ortho"||g==="perspective"?g:"perspective")});var a=-1;function s(g,y){var v=(g-A)*-p,b=(y-f)*-p;e.camera.orbitYaw(v),e.camera.orbitPitch(-b),A=g,f=y}function l(g){const{left:y,top:v}=r._navCubeCanvas.getBoundingClientRect();return[g.clientX-y,g.clientY-v]}{var c=null,d=null,u=!1,h=!1,p=.5,A,f;r._navCubeCanvas.addEventListener("mouseenter",r._onMouseEnter=function(g){h=!0}),r._navCubeCanvas.addEventListener("mouseleave",r._onMouseLeave=function(g){h=!1}),r._navCubeCanvas.addEventListener("mousedown",r._onMouseDown=function(g){if(g.which===1){c=g.x,d=g.y,A=g.clientX,f=g.clientY;var y=l({clientX:g.clientX,clientY:g.clientY}),v=o.pick({canvasPos:y});v?u=!0:u=!1}}),r._navCubeCanvas.addEventListener("mouseup",r._onMouseUp=function(g){if(g.which===1&&(u=!1,c!==null)){var y=l({clientX:g.clientX,clientY:g.clientY}),v=o.pick({canvasPos:y,pickSurface:!0});if(v&&v.uv){var b=r._cubeTextureCanvas.getArea(v.uv);if(b>=0&&(r._navCubeCanvas.style.cursor="pointer",a>=0&&(r._cubeTextureCanvas.setAreaHighlighted(a,!1),r._repaint(),a=-1),b>=0)){if(r._cubeTextureCanvas.setAreaHighlighted(b,!0),a=b,r._repaint(),g.x<c-3||g.x>c+3||g.y<d-3||g.y>d+3)return;var x=r._cubeTextureCanvas.getAreaDir(b);if(x){var k=r._cubeTextureCanvas.getAreaUp(b);r._isProjectNorth&&r._projectNorthOffsetAngle&&(x=n(1,x,dY),k=n(1,k,uY)),m(x,k,function(){a>=0&&(r._cubeTextureCanvas.setAreaHighlighted(a,!1),r._repaint(),a=-1),r._navCubeCanvas.style.cursor="pointer",a>=0&&(r._cubeTextureCanvas.setAreaHighlighted(a,!1),r._repaint(),a=-1),b>=0&&(r._cubeTextureCanvas.setAreaHighlighted(b,!1),a=-1,r._repaint())})}}}}}),r._navCubeCanvas.addEventListener("mousemove",r._onMouseMove=function(g){if(a>=0&&(r._cubeTextureCanvas.setAreaHighlighted(a,!1),r._repaint(),a=-1),!(g.buttons===1&&!u)){if(u){var y=g.clientX,v=g.clientY;r._navCubeCanvas.style.cursor="move",s(y,v);return}if(h){var b=l({clientX:g.clientX,clientY:g.clientY}),x=o.pick({canvasPos:b,pickSurface:!0});if(x){if(x.uv){r._navCubeCanvas.style.cursor="pointer";var k=r._cubeTextureCanvas.getArea(x.uv);if(k===a)return;a>=0&&r._cubeTextureCanvas.setAreaHighlighted(a,!1),k>=0&&(r._cubeTextureCanvas.setAreaHighlighted(k,!0),r._repaint(),a=k)}}else r._navCubeCanvas.style.cursor="default",a>=0&&(r._cubeTextureCanvas.setAreaHighlighted(a,!1),r._repaint(),a=-1)}}}),r._navCubeCanvas.addEventListener("touchstart",r._onTouchStart=function(g){if(g.touches.length>0){c=g.touches[0].clientX,d=g.touches[0].clientY,A=g.touches[0].clientX,f=g.touches[0].clientY;var y=l({clientX:g.touches[0].clientX,clientY:g.touches[0].clientY}),v=o.pick({canvasPos:y});v?u=!0:u=!1}},{passive:!1}),r._navCubeCanvas.addEventListener("touchmove",r._onTouchMove=function(g){g.preventDefault();var y=g.touches[0],v=y.clientX,b=y.clientY,x=document.elementFromPoint(v,b);if(h=r._navCubeCanvas===x,!!h&&u){s(v,b);return}},{passive:!1}),r._navCubeCanvas.addEventListener("touchend",r._onTouchEnd=function(g){u=!1});var m=(function(){var g=C.vec3();return function(y,v,b){var x=r._fitVisible?e.scene.getAABB(e.scene.visibleObjectIds):e.scene.aabb,k=C.getAABB3Diag(x);C.getAABB3Center(x,g);var E=Math.abs(k/Math.tan(r._cameraFitFOV*C.DEGTORAD));e.cameraControl.pivotPos=g,r._cameraFly?e.cameraFlight.flyTo({look:g,eye:[g[0]-E*y[0],g[1]-E*y[1],g[2]-E*y[2]],up:v||[0,1,0],orthoScale:k*1.1,fitFOV:r._cameraFitFOV,duration:r._cameraFlyDuration},b):e.cameraFlight.jumpTo({look:g,eye:[g[0]-E*y[0],g[1]-E*y[1],g[2]-E*y[2]],up:v||[0,1,0],orthoScale:k*1.1,fitFOV:r._cameraFitFOV},b)}})()}this._onUpdated=e.localeService.on("updated",()=>{this._cubeTextureCanvas.clear(),this._repaint()}),this.setVisible(i.visible),this.setCameraFitFOV(i.cameraFitFOV),this.setCameraFly(i.cameraFly),this.setCameraFlyDuration(i.cameraFlyDuration),this.setFitVisible(i.fitVisible),this.setSynchProjection(i.synchProjection)}send(e,i){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 YRt{constructor(e){const i=e.cameraControl,o=e.scene,r=o.canvas.canvas,n=!1,a=1,s=.09,l=.01,c=new rv(o,{position:[0,0,0],scale:[5,5,5],isObject:!1}),d=C.vec3();this._setPosition=(function(){const x=C.vec3(),k=C.vec3();return function(E){d.set(E),Mu(E,x,k),c.origin=x,c.position=k}})(),this._setQuaternion=x=>{c.quaternion=x};const u=(x,k)=>new uo(c,Mp({radiusTop:.001,radiusBottom:x,radialSegments:32,heightSegments:1,height:k,openEnded:!1})),h=(x,k,E)=>new uo(c,Mp({radiusTop:x,radiusBottom:x,radialSegments:E,heightSegments:1,height:k,openEnded:!1})),p=(x,k,E)=>new uo(c,oE({radius:a-.2,tube:x,radialSegments:64,tubeSegments:E,arc:Math.PI*2*k})),A={curve:p(l,.25,14),curveHandle:p(s,.25,14),hoop:p(l,1,8),arrowHead:u(.07,.2),arrowHeadBig:u(.09,.25),arrowHeadHandle:h(s,.37,8),axis:h(l,a,20),axisHandle:h(s,a,20)},f=x=>new ho(c,{diffuse:x,emissive:x,ambient:[0,0,0],specular:[.6,.6,.3],shininess:80,lineWidth:2}),m=(x,k)=>new Hl(c,{edges:!1,fill:!0,fillColor:x,fillAlpha:k}),g=new ho(c,{diffuse:[1,1,0],alpha:0,alphaMode:"blend"}),y={},v=(x,k)=>{C.mulVec3Scalar(x,-1,C.vec3());const E=f(x),B=C.quaternionToRotationMat4(k,C.identityMat4());C.mulMat4(C.rotationMat4v(Math.PI,[0,1,0],C.mat4()),B,B);const P=C.scaleMat4v([.6,.6,.6],C.identityMat4()),D=(ee,ae)=>{const Me=C.translateMat4v(ee,C.identityMat4()),pe=C.identityMat4();return C.mulMat4(Me,ae,pe),C.mulMat4(B,pe,pe),C.mulMat4(pe,P,C.identityMat4())},T=c.addChild(new Ai(c,{geometry:A.curve,material:E,matrix:B,pickable:!1,collidable:!0,clippable:!1,backfaces:!0,visible:!1,isUI:!0,isObject:!1}),n),R=c.addChild(new Ai(c,{geometry:A.curveHandle,material:g,matrix:B,pickable:!0,collidable:!0,clippable:!1,backfaces:!0,visible:!1,isUI:!0,isObject:!1}),n),F=c.addChild(new Ai(c,{geometry:A.arrowHead,material:E,matrix:D([.8,.07,0],C.rotationMat4v(180*C.DEGTORAD,[0,0,1],C.identityMat4())),pickable:!0,collidable:!0,clippable:!1,visible:!1,isUI:!0,isObject:!1}),n),N=c.addChild(new Ai(c,{geometry:A.arrowHead,material:E,matrix:D([.07,.8,0],C.rotationMat4v(90*C.DEGTORAD,[0,0,1],C.identityMat4())),pickable:!0,collidable:!0,clippable:!1,visible:!1,isUI:!0,isObject:!1}),n),q=c.addChild(new Ai(c,{geometry:A.hoop,material:E,highlighted:!0,highlightMaterial:m(x,.6),matrix:B,pickable:!1,collidable:!0,clippable:!1,visible:!1,isUI:!0,isObject:!1}),n),V=C.quaternionToRotationMat4(C.vec3PairToQuaternion([0,1,0],x),C.identityMat4());C.mulMat4(C.rotationMat4v(Math.PI,[0,1,0],C.mat4()),V,V);const W=ee=>C.mulMat4(V,C.translateMat4c(0,ee,0,C.identityMat4()),C.identityMat4()),Y=W(a+.1),$=W(a/2),me=c.addChild(new Ai(c,{geometry:A.arrowHead,material:E,matrix:Y,pickable:!1,collidable:!0,clippable:!1,visible:!1,isUI:!0,isObject:!1}),n),Ie=c.addChild(new Ai(c,{geometry:A.arrowHeadHandle,material:g,matrix:Y,pickable:!0,collidable:!0,clippable:!1,visible:!1,isUI:!0,isObject:!1}),n),Se=c.addChild(new Ai(c,{geometry:A.axis,material:E,matrix:$,pickable:!1,collidable:!0,clippable:!1,visible:!1,isUI:!0,isObject:!1}),n),qe=c.addChild(new Ai(c,{geometry:A.axisHandle,material:g,matrix:$,pickable:!0,collidable:!0,clippable:!1,visible:!1,isUI:!0,isObject:!1}),n),Qe=c.addChild(new Ai(c,{geometry:A.arrowHeadBig,material:E,matrix:Y,pickable:!1,collidable:!0,clippable:!1,visible:!1,isUI:!0,isObject:!1}),n),Ce=(ee,ae)=>C.vec3ApplyQuaternion(c.quaternion,ee,ae),Le=(function(){const ee=C.vec3(),ae=C.vec3(),Me=C.vec3();return(pe,Q)=>{Ce(x,ee);const Z=d,ie=ee;C.canvasPosToWorldRay(r,o.camera.viewMatrix,o.camera.projMatrix,o.camera.projection,pe,ae,Me);const re=C.dotVec3(ie,Me),ne=C.subVec3(ae,Z,Q),G=C.dotVec3(ne,ie),J=C.dotVec3(ne,Me),ue=1-re*re;if(Math.abs(ue)>1e-10){const xe=(G-re*J)/ue;return C.addVec3(Z,C.mulVec3Scalar(ie,xe,Q),Q),!0}else return!1}})(),Fe=C.vec3(),ve=C.vec3();y[Ie.id]=y[qe.id]={setActivated:ee=>Qe.visible=ee,initDragAction:ee=>Le(ee,Fe)&&C.subVec3(Fe,d,Fe)&&(ae=>{Le(ae,ve)&&(C.subVec3(ve,Fe,ve),this._setPosition(ve),this._handlers&&this._handlers.onPosition(ve))})},y[R.id]={setActivated:ee=>q.visible=ee,initDragAction:ee=>{const ae=(function(){const pe=o.camera.projectWorldPos(d);Ce(x,ve),C.transformVec3(o.camera.normalMatrix,ve,ve);const Q=Math.sign(ve[2]);return Z=>{const ie=Z[0]-pe[0],re=Z[1]-pe[1];return Q*Math.atan2(-re,ie)}})();let Me=ae(ee);return pe=>{const Q=ae(pe);c.rotate(x,(Q-Me)*180/Math.PI),this._handlers&&this._handlers.onQuaternion(c.quaternion),Me=Q}}};let ge=!1,we=!1,Re=!1;const We=()=>{const ee=Re&&ge;Ie.visible=qe.visible=me.visible=Se.visible=!!ee,ee||(Qe.visible=!1)},H=()=>{const ee=Re&&we;R.visible=T.visible=F.visible=N.visible=!!ee,ee||(q.visible=!1)};return{setPositionActive:ee=>{ge=ee,We()},setRotationActive:ee=>{we=ee,H()},set visible(ee){Re=ee,We(),H()}}};this._displayMeshes={center:c.addChild(new Ai(c,{geometry:new uo(c,Ep({radius:.05})),material:new ho(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}),n),x:v([1,0,0],C.vec3PairToQuaternion([1,0,0],[0,0,1])),y:v([0,1,0],C.eulerToQuaternion([90,0,0],"XYZ")),z:v([0,0,1],C.identityQuaternion())};const b=[];{let x=-1;const k=B=>{c.scale[0]!==B&&(c.scale=[B,B,B],this._handlers&&this._handlers.onScreenScale&&this._handlers.onScreenScale(c.scale))},E=o.on("tick",()=>{const B=o.camera,P=Math.abs(C.distVec3(B.eye,d));B.projection==="perspective"?P!==x&&k(.07*P*Math.tan(B.perspective.fov*C.DEGTORAD)):B.projection==="ortho"&&k(B.ortho.scale/10),x=P});b.push(()=>o.off(E))}{let x=null,k=null;b.push(()=>{k&&k.cleanup()});const E=C.vec2(),B=(F,N)=>{N[0]=F.pageX,N[1]=F.pageY,Hs(r.ownerDocument.documentElement,r,N)},P=F=>{B(F,E);const N=o.pick({canvasPos:E}),q=N&&N.entity,V=q&&q.id;return V in y&&y[V]},D=(F,N)=>{const q=P(N(F));if(q){k&&k.cleanup();const V=q.initDragAction(E);return V&&(i.pointerEnabled=!1,q.setActivated(!0),k={onChange:W=>{const Y=N(W);Y&&(B(Y,E),V(E))},cleanup:function(){k=null,i.pointerEnabled=!0,q.setActivated(!1)}}),!!V}else return!1},T=(F,N)=>{r.addEventListener(F,N),b.push(()=>r.removeEventListener(F,N))},R=F=>{F.preventDefault(),F.stopPropagation(),F.stopImmediatePropagation()};T("mousedown",F=>{F.which===1&&D(F,N=>N.which===1&&N)&&R(F)}),T("mousemove",F=>{if(k)k.onChange(F),R(F);else{x&&x();const N=P(F);N?(N.setActivated(!0),x=()=>N.setActivated(!1)):x=null}}),T("mouseup",F=>{k&&(k.onChange(F),k.cleanup())}),T("touchstart",F=>{if(F.preventDefault(),F.touches.length===1){const N=F.touches[0].identifier;D(F,q=>[...q.changedTouches].find(V=>V.identifier===N))&&R(F)}}),T("touchmove",F=>{k&&(k.onChange(F),R(F))}),T("touchend",F=>{k&&(k.onChange(F),k.cleanup())})}this.__destroy=()=>{b.forEach(x=>x()),c.destroy();for(let x in y)delete y[x]}}destroy(){this.__destroy()}setHandlers(e){Object.values(this._displayMeshes).forEach(i=>i.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 XRt=class{constructor(t,e,i){this.id=i.id,this._sectionPlane=i,this._mesh=new Ai(e,{id:i.id,geometry:new uo(e,eE({xSize:.5,ySize:.5,zSize:.001})),material:new ho(e,{emissive:[1,1,1],diffuse:[0,0,0],backfaces:!1}),edgeMaterial:new TE(e,{edgeColor:[0,0,0],edgeAlpha:1,edgeWidth:1}),highlightMaterial:new Hl(e,{fill:!0,fillColor:[.5,1,.5],fillAlpha:.7,edges:!0,edgeColor:[0,0,0],edgeAlpha:1,edgeWidth:1}),selectedMaterial:new Hl(e,{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=C.vec3([0,0,0]),r=C.vec3(),n=C.vec3([0,0,1]),a=C.vec4(4),s=C.vec3(),l=()=>{const c=this._sectionPlane.scene.center,d=[-this._sectionPlane.dir[0],-this._sectionPlane.dir[1],-this._sectionPlane.dir[2]];C.subVec3(c,this._sectionPlane.pos,o);const u=-C.dotVec3(d,o);C.normalizeVec3(d),C.mulVec3Scalar(d,u,r);const h=C.vec3PairToQuaternion(n,this._sectionPlane.dir,a);s[0]=r[0]*.1,s[1]=r[1]*.1,s[2]=r[2]*.1,this._mesh.quaternion=h,this._mesh.position=s};this._onSectionPlanePos=this._sectionPlane.on("pos",l),this._onSectionPlaneDir=this._sectionPlane.on("dir",l)}this._highlighted=!1,this._selected=!1}setHighlighted(t){this._highlighted=!!t,this._mesh.highlighted=this._highlighted,this._mesh.highlightMaterial.fillColor=t?[0,.7,0]:[0,0,0]}getHighlighted(){return this._highlighted}setSelected(t){this._selected=!!t,this._mesh.edgeMaterial.edgeWidth=t?3:1,this._mesh.highlightMaterial.edgeWidth=t?3:1}getSelected(){return this._selected}destroy(){this._sectionPlane.off(this._onSectionPlanePos),this._sectionPlane.off(this._onSectionPlaneDir),this._mesh.destroy()}};class $Rt{constructor(e,i){if(!i.onHoverEnterPlane||!i.onHoverLeavePlane||!i.onClickedNothing||!i.onClickedPlane)throw"Missing config(s): onHoverEnterPlane, onHoverLeavePlane, onClickedNothing || onClickedPlane";this.plugin=e,this._viewer=e.viewer,this._onHoverEnterPlane=i.onHoverEnterPlane,this._onHoverLeavePlane=i.onHoverLeavePlane,this._onClickedNothing=i.onClickedNothing,this._onClickedPlane=i.onClickedPlane,this._visible=!0,this._planes={},this._canvas=i.overviewCanvas,this._scene=new Ty(this._viewer,{canvasId:this._canvas.id,transparent:!0}),this._scene.clearLights(),new Xa(this._scene,{dir:[.4,-.4,.8],color:[.8,1,1],intensity:1,space:"view"}),new Xa(this._scene,{dir:[-.8,-.3,-.4],color:[.8,.8,.8],intensity:1,space:"view"}),new Xa(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 r=this._scene.camera,n=C.rotationMat4c(-90*C.DEGTORAD,1,0,0),a=C.vec3(),s=C.vec3(),l=C.vec3();this._synchCamera=()=>{const c=this._viewer.camera.eye,d=this._viewer.camera.look,u=this._viewer.camera.up;C.mulVec3Scalar(C.normalizeVec3(C.subVec3(c,d,a)),7),this._zUp?(C.transformVec3(n,a,s),C.transformVec3(n,u,l),r.look=[0,0,0],r.eye=C.transformVec3(n,a,s),r.up=C.transformPoint3(n,u,l)):(r.look=[0,0,0],r.eye=a,r.up=u)}}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",r=>{this._scene.camera.perspective.fov=r});{var o=null;this._onInputMouseMove=this._scene.input.on("mousemove",r=>{const n=this._scene.pick({canvasPos:r});n?(!o||n.entity.id!==o.id)&&(o&&this._planes[o.id]&&this._onHoverLeavePlane(o.id),o=n.entity,this._planes[o.id]&&this._onHoverEnterPlane(o.id)):o&&(this._onHoverLeavePlane(o.id),o=null)}),this._scene.canvas.canvas.addEventListener("mouseup",this._onCanvasMouseUp=()=>{o?this._planes[o.id]&&this._onClickedPlane(o.id):this._onClickedNothing()}),this._scene.canvas.canvas.addEventListener("mouseout",this._onCanvasMouseOut=()=>{o&&(this._onHoverLeavePlane(o.id),o=null)})}this.setVisible(i.overviewVisible)}addSectionPlane(e){this._planes[e.id]=new XRt(this,this._scene,e)}setPlaneHighlighted(e,i){const o=this._planes[e];o&&o.setHighlighted(i)}setPlaneSelected(e,i){const o=this._planes[e];o&&o.setSelected(i)}removeSectionPlane(e){const i=this._planes[e.id];i&&(i.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 Wl=C.AABB3(),Ou=C.vec3();class eLt extends ba{constructor(e,i={}){if(super("SectionPlanes",e),this._freeControls=[],this._sectionPlanes=e.scene.sectionPlanes,this._controls={},this._shownControlId=null,i.overviewCanvasId!==null&&i.overviewCanvasId!==void 0){const o=document.getElementById(i.overviewCanvasId);o?this._overview=new $Rt(this,{overviewCanvas:o,visible:i.overviewVisible,onHoverEnterPlane:(r=>{this._overview.setPlaneHighlighted(r,!0)}),onHoverLeavePlane:(r=>{this._overview.setPlaneHighlighted(r,!1)}),onClickedPlane:(r=>{if(this.getShownControl()===r){this.hideControl();return}this.showControl(r);const n=this.sectionPlanes[r].pos;Wl.set(this.viewer.scene.aabb),C.getAABB3Center(Wl,Ou),Wl[0]+=n[0]-Ou[0],Wl[1]+=n[1]-Ou[1],Wl[2]+=n[2]-Ou[2],Wl[3]+=n[0]-Ou[0],Wl[4]+=n[1]-Ou[1],Wl[5]+=n[2]-Ou[2],this.viewer.cameraFlight.flyTo({aabb:Wl,fitFOV:65})}),onClickedNothing:(()=>{this.hideControl()})}):this.warn("Can't find overview canvas: '"+i.overviewCanvasId+"' - will create plugin without overview")}this._onSceneSectionPlaneCreated=e.scene.on("sectionPlaneCreated",o=>{this._sectionPlaneCreated(o)})}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 cB(this.viewer.scene,{id:e.id,pos:e.pos,dir:e.dir,active:!0})}_sectionPlaneCreated(e){const i=this._freeControls.length>0?this._freeControls.pop():(()=>{const o=this.viewer.scene,r=(function(){const u=new rv(o,{isObject:!1});return u.addChild(new Ai(u,{geometry:new uo(u,{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 ho(u,{emissive:[0,0,0],diffuse:[0,0,0],backfaces:!0}),opacity:.6,ghosted:!0,ghostMaterial:new Hl(u,{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})),u.addChild(new Ai(u,{geometry:new uo(u,oE({center:[0,0,0],radius:1.7,tube:.02,radialSegments:4,tubeSegments:4,arc:Math.PI*2})),material:new ho(u,{emissive:[0,0,0],diffuse:[0,0,0],specular:[0,0,0],shininess:0}),highlightMaterial:new Hl(u,{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=C.vec3(),p=C.vec3();return function(A){Mu(A,h,p),u.origin=h,u.position=p}})(),setQuaternion:h=>{u.quaternion=h},setScale:h=>{u.scale=h},setVisible:h=>{u.visible=h},destroy:()=>{u.destroy()}}})();let n=()=>{};const a=new YRt(this.viewer);let s=!1,l=!1,c=null;const d=()=>{const u=l&&!s;r.setVisible(u),a.setHandlers(u&&c)};return{_destroy:()=>{n(),a.destroy(),r.destroy()},setCulled:u=>{s=u,d()},setVisible:u=>{l=u,d()},_setSectionPlane:u=>{if(n(),u){let h=!1;c={onPosition:g=>{r.setPosition(g),u.pos=g},onQuaternion:g=>{r.setQuaternion(g),h=!0,u.quaternion=g},onScreenScale:g=>{r.setScale(g)}};const p=()=>{r.setPosition(u.pos),a.setPosition(u.pos)},A=()=>{r.setQuaternion(u.quaternion),a.setQuaternion(u.quaternion)};p(),A();const f=u.on("pos",p),m=u.on("dir",()=>{h?h=!1:A()});n=()=>{u.off(f),u.off(m),n=()=>{}}}}}})();i._setSectionPlane(e),i.setVisible(!1),this._controls[e.id]=i,this._overview&&this._overview.addSectionPlane(e),e.once("destroyed",()=>{this._sectionPlaneDestroyed(e)})}flipSectionPlanes(){const e=this.viewer.scene.sectionPlanes;for(let i in e)e[i].flipDir()}showControl(e){const i=this._controls[e];if(!i){this.error("Control not found: "+e);return}this.hideControl(),i.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 i=this.viewer.scene.sectionPlanes[e];if(!i){this.error("SectionPlane not found: "+e);return}this._sectionPlaneDestroyed(i),i.destroy(),e===this._shownControlId&&(this._shownControlId=null)}_sectionPlaneDestroyed(e){this._overview&&this._overview.removeSectionPlane(e);const i=this._controls[e.id];i&&(i.setVisible(!1),i._setSectionPlane(null),delete this._controls[e.id],this._freeControls.push(i))}clear(){const e=Object.keys(this._sectionPlanes);for(var i=0,o=e.length;i<o;i++)this.destroySectionPlane(e[i])}send(e,i){switch(e){case"snapshotStarting":for(let o in this._controls)this._controls.hasOwnProperty(o)&&this._controls[o].setCulled(!0);break;case"snapshotFinished":for(let o in this._controls)this._controls.hasOwnProperty(o)&&this._controls[o].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 hY{constructor(e={}){this.cacheBuster=e.cacheBuster!==!1}_cacheBusterURL(e){if(!this.cacheBuster)return e;const i=new Date().getTime();return e.indexOf("?")>-1?e+"&_="+i:e+"?_="+i}getManifest(e,i,o){mt.loadJSON(this._cacheBusterURL(e),r=>{i(r)},function(r){o(r)})}getMetaModel(e,i,o){mt.loadJSON(this._cacheBusterURL(e),r=>{i(r)},function(r){o(r)})}getXKT(e,i,o){var r=()=>{};i=i||r,o=o||r;const n=/^data:(.*?)(;base64)?,(.*)$/,a=e.match(n);if(a){const c=!!a[2];var s=a[3];s=window.decodeURIComponent(s),c&&(s=window.atob(s));try{const d=new ArrayBuffer(s.length),u=new Uint8Array(d);for(var l=0;l<s.length;l++)u[l]=s.charCodeAt(l);i(d)}catch(d){o(d)}}else{const c=new XMLHttpRequest;c.open("GET",this._cacheBusterURL(e),!0),c.responseType="arraybuffer",c.onreadystatechange=function(){c.readyState===4&&(c.status===200?i(c.response):o("getXKT error : "+c.response))},c.send(null)}}}var v7={exports:{}},tLt=v7.exports,pY;function iLt(){return pY||(pY=1,(function(t,e){(function(i,o){o(e)})(tLt,(function(i){function o(L){let X=L.length;for(;--X>=0;)L[X]=0}const r=256,n=286,a=30,s=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]),d=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),u=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);o(h);const p=new Array(60);o(p);const A=new Array(512);o(A);const f=new Array(256);o(f);const m=new Array(29);o(m);const g=new Array(a);function y(L,X,O,ke,ye){this.static_tree=L,this.extra_bits=X,this.extra_base=O,this.elems=ke,this.max_length=ye,this.has_stree=L&&L.length}let v,b,x;function k(L,X){this.dyn_tree=L,this.max_code=0,this.stat_desc=X}o(g);const E=L=>L<256?A[L]:A[256+(L>>>7)],B=(L,X)=>{L.pending_buf[L.pending++]=255&X,L.pending_buf[L.pending++]=X>>>8&255},P=(L,X,O)=>{L.bi_valid>16-O?(L.bi_buf|=X<<L.bi_valid&65535,B(L,L.bi_buf),L.bi_buf=X>>16-L.bi_valid,L.bi_valid+=O-16):(L.bi_buf|=X<<L.bi_valid&65535,L.bi_valid+=O)},D=(L,X,O)=>{P(L,O[2*X],O[2*X+1])},T=(L,X)=>{let O=0;do O|=1&L,L>>>=1,O<<=1;while(--X>0);return O>>>1},R=(L,X,O)=>{const ke=new Array(16);let ye,Ae,tt=0;for(ye=1;ye<=s;ye++)tt=tt+O[ye-1]<<1,ke[ye]=tt;for(Ae=0;Ae<=X;Ae++){let Oe=L[2*Ae+1];Oe!==0&&(L[2*Ae]=T(ke[Oe]++,Oe))}},F=L=>{let X;for(X=0;X<n;X++)L.dyn_ltree[2*X]=0;for(X=0;X<a;X++)L.dyn_dtree[2*X]=0;for(X=0;X<19;X++)L.bl_tree[2*X]=0;L.dyn_ltree[512]=1,L.opt_len=L.static_len=0,L.sym_next=L.matches=0},N=L=>{L.bi_valid>8?B(L,L.bi_buf):L.bi_valid>0&&(L.pending_buf[L.pending++]=L.bi_buf),L.bi_buf=0,L.bi_valid=0},q=(L,X,O,ke)=>{const ye=2*X,Ae=2*O;return L[ye]<L[Ae]||L[ye]===L[Ae]&&ke[X]<=ke[O]},V=(L,X,O)=>{const ke=L.heap[O];let ye=O<<1;for(;ye<=L.heap_len&&(ye<L.heap_len&&q(X,L.heap[ye+1],L.heap[ye],L.depth)&&ye++,!q(X,ke,L.heap[ye],L.depth));)L.heap[O]=L.heap[ye],O=ye,ye<<=1;L.heap[O]=ke},W=(L,X,O)=>{let ke,ye,Ae,tt,Oe=0;if(L.sym_next!==0)do ke=255&L.pending_buf[L.sym_buf+Oe++],ke+=(255&L.pending_buf[L.sym_buf+Oe++])<<8,ye=L.pending_buf[L.sym_buf+Oe++],ke===0?D(L,ye,X):(Ae=f[ye],D(L,Ae+r+1,X),tt=l[Ae],tt!==0&&(ye-=m[Ae],P(L,ye,tt)),ke--,Ae=E(ke),D(L,Ae,O),tt=c[Ae],tt!==0&&(ke-=g[Ae],P(L,ke,tt)));while(Oe<L.sym_next);D(L,256,X)},Y=(L,X)=>{const O=X.dyn_tree,ke=X.stat_desc.static_tree,ye=X.stat_desc.has_stree,Ae=X.stat_desc.elems;let tt,Oe,wt,Ve=-1;for(L.heap_len=0,L.heap_max=573,tt=0;tt<Ae;tt++)O[2*tt]!==0?(L.heap[++L.heap_len]=Ve=tt,L.depth[tt]=0):O[2*tt+1]=0;for(;L.heap_len<2;)wt=L.heap[++L.heap_len]=Ve<2?++Ve:0,O[2*wt]=1,L.depth[wt]=0,L.opt_len--,ye&&(L.static_len-=ke[2*wt+1]);for(X.max_code=Ve,tt=L.heap_len>>1;tt>=1;tt--)V(L,O,tt);wt=Ae;do tt=L.heap[1],L.heap[1]=L.heap[L.heap_len--],V(L,O,1),Oe=L.heap[1],L.heap[--L.heap_max]=tt,L.heap[--L.heap_max]=Oe,O[2*wt]=O[2*tt]+O[2*Oe],L.depth[wt]=(L.depth[tt]>=L.depth[Oe]?L.depth[tt]:L.depth[Oe])+1,O[2*tt+1]=O[2*Oe+1]=wt,L.heap[1]=wt++,V(L,O,1);while(L.heap_len>=2);L.heap[--L.heap_max]=L.heap[1],((et,ii)=>{const zt=ii.dyn_tree,Ct=ii.max_code,Ho=ii.stat_desc.static_tree,Ei=ii.stat_desc.has_stree,Qt=ii.stat_desc.extra_bits,Ri=ii.stat_desc.extra_base,ti=ii.stat_desc.max_length;let kt,ei,Li,Pt,wi,oi,Gt=0;for(Pt=0;Pt<=s;Pt++)et.bl_count[Pt]=0;for(zt[2*et.heap[et.heap_max]+1]=0,kt=et.heap_max+1;kt<573;kt++)ei=et.heap[kt],Pt=zt[2*zt[2*ei+1]+1]+1,Pt>ti&&(Pt=ti,Gt++),zt[2*ei+1]=Pt,ei>Ct||(et.bl_count[Pt]++,wi=0,ei>=Ri&&(wi=Qt[ei-Ri]),oi=zt[2*ei],et.opt_len+=oi*(Pt+wi),Ei&&(et.static_len+=oi*(Ho[2*ei+1]+wi)));if(Gt!==0){do{for(Pt=ti-1;et.bl_count[Pt]===0;)Pt--;et.bl_count[Pt]--,et.bl_count[Pt+1]+=2,et.bl_count[ti]--,Gt-=2}while(Gt>0);for(Pt=ti;Pt!==0;Pt--)for(ei=et.bl_count[Pt];ei!==0;)Li=et.heap[--kt],Li>Ct||(zt[2*Li+1]!==Pt&&(et.opt_len+=(Pt-zt[2*Li+1])*zt[2*Li],zt[2*Li+1]=Pt),ei--)}})(L,X),R(O,Ve,L.bl_count)},$=(L,X,O)=>{let ke,ye,Ae=-1,tt=X[1],Oe=0,wt=7,Ve=4;for(tt===0&&(wt=138,Ve=3),X[2*(O+1)+1]=65535,ke=0;ke<=O;ke++)ye=tt,tt=X[2*(ke+1)+1],++Oe<wt&&ye===tt||(Oe<Ve?L.bl_tree[2*ye]+=Oe:ye!==0?(ye!==Ae&&L.bl_tree[2*ye]++,L.bl_tree[32]++):Oe<=10?L.bl_tree[34]++:L.bl_tree[36]++,Oe=0,Ae=ye,tt===0?(wt=138,Ve=3):ye===tt?(wt=6,Ve=3):(wt=7,Ve=4))},me=(L,X,O)=>{let ke,ye,Ae=-1,tt=X[1],Oe=0,wt=7,Ve=4;for(tt===0&&(wt=138,Ve=3),ke=0;ke<=O;ke++)if(ye=tt,tt=X[2*(ke+1)+1],!(++Oe<wt&&ye===tt)){if(Oe<Ve)do D(L,ye,L.bl_tree);while(--Oe!=0);else ye!==0?(ye!==Ae&&(D(L,ye,L.bl_tree),Oe--),D(L,16,L.bl_tree),P(L,Oe-3,2)):Oe<=10?(D(L,17,L.bl_tree),P(L,Oe-3,3)):(D(L,18,L.bl_tree),P(L,Oe-11,7));Oe=0,Ae=ye,tt===0?(wt=138,Ve=3):ye===tt?(wt=6,Ve=3):(wt=7,Ve=4)}};let Ie=!1;const Se=(L,X,O,ke)=>{P(L,0+(ke?1:0),3),N(L),B(L,O),B(L,~O),O&&L.pending_buf.set(L.window.subarray(X,X+O),L.pending),L.pending+=O};var qe=(L,X,O,ke)=>{let ye,Ae,tt=0;L.level>0?(L.strm.data_type===2&&(L.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<r;wt++)if(Oe.dyn_ltree[2*wt]!==0)return 1;return 0})(L)),Y(L,L.l_desc),Y(L,L.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),Y(Oe,Oe.bl_desc),wt=18;wt>=3&&Oe.bl_tree[2*u[wt]+1]===0;wt--);return Oe.opt_len+=3*(wt+1)+5+5+4,wt})(L),ye=L.opt_len+3+7>>>3,Ae=L.static_len+3+7>>>3,Ae<=ye&&(ye=Ae)):ye=Ae=O+5,O+4<=ye&&X!==-1?Se(L,X,O,ke):L.strategy===4||Ae===ye?(P(L,2+(ke?1:0),3),W(L,h,p)):(P(L,4+(ke?1:0),3),((Oe,wt,Ve,et)=>{let ii;for(P(Oe,wt-257,5),P(Oe,Ve-1,5),P(Oe,et-4,4),ii=0;ii<et;ii++)P(Oe,Oe.bl_tree[2*u[ii]+1],3);me(Oe,Oe.dyn_ltree,wt-1),me(Oe,Oe.dyn_dtree,Ve-1)})(L,L.l_desc.max_code+1,L.d_desc.max_code+1,tt+1),W(L,L.dyn_ltree,L.dyn_dtree)),F(L),ke&&N(L)},Qe={_tr_init:L=>{Ie||((()=>{let X,O,ke,ye,Ae;const tt=new Array(16);for(ke=0,ye=0;ye<28;ye++)for(m[ye]=ke,X=0;X<1<<l[ye];X++)f[ke++]=ye;for(f[ke-1]=ye,Ae=0,ye=0;ye<16;ye++)for(g[ye]=Ae,X=0;X<1<<c[ye];X++)A[Ae++]=ye;for(Ae>>=7;ye<a;ye++)for(g[ye]=Ae<<7,X=0;X<1<<c[ye]-7;X++)A[256+Ae++]=ye;for(O=0;O<=s;O++)tt[O]=0;for(X=0;X<=143;)h[2*X+1]=8,X++,tt[8]++;for(;X<=255;)h[2*X+1]=9,X++,tt[9]++;for(;X<=279;)h[2*X+1]=7,X++,tt[7]++;for(;X<=287;)h[2*X+1]=8,X++,tt[8]++;for(R(h,287,tt),X=0;X<a;X++)p[2*X+1]=5,p[2*X]=T(X,5);v=new y(h,l,257,n,s),b=new y(p,c,0,a,s),x=new y(new Array(0),d,0,19,7)})(),Ie=!0),L.l_desc=new k(L.dyn_ltree,v),L.d_desc=new k(L.dyn_dtree,b),L.bl_desc=new k(L.bl_tree,x),L.bi_buf=0,L.bi_valid=0,F(L)},_tr_stored_block:Se,_tr_flush_block:qe,_tr_tally:(L,X,O)=>(L.pending_buf[L.sym_buf+L.sym_next++]=X,L.pending_buf[L.sym_buf+L.sym_next++]=X>>8,L.pending_buf[L.sym_buf+L.sym_next++]=O,X===0?L.dyn_ltree[2*O]++:(L.matches++,X--,L.dyn_ltree[2*(f[O]+r+1)]++,L.dyn_dtree[2*E(X)]++),L.sym_next===L.sym_end),_tr_align:L=>{P(L,2,3),D(L,256,h),(X=>{X.bi_valid===16?(B(X,X.bi_buf),X.bi_buf=0,X.bi_valid=0):X.bi_valid>=8&&(X.pending_buf[X.pending++]=255&X.bi_buf,X.bi_buf>>=8,X.bi_valid-=8)})(L)}},Ce=(L,X,O,ke)=>{let ye=65535&L|0,Ae=L>>>16&65535|0,tt=0;for(;O!==0;){tt=O>2e3?2e3:O,O-=tt;do ye=ye+X[ke++]|0,Ae=Ae+ye|0;while(--tt);ye%=65521,Ae%=65521}return ye|Ae<<16|0};const Le=new Uint32Array((()=>{let L,X=[];for(var O=0;O<256;O++){L=O;for(var ke=0;ke<8;ke++)L=1&L?3988292384^L>>>1:L>>>1;X[O]=L}return X})());var Fe=(L,X,O,ke)=>{const ye=Le,Ae=ke+O;L^=-1;for(let tt=ke;tt<Ae;tt++)L=L>>>8^ye[255&(L^X[tt])];return-1^L},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:we,_tr_stored_block:Re,_tr_flush_block:We,_tr_tally:H,_tr_align:ee}=Qe,{Z_NO_FLUSH:ae,Z_PARTIAL_FLUSH:Me,Z_FULL_FLUSH:pe,Z_FINISH:Q,Z_BLOCK:Z,Z_OK:ie,Z_STREAM_END:re,Z_STREAM_ERROR:ne,Z_DATA_ERROR:G,Z_BUF_ERROR:J,Z_DEFAULT_COMPRESSION:ue,Z_FILTERED:xe,Z_HUFFMAN_ONLY:oe,Z_RLE:Ee,Z_FIXED:je,Z_DEFAULT_STRATEGY:he,Z_UNKNOWN:Ne,Z_DEFLATED:Be}=ge,He=258,rt=262,At=42,ft=113,lt=666,ut=(L,X)=>(L.msg=ve[X],X),Te=L=>2*L-(L>4?9:0),st=L=>{let X=L.length;for(;--X>=0;)L[X]=0},dt=L=>{let X,O,ke,ye=L.w_size;X=L.hash_size,ke=X;do O=L.head[--ke],L.head[ke]=O>=ye?O-ye:0;while(--X);X=ye,ke=X;do O=L.prev[--ke],L.prev[ke]=O>=ye?O-ye:0;while(--X)};let Ye=(L,X,O)=>(X<<L.hash_shift^O)&L.hash_mask;const fe=L=>{const X=L.state;let O=X.pending;O>L.avail_out&&(O=L.avail_out),O!==0&&(L.output.set(X.pending_buf.subarray(X.pending_out,X.pending_out+O),L.next_out),L.next_out+=O,X.pending_out+=O,L.total_out+=O,L.avail_out-=O,X.pending-=O,X.pending===0&&(X.pending_out=0))},be=(L,X)=>{We(L,L.block_start>=0?L.block_start:-1,L.strstart-L.block_start,X),L.block_start=L.strstart,fe(L.strm)},$e=(L,X)=>{L.pending_buf[L.pending++]=X},ht=(L,X)=>{L.pending_buf[L.pending++]=X>>>8&255,L.pending_buf[L.pending++]=255&X},St=(L,X,O,ke)=>{let ye=L.avail_in;return ye>ke&&(ye=ke),ye===0?0:(L.avail_in-=ye,X.set(L.input.subarray(L.next_in,L.next_in+ye),O),L.state.wrap===1?L.adler=Ce(L.adler,X,ye,O):L.state.wrap===2&&(L.adler=Fe(L.adler,X,ye,O)),L.next_in+=ye,L.total_in+=ye,ye)},xt=(L,X)=>{let O,ke,ye=L.max_chain_length,Ae=L.strstart,tt=L.prev_length,Oe=L.nice_match;const wt=L.strstart>L.w_size-rt?L.strstart-(L.w_size-rt):0,Ve=L.window,et=L.w_mask,ii=L.prev,zt=L.strstart+He;let Ct=Ve[Ae+tt-1],Ho=Ve[Ae+tt];L.prev_length>=L.good_match&&(ye>>=2),Oe>L.lookahead&&(Oe=L.lookahead);do if(O=X,Ve[O+tt]===Ho&&Ve[O+tt-1]===Ct&&Ve[O]===Ve[Ae]&&Ve[++O]===Ve[Ae+1]){Ae+=2,O++;do;while(Ve[++Ae]===Ve[++O]&&Ve[++Ae]===Ve[++O]&&Ve[++Ae]===Ve[++O]&&Ve[++Ae]===Ve[++O]&&Ve[++Ae]===Ve[++O]&&Ve[++Ae]===Ve[++O]&&Ve[++Ae]===Ve[++O]&&Ve[++Ae]===Ve[++O]&&Ae<zt);if(ke=He-(zt-Ae),Ae=zt-He,ke>tt){if(L.match_start=X,tt=ke,ke>=Oe)break;Ct=Ve[Ae+tt-1],Ho=Ve[Ae+tt]}}while((X=ii[X&et])>wt&&--ye!=0);return tt<=L.lookahead?tt:L.lookahead},gi=L=>{const X=L.w_size;let O,ke,ye;do{if(ke=L.window_size-L.lookahead-L.strstart,L.strstart>=X+(X-rt)&&(L.window.set(L.window.subarray(X,X+X-ke),0),L.match_start-=X,L.strstart-=X,L.block_start-=X,L.insert>L.strstart&&(L.insert=L.strstart),dt(L),ke+=X),L.strm.avail_in===0)break;if(O=St(L.strm,L.window,L.strstart+L.lookahead,ke),L.lookahead+=O,L.lookahead+L.insert>=3)for(ye=L.strstart-L.insert,L.ins_h=L.window[ye],L.ins_h=Ye(L,L.ins_h,L.window[ye+1]);L.insert&&(L.ins_h=Ye(L,L.ins_h,L.window[ye+3-1]),L.prev[ye&L.w_mask]=L.head[L.ins_h],L.head[L.ins_h]=ye,ye++,L.insert--,!(L.lookahead+L.insert<3)););}while(L.lookahead<rt&&L.strm.avail_in!==0)},ji=(L,X)=>{let O,ke,ye,Ae=L.pending_buf_size-5>L.w_size?L.w_size:L.pending_buf_size-5,tt=0,Oe=L.strm.avail_in;do{if(O=65535,ye=L.bi_valid+42>>3,L.strm.avail_out<ye||(ye=L.strm.avail_out-ye,ke=L.strstart-L.block_start,O>ke+L.strm.avail_in&&(O=ke+L.strm.avail_in),O>ye&&(O=ye),O<Ae&&(O===0&&X!==Q||X===ae||O!==ke+L.strm.avail_in)))break;tt=X===Q&&O===ke+L.strm.avail_in?1:0,Re(L,0,0,tt),L.pending_buf[L.pending-4]=O,L.pending_buf[L.pending-3]=O>>8,L.pending_buf[L.pending-2]=~O,L.pending_buf[L.pending-1]=~O>>8,fe(L.strm),ke&&(ke>O&&(ke=O),L.strm.output.set(L.window.subarray(L.block_start,L.block_start+ke),L.strm.next_out),L.strm.next_out+=ke,L.strm.avail_out-=ke,L.strm.total_out+=ke,L.block_start+=ke,O-=ke),O&&(St(L.strm,L.strm.output,L.strm.next_out,O),L.strm.next_out+=O,L.strm.avail_out-=O,L.strm.total_out+=O)}while(tt===0);return Oe-=L.strm.avail_in,Oe&&(Oe>=L.w_size?(L.matches=2,L.window.set(L.strm.input.subarray(L.strm.next_in-L.w_size,L.strm.next_in),0),L.strstart=L.w_size,L.insert=L.strstart):(L.window_size-L.strstart<=Oe&&(L.strstart-=L.w_size,L.window.set(L.window.subarray(L.w_size,L.w_size+L.strstart),0),L.matches<2&&L.matches++,L.insert>L.strstart&&(L.insert=L.strstart)),L.window.set(L.strm.input.subarray(L.strm.next_in-Oe,L.strm.next_in),L.strstart),L.strstart+=Oe,L.insert+=Oe>L.w_size-L.insert?L.w_size-L.insert:Oe),L.block_start=L.strstart),L.high_water<L.strstart&&(L.high_water=L.strstart),tt?4:X!==ae&&X!==Q&&L.strm.avail_in===0&&L.strstart===L.block_start?2:(ye=L.window_size-L.strstart,L.strm.avail_in>ye&&L.block_start>=L.w_size&&(L.block_start-=L.w_size,L.strstart-=L.w_size,L.window.set(L.window.subarray(L.w_size,L.w_size+L.strstart),0),L.matches<2&&L.matches++,ye+=L.w_size,L.insert>L.strstart&&(L.insert=L.strstart)),ye>L.strm.avail_in&&(ye=L.strm.avail_in),ye&&(St(L.strm,L.window,L.strstart,ye),L.strstart+=ye,L.insert+=ye>L.w_size-L.insert?L.w_size-L.insert:ye),L.high_water<L.strstart&&(L.high_water=L.strstart),ye=L.bi_valid+42>>3,ye=L.pending_buf_size-ye>65535?65535:L.pending_buf_size-ye,Ae=ye>L.w_size?L.w_size:ye,ke=L.strstart-L.block_start,(ke>=Ae||(ke||X===Q)&&X!==ae&&L.strm.avail_in===0&&ke<=ye)&&(O=ke>ye?ye:ke,tt=X===Q&&L.strm.avail_in===0&&O===ke?1:0,Re(L,L.block_start,O,tt),L.block_start+=O,fe(L.strm)),tt?3:1)},Eo=(L,X)=>{let O,ke;for(;;){if(L.lookahead<rt){if(gi(L),L.lookahead<rt&&X===ae)return 1;if(L.lookahead===0)break}if(O=0,L.lookahead>=3&&(L.ins_h=Ye(L,L.ins_h,L.window[L.strstart+3-1]),O=L.prev[L.strstart&L.w_mask]=L.head[L.ins_h],L.head[L.ins_h]=L.strstart),O!==0&&L.strstart-O<=L.w_size-rt&&(L.match_length=xt(L,O)),L.match_length>=3)if(ke=H(L,L.strstart-L.match_start,L.match_length-3),L.lookahead-=L.match_length,L.match_length<=L.max_lazy_match&&L.lookahead>=3){L.match_length--;do L.strstart++,L.ins_h=Ye(L,L.ins_h,L.window[L.strstart+3-1]),O=L.prev[L.strstart&L.w_mask]=L.head[L.ins_h],L.head[L.ins_h]=L.strstart;while(--L.match_length!=0);L.strstart++}else L.strstart+=L.match_length,L.match_length=0,L.ins_h=L.window[L.strstart],L.ins_h=Ye(L,L.ins_h,L.window[L.strstart+1]);else ke=H(L,0,L.window[L.strstart]),L.lookahead--,L.strstart++;if(ke&&(be(L,!1),L.strm.avail_out===0))return 1}return L.insert=L.strstart<2?L.strstart:2,X===Q?(be(L,!0),L.strm.avail_out===0?3:4):L.sym_next&&(be(L,!1),L.strm.avail_out===0)?1:2},to=(L,X)=>{let O,ke,ye;for(;;){if(L.lookahead<rt){if(gi(L),L.lookahead<rt&&X===ae)return 1;if(L.lookahead===0)break}if(O=0,L.lookahead>=3&&(L.ins_h=Ye(L,L.ins_h,L.window[L.strstart+3-1]),O=L.prev[L.strstart&L.w_mask]=L.head[L.ins_h],L.head[L.ins_h]=L.strstart),L.prev_length=L.match_length,L.prev_match=L.match_start,L.match_length=2,O!==0&&L.prev_length<L.max_lazy_match&&L.strstart-O<=L.w_size-rt&&(L.match_length=xt(L,O),L.match_length<=5&&(L.strategy===xe||L.match_length===3&&L.strstart-L.match_start>4096)&&(L.match_length=2)),L.prev_length>=3&&L.match_length<=L.prev_length){ye=L.strstart+L.lookahead-3,ke=H(L,L.strstart-1-L.prev_match,L.prev_length-3),L.lookahead-=L.prev_length-1,L.prev_length-=2;do++L.strstart<=ye&&(L.ins_h=Ye(L,L.ins_h,L.window[L.strstart+3-1]),O=L.prev[L.strstart&L.w_mask]=L.head[L.ins_h],L.head[L.ins_h]=L.strstart);while(--L.prev_length!=0);if(L.match_available=0,L.match_length=2,L.strstart++,ke&&(be(L,!1),L.strm.avail_out===0))return 1}else if(L.match_available){if(ke=H(L,0,L.window[L.strstart-1]),ke&&be(L,!1),L.strstart++,L.lookahead--,L.strm.avail_out===0)return 1}else L.match_available=1,L.strstart++,L.lookahead--}return L.match_available&&(ke=H(L,0,L.window[L.strstart-1]),L.match_available=0),L.insert=L.strstart<2?L.strstart:2,X===Q?(be(L,!0),L.strm.avail_out===0?3:4):L.sym_next&&(be(L,!1),L.strm.avail_out===0)?1:2};function lr(L,X,O,ke,ye){this.good_length=L,this.max_lazy=X,this.nice_length=O,this.max_chain=ke,this.func=ye}const Vi=[new lr(0,0,0,0,ji),new lr(4,4,8,4,Eo),new lr(4,5,16,8,Eo),new lr(4,6,32,32,Eo),new lr(4,4,16,16,to),new lr(8,16,32,32,to),new lr(8,16,128,128,to),new lr(8,32,128,256,to),new lr(32,128,258,1024,to),new lr(32,258,258,4096,to)];function hh(){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=Be,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),st(this.dyn_ltree),st(this.dyn_dtree),st(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),st(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),st(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 ps=L=>{if(!L)return 1;const X=L.state;return!X||X.strm!==L||X.status!==At&&X.status!==57&&X.status!==69&&X.status!==73&&X.status!==91&&X.status!==103&&X.status!==ft&&X.status!==lt?1:0},y2=L=>{if(ps(L))return ut(L,ne);L.total_in=L.total_out=0,L.data_type=Ne;const X=L.state;return X.pending=0,X.pending_out=0,X.wrap<0&&(X.wrap=-X.wrap),X.status=X.wrap===2?57:X.wrap?At:ft,L.adler=X.wrap===2?0:1,X.last_flush=-2,we(X),ie},Nd=L=>{const X=y2(L);var O;return X===ie&&((O=L.state).window_size=2*O.w_size,st(O.head),O.max_lazy_match=Vi[O.level].max_lazy,O.good_match=Vi[O.level].good_length,O.nice_match=Vi[O.level].nice_length,O.max_chain_length=Vi[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),X},b2=(L,X,O,ke,ye,Ae)=>{if(!L)return ne;let tt=1;if(X===ue&&(X=6),ke<0?(tt=0,ke=-ke):ke>15&&(tt=2,ke-=16),ye<1||ye>9||O!==Be||ke<8||ke>15||X<0||X>9||Ae<0||Ae>je||ke===8&&tt!==1)return ut(L,ne);ke===8&&(ke=9);const Oe=new hh;return L.state=Oe,Oe.strm=L,Oe.status=At,Oe.wrap=tt,Oe.gzhead=null,Oe.w_bits=ke,Oe.w_size=1<<Oe.w_bits,Oe.w_mask=Oe.w_size-1,Oe.hash_bits=ye+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<<ye+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=X,Oe.strategy=Ae,Oe.method=O,Nd(L)};var vc={deflateInit:(L,X)=>b2(L,X,Be,15,8,he),deflateInit2:b2,deflateReset:Nd,deflateResetKeep:y2,deflateSetHeader:(L,X)=>ps(L)||L.state.wrap!==2?ne:(L.state.gzhead=X,ie),deflate:(L,X)=>{if(ps(L)||X>Z||X<0)return L?ut(L,ne):ne;const O=L.state;if(!L.output||L.avail_in!==0&&!L.input||O.status===lt&&X!==Q)return ut(L,L.avail_out===0?J:ne);const ke=O.last_flush;if(O.last_flush=X,O.pending!==0){if(fe(L),L.avail_out===0)return O.last_flush=-1,ie}else if(L.avail_in===0&&Te(X)<=Te(ke)&&X!==Q)return ut(L,J);if(O.status===lt&&L.avail_in!==0)return ut(L,J);if(O.status===At&&O.wrap===0&&(O.status=ft),O.status===At){let ye=Be+(O.w_bits-8<<4)<<8,Ae=-1;if(Ae=O.strategy>=oe||O.level<2?0:O.level<6?1:O.level===6?2:3,ye|=Ae<<6,O.strstart!==0&&(ye|=32),ye+=31-ye%31,ht(O,ye),O.strstart!==0&&(ht(O,L.adler>>>16),ht(O,65535&L.adler)),L.adler=1,O.status=ft,fe(L),O.pending!==0)return O.last_flush=-1,ie}if(O.status===57){if(L.adler=0,$e(O,31),$e(O,139),$e(O,8),O.gzhead)$e(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)),$e(O,255&O.gzhead.time),$e(O,O.gzhead.time>>8&255),$e(O,O.gzhead.time>>16&255),$e(O,O.gzhead.time>>24&255),$e(O,O.level===9?2:O.strategy>=oe||O.level<2?4:0),$e(O,255&O.gzhead.os),O.gzhead.extra&&O.gzhead.extra.length&&($e(O,255&O.gzhead.extra.length),$e(O,O.gzhead.extra.length>>8&255)),O.gzhead.hcrc&&(L.adler=Fe(L.adler,O.pending_buf,O.pending,0)),O.gzindex=0,O.status=69;else if($e(O,0),$e(O,0),$e(O,0),$e(O,0),$e(O,0),$e(O,O.level===9?2:O.strategy>=oe||O.level<2?4:0),$e(O,3),O.status=ft,fe(L),O.pending!==0)return O.last_flush=-1,ie}if(O.status===69){if(O.gzhead.extra){let ye=O.pending,Ae=(65535&O.gzhead.extra.length)-O.gzindex;for(;O.pending+Ae>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>ye&&(L.adler=Fe(L.adler,O.pending_buf,O.pending-ye,ye)),O.gzindex+=Oe,fe(L),O.pending!==0)return O.last_flush=-1,ie;ye=0,Ae-=Oe}let tt=new Uint8Array(O.gzhead.extra);O.pending_buf.set(tt.subarray(O.gzindex,O.gzindex+Ae),O.pending),O.pending+=Ae,O.gzhead.hcrc&&O.pending>ye&&(L.adler=Fe(L.adler,O.pending_buf,O.pending-ye,ye)),O.gzindex=0}O.status=73}if(O.status===73){if(O.gzhead.name){let ye,Ae=O.pending;do{if(O.pending===O.pending_buf_size){if(O.gzhead.hcrc&&O.pending>Ae&&(L.adler=Fe(L.adler,O.pending_buf,O.pending-Ae,Ae)),fe(L),O.pending!==0)return O.last_flush=-1,ie;Ae=0}ye=O.gzindex<O.gzhead.name.length?255&O.gzhead.name.charCodeAt(O.gzindex++):0,$e(O,ye)}while(ye!==0);O.gzhead.hcrc&&O.pending>Ae&&(L.adler=Fe(L.adler,O.pending_buf,O.pending-Ae,Ae)),O.gzindex=0}O.status=91}if(O.status===91){if(O.gzhead.comment){let ye,Ae=O.pending;do{if(O.pending===O.pending_buf_size){if(O.gzhead.hcrc&&O.pending>Ae&&(L.adler=Fe(L.adler,O.pending_buf,O.pending-Ae,Ae)),fe(L),O.pending!==0)return O.last_flush=-1,ie;Ae=0}ye=O.gzindex<O.gzhead.comment.length?255&O.gzhead.comment.charCodeAt(O.gzindex++):0,$e(O,ye)}while(ye!==0);O.gzhead.hcrc&&O.pending>Ae&&(L.adler=Fe(L.adler,O.pending_buf,O.pending-Ae,Ae))}O.status=103}if(O.status===103){if(O.gzhead.hcrc){if(O.pending+2>O.pending_buf_size&&(fe(L),O.pending!==0))return O.last_flush=-1,ie;$e(O,255&L.adler),$e(O,L.adler>>8&255),L.adler=0}if(O.status=ft,fe(L),O.pending!==0)return O.last_flush=-1,ie}if(L.avail_in!==0||O.lookahead!==0||X!==ae&&O.status!==lt){let ye=O.level===0?ji(O,X):O.strategy===oe?((Ae,tt)=>{let Oe;for(;;){if(Ae.lookahead===0&&(gi(Ae),Ae.lookahead===0)){if(tt===ae)return 1;break}if(Ae.match_length=0,Oe=H(Ae,0,Ae.window[Ae.strstart]),Ae.lookahead--,Ae.strstart++,Oe&&(be(Ae,!1),Ae.strm.avail_out===0))return 1}return Ae.insert=0,tt===Q?(be(Ae,!0),Ae.strm.avail_out===0?3:4):Ae.sym_next&&(be(Ae,!1),Ae.strm.avail_out===0)?1:2})(O,X):O.strategy===Ee?((Ae,tt)=>{let Oe,wt,Ve,et;const ii=Ae.window;for(;;){if(Ae.lookahead<=He){if(gi(Ae),Ae.lookahead<=He&&tt===ae)return 1;if(Ae.lookahead===0)break}if(Ae.match_length=0,Ae.lookahead>=3&&Ae.strstart>0&&(Ve=Ae.strstart-1,wt=ii[Ve],wt===ii[++Ve]&&wt===ii[++Ve]&&wt===ii[++Ve])){et=Ae.strstart+He;do;while(wt===ii[++Ve]&&wt===ii[++Ve]&&wt===ii[++Ve]&&wt===ii[++Ve]&&wt===ii[++Ve]&&wt===ii[++Ve]&&wt===ii[++Ve]&&wt===ii[++Ve]&&Ve<et);Ae.match_length=He-(et-Ve),Ae.match_length>Ae.lookahead&&(Ae.match_length=Ae.lookahead)}if(Ae.match_length>=3?(Oe=H(Ae,1,Ae.match_length-3),Ae.lookahead-=Ae.match_length,Ae.strstart+=Ae.match_length,Ae.match_length=0):(Oe=H(Ae,0,Ae.window[Ae.strstart]),Ae.lookahead--,Ae.strstart++),Oe&&(be(Ae,!1),Ae.strm.avail_out===0))return 1}return Ae.insert=0,tt===Q?(be(Ae,!0),Ae.strm.avail_out===0?3:4):Ae.sym_next&&(be(Ae,!1),Ae.strm.avail_out===0)?1:2})(O,X):Vi[O.level].func(O,X);if(ye!==3&&ye!==4||(O.status=lt),ye===1||ye===3)return L.avail_out===0&&(O.last_flush=-1),ie;if(ye===2&&(X===Me?ee(O):X!==Z&&(Re(O,0,0,!1),X===pe&&(st(O.head),O.lookahead===0&&(O.strstart=0,O.block_start=0,O.insert=0))),fe(L),L.avail_out===0))return O.last_flush=-1,ie}return X!==Q?ie:O.wrap<=0?re:(O.wrap===2?($e(O,255&L.adler),$e(O,L.adler>>8&255),$e(O,L.adler>>16&255),$e(O,L.adler>>24&255),$e(O,255&L.total_in),$e(O,L.total_in>>8&255),$e(O,L.total_in>>16&255),$e(O,L.total_in>>24&255)):(ht(O,L.adler>>>16),ht(O,65535&L.adler)),fe(L),O.wrap>0&&(O.wrap=-O.wrap),O.pending!==0?ie:re)},deflateEnd:L=>{if(ps(L))return ne;const X=L.state.status;return L.state=null,X===ft?ut(L,G):ie},deflateSetDictionary:(L,X)=>{let O=X.length;if(ps(L))return ne;const ke=L.state,ye=ke.wrap;if(ye===2||ye===1&&ke.status!==At||ke.lookahead)return ne;if(ye===1&&(L.adler=Ce(L.adler,X,O,0)),ke.wrap=0,O>=ke.w_size){ye===0&&(st(ke.head),ke.strstart=0,ke.block_start=0,ke.insert=0);let wt=new Uint8Array(ke.w_size);wt.set(X.subarray(O-ke.w_size,O),0),X=wt,O=ke.w_size}const Ae=L.avail_in,tt=L.next_in,Oe=L.input;for(L.avail_in=O,L.next_in=0,L.input=X,gi(ke);ke.lookahead>=3;){let wt=ke.strstart,Ve=ke.lookahead-2;do ke.ins_h=Ye(ke,ke.ins_h,ke.window[wt+3-1]),ke.prev[wt&ke.w_mask]=ke.head[ke.ins_h],ke.head[ke.ins_h]=wt,wt++;while(--Ve);ke.strstart=wt,ke.lookahead=2,gi(ke)}return ke.strstart+=ke.lookahead,ke.block_start=ke.strstart,ke.insert=ke.lookahead,ke.lookahead=0,ke.match_length=ke.prev_length=2,ke.match_available=0,L.next_in=tt,L.input=Oe,L.avail_in=Ae,ke.wrap=ye,ie},deflateInfo:"pako deflate (from Nodeca project)"};const y9=(L,X)=>Object.prototype.hasOwnProperty.call(L,X);var o4=function(L){const X=Array.prototype.slice.call(arguments,1);for(;X.length;){const O=X.shift();if(O){if(typeof O!="object")throw new TypeError(O+"must be non-object");for(const ke in O)y9(O,ke)&&(L[ke]=O[ke])}}return L},r4=L=>{let X=0;for(let ke=0,ye=L.length;ke<ye;ke++)X+=L[ke].length;const O=new Uint8Array(X);for(let ke=0,ye=0,Ae=L.length;ke<Ae;ke++){let tt=L[ke];O.set(tt,ye),ye+=tt.length}return O};let n4=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{n4=!1}const jd=new Uint8Array(256);for(let L=0;L<256;L++)jd[L]=L>=252?6:L>=248?5:L>=240?4:L>=224?3:L>=192?2:1;jd[254]=jd[254]=1;var w2=L=>{if(typeof TextEncoder=="function"&&TextEncoder.prototype.encode)return new TextEncoder().encode(L);let X,O,ke,ye,Ae,tt=L.length,Oe=0;for(ye=0;ye<tt;ye++)O=L.charCodeAt(ye),(64512&O)==55296&&ye+1<tt&&(ke=L.charCodeAt(ye+1),(64512&ke)==56320&&(O=65536+(O-55296<<10)+(ke-56320),ye++)),Oe+=O<128?1:O<2048?2:O<65536?3:4;for(X=new Uint8Array(Oe),Ae=0,ye=0;Ae<Oe;ye++)O=L.charCodeAt(ye),(64512&O)==55296&&ye+1<tt&&(ke=L.charCodeAt(ye+1),(64512&ke)==56320&&(O=65536+(O-55296<<10)+(ke-56320),ye++)),O<128?X[Ae++]=O:O<2048?(X[Ae++]=192|O>>>6,X[Ae++]=128|63&O):O<65536?(X[Ae++]=224|O>>>12,X[Ae++]=128|O>>>6&63,X[Ae++]=128|63&O):(X[Ae++]=240|O>>>18,X[Ae++]=128|O>>>12&63,X[Ae++]=128|O>>>6&63,X[Ae++]=128|63&O);return X},se=(L,X)=>{const O=X||L.length;if(typeof TextDecoder=="function"&&TextDecoder.prototype.decode)return new TextDecoder().decode(L.subarray(0,X));let ke,ye;const Ae=new Array(2*O);for(ye=0,ke=0;ke<O;){let tt=L[ke++];if(tt<128){Ae[ye++]=tt;continue}let Oe=jd[tt];if(Oe>4)Ae[ye++]=65533,ke+=Oe-1;else{for(tt&=Oe===2?31:Oe===3?15:7;Oe>1&&ke<O;)tt=tt<<6|63&L[ke++],Oe--;Oe>1?Ae[ye++]=65533:tt<65536?Ae[ye++]=tt:(tt-=65536,Ae[ye++]=55296|tt>>10&1023,Ae[ye++]=56320|1023&tt)}}return((tt,Oe)=>{if(Oe<65534&&tt.subarray&&n4)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})(Ae,ye)},Ke=(L,X)=>{(X=X||L.length)>L.length&&(X=L.length);let O=X-1;for(;O>=0&&(192&L[O])==128;)O--;return O<0||O===0?X:O+jd[L[O]]>X?O:X},nt=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 at=Object.prototype.toString,{Z_NO_FLUSH:Ge,Z_SYNC_FLUSH:bt,Z_FULL_FLUSH:Rt,Z_FINISH:Ot,Z_OK:Ft,Z_STREAM_END:Yt,Z_DEFAULT_COMPRESSION:$t,Z_DEFAULT_STRATEGY:Xt,Z_DEFLATED:bi}=ge;function Di(L){this.options=o4({level:$t,method:bi,chunkSize:16384,windowBits:15,memLevel:8,strategy:Xt},L||{});let X=this.options;X.raw&&X.windowBits>0?X.windowBits=-X.windowBits:X.gzip&&X.windowBits>0&&X.windowBits<16&&(X.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new nt,this.strm.avail_out=0;let O=vc.deflateInit2(this.strm,X.level,X.method,X.windowBits,X.memLevel,X.strategy);if(O!==Ft)throw new Error(ve[O]);if(X.header&&vc.deflateSetHeader(this.strm,X.header),X.dictionary){let ke;if(ke=typeof X.dictionary=="string"?w2(X.dictionary):at.call(X.dictionary)==="[object ArrayBuffer]"?new Uint8Array(X.dictionary):X.dictionary,O=vc.deflateSetDictionary(this.strm,ke),O!==Ft)throw new Error(ve[O]);this._dict_set=!0}}function Zi(L,X){const O=new Di(X);if(O.push(L,!0),O.err)throw O.msg||ve[O.err];return O.result}Di.prototype.push=function(L,X){const O=this.strm,ke=this.options.chunkSize;let ye,Ae;if(this.ended)return!1;for(Ae=X===~~X?X:X===!0?Ot:Ge,typeof L=="string"?O.input=w2(L):at.call(L)==="[object ArrayBuffer]"?O.input=new Uint8Array(L):O.input=L,O.next_in=0,O.avail_in=O.input.length;;)if(O.avail_out===0&&(O.output=new Uint8Array(ke),O.next_out=0,O.avail_out=ke),(Ae===bt||Ae===Rt)&&O.avail_out<=6)this.onData(O.output.subarray(0,O.next_out)),O.avail_out=0;else{if(ye=vc.deflate(O,Ae),ye===Yt)return O.next_out>0&&this.onData(O.output.subarray(0,O.next_out)),ye=vc.deflateEnd(this.strm),this.onEnd(ye),this.ended=!0,ye===Ft;if(O.avail_out!==0){if(Ae>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},Di.prototype.onData=function(L){this.chunks.push(L)},Di.prototype.onEnd=function(L){L===Ft&&(this.result=r4(this.chunks)),this.chunks=[],this.err=L,this.msg=this.strm.msg};var bo={Deflate:Di,deflate:Zi,deflateRaw:function(L,X){return(X=X||{}).raw=!0,Zi(L,X)},gzip:function(L,X){return(X=X||{}).gzip=!0,Zi(L,X)}};const Fi=16209;var qt=function(L,X){let O,ke,ye,Ae,tt,Oe,wt,Ve,et,ii,zt,Ct,Ho,Ei,Qt,Ri,ti,kt,ei,Li,Pt,wi,oi,Gt;const ui=L.state;O=L.next_in,oi=L.input,ke=O+(L.avail_in-5),ye=L.next_out,Gt=L.output,Ae=ye-(X-L.avail_out),tt=ye+(L.avail_out-257),Oe=ui.dmax,wt=ui.wsize,Ve=ui.whave,et=ui.wnext,ii=ui.window,zt=ui.hold,Ct=ui.bits,Ho=ui.lencode,Ei=ui.distcode,Qt=(1<<ui.lenbits)-1,Ri=(1<<ui.distbits)-1;e:do{Ct<15&&(zt+=oi[O++]<<Ct,Ct+=8,zt+=oi[O++]<<Ct,Ct+=8),ti=Ho[zt&Qt];t:for(;;){if(kt=ti>>>24,zt>>>=kt,Ct-=kt,kt=ti>>>16&255,kt===0)Gt[ye++]=65535&ti;else{if(!(16&kt)){if((64&kt)==0){ti=Ho[(65535&ti)+(zt&(1<<kt)-1)];continue t}if(32&kt){ui.mode=16191;break e}L.msg="invalid literal/length code",ui.mode=Fi;break e}ei=65535&ti,kt&=15,kt&&(Ct<kt&&(zt+=oi[O++]<<Ct,Ct+=8),ei+=zt&(1<<kt)-1,zt>>>=kt,Ct-=kt),Ct<15&&(zt+=oi[O++]<<Ct,Ct+=8,zt+=oi[O++]<<Ct,Ct+=8),ti=Ei[zt&Ri];i:for(;;){if(kt=ti>>>24,zt>>>=kt,Ct-=kt,kt=ti>>>16&255,!(16&kt)){if((64&kt)==0){ti=Ei[(65535&ti)+(zt&(1<<kt)-1)];continue i}L.msg="invalid distance code",ui.mode=Fi;break e}if(Li=65535&ti,kt&=15,Ct<kt&&(zt+=oi[O++]<<Ct,Ct+=8,Ct<kt&&(zt+=oi[O++]<<Ct,Ct+=8)),Li+=zt&(1<<kt)-1,Li>Oe){L.msg="invalid distance too far back",ui.mode=Fi;break e}if(zt>>>=kt,Ct-=kt,kt=ye-Ae,Li>kt){if(kt=Li-kt,kt>Ve&&ui.sane){L.msg="invalid distance too far back",ui.mode=Fi;break e}if(Pt=0,wi=ii,et===0){if(Pt+=wt-kt,kt<ei){ei-=kt;do Gt[ye++]=ii[Pt++];while(--kt);Pt=ye-Li,wi=Gt}}else if(et<kt){if(Pt+=wt+et-kt,kt-=et,kt<ei){ei-=kt;do Gt[ye++]=ii[Pt++];while(--kt);if(Pt=0,et<ei){kt=et,ei-=kt;do Gt[ye++]=ii[Pt++];while(--kt);Pt=ye-Li,wi=Gt}}}else if(Pt+=et-kt,kt<ei){ei-=kt;do Gt[ye++]=ii[Pt++];while(--kt);Pt=ye-Li,wi=Gt}for(;ei>2;)Gt[ye++]=wi[Pt++],Gt[ye++]=wi[Pt++],Gt[ye++]=wi[Pt++],ei-=3;ei&&(Gt[ye++]=wi[Pt++],ei>1&&(Gt[ye++]=wi[Pt++]))}else{Pt=ye-Li;do Gt[ye++]=Gt[Pt++],Gt[ye++]=Gt[Pt++],Gt[ye++]=Gt[Pt++],ei-=3;while(ei>2);ei&&(Gt[ye++]=Gt[Pt++],ei>1&&(Gt[ye++]=Gt[Pt++]))}break}}break}}while(O<ke&&ye<tt);ei=Ct>>3,O-=ei,Ct-=ei<<3,zt&=(1<<Ct)-1,L.next_in=O,L.next_out=ye,L.avail_in=O<ke?ke-O+5:5-(O-ke),L.avail_out=ye<tt?tt-ye+257:257-(ye-tt),ui.hold=zt,ui.bits=Ct};const Oo=15,Da=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]),zn=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]),yc=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]),$r=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 Ra=(L,X,O,ke,ye,Ae,tt,Oe)=>{const wt=Oe.bits;let Ve,et,ii,zt,Ct,Ho,Ei=0,Qt=0,Ri=0,ti=0,kt=0,ei=0,Li=0,Pt=0,wi=0,oi=0,Gt=null;const ui=new Uint16Array(16),en=new Uint16Array(16);let M2,d4,u4,h4=null;for(Ei=0;Ei<=Oo;Ei++)ui[Ei]=0;for(Qt=0;Qt<ke;Qt++)ui[X[O+Qt]]++;for(kt=wt,ti=Oo;ti>=1&&ui[ti]===0;ti--);if(kt>ti&&(kt=ti),ti===0)return ye[Ae++]=20971520,ye[Ae++]=20971520,Oe.bits=1,0;for(Ri=1;Ri<ti&&ui[Ri]===0;Ri++);for(kt<Ri&&(kt=Ri),Pt=1,Ei=1;Ei<=Oo;Ei++)if(Pt<<=1,Pt-=ui[Ei],Pt<0)return-1;if(Pt>0&&(L===0||ti!==1))return-1;for(en[1]=0,Ei=1;Ei<Oo;Ei++)en[Ei+1]=en[Ei]+ui[Ei];for(Qt=0;Qt<ke;Qt++)X[O+Qt]!==0&&(tt[en[X[O+Qt]]++]=Qt);if(L===0?(Gt=h4=tt,Ho=20):L===1?(Gt=Da,h4=zn,Ho=257):(Gt=yc,h4=$r,Ho=0),oi=0,Qt=0,Ei=Ri,Ct=Ae,ei=kt,Li=0,ii=-1,wi=1<<kt,zt=wi-1,L===1&&wi>852||L===2&&wi>592)return 1;for(;;){M2=Ei-Li,tt[Qt]+1<Ho?(d4=0,u4=tt[Qt]):tt[Qt]>=Ho?(d4=h4[tt[Qt]-Ho],u4=Gt[tt[Qt]-Ho]):(d4=96,u4=0),Ve=1<<Ei-Li,et=1<<ei,Ri=et;do et-=Ve,ye[Ct+(oi>>Li)+et]=M2<<24|d4<<16|u4|0;while(et!==0);for(Ve=1<<Ei-1;oi&Ve;)Ve>>=1;if(Ve!==0?(oi&=Ve-1,oi+=Ve):oi=0,Qt++,--ui[Ei]==0){if(Ei===ti)break;Ei=X[O+tt[Qt]]}if(Ei>kt&&(oi&zt)!==ii){for(Li===0&&(Li=kt),Ct+=Ri,ei=Ei-Li,Pt=1<<ei;ei+Li<ti&&(Pt-=ui[ei+Li],!(Pt<=0));)ei++,Pt<<=1;if(wi+=1<<ei,L===1&&wi>852||L===2&&wi>592)return 1;ii=oi&zt,ye[ii]=kt<<24|ei<<16|Ct-Ae|0}}return oi!==0&&(ye[Ct+oi]=Ei-Li<<24|64<<16|0),Oe.bits=kt,0};const{Z_FINISH:po,Z_BLOCK:kn,Z_TREES:Mr,Z_OK:wo,Z_STREAM_END:Hn,Z_NEED_DICT:C2,Z_STREAM_ERROR:tr,Z_DATA_ERROR:hL,Z_MEM_ERROR:pL,Z_BUF_ERROR:O0e,Z_DEFLATED:fL}=ge,a4=16180,s4=16190,al=16191,b9=16192,w9=16194,l4=16199,c4=16200,C9=16206,Bo=16209,AL=L=>(L>>>24&255)+(L>>>8&65280)+((65280&L)<<8)+((255&L)<<24);function U0e(){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 Vd=L=>{if(!L)return 1;const X=L.state;return!X||X.strm!==L||X.mode<a4||X.mode>16211?1:0},gL=L=>{if(Vd(L))return tr;const X=L.state;return L.total_in=L.total_out=X.total=0,L.msg="",X.wrap&&(L.adler=1&X.wrap),X.mode=a4,X.last=0,X.havedict=0,X.flags=-1,X.dmax=32768,X.head=null,X.hold=0,X.bits=0,X.lencode=X.lendyn=new Int32Array(852),X.distcode=X.distdyn=new Int32Array(592),X.sane=1,X.back=-1,wo},mL=L=>{if(Vd(L))return tr;const X=L.state;return X.wsize=0,X.whave=0,X.wnext=0,gL(L)},vL=(L,X)=>{let O;if(Vd(L))return tr;const ke=L.state;return X<0?(O=0,X=-X):(O=5+(X>>4),X<48&&(X&=15)),X&&(X<8||X>15)?tr:(ke.window!==null&&ke.wbits!==X&&(ke.window=null),ke.wrap=O,ke.wbits=X,mL(L))},yL=(L,X)=>{if(!L)return tr;const O=new U0e;L.state=O,O.strm=L,O.window=null,O.mode=a4;const ke=vL(L,X);return ke!==wo&&(L.state=null),ke};let x9,k9,bL=!0;const N0e=L=>{if(bL){x9=new Int32Array(512),k9=new Int32Array(32);let X=0;for(;X<144;)L.lens[X++]=8;for(;X<256;)L.lens[X++]=9;for(;X<280;)L.lens[X++]=7;for(;X<288;)L.lens[X++]=8;for(Ra(1,L.lens,0,288,x9,0,L.work,{bits:9}),X=0;X<32;)L.lens[X++]=5;Ra(2,L.lens,0,32,k9,0,L.work,{bits:5}),bL=!1}L.lencode=x9,L.lenbits=9,L.distcode=k9,L.distbits=5},wL=(L,X,O,ke)=>{let ye;const Ae=L.state;return Ae.window===null&&(Ae.wsize=1<<Ae.wbits,Ae.wnext=0,Ae.whave=0,Ae.window=new Uint8Array(Ae.wsize)),ke>=Ae.wsize?(Ae.window.set(X.subarray(O-Ae.wsize,O),0),Ae.wnext=0,Ae.whave=Ae.wsize):(ye=Ae.wsize-Ae.wnext,ye>ke&&(ye=ke),Ae.window.set(X.subarray(O-ke,O-ke+ye),Ae.wnext),(ke-=ye)?(Ae.window.set(X.subarray(O-ke,O),0),Ae.wnext=ke,Ae.whave=Ae.wsize):(Ae.wnext+=ye,Ae.wnext===Ae.wsize&&(Ae.wnext=0),Ae.whave<Ae.wsize&&(Ae.whave+=ye))),0};var sl={inflateReset:mL,inflateReset2:vL,inflateResetKeep:gL,inflateInit:L=>yL(L,15),inflateInit2:yL,inflate:(L,X)=>{let O,ke,ye,Ae,tt,Oe,wt,Ve,et,ii,zt,Ct,Ho,Ei,Qt,Ri,ti,kt,ei,Li,Pt,wi,oi=0;const Gt=new Uint8Array(4);let ui,en;const M2=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(Vd(L)||!L.output||!L.input&&L.avail_in!==0)return tr;O=L.state,O.mode===al&&(O.mode=b9),tt=L.next_out,ye=L.output,wt=L.avail_out,Ae=L.next_in,ke=L.input,Oe=L.avail_in,Ve=O.hold,et=O.bits,ii=Oe,zt=wt,wi=wo;e:for(;;)switch(O.mode){case a4:if(O.wrap===0){O.mode=b9;break}for(;et<16;){if(Oe===0)break e;Oe--,Ve+=ke[Ae++]<<et,et+=8}if(2&O.wrap&&Ve===35615){O.wbits===0&&(O.wbits=15),O.check=0,Gt[0]=255&Ve,Gt[1]=Ve>>>8&255,O.check=Fe(O.check,Gt,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){L.msg="incorrect header check",O.mode=Bo;break}if((15&Ve)!==fL){L.msg="unknown compression method",O.mode=Bo;break}if(Ve>>>=4,et-=4,Pt=8+(15&Ve),O.wbits===0&&(O.wbits=Pt),Pt>15||Pt>O.wbits){L.msg="invalid window size",O.mode=Bo;break}O.dmax=1<<O.wbits,O.flags=0,L.adler=O.check=1,O.mode=512&Ve?16189:al,Ve=0,et=0;break;case 16181:for(;et<16;){if(Oe===0)break e;Oe--,Ve+=ke[Ae++]<<et,et+=8}if(O.flags=Ve,(255&O.flags)!==fL){L.msg="unknown compression method",O.mode=Bo;break}if(57344&O.flags){L.msg="unknown header flags set",O.mode=Bo;break}O.head&&(O.head.text=Ve>>8&1),512&O.flags&&4&O.wrap&&(Gt[0]=255&Ve,Gt[1]=Ve>>>8&255,O.check=Fe(O.check,Gt,2,0)),Ve=0,et=0,O.mode=16182;case 16182:for(;et<32;){if(Oe===0)break e;Oe--,Ve+=ke[Ae++]<<et,et+=8}O.head&&(O.head.time=Ve),512&O.flags&&4&O.wrap&&(Gt[0]=255&Ve,Gt[1]=Ve>>>8&255,Gt[2]=Ve>>>16&255,Gt[3]=Ve>>>24&255,O.check=Fe(O.check,Gt,4,0)),Ve=0,et=0,O.mode=16183;case 16183:for(;et<16;){if(Oe===0)break e;Oe--,Ve+=ke[Ae++]<<et,et+=8}O.head&&(O.head.xflags=255&Ve,O.head.os=Ve>>8),512&O.flags&&4&O.wrap&&(Gt[0]=255&Ve,Gt[1]=Ve>>>8&255,O.check=Fe(O.check,Gt,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+=ke[Ae++]<<et,et+=8}O.length=Ve,O.head&&(O.head.extra_len=Ve),512&O.flags&&4&O.wrap&&(Gt[0]=255&Ve,Gt[1]=Ve>>>8&255,O.check=Fe(O.check,Gt,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(ke.subarray(Ae,Ae+Ct),Pt)),512&O.flags&&4&O.wrap&&(O.check=Fe(O.check,ke,Ct,Ae)),Oe-=Ct,Ae+=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=ke[Ae+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=Fe(O.check,ke,Ct,Ae)),Oe-=Ct,Ae+=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=ke[Ae+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=Fe(O.check,ke,Ct,Ae)),Oe-=Ct,Ae+=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+=ke[Ae++]<<et,et+=8}if(4&O.wrap&&Ve!==(65535&O.check)){L.msg="header crc mismatch",O.mode=Bo;break}Ve=0,et=0}O.head&&(O.head.hcrc=O.flags>>9&1,O.head.done=!0),L.adler=O.check=0,O.mode=al;break;case 16189:for(;et<32;){if(Oe===0)break e;Oe--,Ve+=ke[Ae++]<<et,et+=8}L.adler=O.check=AL(Ve),Ve=0,et=0,O.mode=s4;case s4:if(O.havedict===0)return L.next_out=tt,L.avail_out=wt,L.next_in=Ae,L.avail_in=Oe,O.hold=Ve,O.bits=et,C2;L.adler=O.check=1,O.mode=al;case al:if(X===kn||X===Mr)break e;case b9:if(O.last){Ve>>>=7&et,et-=7&et,O.mode=C9;break}for(;et<3;){if(Oe===0)break e;Oe--,Ve+=ke[Ae++]<<et,et+=8}switch(O.last=1&Ve,Ve>>>=1,et-=1,3&Ve){case 0:O.mode=16193;break;case 1:if(N0e(O),O.mode=l4,X===Mr){Ve>>>=2,et-=2;break e}break;case 2:O.mode=16196;break;case 3:L.msg="invalid block type",O.mode=Bo}Ve>>>=2,et-=2;break;case 16193:for(Ve>>>=7&et,et-=7&et;et<32;){if(Oe===0)break e;Oe--,Ve+=ke[Ae++]<<et,et+=8}if((65535&Ve)!=(Ve>>>16^65535)){L.msg="invalid stored block lengths",O.mode=Bo;break}if(O.length=65535&Ve,Ve=0,et=0,O.mode=w9,X===Mr)break e;case w9:O.mode=16195;case 16195:if(Ct=O.length,Ct){if(Ct>Oe&&(Ct=Oe),Ct>wt&&(Ct=wt),Ct===0)break e;ye.set(ke.subarray(Ae,Ae+Ct),tt),Oe-=Ct,Ae+=Ct,wt-=Ct,tt+=Ct,O.length-=Ct;break}O.mode=al;break;case 16196:for(;et<14;){if(Oe===0)break e;Oe--,Ve+=ke[Ae++]<<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){L.msg="too many length or distance symbols",O.mode=Bo;break}O.have=0,O.mode=16197;case 16197:for(;O.have<O.ncode;){for(;et<3;){if(Oe===0)break e;Oe--,Ve+=ke[Ae++]<<et,et+=8}O.lens[M2[O.have++]]=7&Ve,Ve>>>=3,et-=3}for(;O.have<19;)O.lens[M2[O.have++]]=0;if(O.lencode=O.lendyn,O.lenbits=7,ui={bits:O.lenbits},wi=Ra(0,O.lens,0,19,O.lencode,0,O.work,ui),O.lenbits=ui.bits,wi){L.msg="invalid code lengths set",O.mode=Bo;break}O.have=0,O.mode=16198;case 16198:for(;O.have<O.nlen+O.ndist;){for(;oi=O.lencode[Ve&(1<<O.lenbits)-1],Qt=oi>>>24,Ri=oi>>>16&255,ti=65535&oi,!(Qt<=et);){if(Oe===0)break e;Oe--,Ve+=ke[Ae++]<<et,et+=8}if(ti<16)Ve>>>=Qt,et-=Qt,O.lens[O.have++]=ti;else{if(ti===16){for(en=Qt+2;et<en;){if(Oe===0)break e;Oe--,Ve+=ke[Ae++]<<et,et+=8}if(Ve>>>=Qt,et-=Qt,O.have===0){L.msg="invalid bit length repeat",O.mode=Bo;break}Pt=O.lens[O.have-1],Ct=3+(3&Ve),Ve>>>=2,et-=2}else if(ti===17){for(en=Qt+3;et<en;){if(Oe===0)break e;Oe--,Ve+=ke[Ae++]<<et,et+=8}Ve>>>=Qt,et-=Qt,Pt=0,Ct=3+(7&Ve),Ve>>>=3,et-=3}else{for(en=Qt+7;et<en;){if(Oe===0)break e;Oe--,Ve+=ke[Ae++]<<et,et+=8}Ve>>>=Qt,et-=Qt,Pt=0,Ct=11+(127&Ve),Ve>>>=7,et-=7}if(O.have+Ct>O.nlen+O.ndist){L.msg="invalid bit length repeat",O.mode=Bo;break}for(;Ct--;)O.lens[O.have++]=Pt}}if(O.mode===Bo)break;if(O.lens[256]===0){L.msg="invalid code -- missing end-of-block",O.mode=Bo;break}if(O.lenbits=9,ui={bits:O.lenbits},wi=Ra(1,O.lens,0,O.nlen,O.lencode,0,O.work,ui),O.lenbits=ui.bits,wi){L.msg="invalid literal/lengths set",O.mode=Bo;break}if(O.distbits=6,O.distcode=O.distdyn,ui={bits:O.distbits},wi=Ra(2,O.lens,O.nlen,O.ndist,O.distcode,0,O.work,ui),O.distbits=ui.bits,wi){L.msg="invalid distances set",O.mode=Bo;break}if(O.mode=l4,X===Mr)break e;case l4:O.mode=c4;case c4:if(Oe>=6&&wt>=258){L.next_out=tt,L.avail_out=wt,L.next_in=Ae,L.avail_in=Oe,O.hold=Ve,O.bits=et,qt(L,zt),tt=L.next_out,ye=L.output,wt=L.avail_out,Ae=L.next_in,ke=L.input,Oe=L.avail_in,Ve=O.hold,et=O.bits,O.mode===al&&(O.back=-1);break}for(O.back=0;oi=O.lencode[Ve&(1<<O.lenbits)-1],Qt=oi>>>24,Ri=oi>>>16&255,ti=65535&oi,!(Qt<=et);){if(Oe===0)break e;Oe--,Ve+=ke[Ae++]<<et,et+=8}if(Ri&&(240&Ri)==0){for(kt=Qt,ei=Ri,Li=ti;oi=O.lencode[Li+((Ve&(1<<kt+ei)-1)>>kt)],Qt=oi>>>24,Ri=oi>>>16&255,ti=65535&oi,!(kt+Qt<=et);){if(Oe===0)break e;Oe--,Ve+=ke[Ae++]<<et,et+=8}Ve>>>=kt,et-=kt,O.back+=kt}if(Ve>>>=Qt,et-=Qt,O.back+=Qt,O.length=ti,Ri===0){O.mode=16205;break}if(32&Ri){O.back=-1,O.mode=al;break}if(64&Ri){L.msg="invalid literal/length code",O.mode=Bo;break}O.extra=15&Ri,O.mode=16201;case 16201:if(O.extra){for(en=O.extra;et<en;){if(Oe===0)break e;Oe--,Ve+=ke[Ae++]<<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(;oi=O.distcode[Ve&(1<<O.distbits)-1],Qt=oi>>>24,Ri=oi>>>16&255,ti=65535&oi,!(Qt<=et);){if(Oe===0)break e;Oe--,Ve+=ke[Ae++]<<et,et+=8}if((240&Ri)==0){for(kt=Qt,ei=Ri,Li=ti;oi=O.distcode[Li+((Ve&(1<<kt+ei)-1)>>kt)],Qt=oi>>>24,Ri=oi>>>16&255,ti=65535&oi,!(kt+Qt<=et);){if(Oe===0)break e;Oe--,Ve+=ke[Ae++]<<et,et+=8}Ve>>>=kt,et-=kt,O.back+=kt}if(Ve>>>=Qt,et-=Qt,O.back+=Qt,64&Ri){L.msg="invalid distance code",O.mode=Bo;break}O.offset=ti,O.extra=15&Ri,O.mode=16203;case 16203:if(O.extra){for(en=O.extra;et<en;){if(Oe===0)break e;Oe--,Ve+=ke[Ae++]<<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){L.msg="invalid distance too far back",O.mode=Bo;break}O.mode=16204;case 16204:if(wt===0)break e;if(Ct=zt-wt,O.offset>Ct){if(Ct=O.offset-Ct,Ct>O.whave&&O.sane){L.msg="invalid distance too far back",O.mode=Bo;break}Ct>O.wnext?(Ct-=O.wnext,Ho=O.wsize-Ct):Ho=O.wnext-Ct,Ct>O.length&&(Ct=O.length),Ei=O.window}else Ei=ye,Ho=tt-O.offset,Ct=O.length;Ct>wt&&(Ct=wt),wt-=Ct,O.length-=Ct;do ye[tt++]=Ei[Ho++];while(--Ct);O.length===0&&(O.mode=c4);break;case 16205:if(wt===0)break e;ye[tt++]=O.length,wt--,O.mode=c4;break;case C9:if(O.wrap){for(;et<32;){if(Oe===0)break e;Oe--,Ve|=ke[Ae++]<<et,et+=8}if(zt-=wt,L.total_out+=zt,O.total+=zt,4&O.wrap&&zt&&(L.adler=O.check=O.flags?Fe(O.check,ye,zt,tt-zt):Ce(O.check,ye,zt,tt-zt)),zt=wt,4&O.wrap&&(O.flags?Ve:AL(Ve))!==O.check){L.msg="incorrect data check",O.mode=Bo;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+=ke[Ae++]<<et,et+=8}if(4&O.wrap&&Ve!==(4294967295&O.total)){L.msg="incorrect length check",O.mode=Bo;break}Ve=0,et=0}O.mode=16208;case 16208:wi=Hn;break e;case Bo:wi=hL;break e;case 16210:return pL;default:return tr}return L.next_out=tt,L.avail_out=wt,L.next_in=Ae,L.avail_in=Oe,O.hold=Ve,O.bits=et,(O.wsize||zt!==L.avail_out&&O.mode<Bo&&(O.mode<C9||X!==po))&&wL(L,L.output,L.next_out,zt-L.avail_out),ii-=L.avail_in,zt-=L.avail_out,L.total_in+=ii,L.total_out+=zt,O.total+=zt,4&O.wrap&&zt&&(L.adler=O.check=O.flags?Fe(O.check,ye,zt,L.next_out-zt):Ce(O.check,ye,zt,L.next_out-zt)),L.data_type=O.bits+(O.last?64:0)+(O.mode===al?128:0)+(O.mode===l4||O.mode===w9?256:0),(ii===0&&zt===0||X===po)&&wi===wo&&(wi=O0e),wi},inflateEnd:L=>{if(Vd(L))return tr;let X=L.state;return X.window&&(X.window=null),L.state=null,wo},inflateGetHeader:(L,X)=>{if(Vd(L))return tr;const O=L.state;return(2&O.wrap)==0?tr:(O.head=X,X.done=!1,wo)},inflateSetDictionary:(L,X)=>{const O=X.length;let ke,ye,Ae;return Vd(L)?tr:(ke=L.state,ke.wrap!==0&&ke.mode!==s4?tr:ke.mode===s4&&(ye=1,ye=Ce(ye,X,O,0),ye!==ke.check)?hL:(Ae=wL(L,X,O,O),Ae?(ke.mode=16210,pL):(ke.havedict=1,wo)))},inflateInfo:"pako inflate (from Nodeca project)"},j0e=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 CL=Object.prototype.toString,{Z_NO_FLUSH:V0e,Z_FINISH:z0e,Z_OK:x2,Z_STREAM_END:M9,Z_NEED_DICT:E9,Z_STREAM_ERROR:H0e,Z_DATA_ERROR:xL,Z_MEM_ERROR:q0e}=ge;function k2(L){this.options=o4({chunkSize:65536,windowBits:15,to:""},L||{});const X=this.options;X.raw&&X.windowBits>=0&&X.windowBits<16&&(X.windowBits=-X.windowBits,X.windowBits===0&&(X.windowBits=-15)),!(X.windowBits>=0&&X.windowBits<16)||L&&L.windowBits||(X.windowBits+=32),X.windowBits>15&&X.windowBits<48&&(15&X.windowBits)==0&&(X.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new nt,this.strm.avail_out=0;let O=sl.inflateInit2(this.strm,X.windowBits);if(O!==x2)throw new Error(ve[O]);if(this.header=new j0e,sl.inflateGetHeader(this.strm,this.header),X.dictionary&&(typeof X.dictionary=="string"?X.dictionary=w2(X.dictionary):CL.call(X.dictionary)==="[object ArrayBuffer]"&&(X.dictionary=new Uint8Array(X.dictionary)),X.raw&&(O=sl.inflateSetDictionary(this.strm,X.dictionary),O!==x2)))throw new Error(ve[O])}function B9(L,X){const O=new k2(X);if(O.push(L),O.err)throw O.msg||ve[O.err];return O.result}k2.prototype.push=function(L,X){const O=this.strm,ke=this.options.chunkSize,ye=this.options.dictionary;let Ae,tt,Oe;if(this.ended)return!1;for(tt=X===~~X?X:X===!0?z0e:V0e,CL.call(L)==="[object ArrayBuffer]"?O.input=new Uint8Array(L):O.input=L,O.next_in=0,O.avail_in=O.input.length;;){for(O.avail_out===0&&(O.output=new Uint8Array(ke),O.next_out=0,O.avail_out=ke),Ae=sl.inflate(O,tt),Ae===E9&&ye&&(Ae=sl.inflateSetDictionary(O,ye),Ae===x2?Ae=sl.inflate(O,tt):Ae===xL&&(Ae=E9));O.avail_in>0&&Ae===M9&&O.state.wrap>0&&L[O.next_in]!==0;)sl.inflateReset(O),Ae=sl.inflate(O,tt);switch(Ae){case H0e:case xL:case E9:case q0e:return this.onEnd(Ae),this.ended=!0,!1}if(Oe=O.avail_out,O.next_out&&(O.avail_out===0||Ae===M9))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=ke-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(Ae!==x2||Oe!==0){if(Ae===M9)return Ae=sl.inflateEnd(this.strm),this.onEnd(Ae),this.ended=!0,!0;if(O.avail_in===0)break}}return!0},k2.prototype.onData=function(L){this.chunks.push(L)},k2.prototype.onEnd=function(L){L===x2&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=r4(this.chunks)),this.chunks=[],this.err=L,this.msg=this.strm.msg};var Q0e={Inflate:k2,inflate:B9,inflateRaw:function(L,X){return(X=X||{}).raw=!0,B9(L,X)},ungzip:B9};const{Deflate:G0e,deflate:K0e,deflateRaw:J0e,gzip:Z0e}=bo,{Inflate:W0e,inflate:Y0e,inflateRaw:X0e,ungzip:$0e}=Q0e;var kL=G0e,ML=K0e,EL=J0e,BL=Z0e,PL=W0e,IL=Y0e,SL=X0e,TL=$0e,DL=ge,efe={Deflate:kL,deflate:ML,deflateRaw:EL,gzip:BL,Inflate:PL,inflate:IL,inflateRaw:SL,ungzip:TL,constants:DL};i.Deflate=kL,i.Inflate=PL,i.constants=DL,i.default=efe,i.deflate=ML,i.deflateRaw=EL,i.gzip=BL,i.inflate=IL,i.inflateRaw=SL,i.ungzip=TL,Object.defineProperty(i,"__esModule",{value:!0})}))})(v7,v7.exports)),v7.exports}var fY=iLt();const oLt=rm(fY),ts=tfe({__proto__:null,default:oLt},[fY]);let mn=window.pako||ts;mn.inflate||(mn=mn.default);const rLt=(function(){const t=new Float32Array(3);return function(e){return t[0]=e[0]/255,t[1]=e[1]/255,t[2]=e[2]/255,t}})();function nLt(t){return{positions:t[0],normals:t[1],indices:t[2],edgeIndices:t[3],meshPositions:t[4],meshIndices:t[5],meshEdgesIndices:t[6],meshColors:t[7],entityIDs:t[8],entityMeshes:t[9],entityIsObjects:t[10],positionsDecodeMatrix:t[11]}}function aLt(t){return{positions:new Uint16Array(mn.inflate(t.positions).buffer),normals:new Int8Array(mn.inflate(t.normals).buffer),indices:new Uint32Array(mn.inflate(t.indices).buffer),edgeIndices:new Uint32Array(mn.inflate(t.edgeIndices).buffer),meshPositions:new Uint32Array(mn.inflate(t.meshPositions).buffer),meshIndices:new Uint32Array(mn.inflate(t.meshIndices).buffer),meshEdgesIndices:new Uint32Array(mn.inflate(t.meshEdgesIndices).buffer),meshColors:new Uint8Array(mn.inflate(t.meshColors).buffer),entityIDs:mn.inflate(t.entityIDs,{to:"string"}),entityMeshes:new Uint32Array(mn.inflate(t.entityMeshes).buffer),entityIsObjects:new Uint8Array(mn.inflate(t.entityIsObjects).buffer),positionsDecodeMatrix:new Float32Array(mn.inflate(t.positionsDecodeMatrix).buffer)}}function sLt(t,e,i,o,r,n){n.getNextId(),o.positionsCompression="precompressed",o.normalsCompression="precompressed";const a=i.positions,s=i.normals,l=i.indices,c=i.edgeIndices,d=i.meshPositions,u=i.meshIndices,h=i.meshEdgesIndices,p=i.meshColors,A=JSON.parse(i.entityIDs),f=i.entityMeshes,m=i.entityIsObjects,g=d.length,y=f.length;for(let v=0;v<y;v++){const b=A[v],x=e.globalizeObjectIds?C.globalizeObjectId(o.id,b):b,k=t.metaScene.metaObjects[x],E={},B={};if(k){if(e.excludeTypesMap&&k.type&&e.excludeTypesMap[k.type]||e.includeTypesMap&&k.type&&!e.includeTypesMap[k.type])continue;const T=e.objectDefaults?e.objectDefaults[k.type]||e.objectDefaults.DEFAULT:null;T&&(T.visible===!1&&(E.visible=!1),T.pickable===!1&&(E.pickable=!1),T.colorize&&(B.color=T.colorize),T.opacity!==void 0&&T.opacity!==null&&(B.opacity=T.opacity))}else if(e.excludeUnclassifiedObjects)continue;const P=v===y-1,D=[];for(let T=f[v],R=P?f.length:f[v+1];T<R;T++){const F=T===g-1,N=x+".mesh."+T,q=rLt(p.subarray(T*4,T*4+3)),V=p[T*4+3]/255;o.createMesh(mt.apply(B,{id:N,primitive:"triangles",positionsCompressed:a.subarray(d[T],F?a.length:d[T+1]),normalsCompressed:s.subarray(d[T],F?a.length:d[T+1]),indices:l.subarray(u[T],F?l.length:u[T+1]),edgeIndices:c.subarray(h[T],F?c.length:h[T+1]),positionsDecodeMatrix:i.positionsDecodeMatrix,color:q,opacity:V})),D.push(N)}o.createEntity(mt.apply(E,{id:x,isObject:m[v]===1,meshIds:D}))}}const AY={version:1,parse:function(t,e,i,o,r,n){const a=nLt(i),s=aLt(a);sLt(t,e,s,o,r,n)}};let vr=window.pako||ts;vr.inflate||(vr=vr.default);function lLt(t){return{positions:t[0],normals:t[1],indices:t[2],edgeIndices:t[3],meshPositions:t[4],meshIndices:t[5],meshEdgesIndices:t[6],meshColors:t[7],entityIDs:t[8],entityMeshes:t[9],entityIsObjects:t[10],positionsDecodeMatrix:t[11],entityMeshIds:t[12],entityMatrices:t[13],entityUsesInstancing:t[14]}}function cLt(t){return{positions:new Uint16Array(vr.inflate(t.positions).buffer),normals:new Int8Array(vr.inflate(t.normals).buffer),indices:new Uint32Array(vr.inflate(t.indices).buffer),edgeIndices:new Uint32Array(vr.inflate(t.edgeIndices).buffer),meshPositions:new Uint32Array(vr.inflate(t.meshPositions).buffer),meshIndices:new Uint32Array(vr.inflate(t.meshIndices).buffer),meshEdgesIndices:new Uint32Array(vr.inflate(t.meshEdgesIndices).buffer),meshColors:new Uint8Array(vr.inflate(t.meshColors).buffer),entityIDs:vr.inflate(t.entityIDs,{to:"string"}),entityMeshes:new Uint32Array(vr.inflate(t.entityMeshes).buffer),entityIsObjects:new Uint8Array(vr.inflate(t.entityIsObjects).buffer),positionsDecodeMatrix:new Float32Array(vr.inflate(t.positionsDecodeMatrix).buffer),entityMeshIds:new Uint32Array(vr.inflate(t.entityMeshIds).buffer),entityMatrices:new Float32Array(vr.inflate(t.entityMatrices).buffer),entityUsesInstancing:new Uint8Array(vr.inflate(t.entityUsesInstancing).buffer)}}const dLt=(function(){const t=new Float32Array(3);return function(e){return t[0]=e[0]/255,t[1]=e[1]/255,t[2]=e[2]/255,t}})();function uLt(t,e,i,o,r,n){const a=n.getNextId();o.positionsCompression="precompressed",o.normalsCompression="precompressed";const s=i.positions,l=i.normals,c=i.indices,d=i.edgeIndices,u=i.meshPositions,h=i.meshIndices,p=i.meshEdgesIndices,A=i.meshColors,f=JSON.parse(i.entityIDs),m=i.entityMeshes,g=i.entityIsObjects,y=i.entityMeshIds,v=i.entityMatrices,b=i.entityUsesInstancing,x=u.length,k=m.length,E={};for(let B=0;B<k;B++){const P=f[B],D=e.globalizeObjectIds?C.globalizeObjectId(o.id,P):P,T=t.metaScene.metaObjects[D],R={},F={},N=v.subarray(B*16,B*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&&(R.visible=!1),W.pickable===!1&&(R.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 q=B===k-1,V=[];for(let W=m[B],Y=q?y.length:m[B+1];W<Y;W++){const $=y[W],me=$===x-1,Ie=n.getNextId(),Se=dLt(A.subarray($*4,$*4+3)),qe=A[$*4+3]/255,Qe=s.subarray(u[$],me?s.length:u[$+1]),Ce=l.subarray(u[$],me?s.length:u[$+1]),Le=c.subarray(h[$],me?c.length:h[$+1]),Fe=d.subarray(p[$],me?d.length:p[$+1]);if(b[B]===1){const ve=`${a}.geometry.${Ie}.${$}`;ve in E||(o.createGeometry({id:ve,positionsCompressed:Qe,normalsCompressed:Ce,indices:Le,edgeIndices:Fe,primitive:"triangles",positionsDecodeMatrix:i.positionsDecodeMatrix}),E[ve]=!0),o.createMesh(mt.apply(F,{id:Ie,color:Se,opacity:qe,matrix:N,geometryId:ve})),V.push(Ie)}else o.createMesh(mt.apply(F,{id:Ie,primitive:"triangles",positionsCompressed:Qe,normalsCompressed:Ce,indices:Le,edgeIndices:Fe,positionsDecodeMatrix:i.positionsDecodeMatrix,color:Se,opacity:qe})),V.push(Ie)}V.length&&o.createEntity(mt.apply(R,{id:D,isObject:g[B]===1,meshIds:V}))}}const gY={version:2,parse:function(t,e,i,o,r,n){const a=lLt(i),s=cLt(a);uLt(t,e,s,o,r,n)}};let dr=window.pako||ts;dr.inflate||(dr=dr.default);function hLt(t){return{positions:t[0],normals:t[1],indices:t[2],edgeIndices:t[3],meshPositions:t[4],meshIndices:t[5],meshEdgesIndices:t[6],meshColors:t[7],entityIDs:t[8],entityMeshes:t[9],entityIsObjects:t[10],instancedPositionsDecodeMatrix:t[11],batchedPositionsDecodeMatrix:t[12],entityMeshIds:t[13],entityMatrices:t[14],entityUsesInstancing:t[15]}}function pLt(t){return{positions:new Uint16Array(dr.inflate(t.positions).buffer),normals:new Int8Array(dr.inflate(t.normals).buffer),indices:new Uint32Array(dr.inflate(t.indices).buffer),edgeIndices:new Uint32Array(dr.inflate(t.edgeIndices).buffer),meshPositions:new Uint32Array(dr.inflate(t.meshPositions).buffer),meshIndices:new Uint32Array(dr.inflate(t.meshIndices).buffer),meshEdgesIndices:new Uint32Array(dr.inflate(t.meshEdgesIndices).buffer),meshColors:new Uint8Array(dr.inflate(t.meshColors).buffer),entityIDs:dr.inflate(t.entityIDs,{to:"string"}),entityMeshes:new Uint32Array(dr.inflate(t.entityMeshes).buffer),entityIsObjects:new Uint8Array(dr.inflate(t.entityIsObjects).buffer),instancedPositionsDecodeMatrix:new Float32Array(dr.inflate(t.instancedPositionsDecodeMatrix).buffer),batchedPositionsDecodeMatrix:new Float32Array(dr.inflate(t.batchedPositionsDecodeMatrix).buffer),entityMeshIds:new Uint32Array(dr.inflate(t.entityMeshIds).buffer),entityMatrices:new Float32Array(dr.inflate(t.entityMatrices).buffer),entityUsesInstancing:new Uint8Array(dr.inflate(t.entityUsesInstancing).buffer)}}const fLt=(function(){const t=new Float32Array(3);return function(e){return t[0]=e[0]/255,t[1]=e[1]/255,t[2]=e[2]/255,t}})();function ALt(t,e,i,o,r,n){const a=n.getNextId();o.positionsCompression="precompressed",o.normalsCompression="precompressed";const s=i.positions,l=i.normals,c=i.indices,d=i.edgeIndices,u=i.meshPositions,h=i.meshIndices,p=i.meshEdgesIndices,A=i.meshColors,f=JSON.parse(i.entityIDs),m=i.entityMeshes,g=i.entityIsObjects,y=i.entityMeshIds,v=i.entityMatrices,b=i.entityUsesInstancing,x=u.length,k=m.length,E={};for(let F=0;F<k;F++){const N=f[F],q=e.globalizeObjectIds?C.globalizeObjectId(o.id,N):N,V=t.metaScene.metaObjects[q],W={},Y={},$=v.subarray(F*16,F*16+16);if(V){if(e.excludeTypesMap&&V.type&&e.excludeTypesMap[V.type]||e.includeTypesMap&&V.type&&!e.includeTypesMap[V.type])continue;const Se=e.objectDefaults?e.objectDefaults[V.type]||e.objectDefaults.DEFAULT:null;Se&&(Se.visible===!1&&(W.visible=!1),Se.pickable===!1&&(W.pickable=!1),Se.colorize&&(Y.color=Se.colorize),Se.opacity!==void 0&&Se.opacity!==null&&(Y.opacity=Se.opacity))}else if(e.excludeUnclassifiedObjects)continue;const me=F===k-1,Ie=[];for(let Se=m[F],qe=me?y.length:m[F+1];Se<qe;Se++){var B=y[Se];const Qe=B===x-1,Ce=`${a}.${q}.mesh.${B}`,Le=fLt(A.subarray(B*4,B*4+3)),Fe=A[B*4+3]/255;var P=s.subarray(u[B],Qe?s.length:u[B+1]),D=l.subarray(u[B],Qe?s.length:u[B+1]),T=c.subarray(h[B],Qe?c.length:h[B+1]),R=d.subarray(p[B],Qe?d.length:p[B+1]);if(b[F]===1){const ve=`${a}.geometry.${Ce}.${B}`;ve in E||(o.createGeometry({id:ve,positionsCompressed:P,normalsCompressed:D,indices:T,edgeIndices:R,primitive:"triangles",positionsDecodeMatrix:i.instancedPositionsDecodeMatrix}),E[ve]=!0),o.createMesh(mt.apply(Y,{id:Ce,color:Le,opacity:Fe,matrix:$,geometryId:ve})),Ie.push(Ce)}else o.createMesh(mt.apply(Y,{id:Ce,primitive:"triangles",positionsCompressed:P,normalsCompressed:D,indices:T,edgeIndices:R,positionsDecodeMatrix:i.batchedPositionsDecodeMatrix,color:Le,opacity:Fe})),Ie.push(Ce)}Ie.length&&o.createEntity(mt.apply(W,{id:q,isObject:g[F]===1,meshIds:Ie}))}}const mY={version:3,parse:function(t,e,i,o,r,n){const a=hLt(i),s=pLt(a);ALt(t,e,s,o,r,n)}};let yr=window.pako||ts;yr.inflate||(yr=yr.default);function gLt(t){return{positions:t[0],normals:t[1],indices:t[2],edgeIndices:t[3],decodeMatrices:t[4],matrices:t[5],eachPrimitivePositionsAndNormalsPortion:t[6],eachPrimitiveIndicesPortion:t[7],eachPrimitiveEdgeIndicesPortion:t[8],eachPrimitiveDecodeMatricesPortion:t[9],eachPrimitiveColor:t[10],primitiveInstances:t[11],eachEntityId:t[12],eachEntityPrimitiveInstancesPortion:t[13],eachEntityMatricesPortion:t[14],eachEntityMatrix:t[15]}}function mLt(t){return{positions:new Uint16Array(yr.inflate(t.positions).buffer),normals:new Int8Array(yr.inflate(t.normals).buffer),indices:new Uint32Array(yr.inflate(t.indices).buffer),edgeIndices:new Uint32Array(yr.inflate(t.edgeIndices).buffer),decodeMatrices:new Float32Array(yr.inflate(t.decodeMatrices).buffer),matrices:new Float32Array(yr.inflate(t.matrices).buffer),eachPrimitivePositionsAndNormalsPortion:new Uint32Array(yr.inflate(t.eachPrimitivePositionsAndNormalsPortion).buffer),eachPrimitiveIndicesPortion:new Uint32Array(yr.inflate(t.eachPrimitiveIndicesPortion).buffer),eachPrimitiveEdgeIndicesPortion:new Uint32Array(yr.inflate(t.eachPrimitiveEdgeIndicesPortion).buffer),eachPrimitiveDecodeMatricesPortion:new Uint32Array(yr.inflate(t.eachPrimitiveDecodeMatricesPortion).buffer),eachPrimitiveColor:new Uint8Array(yr.inflate(t.eachPrimitiveColor).buffer),primitiveInstances:new Uint32Array(yr.inflate(t.primitiveInstances).buffer),eachEntityId:yr.inflate(t.eachEntityId,{to:"string"}),eachEntityPrimitiveInstancesPortion:new Uint32Array(yr.inflate(t.eachEntityPrimitiveInstancesPortion).buffer),eachEntityMatricesPortion:new Uint32Array(yr.inflate(t.eachEntityMatricesPortion).buffer)}}const vLt=(function(){const t=new Float32Array(3);return function(e){return t[0]=e[0]/255,t[1]=e[1]/255,t[2]=e[2]/255,t}})();function yLt(t,e,i,o,r,n){const a=n.getNextId();o.positionsCompression="precompressed",o.normalsCompression="precompressed";const s=i.positions,l=i.normals,c=i.indices,d=i.edgeIndices,u=i.decodeMatrices,h=i.matrices,p=i.eachPrimitivePositionsAndNormalsPortion,A=i.eachPrimitiveIndicesPortion,f=i.eachPrimitiveEdgeIndicesPortion,m=i.eachPrimitiveDecodeMatricesPortion,g=i.eachPrimitiveColor,y=i.primitiveInstances,v=JSON.parse(i.eachEntityId),b=i.eachEntityPrimitiveInstancesPortion,x=i.eachEntityMatricesPortion,k=p.length,E=y.length,B=new Uint8Array(k),P=new Uint32Array(k),D=v.length;for(let F=0;F<k;F++)P[F]=F;P.sort((F,N)=>m[F]<m[N]?-1:m[F]>m[N]?1:0);for(let F=0;F<E;F++){const N=y[F];B[N]++}const T={};for(let F=0;F<D;F++){const N=D-1,q=F===N,V=b[F],W=q?b[N]:b[F+1];for(let Y=V;Y<W;Y++){const $=y[Y];B[$]>1||(T[$]=F)}}for(let F=0;F<k;F++){const N=P[F],q=N===k-1,V=B[N]>1,W=vLt(g.subarray(N*4,N*4+3)),Y=g[N*4+3]/255,$=s.subarray(p[N],q?s.length:p[N+1]),me=l.subarray(p[N],q?l.length:p[N+1]),Ie=c.subarray(A[N],q?c.length:A[N+1]),Se=d.subarray(f[N],q?d.length:f[N+1]),qe=u.subarray(m[N],m[N]+16);if(V){const Qe=`${a}-geometry.${N}`;o.createGeometry({id:Qe,primitive:"triangles",positionsCompressed:$,normalsCompressed:me,indices:Ie,edgeIndices:Se,positionsDecodeMatrix:qe})}else{const Qe=`${a}-${N}`,Ce=T[N];v[Ce];const Le={};o.createMesh(mt.apply(Le,{id:Qe,primitive:"triangles",positionsCompressed:$,normalsCompressed:me,indices:Ie,edgeIndices:Se,positionsDecodeMatrix:qe,color:W,opacity:Y}))}}let R=0;for(let F=0;F<D;F++){const N=D-1,q=F===N,V=v[F],W=b[F],Y=q?b[N]:b[F+1],$=[];for(let me=W;me<Y;me++){const Ie=y[me];if(B[Ie]>1){const Se={},qe=`${a}-instance.${R++}`,Qe=`${a}-geometry.${Ie}`,Ce=x[F]*16,Le=h.subarray(Ce,Ce+16);o.createMesh(mt.apply(Se,{id:qe,geometryId:Qe,matrix:Le})),$.push(qe)}else $.push(Ie)}if($.length>0){const me={};o.createEntity(mt.apply(me,{id:V,isObject:!0,meshIds:$}))}}}const vY={version:4,parse:function(t,e,i,o,r,n){const a=gLt(i),s=mLt(a);yLt(t,e,s,o,r,n)}};let Wr=window.pako||ts;Wr.inflate||(Wr=Wr.default);function bLt(t){return{positions:t[0],normals:t[1],indices:t[2],edgeIndices:t[3],matrices:t[4],eachPrimitivePositionsAndNormalsPortion:t[5],eachPrimitiveIndicesPortion:t[6],eachPrimitiveEdgeIndicesPortion:t[7],eachPrimitiveColor:t[8],primitiveInstances:t[9],eachEntityId:t[10],eachEntityPrimitiveInstancesPortion:t[11],eachEntityMatricesPortion:t[12]}}function wLt(t){return{positions:new Float32Array(Wr.inflate(t.positions).buffer),normals:new Int8Array(Wr.inflate(t.normals).buffer),indices:new Uint32Array(Wr.inflate(t.indices).buffer),edgeIndices:new Uint32Array(Wr.inflate(t.edgeIndices).buffer),matrices:new Float32Array(Wr.inflate(t.matrices).buffer),eachPrimitivePositionsAndNormalsPortion:new Uint32Array(Wr.inflate(t.eachPrimitivePositionsAndNormalsPortion).buffer),eachPrimitiveIndicesPortion:new Uint32Array(Wr.inflate(t.eachPrimitiveIndicesPortion).buffer),eachPrimitiveEdgeIndicesPortion:new Uint32Array(Wr.inflate(t.eachPrimitiveEdgeIndicesPortion).buffer),eachPrimitiveColor:new Uint8Array(Wr.inflate(t.eachPrimitiveColor).buffer),primitiveInstances:new Uint32Array(Wr.inflate(t.primitiveInstances).buffer),eachEntityId:Wr.inflate(t.eachEntityId,{to:"string"}),eachEntityPrimitiveInstancesPortion:new Uint32Array(Wr.inflate(t.eachEntityPrimitiveInstancesPortion).buffer),eachEntityMatricesPortion:new Uint32Array(Wr.inflate(t.eachEntityMatricesPortion).buffer)}}const CLt=(function(){const t=new Float32Array(3);return function(e){return t[0]=e[0]/255,t[1]=e[1]/255,t[2]=e[2]/255,t}})();function xLt(t,e,i,o,r,n){const a=n.getNextId();o.positionsCompression="disabled",o.normalsCompression="precompressed";const s=i.positions,l=i.normals,c=i.indices,d=i.edgeIndices,u=i.matrices,h=i.eachPrimitivePositionsAndNormalsPortion,p=i.eachPrimitiveIndicesPortion,A=i.eachPrimitiveEdgeIndicesPortion,f=i.eachPrimitiveColor,m=i.primitiveInstances,g=JSON.parse(i.eachEntityId),y=i.eachEntityPrimitiveInstancesPortion,v=i.eachEntityMatricesPortion,b=h.length,x=m.length,k=new Uint8Array(b),E=g.length;for(let D=0;D<x;D++){const T=m[D];k[T]++}const B={};for(let D=0;D<E;D++){const T=E-1,R=D===T,F=y[D],N=R?y[T]:y[D+1];for(let q=F;q<N;q++){const V=m[q];k[V]>1||(B[V]=D)}}for(let D=0;D<b;D++){const T=D===b-1,R=k[D]>1,F=CLt(f.subarray(D*4,D*4+3)),N=f[D*4+3]/255,q=s.subarray(h[D],T?s.length:h[D+1]),V=l.subarray(h[D],T?l.length:h[D+1]),W=c.subarray(p[D],T?c.length:p[D+1]),Y=d.subarray(A[D],T?d.length:A[D+1]);if(R){const $=`${a}-geometry.${D}`;o.createGeometry({id:$,primitive:"triangles",positionsCompressed:q,normalsCompressed:V,indices:W,edgeIndices:Y})}else{const $=D,me=B[D];g[me];const Ie={};o.createMesh(mt.apply(Ie,{id:$,primitive:"triangles",positionsCompressed:q,normalsCompressed:V,indices:W,edgeIndices:Y,color:F,opacity:N}))}}let P=0;for(let D=0;D<E;D++){const T=E-1,R=D===T,F=g[D],N=y[D],q=R?y[T]:y[D+1],V=[];for(let W=N;W<q;W++){const Y=m[W];if(k[Y]>1){const $={},me="instance."+P++,Ie="geometry"+Y,Se=v[D]*16,qe=u.subarray(Se,Se+16);o.createMesh(mt.apply($,{id:me,geometryId:Ie,matrix:qe})),V.push(me)}else V.push(Y)}if(V.length>0){const W={};o.createEntity(mt.apply(W,{id:F,isObject:!0,meshIds:V}))}}}const yY={version:5,parse:function(t,e,i,o,r,n){const a=bLt(i),s=wLt(a);xLt(t,e,s,o,r,n)}};let Zv=window.pako||ts;Zv.inflate||(Zv=Zv.default);function kLt(t){return{positions:t[0],normals:t[1],indices:t[2],edgeIndices:t[3],matrices:t[4],reusedPrimitivesDecodeMatrix:t[5],eachPrimitivePositionsAndNormalsPortion:t[6],eachPrimitiveIndicesPortion:t[7],eachPrimitiveEdgeIndicesPortion:t[8],eachPrimitiveColorAndOpacity:t[9],primitiveInstances:t[10],eachEntityId:t[11],eachEntityPrimitiveInstancesPortion:t[12],eachEntityMatricesPortion:t[13],eachTileAABB:t[14],eachTileEntitiesPortion:t[15]}}function MLt(t){function e(i,o){return i.length===0?[]:Zv.inflate(i,o).buffer}return{positions:new Uint16Array(e(t.positions)),normals:new Int8Array(e(t.normals)),indices:new Uint32Array(e(t.indices)),edgeIndices:new Uint32Array(e(t.edgeIndices)),matrices:new Float32Array(e(t.matrices)),reusedPrimitivesDecodeMatrix:new Float32Array(e(t.reusedPrimitivesDecodeMatrix)),eachPrimitivePositionsAndNormalsPortion:new Uint32Array(e(t.eachPrimitivePositionsAndNormalsPortion)),eachPrimitiveIndicesPortion:new Uint32Array(e(t.eachPrimitiveIndicesPortion)),eachPrimitiveEdgeIndicesPortion:new Uint32Array(e(t.eachPrimitiveEdgeIndicesPortion)),eachPrimitiveColorAndOpacity:new Uint8Array(e(t.eachPrimitiveColorAndOpacity)),primitiveInstances:new Uint32Array(e(t.primitiveInstances)),eachEntityId:Zv.inflate(t.eachEntityId,{to:"string"}),eachEntityPrimitiveInstancesPortion:new Uint32Array(e(t.eachEntityPrimitiveInstancesPortion)),eachEntityMatricesPortion:new Uint32Array(e(t.eachEntityMatricesPortion)),eachTileAABB:new Float64Array(e(t.eachTileAABB)),eachTileEntitiesPortion:new Uint32Array(e(t.eachTileEntitiesPortion))}}const ELt=(function(){const t=new Float32Array(3);return function(e){return t[0]=e[0]/255,t[1]=e[1]/255,t[2]=e[2]/255,t}})();function BLt(t,e,i,o,r,n){const a=n.getNextId(),s=i.positions,l=i.normals,c=i.indices,d=i.edgeIndices,u=i.matrices,h=i.reusedPrimitivesDecodeMatrix,p=i.eachPrimitivePositionsAndNormalsPortion,A=i.eachPrimitiveIndicesPortion,f=i.eachPrimitiveEdgeIndicesPortion,m=i.eachPrimitiveColorAndOpacity,g=i.primitiveInstances,y=JSON.parse(i.eachEntityId),v=i.eachEntityPrimitiveInstancesPortion,b=i.eachEntityMatricesPortion,x=i.eachTileAABB,k=i.eachTileEntitiesPortion,E=p.length,B=g.length,P=y.length,D=k.length,T=new Uint32Array(E);for(let N=0;N<B;N++){const q=g[N];T[q]!==void 0?T[q]++:T[q]=1}const R=C.vec3(),F=C.AABB3();for(let N=0;N<D;N++){const q=D-1,V=N===q,W=k[N],Y=V?P:k[N+1],$=N*6,me=x.subarray($,$+6);C.getAABB3Center(me,R),F[0]=me[0]-R[0],F[1]=me[1]-R[1],F[2]=me[2]-R[2],F[3]=me[3]-R[0],F[4]=me[4]-R[1],F[5]=me[5]-R[2];const Ie=Jt.createPositionsDecodeMatrix(F),Se={};for(let qe=W;qe<Y;qe++){const Qe=y[qe],Ce=e.globalizeObjectIds?C.globalizeObjectId(o.id,Qe):Qe,Le=b[qe],Fe=u.slice(Le,Le+16),ve=P-1,ge=qe===ve,we=v[qe],Re=ge?g.length:v[qe+1],We=[],H=t.metaScene.metaObjects[Ce],ee={},ae={};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 Me=e.objectDefaults?e.objectDefaults[H.type]||e.objectDefaults.DEFAULT:null;Me&&(Me.visible===!1&&(ee.visible=!1),Me.pickable===!1&&(ee.pickable=!1),Me.colorize&&(ae.color=Me.colorize),Me.opacity!==void 0&&Me.opacity!==null&&(ae.opacity=Me.opacity))}else if(e.excludeUnclassifiedObjects)continue;for(let Me=we;Me<Re;Me++){const pe=g[Me],Q=T[pe]>1,Z=pe===E-1,ie=s.subarray(p[pe],Z?s.length:p[pe+1]),re=l.subarray(p[pe],Z?l.length:p[pe+1]),ne=c.subarray(A[pe],Z?c.length:A[pe+1]),G=d.subarray(f[pe],Z?d.length:f[pe+1]),J=ELt(m.subarray(pe*4,pe*4+3)),ue=m[pe*4+3]/255,xe=n.getNextId();if(Q){const oe=`${a}-geometry.${N}.${pe}`;Se[oe]||(o.createGeometry({id:oe,primitive:"triangles",positionsCompressed:ie,indices:ne,edgeIndices:G,positionsDecodeMatrix:h}),Se[oe]=!0),o.createMesh(mt.apply(ae,{id:xe,geometryId:oe,origin:R,matrix:Fe,color:J,opacity:ue})),We.push(xe)}else o.createMesh(mt.apply(ae,{id:xe,origin:R,primitive:"triangles",positionsCompressed:ie,normalsCompressed:re,indices:ne,edgeIndices:G,positionsDecodeMatrix:Ie,color:J,opacity:ue})),We.push(xe)}We.length>0&&o.createEntity(mt.apply(ee,{id:Ce,isObject:!0,meshIds:We}))}}}const bY={version:6,parse:function(t,e,i,o,r,n){const a=kLt(i),s=MLt(a);BLt(t,e,s,o,r,n)}};let Wv=window.pako||ts;Wv.inflate||(Wv=Wv.default);function PLt(t){return{positions:t[0],normals:t[1],colors:t[2],indices:t[3],edgeIndices:t[4],matrices:t[5],reusedGeometriesDecodeMatrix:t[6],eachGeometryPrimitiveType:t[7],eachGeometryPositionsPortion:t[8],eachGeometryNormalsPortion:t[9],eachGeometryColorsPortion:t[10],eachGeometryIndicesPortion:t[11],eachGeometryEdgeIndicesPortion:t[12],eachMeshGeometriesPortion:t[13],eachMeshMatricesPortion:t[14],eachMeshMaterial:t[15],eachEntityId:t[16],eachEntityMeshesPortion:t[17],eachTileAABB:t[18],eachTileEntitiesPortion:t[19]}}function ILt(t){function e(i,o){return i.length===0?[]:Wv.inflate(i,o).buffer}return{positions:new Uint16Array(e(t.positions)),normals:new Int8Array(e(t.normals)),colors:new Uint8Array(e(t.colors)),indices:new Uint32Array(e(t.indices)),edgeIndices:new Uint32Array(e(t.edgeIndices)),matrices:new Float32Array(e(t.matrices)),reusedGeometriesDecodeMatrix:new Float32Array(e(t.reusedGeometriesDecodeMatrix)),eachGeometryPrimitiveType:new Uint8Array(e(t.eachGeometryPrimitiveType)),eachGeometryPositionsPortion:new Uint32Array(e(t.eachGeometryPositionsPortion)),eachGeometryNormalsPortion:new Uint32Array(e(t.eachGeometryNormalsPortion)),eachGeometryColorsPortion:new Uint32Array(e(t.eachGeometryColorsPortion)),eachGeometryIndicesPortion:new Uint32Array(e(t.eachGeometryIndicesPortion)),eachGeometryEdgeIndicesPortion:new Uint32Array(e(t.eachGeometryEdgeIndicesPortion)),eachMeshGeometriesPortion:new Uint32Array(e(t.eachMeshGeometriesPortion)),eachMeshMatricesPortion:new Uint32Array(e(t.eachMeshMatricesPortion)),eachMeshMaterial:new Uint8Array(e(t.eachMeshMaterial)),eachEntityId:Wv.inflate(t.eachEntityId,{to:"string"}),eachEntityMeshesPortion:new Uint32Array(e(t.eachEntityMeshesPortion)),eachTileAABB:new Float64Array(e(t.eachTileAABB)),eachTileEntitiesPortion:new Uint32Array(e(t.eachTileEntitiesPortion))}}const SLt=(function(){const t=new Float32Array(3);return function(e){return t[0]=e[0]/255,t[1]=e[1]/255,t[2]=e[2]/255,t}})();function wY(t){const e=[];for(let i=0,o=t.length;i<o;i+=3)e.push(t[i]),e.push(t[i+1]),e.push(t[i+2]),e.push(1);return e}function TLt(t,e,i,o,r,n){const a=n.getNextId(),s=i.positions,l=i.normals,c=i.colors,d=i.indices,u=i.edgeIndices,h=i.matrices,p=i.reusedGeometriesDecodeMatrix,A=i.eachGeometryPrimitiveType,f=i.eachGeometryPositionsPortion,m=i.eachGeometryNormalsPortion,g=i.eachGeometryColorsPortion,y=i.eachGeometryIndicesPortion,v=i.eachGeometryEdgeIndicesPortion,b=i.eachMeshGeometriesPortion,x=i.eachMeshMatricesPortion,k=i.eachMeshMaterial,E=JSON.parse(i.eachEntityId),B=i.eachEntityMeshesPortion,P=i.eachTileAABB,D=i.eachTileEntitiesPortion,T=f.length,R=b.length,F=E.length,N=D.length,q=new Uint32Array(T);for(let Y=0;Y<R;Y++){const $=b[Y];q[$]!==void 0?q[$]++:q[$]=1}const V=C.vec3(),W=C.AABB3();for(let Y=0;Y<N;Y++){const $=N-1,me=Y===$,Ie=D[Y],Se=me?F:D[Y+1],qe=Y*6,Qe=P.subarray(qe,qe+6);C.getAABB3Center(Qe,V),W[0]=Qe[0]-V[0],W[1]=Qe[1]-V[1],W[2]=Qe[2]-V[2],W[3]=Qe[3]-V[0],W[4]=Qe[4]-V[1],W[5]=Qe[5]-V[2];const Ce=Jt.createPositionsDecodeMatrix(W),Le={};for(let Fe=Ie;Fe<Se;Fe++){const ve=E[Fe],ge=e.globalizeObjectIds?C.globalizeObjectId(o.id,ve):ve,we=F-1,Re=Fe===we,We=B[Fe],H=Re?b.length:B[Fe+1],ee=[],ae=t.metaScene.metaObjects[ge],Me={},pe={};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 Q=e.objectDefaults?e.objectDefaults[ae.type]||e.objectDefaults.DEFAULT:null;Q&&(Q.visible===!1&&(Me.visible=!1),Q.pickable===!1&&(Me.pickable=!1),Q.colorize&&(pe.color=Q.colorize),Q.opacity!==void 0&&Q.opacity!==null&&(pe.opacity=Q.opacity),Q.metallic!==void 0&&Q.metallic!==null&&(pe.metallic=Q.metallic),Q.roughness!==void 0&&Q.roughness!==null&&(pe.roughness=Q.roughness))}else if(e.excludeUnclassifiedObjects)continue;for(let Q=We;Q<H;Q++){const Z=b[Q],ie=q[Z]>1,re=Z===T-1,ne=SLt(k.subarray(Q*6,Q*6+3)),G=k[Q*6+3]/255,J=k[Q*6+4]/255,ue=k[Q*6+5]/255,xe=n.getNextId();if(ie){const oe=x[Q],Ee=h.slice(oe,oe+16),je=`${a}-geometry.${Y}.${Z}`;if(!Le[je]){const he=A[Z];let Ne,Be,He,rt,At,ft;switch(he){case 0:Ne="solid",Be=s.subarray(f[Z],re?s.length:f[Z+1]),He=l.subarray(m[Z],re?l.length:m[Z+1]),At=d.subarray(y[Z],re?d.length:y[Z+1]),ft=u.subarray(v[Z],re?u.length:v[Z+1]);break;case 1:Ne="surface",Be=s.subarray(f[Z],re?s.length:f[Z+1]),He=l.subarray(m[Z],re?l.length:m[Z+1]),At=d.subarray(y[Z],re?d.length:y[Z+1]),ft=u.subarray(v[Z],re?u.length:v[Z+1]);break;case 2:Ne="points",Be=s.subarray(f[Z],re?s.length:f[Z+1]),rt=wY(c.subarray(g[Z],re?c.length:g[Z+1]));break;case 3:Ne="lines",Be=s.subarray(f[Z],re?s.length:f[Z+1]),At=d.subarray(y[Z],re?d.length:y[Z+1]);break;default:continue}o.createGeometry({id:je,primitive:Ne,positionsCompressed:Be,normalsCompressed:He,colors:rt,indices:At,edgeIndices:ft,positionsDecodeMatrix:p}),Le[je]=!0}o.createMesh(mt.apply(pe,{id:xe,geometryId:je,origin:V,matrix:Ee,color:ne,metallic:J,roughness:ue,opacity:G})),ee.push(xe)}else{const oe=A[Z];let Ee,je,he,Ne,Be,He;switch(oe){case 0:Ee="solid",je=s.subarray(f[Z],re?s.length:f[Z+1]),he=l.subarray(m[Z],re?l.length:m[Z+1]),Be=d.subarray(y[Z],re?d.length:y[Z+1]),He=u.subarray(v[Z],re?u.length:v[Z+1]);break;case 1:Ee="surface",je=s.subarray(f[Z],re?s.length:f[Z+1]),he=l.subarray(m[Z],re?l.length:m[Z+1]),Be=d.subarray(y[Z],re?d.length:y[Z+1]),He=u.subarray(v[Z],re?u.length:v[Z+1]);break;case 2:Ee="points",je=s.subarray(f[Z],re?s.length:f[Z+1]),Ne=wY(c.subarray(g[Z],re?c.length:g[Z+1]));break;case 3:Ee="lines",je=s.subarray(f[Z],re?s.length:f[Z+1]),Be=d.subarray(y[Z],re?d.length:y[Z+1]);break;default:continue}o.createMesh(mt.apply(pe,{id:xe,origin:V,primitive:Ee,positionsCompressed:je,normalsCompressed:he,colors:Ne,indices:Be,edgeIndices:He,positionsDecodeMatrix:Ce,color:ne,metallic:J,roughness:ue,opacity:G})),ee.push(xe)}}ee.length>0&&o.createEntity(mt.apply(Me,{id:ge,isObject:!0,meshIds:ee}))}}}const CY={version:7,parse:function(t,e,i,o,r,n){const a=PLt(i),s=ILt(a);TLt(t,e,s,o,r,n)}};let Uu=window.pako||ts;Uu.inflate||(Uu=Uu.default);const Yl=C.vec4(),xY=C.vec4();function DLt(t){return{types:t[0],eachMetaObjectId:t[1],eachMetaObjectType:t[2],eachMetaObjectName:t[3],eachMetaObjectParent:t[4],positions:t[5],normals:t[6],colors:t[7],indices:t[8],edgeIndices:t[9],matrices:t[10],reusedGeometriesDecodeMatrix:t[11],eachGeometryPrimitiveType:t[12],eachGeometryPositionsPortion:t[13],eachGeometryNormalsPortion:t[14],eachGeometryColorsPortion:t[15],eachGeometryIndicesPortion:t[16],eachGeometryEdgeIndicesPortion:t[17],eachMeshGeometriesPortion:t[18],eachMeshMatricesPortion:t[19],eachMeshMaterial:t[20],eachEntityMetaObject:t[21],eachEntityMeshesPortion:t[22],eachTileAABB:t[23],eachTileEntitiesPortion:t[24]}}function RLt(t){function e(i,o){return i.length===0?[]:Uu.inflate(i,o).buffer}return{types:Uu.inflate(t.types,{to:"string"}),eachMetaObjectId:Uu.inflate(t.eachMetaObjectId,{to:"string"}),eachMetaObjectType:new Uint32Array(e(t.eachMetaObjectType)),eachMetaObjectName:Uu.inflate(t.eachMetaObjectName,{to:"string"}),eachMetaObjectParent:new Uint32Array(e(t.eachMetaObjectParent)),positions:new Uint16Array(e(t.positions)),normals:new Int8Array(e(t.normals)),colors:new Uint8Array(e(t.colors)),indices:new Uint32Array(e(t.indices)),edgeIndices:new Uint32Array(e(t.edgeIndices)),matrices:new Float32Array(e(t.matrices)),reusedGeometriesDecodeMatrix:new Float32Array(e(t.reusedGeometriesDecodeMatrix)),eachGeometryPrimitiveType:new Uint8Array(e(t.eachGeometryPrimitiveType)),eachGeometryPositionsPortion:new Uint32Array(e(t.eachGeometryPositionsPortion)),eachGeometryNormalsPortion:new Uint32Array(e(t.eachGeometryNormalsPortion)),eachGeometryColorsPortion:new Uint32Array(e(t.eachGeometryColorsPortion)),eachGeometryIndicesPortion:new Uint32Array(e(t.eachGeometryIndicesPortion)),eachGeometryEdgeIndicesPortion:new Uint32Array(e(t.eachGeometryEdgeIndicesPortion)),eachMeshGeometriesPortion:new Uint32Array(e(t.eachMeshGeometriesPortion)),eachMeshMatricesPortion:new Uint32Array(e(t.eachMeshMatricesPortion)),eachMeshMaterial:new Uint8Array(e(t.eachMeshMaterial)),eachEntityMetaObject:new Uint32Array(e(t.eachEntityMetaObject)),eachEntityMeshesPortion:new Uint32Array(e(t.eachEntityMeshesPortion)),eachTileAABB:new Float64Array(e(t.eachTileAABB)),eachTileEntitiesPortion:new Uint32Array(e(t.eachTileEntitiesPortion))}}const LLt=(function(){const t=new Float32Array(3);return function(e){return t[0]=e[0]/255,t[1]=e[1]/255,t[2]=e[2]/255,t}})();function kY(t){const e=[];for(let i=0,o=t.length;i<o;i+=3)e.push(t[i]),e.push(t[i+1]),e.push(t[i+2]),e.push(1);return e}function _Lt(t,e,i,o,r,n){const a=n.getNextId(),s=JSON.parse(i.types),l=JSON.parse(i.eachMetaObjectId),c=i.eachMetaObjectType,d=JSON.parse(i.eachMetaObjectName),u=i.eachMetaObjectParent,h=i.positions,p=i.normals,A=i.colors,f=i.indices,m=i.edgeIndices,g=i.matrices,y=i.reusedGeometriesDecodeMatrix,v=i.eachGeometryPrimitiveType,b=i.eachGeometryPositionsPortion,x=i.eachGeometryNormalsPortion,k=i.eachGeometryColorsPortion,E=i.eachGeometryIndicesPortion,B=i.eachGeometryEdgeIndicesPortion,P=i.eachMeshGeometriesPortion,D=i.eachMeshMatricesPortion,T=i.eachMeshMaterial,R=i.eachEntityMetaObject,F=i.eachEntityMeshesPortion,N=i.eachTileAABB,q=i.eachTileEntitiesPortion,V=l.length,W=b.length,Y=P.length,$=R.length,me=q.length;if(r){const Ce={metaObjects:[]};for(let Le=0;Le<V;Le++){const Fe=l[Le],ve=c[Le],ge=s[ve]||"default",we=d[Le],Re=u[Le],We=Re!==Le?l[Re]:null;Ce.metaObjects.push({id:Fe,type:ge,name:we,parent:We})}r.loadData(Ce,{includeTypes:e.includeTypes,excludeTypes:e.excludeTypes,globalizeObjectIds:e.globalizeObjectIds})}const Ie=new Uint32Array(W);for(let Ce=0;Ce<Y;Ce++){const Le=P[Ce];Ie[Le]!==void 0?Ie[Le]++:Ie[Le]=1}const Se=C.vec3(),qe=C.AABB3(),Qe={};for(let Ce=0;Ce<me;Ce++){const Le=me-1,Fe=Ce===Le,ve=q[Ce],ge=Fe?$:q[Ce+1],we=Ce*6,Re=N.subarray(we,we+6);C.getAABB3Center(Re,Se),qe[0]=Re[0]-Se[0],qe[1]=Re[1]-Se[1],qe[2]=Re[2]-Se[2],qe[3]=Re[3]-Se[0],qe[4]=Re[4]-Se[1],qe[5]=Re[5]-Se[2];const We=Jt.createPositionsDecodeMatrix(qe),H={};for(let ee=ve;ee<ge;ee++){const ae=R[ee],Me=l[ae],pe=e.globalizeObjectIds?C.globalizeObjectId(o.id,Me):Me,Q=$-1,Z=ee===Q,ie=F[ee],re=Z?P.length:F[ee+1],ne=[],G=t.metaScene.metaObjects[pe],J={},ue={};if(G){if(e.excludeTypesMap&&G.type&&e.excludeTypesMap[G.type]||e.includeTypesMap&&G.type&&!e.includeTypesMap[G.type]||e.includeIdsMap&&G.id&&!e.includeIdsMap[G.id])continue;const xe=e.objectDefaults?e.objectDefaults[G.type]||e.objectDefaults.DEFAULT:null;xe&&(xe.visible===!1&&(J.visible=!1),xe.pickable===!1&&(J.pickable=!1),xe.colorize&&(ue.color=xe.colorize),xe.opacity!==void 0&&xe.opacity!==null&&(ue.opacity=xe.opacity),xe.metallic!==void 0&&xe.metallic!==null&&(ue.metallic=xe.metallic),xe.roughness!==void 0&&xe.roughness!==null&&(ue.roughness=xe.roughness))}else if(e.excludeUnclassifiedObjects)continue;for(let xe=ie;xe<re;xe++){const oe=P[xe],Ee=Ie[oe]>1,je=oe===W-1,he=LLt(T.subarray(xe*6,xe*6+3)),Ne=T[xe*6+3]/255,Be=T[xe*6+4]/255,He=T[xe*6+5]/255,rt=n.getNextId();if(Ee){const At=D[xe],ft=g.slice(At,At+16),lt=`${a}-geometry.${Ce}.${oe}`;let ut=Qe[lt];if(!ut){ut={batchThisMesh:!e.reuseGeometries};const Te=v[oe];let st=!1;switch(Te){case 0:ut.primitiveName="solid",ut.geometryPositions=h.subarray(b[oe],je?h.length:b[oe+1]),ut.geometryNormals=p.subarray(x[oe],je?p.length:x[oe+1]),ut.geometryIndices=f.subarray(E[oe],je?f.length:E[oe+1]),ut.geometryEdgeIndices=m.subarray(B[oe],je?m.length:B[oe+1]),st=ut.geometryPositions.length>0&&ut.geometryIndices.length>0;break;case 1:ut.primitiveName="surface",ut.geometryPositions=h.subarray(b[oe],je?h.length:b[oe+1]),ut.geometryNormals=p.subarray(x[oe],je?p.length:x[oe+1]),ut.geometryIndices=f.subarray(E[oe],je?f.length:E[oe+1]),ut.geometryEdgeIndices=m.subarray(B[oe],je?m.length:B[oe+1]),st=ut.geometryPositions.length>0&&ut.geometryIndices.length>0;break;case 2:ut.primitiveName="points",ut.geometryPositions=h.subarray(b[oe],je?h.length:b[oe+1]),ut.geometryColors=kY(A.subarray(k[oe],je?A.length:k[oe+1])),st=ut.geometryPositions.length>0;break;case 3:ut.primitiveName="lines",ut.geometryPositions=h.subarray(b[oe],je?h.length:b[oe+1]),ut.geometryIndices=f.subarray(E[oe],je?f.length:E[oe+1]),st=ut.geometryPositions.length>0&&ut.geometryIndices.length>0;break;default:continue}if(st||(ut=null),ut&&(ut.geometryPositions.length>1e3,ut.batchThisMesh)){ut.decompressedPositions=new Float32Array(ut.geometryPositions.length);const dt=ut.geometryPositions,Ye=ut.decompressedPositions;for(let fe=0,be=dt.length;fe<be;fe+=3)Ye[fe+0]=dt[fe+0]*y[0]+y[12],Ye[fe+1]=dt[fe+1]*y[5]+y[13],Ye[fe+2]=dt[fe+2]*y[10]+y[14];ut.geometryPositions=null,Qe[lt]=ut}}if(ut)if(ut.batchThisMesh){const Te=ut.decompressedPositions,st=new Uint16Array(Te.length);for(let dt=0,Ye=Te.length;dt<Ye;dt+=3)Yl[0]=Te[dt+0],Yl[1]=Te[dt+1],Yl[2]=Te[dt+2],Yl[3]=1,C.transformVec4(ft,Yl,xY),Jt.compressPosition(xY,qe,Yl),st[dt+0]=Yl[0],st[dt+1]=Yl[1],st[dt+2]=Yl[2];o.createMesh(mt.apply(ue,{id:rt,origin:Se,primitive:ut.primitiveName,positionsCompressed:st,normalsCompressed:ut.geometryNormals,colorsCompressed:ut.geometryColors,indices:ut.geometryIndices,edgeIndices:ut.geometryEdgeIndices,positionsDecodeMatrix:We,color:he,metallic:Be,roughness:He,opacity:Ne})),ne.push(rt)}else H[lt]||(o.createGeometry({id:lt,primitive:ut.primitiveName,positionsCompressed:ut.geometryPositions,normalsCompressed:ut.geometryNormals,colorsCompressed:ut.geometryColors,indices:ut.geometryIndices,edgeIndices:ut.geometryEdgeIndices,positionsDecodeMatrix:y}),H[lt]=!0),o.createMesh(mt.apply(ue,{id:rt,geometryId:lt,origin:Se,matrix:ft,color:he,metallic:Be,roughness:He,opacity:Ne})),ne.push(rt)}else{const At=v[oe];let ft,lt,ut,Te,st,dt,Ye=!1;switch(At){case 0:ft="solid",lt=h.subarray(b[oe],je?h.length:b[oe+1]),ut=p.subarray(x[oe],je?p.length:x[oe+1]),st=f.subarray(E[oe],je?f.length:E[oe+1]),dt=m.subarray(B[oe],je?m.length:B[oe+1]),Ye=lt.length>0&&st.length>0;break;case 1:ft="surface",lt=h.subarray(b[oe],je?h.length:b[oe+1]),ut=p.subarray(x[oe],je?p.length:x[oe+1]),st=f.subarray(E[oe],je?f.length:E[oe+1]),dt=m.subarray(B[oe],je?m.length:B[oe+1]),Ye=lt.length>0&&st.length>0;break;case 2:ft="points",lt=h.subarray(b[oe],je?h.length:b[oe+1]),Te=kY(A.subarray(k[oe],je?A.length:k[oe+1])),Ye=lt.length>0;break;case 3:ft="lines",lt=h.subarray(b[oe],je?h.length:b[oe+1]),st=f.subarray(E[oe],je?f.length:E[oe+1]),Ye=lt.length>0&&st.length>0;break;default:continue}Ye&&(o.createMesh(mt.apply(ue,{id:rt,origin:Se,primitive:ft,positionsCompressed:lt,normalsCompressed:ut,colorsCompressed:Te,indices:st,edgeIndices:dt,positionsDecodeMatrix:We,color:he,metallic:Be,roughness:He,opacity:Ne})),ne.push(rt))}}ne.length>0&&o.createEntity(mt.apply(J,{id:pe,isObject:!0,meshIds:ne}))}}}const MY={version:8,parse:function(t,e,i,o,r,n){const a=DLt(i),s=RLt(a);_Lt(t,e,s,o,r,n)}};let r1=window.pako||ts;r1.inflate||(r1=r1.default);const Xl=C.vec4(),EY=C.vec4();function FLt(t){return{metadata:t[0],positions:t[1],normals:t[2],colors:t[3],indices:t[4],edgeIndices:t[5],matrices:t[6],reusedGeometriesDecodeMatrix:t[7],eachGeometryPrimitiveType:t[8],eachGeometryPositionsPortion:t[9],eachGeometryNormalsPortion:t[10],eachGeometryColorsPortion:t[11],eachGeometryIndicesPortion:t[12],eachGeometryEdgeIndicesPortion:t[13],eachMeshGeometriesPortion:t[14],eachMeshMatricesPortion:t[15],eachMeshMaterial:t[16],eachEntityId:t[17],eachEntityMeshesPortion:t[18],eachTileAABB:t[19],eachTileEntitiesPortion:t[20]}}function OLt(t){function e(i,o){return i.length===0?[]:r1.inflate(i,o).buffer}return{metadata:JSON.parse(r1.inflate(t.metadata,{to:"string"})),positions:new Uint16Array(e(t.positions)),normals:new Int8Array(e(t.normals)),colors:new Uint8Array(e(t.colors)),indices:new Uint32Array(e(t.indices)),edgeIndices:new Uint32Array(e(t.edgeIndices)),matrices:new Float32Array(e(t.matrices)),reusedGeometriesDecodeMatrix:new Float32Array(e(t.reusedGeometriesDecodeMatrix)),eachGeometryPrimitiveType:new Uint8Array(e(t.eachGeometryPrimitiveType)),eachGeometryPositionsPortion:new Uint32Array(e(t.eachGeometryPositionsPortion)),eachGeometryNormalsPortion:new Uint32Array(e(t.eachGeometryNormalsPortion)),eachGeometryColorsPortion:new Uint32Array(e(t.eachGeometryColorsPortion)),eachGeometryIndicesPortion:new Uint32Array(e(t.eachGeometryIndicesPortion)),eachGeometryEdgeIndicesPortion:new Uint32Array(e(t.eachGeometryEdgeIndicesPortion)),eachMeshGeometriesPortion:new Uint32Array(e(t.eachMeshGeometriesPortion)),eachMeshMatricesPortion:new Uint32Array(e(t.eachMeshMatricesPortion)),eachMeshMaterial:new Uint8Array(e(t.eachMeshMaterial)),eachEntityId:JSON.parse(r1.inflate(t.eachEntityId,{to:"string"})),eachEntityMeshesPortion:new Uint32Array(e(t.eachEntityMeshesPortion)),eachTileAABB:new Float64Array(e(t.eachTileAABB)),eachTileEntitiesPortion:new Uint32Array(e(t.eachTileEntitiesPortion))}}const ULt=(function(){const t=new Float32Array(3);return function(e){return t[0]=e[0]/255,t[1]=e[1]/255,t[2]=e[2]/255,t}})();function NLt(t,e,i,o,r,n){const a=n.getNextId(),s=i.metadata,l=i.positions,c=i.normals,d=i.colors,u=i.indices,h=i.edgeIndices,p=i.matrices,A=i.reusedGeometriesDecodeMatrix,f=i.eachGeometryPrimitiveType,m=i.eachGeometryPositionsPortion,g=i.eachGeometryNormalsPortion,y=i.eachGeometryColorsPortion,v=i.eachGeometryIndicesPortion,b=i.eachGeometryEdgeIndicesPortion,x=i.eachMeshGeometriesPortion,k=i.eachMeshMatricesPortion,E=i.eachMeshMaterial,B=i.eachEntityId,P=i.eachEntityMeshesPortion,D=i.eachTileAABB,T=i.eachTileEntitiesPortion,R=m.length,F=x.length,N=P.length,q=T.length;r&&r.loadData(s,{includeTypes:e.includeTypes,excludeTypes:e.excludeTypes,globalizeObjectIds:e.globalizeObjectIds});const V=new Uint32Array(R);for(let me=0;me<F;me++){const Ie=x[me];V[Ie]!==void 0?V[Ie]++:V[Ie]=1}const W=C.vec3(),Y=C.AABB3(),$={};for(let me=0;me<q;me++){const Ie=q-1,Se=me===Ie,qe=T[me],Qe=Se?N-1:T[me+1]-1,Ce=me*6,Le=D.subarray(Ce,Ce+6);C.getAABB3Center(Le,W),Y[0]=Le[0]-W[0],Y[1]=Le[1]-W[1],Y[2]=Le[2]-W[2],Y[3]=Le[3]-W[0],Y[4]=Le[4]-W[1],Y[5]=Le[5]-W[2];const Fe=Jt.createPositionsDecodeMatrix(Y),ve={};for(let ge=qe;ge<=Qe;ge++){const we=B[ge],Re=e.globalizeObjectIds?C.globalizeObjectId(o.id,we):we,We=N-1,H=ge===We,ee=P[ge],ae=H?x.length-1:P[ge+1]-1,Me=[],pe=t.metaScene.metaObjects[Re],Q={},Z={};if(!(e.includeIdsMap&&we&&!e.includeIdsMap[we])){if(pe){if(e.excludeTypesMap&&pe.type&&e.excludeTypesMap[pe.type]||e.includeTypesMap&&pe.type&&!e.includeTypesMap[pe.type]||e.includeIdsMap&&pe.id&&!e.includeIdsMap[pe.id])continue;const ie=e.objectDefaults?e.objectDefaults[pe.type]||e.objectDefaults.DEFAULT:null;ie&&(ie.visible===!1&&(Q.visible=!1),ie.pickable===!1&&(Q.pickable=!1),ie.colorize&&(Z.color=ie.colorize),ie.opacity!==void 0&&ie.opacity!==null&&(Z.opacity=ie.opacity),ie.metallic!==void 0&&ie.metallic!==null&&(Z.metallic=ie.metallic),ie.roughness!==void 0&&ie.roughness!==null&&(Z.roughness=ie.roughness))}else if(e.excludeUnclassifiedObjects)continue;for(let ie=ee;ie<=ae;ie++){const re=x[ie],ne=V[re]>1,G=re===R-1,J=ULt(E.subarray(ie*6,ie*6+3)),ue=E[ie*6+3]/255,xe=E[ie*6+4]/255,oe=E[ie*6+5]/255,Ee=n.getNextId();if(ne){const je=k[ie],he=p.slice(je,je+16),Ne=`${a}-geometry.${me}.${re}`;let Be=$[Ne];if(!Be){Be={batchThisMesh:!e.reuseGeometries};const He=f[re];let rt=!1;switch(He){case 0:Be.primitiveName="solid",Be.geometryPositions=l.subarray(m[re],G?l.length:m[re+1]),Be.geometryNormals=c.subarray(g[re],G?c.length:g[re+1]),Be.geometryIndices=u.subarray(v[re],G?u.length:v[re+1]),Be.geometryEdgeIndices=h.subarray(b[re],G?h.length:b[re+1]),rt=Be.geometryPositions.length>0&&Be.geometryIndices.length>0;break;case 1:Be.primitiveName="surface",Be.geometryPositions=l.subarray(m[re],G?l.length:m[re+1]),Be.geometryNormals=c.subarray(g[re],G?c.length:g[re+1]),Be.geometryIndices=u.subarray(v[re],G?u.length:v[re+1]),Be.geometryEdgeIndices=h.subarray(b[re],G?h.length:b[re+1]),rt=Be.geometryPositions.length>0&&Be.geometryIndices.length>0;break;case 2:Be.primitiveName="points",Be.geometryPositions=l.subarray(m[re],G?l.length:m[re+1]),Be.geometryColors=d.subarray(y[re],G?d.length:y[re+1]),rt=Be.geometryPositions.length>0;break;case 3:Be.primitiveName="lines",Be.geometryPositions=l.subarray(m[re],G?l.length:m[re+1]),Be.geometryIndices=u.subarray(v[re],G?u.length:v[re+1]),rt=Be.geometryPositions.length>0&&Be.geometryIndices.length>0;break;default:continue}if(rt||(Be=null),Be&&(Be.geometryPositions.length>1e3,Be.batchThisMesh)){Be.decompressedPositions=new Float32Array(Be.geometryPositions.length),Be.transformedAndRecompressedPositions=new Uint16Array(Be.geometryPositions.length);const At=Be.geometryPositions,ft=Be.decompressedPositions;for(let lt=0,ut=At.length;lt<ut;lt+=3)ft[lt+0]=At[lt+0]*A[0]+A[12],ft[lt+1]=At[lt+1]*A[5]+A[13],ft[lt+2]=At[lt+2]*A[10]+A[14];Be.geometryPositions=null,$[Ne]=Be}}if(Be)if(Be.batchThisMesh){const He=Be.decompressedPositions,rt=Be.transformedAndRecompressedPositions;for(let At=0,ft=He.length;At<ft;At+=3)Xl[0]=He[At+0],Xl[1]=He[At+1],Xl[2]=He[At+2],Xl[3]=1,C.transformVec4(he,Xl,EY),Jt.compressPosition(EY,Y,Xl),rt[At+0]=Xl[0],rt[At+1]=Xl[1],rt[At+2]=Xl[2];o.createMesh(mt.apply(Z,{id:Ee,origin:W,primitive:Be.primitiveName,positionsCompressed:rt,normalsCompressed:Be.geometryNormals,colorsCompressed:Be.geometryColors,indices:Be.geometryIndices,edgeIndices:Be.geometryEdgeIndices,positionsDecodeMatrix:Fe,color:J,metallic:xe,roughness:oe,opacity:ue})),Me.push(Ee)}else ve[Ne]||(o.createGeometry({id:Ne,primitive:Be.primitiveName,positionsCompressed:Be.geometryPositions,normalsCompressed:Be.geometryNormals,colorsCompressed:Be.geometryColors,indices:Be.geometryIndices,edgeIndices:Be.geometryEdgeIndices,positionsDecodeMatrix:A}),ve[Ne]=!0),o.createMesh(mt.apply(Z,{id:Ee,geometryId:Ne,origin:W,matrix:he,color:J,metallic:xe,roughness:oe,opacity:ue})),Me.push(Ee)}else{const je=f[re];let he,Ne,Be,He,rt,At,ft=!1;switch(je){case 0:he="solid",Ne=l.subarray(m[re],G?l.length:m[re+1]),Be=c.subarray(g[re],G?c.length:g[re+1]),rt=u.subarray(v[re],G?u.length:v[re+1]),At=h.subarray(b[re],G?h.length:b[re+1]),ft=Ne.length>0&&rt.length>0;break;case 1:he="surface",Ne=l.subarray(m[re],G?l.length:m[re+1]),Be=c.subarray(g[re],G?c.length:g[re+1]),rt=u.subarray(v[re],G?u.length:v[re+1]),At=h.subarray(b[re],G?h.length:b[re+1]),ft=Ne.length>0&&rt.length>0;break;case 2:he="points",Ne=l.subarray(m[re],G?l.length:m[re+1]),He=d.subarray(y[re],G?d.length:y[re+1]),ft=Ne.length>0;break;case 3:he="lines",Ne=l.subarray(m[re],G?l.length:m[re+1]),rt=u.subarray(v[re],G?u.length:v[re+1]),ft=Ne.length>0&&rt.length>0;break;default:continue}ft&&(o.createMesh(mt.apply(Z,{id:Ee,origin:W,primitive:he,positionsCompressed:Ne,normalsCompressed:Be,colorsCompressed:He,indices:rt,edgeIndices:At,positionsDecodeMatrix:Fe,color:J,metallic:xe,roughness:oe,opacity:ue})),Me.push(Ee))}}Me.length>0&&o.createEntity(mt.apply(Q,{id:Re,isObject:!0,meshIds:Me}))}}}}const BY={version:9,parse:function(t,e,i,o,r,n){const a=FLt(i),s=OLt(a);NLt(t,e,s,o,r,n)}};let n1=window.pako||ts;n1.inflate||(n1=n1.default);const $l=C.vec4(),PY=C.vec4(),jLt=9;function VLt(t){let e=0;return{metadata:t[e++],textureData:t[e++],eachTextureDataPortion:t[e++],eachTextureAttributes:t[e++],positions:t[e++],normals:t[e++],colors:t[e++],uvs:t[e++],indices:t[e++],edgeIndices:t[e++],eachTextureSetTextures:t[e++],matrices:t[e++],reusedGeometriesDecodeMatrix:t[e++],eachGeometryPrimitiveType:t[e++],eachGeometryPositionsPortion:t[e++],eachGeometryNormalsPortion:t[e++],eachGeometryColorsPortion:t[e++],eachGeometryUVsPortion:t[e++],eachGeometryIndicesPortion:t[e++],eachGeometryEdgeIndicesPortion:t[e++],eachMeshGeometriesPortion:t[e++],eachMeshMatricesPortion:t[e++],eachMeshTextureSet:t[e++],eachMeshMaterialAttributes:t[e++],eachEntityId:t[e++],eachEntityMeshesPortion:t[e++],eachTileAABB:t[e++],eachTileEntitiesPortion:t[e++]}}function zLt(t){function e(i,o){return i.length===0?[]:n1.inflate(i,o).buffer}return{metadata:JSON.parse(n1.inflate(t.metadata,{to:"string"})),textureData:new Uint8Array(e(t.textureData)),eachTextureDataPortion:new Uint32Array(e(t.eachTextureDataPortion)),eachTextureAttributes:new Uint16Array(e(t.eachTextureAttributes)),positions:new Uint16Array(e(t.positions)),normals:new Int8Array(e(t.normals)),colors:new Uint8Array(e(t.colors)),uvs:new Float32Array(e(t.uvs)),indices:new Uint32Array(e(t.indices)),edgeIndices:new Uint32Array(e(t.edgeIndices)),eachTextureSetTextures:new Int32Array(e(t.eachTextureSetTextures)),matrices:new Float32Array(e(t.matrices)),reusedGeometriesDecodeMatrix:new Float32Array(e(t.reusedGeometriesDecodeMatrix)),eachGeometryPrimitiveType:new Uint8Array(e(t.eachGeometryPrimitiveType)),eachGeometryPositionsPortion:new Uint32Array(e(t.eachGeometryPositionsPortion)),eachGeometryNormalsPortion:new Uint32Array(e(t.eachGeometryNormalsPortion)),eachGeometryColorsPortion:new Uint32Array(e(t.eachGeometryColorsPortion)),eachGeometryUVsPortion:new Uint32Array(e(t.eachGeometryUVsPortion)),eachGeometryIndicesPortion:new Uint32Array(e(t.eachGeometryIndicesPortion)),eachGeometryEdgeIndicesPortion:new Uint32Array(e(t.eachGeometryEdgeIndicesPortion)),eachMeshGeometriesPortion:new Uint32Array(e(t.eachMeshGeometriesPortion)),eachMeshMatricesPortion:new Uint32Array(e(t.eachMeshMatricesPortion)),eachMeshTextureSet:new Int32Array(e(t.eachMeshTextureSet)),eachMeshMaterialAttributes:new Uint8Array(e(t.eachMeshMaterialAttributes)),eachEntityId:JSON.parse(n1.inflate(t.eachEntityId,{to:"string"})),eachEntityMeshesPortion:new Uint32Array(e(t.eachEntityMeshesPortion)),eachTileAABB:new Float64Array(e(t.eachTileAABB)),eachTileEntitiesPortion:new Uint32Array(e(t.eachTileEntitiesPortion))}}const HLt=(function(){const t=new Float32Array(3);return function(e){return t[0]=e[0]/255,t[1]=e[1]/255,t[2]=e[2]/255,t}})();(function(){const t=document.createElement("canvas"),e=t.getContext("2d");return function(i){return t.width=i.width,t.height=i.height,e.putImageData(i,0,0),t.toDataURL()}})();function qLt(t,e,i,o,r,n){const a=n.getNextId(),s=i.metadata,l=i.textureData,c=i.eachTextureDataPortion,d=i.eachTextureAttributes,u=i.positions,h=i.normals,p=i.colors,A=i.uvs,f=i.indices,m=i.edgeIndices,g=i.eachTextureSetTextures,y=i.matrices,v=i.reusedGeometriesDecodeMatrix,b=i.eachGeometryPrimitiveType,x=i.eachGeometryPositionsPortion,k=i.eachGeometryNormalsPortion,E=i.eachGeometryColorsPortion,B=i.eachGeometryUVsPortion,P=i.eachGeometryIndicesPortion,D=i.eachGeometryEdgeIndicesPortion,T=i.eachMeshGeometriesPortion,R=i.eachMeshMatricesPortion,F=i.eachMeshTextureSet,N=i.eachMeshMaterialAttributes,q=i.eachEntityId,V=i.eachEntityMeshesPortion,W=i.eachTileAABB,Y=i.eachTileEntitiesPortion,$=c.length,me=g.length/5,Ie=x.length,Se=T.length,qe=V.length,Qe=Y.length;r&&r.loadData(s,{includeTypes:e.includeTypes,excludeTypes:e.excludeTypes,globalizeObjectIds:e.globalizeObjectIds});for(let ge=0;ge<$;ge++){const we=ge===$-1,Re=c[ge],We=we?l.length:c[ge+1],H=We-Re>0,ee=ge*jLt,ae=d[ee+0]===1,Me=d[ee+1];d[ee+2],d[ee+3];const pe=d[ee+4],Q=d[ee+5],Z=d[ee+6],ie=d[ee+7],re=d[ee+8];if(H){const ne=new Uint8Array(l.subarray(Re,We)).buffer,G=`${a}-texture-${ge}`;if(ae)o.createTexture({id:G,buffers:[ne],minFilter:pe,magFilter:Q,wrapS:Z,wrapT:ie,wrapR:re});else{const J=Me===ey?"image/jpeg":Me===ty?"image/png":"image/gif",ue=new Blob([ne],{type:J}),xe=(window.URL||window.webkitURL).createObjectURL(ue),oe=document.createElement("img");oe.src=xe,o.createTexture({id:G,image:oe,minFilter:pe,magFilter:Q,wrapS:Z,wrapT:ie,wrapR:re})}}}for(let ge=0;ge<me;ge++){const we=ge*5,Re=`${a}-textureSet-${ge}`,We=g[we+0],H=g[we+1],ee=g[we+2],ae=g[we+3],Me=g[we+4];o.createTextureSet({id:Re,colorTextureId:We>=0?`${a}-texture-${We}`:null,normalsTextureId:ee>=0?`${a}-texture-${ee}`:null,metallicRoughnessTextureId:H>=0?`${a}-texture-${H}`:null,emissiveTextureId:ae>=0?`${a}-texture-${ae}`:null,occlusionTextureId:Me>=0?`${a}-texture-${Me}`:null})}const Ce=new Uint32Array(Ie);for(let ge=0;ge<Se;ge++){const we=T[ge];Ce[we]!==void 0?Ce[we]++:Ce[we]=1}const Le=C.vec3(),Fe=C.AABB3(),ve={};for(let ge=0;ge<Qe;ge++){const we=Qe-1,Re=ge===we,We=Y[ge],H=Re?qe-1:Y[ge+1]-1,ee=ge*6,ae=W.subarray(ee,ee+6);C.getAABB3Center(ae,Le),Fe[0]=ae[0]-Le[0],Fe[1]=ae[1]-Le[1],Fe[2]=ae[2]-Le[2],Fe[3]=ae[3]-Le[0],Fe[4]=ae[4]-Le[1],Fe[5]=ae[5]-Le[2];const Me=Jt.createPositionsDecodeMatrix(Fe),pe={};for(let Q=We;Q<=H;Q++){const Z=q[Q],ie=e.globalizeObjectIds?C.globalizeObjectId(o.id,Z):Z,re=qe-1,ne=Q===re,G=V[Q],J=ne?T.length-1:V[Q+1]-1,ue=[],xe=t.metaScene.metaObjects[ie],oe={},Ee={};if(!(e.includeIdsMap&&Z&&!e.includeIdsMap[Z])){if(xe){if(e.excludeTypesMap&&xe.type&&e.excludeTypesMap[xe.type]||e.includeTypesMap&&xe.type&&!e.includeTypesMap[xe.type]||e.includeIdsMap&&xe.id&&!e.includeIdsMap[xe.id])continue;const je=e.objectDefaults?e.objectDefaults[xe.type]||e.objectDefaults.DEFAULT:null;je&&(je.visible===!1&&(oe.visible=!1),je.pickable===!1&&(oe.pickable=!1),je.colorize&&(Ee.color=je.colorize),je.opacity!==void 0&&je.opacity!==null&&(Ee.opacity=je.opacity),je.metallic!==void 0&&je.metallic!==null&&(Ee.metallic=je.metallic),je.roughness!==void 0&&je.roughness!==null&&(Ee.roughness=je.roughness))}else if(e.excludeUnclassifiedObjects)continue;for(let je=G;je<=J;je++){const he=T[je],Ne=Ce[he]>1,Be=he===Ie-1,He=F[je],rt=He>=0?`${a}-textureSet-${He}`:null,At=HLt(N.subarray(je*6,je*6+3)),ft=N[je*6+3]/255,lt=N[je*6+4]/255,ut=N[je*6+5]/255,Te=n.getNextId();if(Ne){const st=R[je],dt=y.slice(st,st+16),Ye=`${a}-geometry.${ge}.${he}`;let fe=ve[Ye];if(!fe){fe={batchThisMesh:!e.reuseGeometries};const be=b[he];let $e=!1;switch(be){case 0:fe.primitiveName="solid",fe.geometryPositions=u.subarray(x[he],Be?u.length:x[he+1]),fe.geometryNormals=h.subarray(k[he],Be?h.length:k[he+1]),fe.geometryUVs=A.subarray(B[he],Be?A.length:B[he+1]),fe.geometryIndices=f.subarray(P[he],Be?f.length:P[he+1]),fe.geometryEdgeIndices=m.subarray(D[he],Be?m.length:D[he+1]),$e=fe.geometryPositions.length>0&&fe.geometryIndices.length>0;break;case 1:fe.primitiveName="surface",fe.geometryPositions=u.subarray(x[he],Be?u.length:x[he+1]),fe.geometryNormals=h.subarray(k[he],Be?h.length:k[he+1]),fe.geometryUVs=A.subarray(B[he],Be?A.length:B[he+1]),fe.geometryIndices=f.subarray(P[he],Be?f.length:P[he+1]),fe.geometryEdgeIndices=m.subarray(D[he],Be?m.length:D[he+1]),$e=fe.geometryPositions.length>0&&fe.geometryIndices.length>0;break;case 2:fe.primitiveName="points",fe.geometryPositions=u.subarray(x[he],Be?u.length:x[he+1]),fe.geometryColors=p.subarray(E[he],Be?p.length:E[he+1]),$e=fe.geometryPositions.length>0;break;case 3:fe.primitiveName="lines",fe.geometryPositions=u.subarray(x[he],Be?u.length:x[he+1]),fe.geometryIndices=f.subarray(P[he],Be?f.length:P[he+1]),$e=fe.geometryPositions.length>0&&fe.geometryIndices.length>0;break;case 4:fe.primitiveName="lines",fe.geometryPositions=u.subarray(x[he],Be?u.length:x[he+1]),fe.geometryIndices=IY(fe.geometryPositions,f.subarray(P[he],Be?f.length:P[he+1])),$e=fe.geometryPositions.length>0&&fe.geometryIndices.length>0;break;default:continue}if($e||(fe=null),fe&&(fe.geometryPositions.length>1e3,fe.batchThisMesh)){fe.decompressedPositions=new Float32Array(fe.geometryPositions.length),fe.transformedAndRecompressedPositions=new Uint16Array(fe.geometryPositions.length);const ht=fe.geometryPositions,St=fe.decompressedPositions;for(let xt=0,gi=ht.length;xt<gi;xt+=3)St[xt+0]=ht[xt+0]*v[0]+v[12],St[xt+1]=ht[xt+1]*v[5]+v[13],St[xt+2]=ht[xt+2]*v[10]+v[14];fe.geometryPositions=null,ve[Ye]=fe}}if(fe)if(fe.batchThisMesh){const be=fe.decompressedPositions,$e=fe.transformedAndRecompressedPositions;for(let ht=0,St=be.length;ht<St;ht+=3)$l[0]=be[ht+0],$l[1]=be[ht+1],$l[2]=be[ht+2],$l[3]=1,C.transformVec4(dt,$l,PY),Jt.compressPosition(PY,Fe,$l),$e[ht+0]=$l[0],$e[ht+1]=$l[1],$e[ht+2]=$l[2];o.createMesh(mt.apply(Ee,{id:Te,textureSetId:rt,origin:Le,primitive:fe.primitiveName,positionsCompressed:$e,normalsCompressed:fe.geometryNormals,uv:fe.geometryUVs,colorsCompressed:fe.geometryColors,indices:fe.geometryIndices,edgeIndices:fe.geometryEdgeIndices,positionsDecodeMatrix:Me,color:At,metallic:lt,roughness:ut,opacity:ft})),ue.push(Te)}else pe[Ye]||(o.createGeometry({id:Ye,primitive:fe.primitiveName,positionsCompressed:fe.geometryPositions,normalsCompressed:fe.geometryNormals,uv:fe.geometryUVs,colorsCompressed:fe.geometryColors,indices:fe.geometryIndices,edgeIndices:fe.geometryEdgeIndices,positionsDecodeMatrix:v}),pe[Ye]=!0),o.createMesh(mt.apply(Ee,{id:Te,geometryId:Ye,textureSetId:rt,matrix:dt,color:At,metallic:lt,roughness:ut,opacity:ft,origin:Le})),ue.push(Te)}else{const st=b[he];let dt,Ye,fe,be,$e,ht,St,xt=!1;switch(st){case 0:dt="solid",Ye=u.subarray(x[he],Be?u.length:x[he+1]),fe=h.subarray(k[he],Be?h.length:k[he+1]),be=A.subarray(B[he],Be?A.length:B[he+1]),ht=f.subarray(P[he],Be?f.length:P[he+1]),St=m.subarray(D[he],Be?m.length:D[he+1]),xt=Ye.length>0&&ht.length>0;break;case 1:dt="surface",Ye=u.subarray(x[he],Be?u.length:x[he+1]),fe=h.subarray(k[he],Be?h.length:k[he+1]),be=A.subarray(B[he],Be?A.length:B[he+1]),ht=f.subarray(P[he],Be?f.length:P[he+1]),St=m.subarray(D[he],Be?m.length:D[he+1]),xt=Ye.length>0&&ht.length>0;break;case 2:dt="points",Ye=u.subarray(x[he],Be?u.length:x[he+1]),$e=p.subarray(E[he],Be?p.length:E[he+1]),xt=Ye.length>0;break;case 3:dt="lines",Ye=u.subarray(x[he],Be?u.length:x[he+1]),ht=f.subarray(P[he],Be?f.length:P[he+1]),xt=Ye.length>0&&ht.length>0;break;case 4:dt="lines",Ye=u.subarray(x[he],Be?u.length:x[he+1]),ht=IY(Ye,f.subarray(P[he],Be?f.length:P[he+1])),xt=Ye.length>0&&ht.length>0;break;default:continue}xt&&(o.createMesh(mt.apply(Ee,{id:Te,textureSetId:rt,origin:Le,primitive:dt,positionsCompressed:Ye,normalsCompressed:fe,uv:be&&be.length>0?be:null,colorsCompressed:$e,indices:ht,edgeIndices:St,positionsDecodeMatrix:Me,color:At,metallic:lt,roughness:ut,opacity:ft})),ue.push(Te))}}ue.length>0&&o.createEntity(mt.apply(oe,{id:ie,isObject:!0,meshIds:ue}))}}}}function IY(t,e){const i=[];if(e.length>1)for(let o=0,r=e.length-1;o<r;o++)i.push(e[o]),i.push(e[o+1]);else if(t.length>1)for(let o=0,r=t.length/3-1;o<r;o++)i.push(o),i.push(o+1);return i}const SY={version:10,parse:function(t,e,i,o,r,n){const a=VLt(i),s=zLt(a);qLt(t,e,s,o,r,n)}},ec=C.vec4(),TY=C.vec4(),QLt=9;function GLt(t){const e=(function(){const r=new ArrayBuffer(2);return new Uint16Array(r)[0]=1,new Uint8Array(r)[0]!==1})(),i=(function(){let r=0;const n=new DataView(t);return function(a){const s=1+2*r++,l=n.getUint32(s*4,!0),c=n.getUint32((s+1)*4,!0),d=a.BYTES_PER_ELEMENT;if(e&&d>1){const u=new Uint8Array(t,l,c),h=d/2,p=u.length/d;for(let A=0;A<p;A++){const f=A*d;for(let m=0;m<h;m++){const g=f+m,y=f-m+d-1,v=u[g];u[g]=u[y],u[y]=v}}}return new a(t,l,c/d)}})(),o=(function(){const r=new TextDecoder;return()=>JSON.parse(r.decode(i(Uint8Array)))})();return{metadata:o(),textureData:i(Uint8Array),eachTextureDataPortion:i(Uint32Array),eachTextureAttributes:i(Uint16Array),positions:i(Uint16Array),normals:i(Int8Array),colors:i(Uint8Array),uvs:i(Float32Array),indices:i(Uint32Array),edgeIndices:i(Uint32Array),eachTextureSetTextures:i(Int32Array),matrices:i(Float32Array),reusedGeometriesDecodeMatrix:i(Float32Array),eachGeometryPrimitiveType:i(Uint8Array),eachGeometryPositionsPortion:i(Uint32Array),eachGeometryNormalsPortion:i(Uint32Array),eachGeometryColorsPortion:i(Uint32Array),eachGeometryUVsPortion:i(Uint32Array),eachGeometryIndicesPortion:i(Uint32Array),eachGeometryEdgeIndicesPortion:i(Uint32Array),eachMeshGeometriesPortion:i(Uint32Array),eachMeshMatricesPortion:i(Uint32Array),eachMeshTextureSet:i(Int32Array),eachMeshMaterialAttributes:i(Uint8Array),eachEntityId:o(),eachEntityMeshesPortion:i(Uint32Array),eachTileAABB:i(Float64Array),eachTileEntitiesPortion:i(Uint32Array)}}const KLt=(function(){const t=new Float32Array(3);return function(e){return t[0]=e[0]/255,t[1]=e[1]/255,t[2]=e[2]/255,t}})();(function(){const t=document.createElement("canvas"),e=t.getContext("2d");return function(i){return t.width=i.width,t.height=i.height,e.putImageData(i,0,0),t.toDataURL()}})();function JLt(t,e,i,o,r,n){const a=n.getNextId(),s=i.metadata,l=i.textureData,c=i.eachTextureDataPortion,d=i.eachTextureAttributes,u=i.positions,h=i.normals,p=i.colors,A=i.uvs,f=i.indices,m=i.edgeIndices,g=i.eachTextureSetTextures,y=i.matrices,v=i.reusedGeometriesDecodeMatrix,b=i.eachGeometryPrimitiveType,x=i.eachGeometryPositionsPortion,k=i.eachGeometryNormalsPortion,E=i.eachGeometryColorsPortion,B=i.eachGeometryUVsPortion,P=i.eachGeometryIndicesPortion,D=i.eachGeometryEdgeIndicesPortion,T=i.eachMeshGeometriesPortion,R=i.eachMeshMatricesPortion,F=i.eachMeshTextureSet,N=i.eachMeshMaterialAttributes,q=i.eachEntityId,V=i.eachEntityMeshesPortion,W=i.eachTileAABB,Y=i.eachTileEntitiesPortion,$=c.length,me=g.length/5,Ie=x.length,Se=T.length,qe=V.length,Qe=Y.length;r&&r.loadData(s,{includeTypes:e.includeTypes,excludeTypes:e.excludeTypes,globalizeObjectIds:e.globalizeObjectIds});for(let ge=0;ge<$;ge++){const we=ge===$-1,Re=c[ge],We=we?l.length:c[ge+1],H=We-Re>0,ee=ge*QLt,ae=d[ee+0]===1,Me=d[ee+1];d[ee+2],d[ee+3];const pe=d[ee+4],Q=d[ee+5],Z=d[ee+6],ie=d[ee+7],re=d[ee+8];if(H){const ne=new Uint8Array(l.subarray(Re,We)).buffer,G=`${a}-texture-${ge}`;if(ae)o.createTexture({id:G,buffers:[ne],minFilter:pe,magFilter:Q,wrapS:Z,wrapT:ie,wrapR:re});else{const J=Me===ey?"image/jpeg":Me===ty?"image/png":"image/gif",ue=new Blob([ne],{type:J}),xe=(window.URL||window.webkitURL).createObjectURL(ue),oe=document.createElement("img");oe.src=xe,o.createTexture({id:G,image:oe,minFilter:pe,magFilter:Q,wrapS:Z,wrapT:ie,wrapR:re})}}}for(let ge=0;ge<me;ge++){const we=ge*5,Re=`${a}-textureSet-${ge}`,We=g[we+0],H=g[we+1],ee=g[we+2],ae=g[we+3],Me=g[we+4];o.createTextureSet({id:Re,colorTextureId:We>=0?`${a}-texture-${We}`:null,normalsTextureId:ee>=0?`${a}-texture-${ee}`:null,metallicRoughnessTextureId:H>=0?`${a}-texture-${H}`:null,emissiveTextureId:ae>=0?`${a}-texture-${ae}`:null,occlusionTextureId:Me>=0?`${a}-texture-${Me}`:null})}const Ce=new Uint32Array(Ie);for(let ge=0;ge<Se;ge++){const we=T[ge];Ce[we]!==void 0?Ce[we]++:Ce[we]=1}const Le=C.vec3(),Fe=C.AABB3(),ve={};for(let ge=0;ge<Qe;ge++){const we=Qe-1,Re=ge===we,We=Y[ge],H=Re?qe-1:Y[ge+1]-1,ee=ge*6,ae=W.subarray(ee,ee+6);C.getAABB3Center(ae,Le),Fe[0]=ae[0]-Le[0],Fe[1]=ae[1]-Le[1],Fe[2]=ae[2]-Le[2],Fe[3]=ae[3]-Le[0],Fe[4]=ae[4]-Le[1],Fe[5]=ae[5]-Le[2];const Me=Jt.createPositionsDecodeMatrix(Fe),pe={};for(let Q=We;Q<=H;Q++){const Z=q[Q],ie=e.globalizeObjectIds?C.globalizeObjectId(o.id,Z):Z,re=qe-1,ne=Q===re,G=V[Q],J=ne?T.length-1:V[Q+1]-1,ue=[],xe=t.metaScene.metaObjects[ie],oe={},Ee={};if(!(e.includeIdsMap&&Z&&!e.includeIdsMap[Z])){if(xe){if(e.excludeTypesMap&&xe.type&&e.excludeTypesMap[xe.type]||e.includeTypesMap&&xe.type&&!e.includeTypesMap[xe.type]||e.includeIdsMap&&xe.id&&!e.includeIdsMap[xe.id])continue;const je=e.objectDefaults?e.objectDefaults[xe.type]||e.objectDefaults.DEFAULT:null;je&&(je.visible===!1&&(oe.visible=!1),je.pickable===!1&&(oe.pickable=!1),je.colorize&&(Ee.color=je.colorize),je.opacity!==void 0&&je.opacity!==null&&(Ee.opacity=je.opacity),je.metallic!==void 0&&je.metallic!==null&&(Ee.metallic=je.metallic),je.roughness!==void 0&&je.roughness!==null&&(Ee.roughness=je.roughness))}else if(e.excludeUnclassifiedObjects)continue;for(let je=G;je<=J;je++){const he=T[je],Ne=Ce[he]>1,Be=he===Ie-1,He=F[je],rt=He>=0?`${a}-textureSet-${He}`:null,At=KLt(N.subarray(je*6,je*6+3)),ft=N[je*6+3]/255,lt=N[je*6+4]/255,ut=N[je*6+5]/255,Te=n.getNextId();if(Ne){const st=R[je],dt=y.slice(st,st+16),Ye=`${a}-geometry.${ge}.${he}`;let fe=ve[Ye];if(!fe){fe={batchThisMesh:!e.reuseGeometries};const be=b[he];let $e=!1;switch(be){case 0:fe.primitiveName="solid",fe.geometryPositions=u.subarray(x[he],Be?u.length:x[he+1]),fe.geometryNormals=h.subarray(k[he],Be?h.length:k[he+1]),fe.geometryUVs=A.subarray(B[he],Be?A.length:B[he+1]),fe.geometryIndices=f.subarray(P[he],Be?f.length:P[he+1]),fe.geometryEdgeIndices=m.subarray(D[he],Be?m.length:D[he+1]),$e=fe.geometryPositions.length>0&&fe.geometryIndices.length>0;break;case 1:fe.primitiveName="surface",fe.geometryPositions=u.subarray(x[he],Be?u.length:x[he+1]),fe.geometryNormals=h.subarray(k[he],Be?h.length:k[he+1]),fe.geometryUVs=A.subarray(B[he],Be?A.length:B[he+1]),fe.geometryIndices=f.subarray(P[he],Be?f.length:P[he+1]),fe.geometryEdgeIndices=m.subarray(D[he],Be?m.length:D[he+1]),$e=fe.geometryPositions.length>0&&fe.geometryIndices.length>0;break;case 2:fe.primitiveName="points",fe.geometryPositions=u.subarray(x[he],Be?u.length:x[he+1]),fe.geometryColors=p.subarray(E[he],Be?p.length:E[he+1]),$e=fe.geometryPositions.length>0;break;case 3:fe.primitiveName="lines",fe.geometryPositions=u.subarray(x[he],Be?u.length:x[he+1]),fe.geometryIndices=f.subarray(P[he],Be?f.length:P[he+1]),$e=fe.geometryPositions.length>0&&fe.geometryIndices.length>0;break;case 4:fe.primitiveName="lines",fe.geometryPositions=u.subarray(x[he],Be?u.length:x[he+1]),fe.geometryIndices=DY(fe.geometryPositions,f.subarray(P[he],Be?f.length:P[he+1])),$e=fe.geometryPositions.length>0&&fe.geometryIndices.length>0;break;default:continue}if($e||(fe=null),fe&&(fe.geometryPositions.length>1e3,fe.batchThisMesh)){fe.decompressedPositions=new Float32Array(fe.geometryPositions.length),fe.transformedAndRecompressedPositions=new Uint16Array(fe.geometryPositions.length);const ht=fe.geometryPositions,St=fe.decompressedPositions;for(let xt=0,gi=ht.length;xt<gi;xt+=3)St[xt+0]=ht[xt+0]*v[0]+v[12],St[xt+1]=ht[xt+1]*v[5]+v[13],St[xt+2]=ht[xt+2]*v[10]+v[14];fe.geometryPositions=null,ve[Ye]=fe}}if(fe)if(fe.batchThisMesh){const be=fe.decompressedPositions,$e=fe.transformedAndRecompressedPositions;for(let ht=0,St=be.length;ht<St;ht+=3)ec[0]=be[ht+0],ec[1]=be[ht+1],ec[2]=be[ht+2],ec[3]=1,C.transformVec4(dt,ec,TY),Jt.compressPosition(TY,Fe,ec),$e[ht+0]=ec[0],$e[ht+1]=ec[1],$e[ht+2]=ec[2];o.createMesh(mt.apply(Ee,{id:Te,textureSetId:rt,origin:Le,primitive:fe.primitiveName,positionsCompressed:$e,normalsCompressed:fe.geometryNormals,uv:fe.geometryUVs,colorsCompressed:fe.geometryColors,indices:fe.geometryIndices,edgeIndices:fe.geometryEdgeIndices,positionsDecodeMatrix:Me,color:At,metallic:lt,roughness:ut,opacity:ft})),ue.push(Te)}else pe[Ye]||(o.createGeometry({id:Ye,primitive:fe.primitiveName,positionsCompressed:fe.geometryPositions,normalsCompressed:fe.geometryNormals,uv:fe.geometryUVs,colorsCompressed:fe.geometryColors,indices:fe.geometryIndices,edgeIndices:fe.geometryEdgeIndices,positionsDecodeMatrix:v}),pe[Ye]=!0),o.createMesh(mt.apply(Ee,{id:Te,geometryId:Ye,textureSetId:rt,matrix:dt,color:At,metallic:lt,roughness:ut,opacity:ft,origin:Le})),ue.push(Te)}else{const st=b[he];let dt,Ye,fe,be,$e,ht,St,xt=!1;switch(st){case 0:dt="solid",Ye=u.subarray(x[he],Be?u.length:x[he+1]),fe=h.subarray(k[he],Be?h.length:k[he+1]),be=A.subarray(B[he],Be?A.length:B[he+1]),ht=f.subarray(P[he],Be?f.length:P[he+1]),St=m.subarray(D[he],Be?m.length:D[he+1]),xt=Ye.length>0&&ht.length>0;break;case 1:dt="surface",Ye=u.subarray(x[he],Be?u.length:x[he+1]),fe=h.subarray(k[he],Be?h.length:k[he+1]),be=A.subarray(B[he],Be?A.length:B[he+1]),ht=f.subarray(P[he],Be?f.length:P[he+1]),St=m.subarray(D[he],Be?m.length:D[he+1]),xt=Ye.length>0&&ht.length>0;break;case 2:dt="points",Ye=u.subarray(x[he],Be?u.length:x[he+1]),$e=p.subarray(E[he],Be?p.length:E[he+1]),xt=Ye.length>0;break;case 3:dt="lines",Ye=u.subarray(x[he],Be?u.length:x[he+1]),ht=f.subarray(P[he],Be?f.length:P[he+1]),xt=Ye.length>0&&ht.length>0;break;case 4:dt="lines",Ye=u.subarray(x[he],Be?u.length:x[he+1]),ht=DY(Ye,f.subarray(P[he],Be?f.length:P[he+1])),xt=Ye.length>0&&ht.length>0;break;default:continue}xt&&(o.createMesh(mt.apply(Ee,{id:Te,textureSetId:rt,origin:Le,primitive:dt,positionsCompressed:Ye,normalsCompressed:fe,uv:be&&be.length>0?be:null,colorsCompressed:$e,indices:ht,edgeIndices:St,positionsDecodeMatrix:Me,color:At,metallic:lt,roughness:ut,opacity:ft})),ue.push(Te))}}ue.length>0&&o.createEntity(mt.apply(oe,{id:ie,isObject:!0,meshIds:ue}))}}}}function DY(t,e){const i=[];if(e.length>1)for(let o=0,r=e.length-1;o<r;o++)i.push(e[o]),i.push(e[o+1]);else if(t.length>1)for(let o=0,r=t.length/3-1;o<r;o++)i.push(o),i.push(o+1);return i}const RY={version:11,parseArrayBuffer:function(t,e,i,o,r,n){const a=GLt(i);JLt(t,e,a,o,r,n)}};let Nu=window.pako||ts;Nu.inflate||(Nu=Nu.default);const tc=C.vec4(),LY=C.vec4(),ZLt=9;function WLt(t){const e=(function(){const r=new ArrayBuffer(2);return new Uint16Array(r)[0]=1,new Uint8Array(r)[0]!==1})(),i=(function(){let r=0;const n=new DataView(t);return function(a){const s=1+2*r++,l=n.getUint32(s*4,!0),c=n.getUint32((s+1)*4,!0),d=a.BYTES_PER_ELEMENT;if(e&&d>1){const u=new Uint8Array(t,l,c),h=d/2,p=u.length/d;for(let A=0;A<p;A++){const f=A*d;for(let m=0;m<h;m++){const g=f+m,y=f-m+d-1,v=u[g];u[g]=u[y],u[y]=v}}}return new a(t,l,c/d)}})(),o=(function(){const r=new TextDecoder;return()=>JSON.parse(r.decode(i(Uint8Array)))})();return{metadata:o(),textureData:i(Uint8Array),eachTextureDataPortion:i(Uint32Array),eachTextureAttributes:i(Uint16Array),positions:i(Uint16Array),normals:i(Int8Array),colors:i(Uint8Array),uvs:i(Float32Array),indices:i(Uint32Array),edgeIndices:i(Uint32Array),eachTextureSetTextures:i(Int32Array),matrices:i(Float32Array),reusedGeometriesDecodeMatrix:i(Float32Array),eachGeometryPrimitiveType:i(Uint8Array),eachGeometryAxisLabel:o(),eachGeometryPositionsPortion:i(Uint32Array),eachGeometryNormalsPortion:i(Uint32Array),eachGeometryColorsPortion:i(Uint32Array),eachGeometryUVsPortion:i(Uint32Array),eachGeometryIndicesPortion:i(Uint32Array),eachGeometryEdgeIndicesPortion:i(Uint32Array),eachMeshGeometriesPortion:i(Uint32Array),eachMeshMatricesPortion:i(Uint32Array),eachMeshTextureSet:i(Int32Array),eachMeshMaterialAttributes:i(Uint8Array),eachEntityId:o(),eachEntityMeshesPortion:i(Uint32Array),eachTileAABB:i(Float64Array),eachTileEntitiesPortion:i(Uint32Array)}}function YLt(t){let e=0;return{metadata:t[e++],textureData:t[e++],eachTextureDataPortion:t[e++],eachTextureAttributes:t[e++],positions:t[e++],normals:t[e++],colors:t[e++],uvs:t[e++],indices:t[e++],edgeIndices:t[e++],eachTextureSetTextures:t[e++],matrices:t[e++],reusedGeometriesDecodeMatrix:t[e++],eachGeometryPrimitiveType:t[e++],eachGeometryAxisLabel:t[e++],eachGeometryPositionsPortion:t[e++],eachGeometryNormalsPortion:t[e++],eachGeometryColorsPortion:t[e++],eachGeometryUVsPortion:t[e++],eachGeometryIndicesPortion:t[e++],eachGeometryEdgeIndicesPortion:t[e++],eachMeshGeometriesPortion:t[e++],eachMeshMatricesPortion:t[e++],eachMeshTextureSet:t[e++],eachMeshMaterialAttributes:t[e++],eachEntityId:t[e++],eachEntityMeshesPortion:t[e++],eachTileAABB:t[e++],eachTileEntitiesPortion:t[e++]}}function XLt(t){function e(i,o){return i.length===0?[]:Nu.inflate(i,o).buffer}return{metadata:JSON.parse(Nu.inflate(t.metadata,{to:"string"})),textureData:new Uint8Array(e(t.textureData)),eachTextureDataPortion:new Uint32Array(e(t.eachTextureDataPortion)),eachTextureAttributes:new Uint16Array(e(t.eachTextureAttributes)),positions:new Uint16Array(e(t.positions)),normals:new Int8Array(e(t.normals)),colors:new Uint8Array(e(t.colors)),uvs:new Float32Array(e(t.uvs)),indices:new Uint32Array(e(t.indices)),edgeIndices:new Uint32Array(e(t.edgeIndices)),eachTextureSetTextures:new Int32Array(e(t.eachTextureSetTextures)),matrices:new Float32Array(e(t.matrices)),reusedGeometriesDecodeMatrix:new Float32Array(e(t.reusedGeometriesDecodeMatrix)),eachGeometryPrimitiveType:new Uint8Array(e(t.eachGeometryPrimitiveType)),eachGeometryAxisLabel:JSON.parse(Nu.inflate(t.eachGeometryAxisLabel,{to:"string"})),eachGeometryPositionsPortion:new Uint32Array(e(t.eachGeometryPositionsPortion)),eachGeometryNormalsPortion:new Uint32Array(e(t.eachGeometryNormalsPortion)),eachGeometryColorsPortion:new Uint32Array(e(t.eachGeometryColorsPortion)),eachGeometryUVsPortion:new Uint32Array(e(t.eachGeometryUVsPortion)),eachGeometryIndicesPortion:new Uint32Array(e(t.eachGeometryIndicesPortion)),eachGeometryEdgeIndicesPortion:new Uint32Array(e(t.eachGeometryEdgeIndicesPortion)),eachMeshGeometriesPortion:new Uint32Array(e(t.eachMeshGeometriesPortion)),eachMeshMatricesPortion:new Uint32Array(e(t.eachMeshMatricesPortion)),eachMeshTextureSet:new Int32Array(e(t.eachMeshTextureSet)),eachMeshMaterialAttributes:new Uint8Array(e(t.eachMeshMaterialAttributes)),eachEntityId:JSON.parse(Nu.inflate(t.eachEntityId,{to:"string"})),eachEntityMeshesPortion:new Uint32Array(e(t.eachEntityMeshesPortion)),eachTileAABB:new Float64Array(e(t.eachTileAABB)),eachTileEntitiesPortion:new Uint32Array(e(t.eachTileEntitiesPortion))}}const $Lt=(function(){const t=new Float32Array(3);return function(e){return t[0]=e[0]/255,t[1]=e[1]/255,t[2]=e[2]/255,t}})();(function(){const t=document.createElement("canvas"),e=t.getContext("2d");return function(i){return t.width=i.width,t.height=i.height,e.putImageData(i,0,0),t.toDataURL()}})();function _Y(t,e,i,o,r,n){const a=n.getNextId(),s=i.metadata,l=i.textureData,c=i.eachTextureDataPortion,d=i.eachTextureAttributes,u=i.positions,h=i.normals,p=i.colors,A=i.uvs,f=i.indices,m=i.edgeIndices,g=i.eachTextureSetTextures,y=i.matrices,v=i.reusedGeometriesDecodeMatrix,b=i.eachGeometryPrimitiveType,x=i.eachGeometryAxisLabel,k=i.eachGeometryPositionsPortion,E=i.eachGeometryNormalsPortion,B=i.eachGeometryColorsPortion,P=i.eachGeometryUVsPortion,D=i.eachGeometryIndicesPortion,T=i.eachGeometryEdgeIndicesPortion,R=i.eachMeshGeometriesPortion,F=i.eachMeshMatricesPortion,N=i.eachMeshTextureSet,q=i.eachMeshMaterialAttributes,V=i.eachEntityId,W=i.eachEntityMeshesPortion,Y=i.eachTileAABB,$=i.eachTileEntitiesPortion,me=c.length,Ie=g.length/5,Se=k.length,qe=R.length,Qe=W.length,Ce=$.length;r&&r.loadData(s,{includeTypes:e.includeTypes,excludeTypes:e.excludeTypes,globalizeObjectIds:e.globalizeObjectIds});for(let we=0;we<me;we++){const Re=we===me-1,We=c[we],H=Re?l.length:c[we+1],ee=H-We>0,ae=we*ZLt,Me=d[ae+0]===1,pe=d[ae+1];d[ae+2],d[ae+3];const Q=d[ae+4],Z=d[ae+5],ie=d[ae+6],re=d[ae+7],ne=d[ae+8];if(ee){const G=new Uint8Array(l.subarray(We,H)).buffer,J=`${a}-texture-${we}`;if(Me)o.createTexture({id:J,buffers:[G],minFilter:Q,magFilter:Z,wrapS:ie,wrapT:re,wrapR:ne});else{const ue=pe===ey?"image/jpeg":pe===ty?"image/png":"image/gif",xe=new Blob([G],{type:ue}),oe=(window.URL||window.webkitURL).createObjectURL(xe),Ee=document.createElement("img");Ee.src=oe,o.createTexture({id:J,image:Ee,minFilter:Q,magFilter:Z,wrapS:ie,wrapT:re,wrapR:ne})}}}for(let we=0;we<Ie;we++){const Re=we*5,We=`${a}-textureSet-${we}`,H=g[Re+0],ee=g[Re+1],ae=g[Re+2],Me=g[Re+3],pe=g[Re+4];o.createTextureSet({id:We,colorTextureId:H>=0?`${a}-texture-${H}`:null,normalsTextureId:ae>=0?`${a}-texture-${ae}`:null,metallicRoughnessTextureId:ee>=0?`${a}-texture-${ee}`:null,emissiveTextureId:Me>=0?`${a}-texture-${Me}`:null,occlusionTextureId:pe>=0?`${a}-texture-${pe}`:null})}const Le=new Uint32Array(Se);for(let we=0;we<qe;we++){const Re=R[we];Le[Re]!==void 0?Le[Re]++:Le[Re]=1}const Fe=C.vec3(),ve=C.AABB3(),ge={};for(let we=0;we<Ce;we++){const Re=Ce-1,We=we===Re,H=$[we],ee=We?Qe-1:$[we+1]-1,ae=we*6,Me=Y.subarray(ae,ae+6);C.getAABB3Center(Me,Fe),ve[0]=Me[0]-Fe[0],ve[1]=Me[1]-Fe[1],ve[2]=Me[2]-Fe[2],ve[3]=Me[3]-Fe[0],ve[4]=Me[4]-Fe[1],ve[5]=Me[5]-Fe[2];const pe=Jt.createPositionsDecodeMatrix(ve),Q={};for(let Z=H;Z<=ee;Z++){const ie=V[Z],re=e.globalizeObjectIds?C.globalizeObjectId(o.id,ie):ie,ne=Qe-1,G=Z===ne,J=W[Z],ue=G?R.length-1:W[Z+1]-1,xe=[],oe=t.metaScene.metaObjects[re],Ee={},je={};if(!(e.includeIdsMap&&ie&&!e.includeIdsMap[ie])){if(oe){if(e.excludeTypesMap&&oe.type&&e.excludeTypesMap[oe.type]||e.includeTypesMap&&oe.type&&!e.includeTypesMap[oe.type]||e.includeIdsMap&&oe.id&&!e.includeIdsMap[oe.id])continue;const he=e.objectDefaults?e.objectDefaults[oe.type]||e.objectDefaults.DEFAULT:null;he&&(he.visible===!1&&(Ee.visible=!1),he.pickable===!1&&(Ee.pickable=!1),he.colorize&&(je.color=he.colorize),he.opacity!==void 0&&he.opacity!==null&&(je.opacity=he.opacity),he.metallic!==void 0&&he.metallic!==null&&(je.metallic=he.metallic),he.roughness!==void 0&&he.roughness!==null&&(je.roughness=he.roughness))}else if(e.excludeUnclassifiedObjects)continue;for(let he=J;he<=ue;he++){const Ne=R[he],Be=Le[Ne]>1,He=Ne===Se-1,rt=N[he],At=rt>=0?`${a}-textureSet-${rt}`:null,ft=$Lt(q.subarray(he*6,he*6+3)),lt=q[he*6+3]/255,ut=q[he*6+4]/255,Te=q[he*6+5]/255,st=n.getNextId();if(Be){const dt=F[he],Ye=y.slice(dt,dt+16),fe=`${a}-geometry.${we}.${Ne}`;let be=ge[fe];if(!be){be={batchThisMesh:!e.reuseGeometries};const $e=b[Ne],ht=x[Ne];let St=!1,xt;switch($e){case 0:be.primitiveName="solid",be.geometryPositions=u.subarray(k[Ne],He?u.length:k[Ne+1]),be.geometryNormals=h.subarray(E[Ne],He?h.length:E[Ne+1]),be.geometryUVs=A.subarray(P[Ne],He?A.length:P[Ne+1]),be.geometryIndices=f.subarray(D[Ne],He?f.length:D[Ne+1]),be.geometryEdgeIndices=m.subarray(T[Ne],He?m.length:T[Ne+1]),St=be.geometryPositions.length>0&&be.geometryIndices.length>0;break;case 1:be.primitiveName="surface",be.geometryPositions=u.subarray(k[Ne],He?u.length:k[Ne+1]),be.geometryNormals=h.subarray(E[Ne],He?h.length:E[Ne+1]),be.geometryUVs=A.subarray(P[Ne],He?A.length:P[Ne+1]),be.geometryIndices=f.subarray(D[Ne],He?f.length:D[Ne+1]),be.geometryEdgeIndices=m.subarray(T[Ne],He?m.length:T[Ne+1]),St=be.geometryPositions.length>0&&be.geometryIndices.length>0;break;case 2:be.primitiveName="points",be.geometryPositions=u.subarray(k[Ne],He?u.length:k[Ne+1]),be.geometryColors=p.subarray(B[Ne],He?p.length:B[Ne+1]),St=be.geometryPositions.length>0;break;case 3:be.primitiveName="lines",be.geometryPositions=u.subarray(k[Ne],He?u.length:k[Ne+1]),be.geometryIndices=f.subarray(D[Ne],He?f.length:D[Ne+1]),St=be.geometryPositions.length>0&&be.geometryIndices.length>0;break;case 4:be.primitiveName="lines",be.geometryPositions=u.subarray(k[Ne],He?u.length:k[Ne+1]),be.geometryIndices=FY(be.geometryPositions,f.subarray(D[Ne],He?f.length:D[Ne+1])),St=be.geometryPositions.length>0&&be.geometryIndices.length>0;break;case 7:be.primitiveName="lines",be.geometryPositions=u.subarray(k[Ne],He?u.length:k[Ne+1]),be.decompressedPositions=Jt.decompressPositions(be.geometryPositions,v),xt=Bp({origin:be.decompressedPositions,text:ht,size:2}),be.decompressedPositions=xt.positions,be.geometryIndices=xt.indices,be.geometryPositions=null,St=be.decompressedPositions.length>0&&be.geometryIndices.length>0;break;default:continue}if(St||(be=null),be&&(be.geometryPositions&&be.geometryPositions.length>1e3,be.batchThisMesh)){if($e===7)be.transformedAndRecompressedPositions=new Uint16Array(be.decompressedPositions.length);else{be.decompressedPositions=new Float32Array(be.geometryPositions.length),be.transformedAndRecompressedPositions=new Uint16Array(be.geometryPositions.length);const gi=be.geometryPositions,ji=be.decompressedPositions;for(let Eo=0,to=gi.length;Eo<to;Eo+=3)ji[Eo+0]=gi[Eo+0]*v[0]+v[12],ji[Eo+1]=gi[Eo+1]*v[5]+v[13],ji[Eo+2]=gi[Eo+2]*v[10]+v[14];be.geometryPositions=null}ge[fe]=be}}if(be)if(be.batchThisMesh){const $e=be.decompressedPositions,ht=be.transformedAndRecompressedPositions;for(let St=0,xt=$e.length;St<xt;St+=3)tc[0]=$e[St+0],tc[1]=$e[St+1],tc[2]=$e[St+2],tc[3]=1,C.transformVec4(Ye,tc,LY),Jt.compressPosition(LY,ve,tc),ht[St+0]=tc[0],ht[St+1]=tc[1],ht[St+2]=tc[2];o.createMesh(mt.apply(je,{id:st,textureSetId:At,origin:Fe,primitive:be.primitiveName,positionsCompressed:ht,normalsCompressed:be.geometryNormals,uv:be.geometryUVs,colorsCompressed:be.geometryColors,indices:be.geometryIndices,edgeIndices:be.geometryEdgeIndices,positionsDecodeMatrix:pe,color:ft,metallic:ut,roughness:Te,opacity:lt})),xe.push(st)}else{if(!Q[fe]){let $e={id:fe,primitive:be.primitiveName,normalsCompressed:be.geometryNormals,uv:be.geometryUVs,colorsCompressed:be.geometryColors,indices:be.geometryIndices,edgeIndices:be.geometryEdgeIndices};be.geometryPositions?$e={...$e,positionsCompressed:be.geometryPositions,positionsDecodeMatrix:v}:$e={...$e,positions:be.decompressedPositions},o.createGeometry($e),Q[fe]=!0}o.createMesh(mt.apply(je,{id:st,geometryId:fe,textureSetId:At,matrix:Ye,color:ft,metallic:ut,roughness:Te,opacity:lt,origin:Fe})),xe.push(st)}}else{const dt=b[Ne],Ye=x[Ne];let fe,be,$e,ht,St,xt,gi,ji=!1,Eo;switch(dt){case 0:fe="solid",be=u.subarray(k[Ne],He?u.length:k[Ne+1]),$e=h.subarray(E[Ne],He?h.length:E[Ne+1]),ht=A.subarray(P[Ne],He?A.length:P[Ne+1]),xt=f.subarray(D[Ne],He?f.length:D[Ne+1]),gi=m.subarray(T[Ne],He?m.length:T[Ne+1]),ji=be.length>0&&xt.length>0;break;case 1:fe="surface",be=u.subarray(k[Ne],He?u.length:k[Ne+1]),$e=h.subarray(E[Ne],He?h.length:E[Ne+1]),ht=A.subarray(P[Ne],He?A.length:P[Ne+1]),xt=f.subarray(D[Ne],He?f.length:D[Ne+1]),gi=m.subarray(T[Ne],He?m.length:T[Ne+1]),ji=be.length>0&&xt.length>0;break;case 2:fe="points",be=u.subarray(k[Ne],He?u.length:k[Ne+1]),St=p.subarray(B[Ne],He?p.length:B[Ne+1]),ji=be.length>0;break;case 3:fe="lines",be=u.subarray(k[Ne],He?u.length:k[Ne+1]),xt=f.subarray(D[Ne],He?f.length:D[Ne+1]),ji=be.length>0&&xt.length>0;break;case 4:fe="lines",be=u.subarray(k[Ne],He?u.length:k[Ne+1]),xt=FY(be,f.subarray(D[Ne],He?f.length:D[Ne+1])),ji=be.length>0&&xt.length>0;break;case 7:fe="lines",be=u.subarray(k[Ne],He?u.length:k[Ne+1]),be=Jt.decompressPositions(be,pe),Eo=Bp({origin:be,text:Ye,size:2}),be=Eo.positions,xt=Eo.indices,ji=be.length>0&&xt.length>0;break;default:continue}if(ji){let to=mt.apply(je,{id:st,textureSetId:At,origin:Fe,primitive:fe,normalsCompressed:$e,uv:ht&&ht.length>0?ht:null,colorsCompressed:St,indices:xt,edgeIndices:gi,color:ft,metallic:ut,roughness:Te,opacity:lt});dt!==7?to={...to,positionsCompressed:be,positionsDecodeMatrix:pe}:to={...to,positions:be},o.createMesh(to),xe.push(st)}}}xe.length>0&&o.createEntity(mt.apply(Ee,{id:re,isObject:!0,meshIds:xe}))}}}}function FY(t,e){const i=[];if(e.length>1)for(let o=0,r=e.length-1;o<r;o++)i.push(e[o]),i.push(e[o+1]);else if(t.length>1)for(let o=0,r=t.length/3-1;o<r;o++)i.push(o),i.push(o+1);return i}const OY={version:12,parseArrayBuffer:function(t,e,i,o,r,n){const a=WLt(i);_Y(t,e,a,o,r,n)},parse:function(t,e,i,o,r,n){const a=YLt(i),s=XLt(a);_Y(t,e,s,o,r,n)}},vn={};vn[AY.version]=AY,vn[gY.version]=gY,vn[mY.version]=mY,vn[vY.version]=vY,vn[yY.version]=yY,vn[bY.version]=bY,vn[CY.version]=CY,vn[MY.version]=MY,vn[BY.version]=BY,vn[SY.version]=SY,vn[RY.version]=RY,vn[OY.version]=OY;class y7 extends ba{constructor(e,i={}){super("XKTLoader",e,i),this._maxGeometryBatchSize=i.maxGeometryBatchSize,this.textureTranscoder=i.textureTranscoder,this.dataSource=i.dataSource,this.objectDefaults=i.objectDefaults,this.includeTypes=i.includeTypes,this.excludeTypes=i.excludeTypes,this.excludeUnclassifiedObjects=i.excludeUnclassifiedObjects,this.reuseGeometries=i.reuseGeometries}get supportedVersions(){return Object.keys(vn)}get textureTranscoder(){return this._textureTranscoder}set textureTranscoder(e){this._textureTranscoder=e}get dataSource(){return this._dataSource}set dataSource(e){this._dataSource=e||new hY}get objectDefaults(){return this._objectDefaults}set objectDefaults(e){this._objectDefaults=e||cY}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 i={},o=e.includeTypes||this._includeTypes,r=e.excludeTypes||this._excludeTypes,n=e.includeIds||this._includeIds,a=e.objectDefaults||this._objectDefaults;if(i.reuseGeometries=e.reuseGeometries!==null&&e.reuseGeometries!==void 0?e.reuseGeometries:this._reuseGeometries!==!1,o){i.includeTypesMap={};for(let A=0,f=o.length;A<f;A++)i.includeTypesMap[o[A]]=!0}if(r){i.excludeTypesMap={};for(let A=0,f=r.length;A<f;A++)i.excludeTypesMap[r[A]]=!0}if(n){i.includeIdsMap={};for(let A=0,f=n.length;A<f;A++)i.includeIdsMap[n[A]]=!0}a&&(i.objectDefaults=a),i.excludeUnclassifiedObjects=e.excludeUnclassifiedObjects!==void 0?!!e.excludeUnclassifiedObjects:this._excludeUnclassifiedObjects,i.globalizeObjectIds=e.globalizeObjectIds!==void 0&&e.globalizeObjectIds!==null?!!e.globalizeObjectIds:this._globalizeObjectIds;const s=new Pv(this.viewer.scene,mt.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=s.id,c=new hZ({metaScene:this.viewer.metaScene,id:l});this.viewer.scene.canvas.spinner.processes++;const d=()=>{s.destroyed||(s.finalize(),c.finalize(),this.viewer.scene.canvas.spinner.processes--,s.once("destroyed",()=>{this.viewer.metaScene.destroyMetaModel(c.id)}),this.scheduleTask(()=>{s.destroyed||(s.scene.fire("modelLoaded",s.id),s.fire("loaded",!0,!1))}))},u=A=>{this.viewer.scene.canvas.spinner.processes--,this.error(A),s.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=>{s.destroyed||(c.loadData(f,{includeTypes:o,excludeTypes:r,globalizeObjectIds:i.globalizeObjectIds}),e.src?this._loadModel(e.src,i,s,null,p,d,u):(this._parseModel(e.xkt,i,s,null,p),d()))},f=>{u(`load(): Failed to load model metadata for model '${l} from '${A}' - ${f}`)})}else e.metaModelData&&(c.loadData(e.metaModelData,{includeTypes:o,excludeTypes:r,globalizeObjectIds:i.globalizeObjectIds}),e.src?this._loadModel(e.src,i,s,null,p,d,u):(this._parseModel(e.xkt,i,s,null,p),d()));else if(e.src)this._loadModel(e.src,i,s,c,p,d,u);else if(e.xkt)this._parseModel(e.xkt,i,s,c,p),d();else if(e.manifestSrc||e.manifest){const A=e.manifestSrc?e_t(e.manifestSrc):"",f=(y,v,b)=>{let x=0;const k=()=>{s.destroyed||x>=y.length?v():this._dataSource.getMetaModel(`${A}${y[x]}`,E=>{c.loadData(E,{includeTypes:o,excludeTypes:r,globalizeObjectIds:i.globalizeObjectIds}),x++,this.scheduleTask(k,200)},b)};k()},m=(y,v,b)=>{let x=0;const k=()=>{s.destroyed||x>=y.length?v():this._dataSource.getXKT(`${A}${y[x]}`,E=>{this._parseModel(E,i,s,null,p),s.preFinalize(),x++,this.scheduleTask(k,200)},b)};k()},g=(y,v,b)=>{let x=0;const k=()=>{s.destroyed||x>=y.length?v():this._dataSource.getXKT(`${A}${y[x]}`,E=>{this._parseModel(E,i,s,c,p),s.preFinalize(),x++,this.scheduleTask(k,200)},b)};k()};if(e.manifest){const y=e.manifest,v=y.xktFiles;if(!v||v.length===0){u("load(): Failed to load model manifest - manifest not valid");return}const b=y.metaModelFiles;b?f(b,()=>{m(v,d,u)},u):g(v,d,u)}else this._dataSource.getManifest(e.manifestSrc,y=>{if(s.destroyed)return;const v=y.xktFiles;if(!v||v.length===0){u("load(): Failed to load model manifest - manifest not valid");return}const b=y.metaModelFiles;b?f(b,()=>{m(v,d,u)},u):g(v,d,u)},u)}return s}_loadModel(e,i,o,r,n,a,s){this._dataSource.getXKT(e,l=>{this._parseModel(l,i,o,r,n),o.preFinalize(),a()},s)}async _parseModel(e,i,o,r,n){if(o.destroyed)return;const a=new DataView(e),s=new Uint8Array(e),l=a.getUint32(0,!0),c=l&2147483647,d=c<11||c>=12&&l>>>31,u=vn[c];if(!u){this.error("Unsupported .XKT file version: "+c+" - this XKTLoaderPlugin supports versions "+Object.keys(vn));return}if(!d){u.parseArrayBuffer(this.viewer,i,e,o,r,n);return}const h=a.getUint32(4,!0),p=[];let A=(h+2)*4;for(let f=0;f<h;f++){const m=a.getUint32((f+2)*4,!0);p.push(s.subarray(A,A+m)),A+=m}u.parse(this.viewer,i,p,o,r,n)}}function e_t(t){t.indexOf("?")>-1&&(t=t.split("?")[0]);const e=t.split("/");return e.pop(),e.join("/")+"/"}let t_t=1;class uL{constructor(e,i,o=null){this.tileset=e,this.computePriority=e.plugin.computePriority,this.distanceFactorToFreeData=e.plugin.distanceFactorToFreeData,this.src=i.content?.uri??null;const r=this.src?new URL(this.src).pathname:null;this.name=`${e.name}_${r?r.substring(r.lastIndexOf("/")+1):`tileWithNoContent_${t_t++}`}`,this.parent=o,this.refine=i.refine,this.data=null,this.fetching=null,this.depth=o?o.depth+1:1,this.model=null,this.loadProcess=null,this.loading=!1,this.currentDistanceFromCamera=null,this._visible=!o,this.priority=1,this.geometricError=i.geometricError;const[n,a,s,l,c,d,u,h,p,A,f,m]=i.boundingVolume.box,g=[n,s,-a];e.rootTransform&&(g[0]+=e.rootTransform[12],g[1]+=e.rootTransform[14],g[2]-=e.rootTransform[13]),this.center=Object.freeze(g);const y=[l,c,d],v=[-u,-h,-p],b=[A,f,m];this.xSize=C.lenVec3(y),this.ySize=C.lenVec3(b),this.zSize=C.lenVec3(v),this.volume=this.xSize*2*this.ySize*2*this.zSize*2,this.children=i.children?.map(x=>new uL(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=C.distVec3(this.center,e),this.parent&&(this.visible=this.isWithinCameraVisibleRange,this.currentDistanceFromCamera>this.viewDistance*this.distanceFactorToFreeData&&(this.data=null)),this.visible&&this.children.forEach(i=>i.updateVisibility(e)),this.priority=this.computePriority(this)}fetchData(){return this.data?this.data:this.src?(this.fetching||(this.fetching=new Promise((e,i)=>{fetch(this.src).then(o=>{o.ok?o.arrayBuffer().then(r=>{this.data=r,this.fetching=null,e(this.data)}):i(o)})})),this.fetching):null}showBoundingBox(){const{viewer:e}=this.tileset.plugin,{xSize:i,ySize:o,zSize:r,center:n}=this,a=1/this.depth;this.boxLines=new Ai(e.scene,{geometry:new uo(e.scene,tE({center:n,xSize:i,ySize:o,zSize:r})),material:new ho(e.scene,{emissive:[1-a,a,(1-a)/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(i=>{const o=this.tileset.plugin.loader.load({id:this.name,xkt:this.data,metaModelData:{metaObjects:[{id:"metaModelRoot"}]}});o.once("loaded",()=>{this.loading=!1,this.loadProcess=null,this.model=o,this.tileset.destroyed||!this.visible?(this.unload(),i(null)):(this.tileset.loadedTiles.add(this),i(o))}),o.once("destroyed",()=>{this.loading=!1,this.loadProcess=null,i(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 i_t(t,e,i){const o=Array.from(t),r=o.splice(0,e),n=async a=>{if(await i(a),o.length>0){const s=o.shift();n(s)}};r.forEach(n)}function o_t(t){let e=!1;return{cancel(){e=!0},async run(i){for(let o of t){if(e)break;await new Promise(r=>setTimeout(()=>(i(o)||Promise.resolve()).then(r)))}}}}let r_t=0;class n_t{constructor(e,i){this.plugin=e,this.name=i.name||`tileset-${r_t++}`,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,i.root.transform&&(this.rootTransform=i.root.transform),this.root=new uL(this,i.root),this.root.load().then(o=>e.viewer.cameraFlight.flyTo(o))}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(i=>{i.visible||i.unload()});const e=Array.from(this.visibleTiles).filter(i=>!i.loaded).sort((i,o)=>i.priority-o.priority);i_t(e,40,i=>i.fetchData()),this.queue=o_t(e),this.queue.run(i=>i.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 a_t(t){return t.depth}class UY extends ba{constructor(e,i={}){super("TilesetLoader",e);const{computePriority:o=a_t,sensitivity:r=50,distanceFactorToFreeData:n=3,debugMode:a=!1}=i;this._sensitivity=r,this.distanceFactorToFreeData=n,this.computePriority=o,this.debugMode=a,this.tilesets=new Set,e.camera.on("matrix",this.updateTilesetsVisibilityCallback=()=>this.updateTilesetsVisibility()),e.scene.on("tick",this.renderTilesetsCallback=()=>this.renderTilesets()),this.loader=new y7(e)}load(e){const i=new n_t(this,e);return this.tilesets.add(i),i}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(i=>i.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 s_t="2.6.90";typeof window<"u"&&(window.__XEOKIT__?console.warn("WARNING: Multiple instances of xeokit-sdk being imported."):window.__XEOKIT__=s_t);const ic=Object.freeze(Object.defineProperty({__proto__:null,AlphaFormat:yG,AmbientLight:nB,AngleMeasurementEditMouseControl:_Et,AngleMeasurementEditTouchControl:FEt,AngleMeasurementsControl:RB,AngleMeasurementsMouseControl:CZ,AngleMeasurementsPlugin:zy,AngleMeasurementsTouchControl:LEt,AnnotationsPlugin:_B,AxisGizmoPlugin:VEt,BCFViewpointsPlugin:Jy,Bitmap:eK,ByteType:cG,CameraMemento:Ekt,CameraPath:X7t,CameraPathAnimation:kr,ClampToEdgeWrapping:Kr,Component:ni,CompressedMediaType:Cbt,Configs:cy,ContextMenu:A7t,CubicBezierCurve:Ikt,Curve:iv,DefaultLoadingManager:aJ,DepthFormat:xG,DepthStencilFormat:kG,DirLight:Xa,DistanceMeasurementEditControl:OB,DistanceMeasurementEditMouseControl:ZEt,DistanceMeasurementEditTouchControl:WEt,DistanceMeasurementsControl:FB,DistanceMeasurementsMouseControl:BZ,DistanceMeasurementsPlugin:PZ,DistanceMeasurementsTouchControl:JEt,EdgeMaterial:TE,EmphasisMaterial:Hl,FastNavPlugin:DZ,FloatType:fG,Fresnel:A9t,Frustum:Wn,FrustumPlane:Cu,GIFMediaType:wbt,GLTFDefaultDataSource:RZ,GLTFLoaderPlugin:kP,HalfFloatType:AG,ImagePlane:s9t,IntType:hG,JPEGMediaType:ey,KTX2TextureTranscoder:us,LOD:EJ,LambertMaterial:l9t,LightMap:kkt,LineSet:bJ,LinearEncoding:Dn,LinearFilter:Jr,LinearMipMapLinearFilter:Ip,LinearMipMapNearestFilter:av,LinearMipmapLinearFilter:Bu,LinearMipmapNearestFilter:bbt,Loader:sJ,LoadingManager:nJ,LocaleService:HQ,LuminanceAlphaFormat:CG,LuminanceFormat:wG,Map:ya,Marker:Sv,MarqueePicker:nl,MarqueePickerMouseControl:Y7t,Mesh:Ai,MeshSurfaceArea:nK,MeshVolume:iK,MetallicMaterial:u9t,MirroredRepeatWrapping:Nl,ModelMemento:Bkt,NavCubePlugin:MP,NearestFilter:Eu,NearestMipMapLinearFilter:Pp,NearestMipMapNearestFilter:nv,NearestMipmapLinearFilter:lG,NearestMipmapNearestFilter:sG,Node:rv,ObjectsKdTree3:y7t,ObjectsMemento:Pkt,PNGMediaType:ty,Path:Skt,PerformanceModel:Dkt,PhongMaterial:ho,PickResult:Ey,Plugin:ba,PointLight:wkt,PointerCircle:JM,PointerLens:g7t,QuadraticBezierCurve:Tkt,Queue:RQ,RGBAFormat:sv,RGBAIntegerFormat:IG,RGBA_ASTC_10x10_Format:vE,RGBA_ASTC_10x5_Format:AE,RGBA_ASTC_10x6_Format:gE,RGBA_ASTC_10x8_Format:mE,RGBA_ASTC_12x10_Format:yE,RGBA_ASTC_12x12_Format:bE,RGBA_ASTC_4x4_Format:X8,RGBA_ASTC_5x4_Format:lE,RGBA_ASTC_5x5_Format:cE,RGBA_ASTC_6x5_Format:dE,RGBA_ASTC_6x6_Format:uE,RGBA_ASTC_8x5_Format:hE,RGBA_ASTC_8x6_Format:pE,RGBA_ASTC_8x8_Format:fE,RGBA_BPTC_Format:$8,RGBA_ETC2_EAC_Format:Y8,RGBA_PVRTC_2BPPV1_Format:aE,RGBA_PVRTC_4BPPV1_Format:Z8,RGBA_S3TC_DXT1_Format:G8,RGBA_S3TC_DXT3_Format:K8,RGBA_S3TC_DXT5_Format:cv,RGBFormat:bG,RGB_ETC1_Format:sE,RGB_ETC2_Format:W8,RGB_PVRTC_2BPPV1_Format:nE,RGB_PVRTC_4BPPV1_Format:J8,RGB_S3TC_DXT1_Format:lv,RGFormat:BG,RGIntegerFormat:PG,ReadableGeometry:uo,RedFormat:MG,RedIntegerFormat:EG,ReflectionMap:xkt,RepeatWrapping:vo,SceneModel:Pv,SceneModelMesh:sK,SceneModelTransform:pJ,SectionPlane:cB,SectionPlanesPlugin:eLt,ShortType:dG,SpecularMaterial:f9t,SplineCurve:j8,SpriteMarker:Mkt,Texture:Sp,TextureTranscoder:_kt,TilesetLoaderPlugin:UY,UnsignedByteType:rE,UnsignedInt248Type:vG,UnsignedIntType:pG,UnsignedShort4444Type:gG,UnsignedShort5551Type:mG,UnsignedShortType:uG,VBOGeometry:WQ,VFC:NJ,Viewer:wZ,WorkerPool:cJ,XKTDefaultDataSource:hY,XKTLoaderPlugin:y7,buildBoxGeometry:eE,buildBoxLinesGeometry:tE,buildBoxLinesGeometryFromAABB:Abt,buildCylinderGeometry:Mp,buildGridGeometry:YQ,buildLineGeometry:$Q,buildPlaneGeometry:iE,buildPolylineGeometry:XQ,buildPolylineGeometryFromCurve:mbt,buildSphereGeometry:Ep,buildTorusGeometry:oE,buildVectorTextGeometry:Bp,createCombinedTexture:SEt,createRTCViewMat:_i,createSkyboxMesh:TEt,createSphereMapMesh:DEt,frustumIntersectsAABB3:N8,getKTX2TextureTranscoder:dJ,getPlaneRTCPos:Vo,isTriangleMeshSolid:tK,load3DSGeometry:pbt,loadOBJGeometry:fbt,math:C,meshSurfaceArea:pv,meshVolume:Dp,os:fB,rtcToWorldPos:ybt,sRGBEncoding:ao,setFrustum:zQ,stats:Mi,utils:mt,worldToRTCPos:Mu,worldToRTCPositions:Q8},Symbol.toStringTag,{value:"Module"}));function a1(t){let e=t.substring(1);const i=[];let o=null;for(;e.length>0;)o=e.substring(0,2),e=e.substring(2),i.push(parseInt(o,16)/255);return i}function NY(t){let e="";return e+=Math.round(t[0]*255).toString(16).padStart(2,"0"),e+=Math.round(t[1]*255).toString(16).padStart(2,"0"),e+=Math.round(t[2]*255).toString(16).padStart(2,"0"),`#${e}`}const l_t={class:"annotations-3d"},c_t={__name:"Annotations3D",setup(t){const e=ct("$viewer"),{localContext:i}=e,{xeokit:o}=i.viewer,r=o.scene.canvas.canvas,n=T8(),a=Pr(new WeakSet),s=De(()=>n.value.filter(u=>a.has(u))),l=new Map;pt(n,()=>{n.value.forEach(u=>{if(!l.has(u.id)){const{x:h,y:p,z:A}=u,f=new Sv(o.scene,{worldPos:[h,A,p]});l.set(u.id,f);const[m,g]=f.canvasPos;f.style=le(`left: ${m}px; top: ${g}px;`),f.on("canvasPos",([b,x])=>{f.style.value=`left: ${b}px; top: ${x}px;`}),f.on("visible",b=>b?a.add(u):a.delete(u)),f.on("destroyed",()=>{e.state.hub.off(v),e.state.hub.off(y)});const y=e.state.hub.on("annotation-updated",({annotation:b})=>{if(b.id===u.id){const{x,y:k,z:E}=b;f.worldPos=[x,E,k],f._update(),o.scene._renderer._occlusionTester._occlusionTestListDirty=!0}}),v=e.state.hub.on("annotation-removed",({annotation:b})=>{b.id===u.id&&(l.delete(u.id),f.destroy())})}})},{flush:"sync"});const c=(u,h)=>{const{clientX:p,clientY:A}=h,{x:f,y:m}=r.getBoundingClientRect(),g=o.scene.pick({pickSurface:!0,canvasPos:[p-f,A-m]});if(g){const[y,v,b]=g.worldPos;Object.assign(u,{x:y,y:b,z:v})}},d=u=>l.get(u.id).style.value;return(u,h)=>(M(),_("div",l_t,[(M(!0),_(Xe,null,Et(s.value,p=>(M(),K(D8,{key:p.instanceId,annotation:p,canvas:ot(r),style:de(d(p)),onAnnotationDrag:A=>c(p,A)},null,8,["annotation","canvas","style","onAnnotationDrag"]))),128))]))}},jY=j(c_t,[["__scopeId","data-v-10ceb001"]]),d_t={setup(){const t=ct("$viewer"),e=t.localContext.pluginComponentInstances.get("viewer3d"),{math:i}=e.xeokitSdk,o=()=>{const n=e.xeokit,a=[0,0,-1],s=n.scene.aabb,l=i.getAABB3Diag(s),c=i.vec3();i.getAABB3Center(s,c);const d=45,u=Math.abs(l/Math.tan(d*i.DEGTORAD));n.cameraControl.pivotPos=c,n.cameraFlight.jumpTo({look:c,eye:[c[0]-u*a[0],c[1]-u*a[1],c[2]-u*a[2]],up:[0,1,0],orthoScale:l*1.1,fitFOV:d})},r=()=>{const n=t.localContext.loadedModels.flatMap(a=>a.objects.filter(s=>s.visible===!1).map(s=>s.id));t.state.showObjects(n)};return{onClick:()=>{o(),r(),e.reintegrateObjects()}}}};function u_t(t,e,i,o,r,n){const a=I("BIMDataIconHome"),s=I("BIMDataButton");return M(),K(s,{color:"default",ghost:"",rounded:"",icon:"",onClick:o.onClick},{default:U(()=>[S(a,{size:"xs"})]),_:1},8,["onClick"])}const h_t=j(d_t,[["render",u_t]]),p_t={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 f_t(t,e,i,o,r,n){const a=I("BIMDataIcon"),s=I("BIMDataButton"),l=I("BIMDataTooltip");return M(),K(l,{text:t.$t("navigationVersionsModel.tooltip")},{default:U(()=>[S(s,{class:ce(["bimdata-navigation-versions-model",{active:n.active}]),color:"primary",ghost:"",rounded:"",icon:"",onClick:n.onClick},{default:U(()=>[S(a,{name:"versioning",fill:"",color:"primary",size:"xxs"})]),_:1},8,["class","onClick"])]),_:1},8,["text"])}const A_t=j(p_t,[["render",f_t],["__scopeId","data-v-ced27a96"]]),g_t={key:0,width:"159",height:"116",viewBox:"0 0 159 116",fill:"none",xmlns:"http://www.w3.org/2000/svg"},m_t={key:1,width:"159",height:"116",viewBox:"0 0 159 116",fill:"none",xmlns:"http://www.w3.org/2000/svg"},v_t={__name:"KeyboardNavigate",setup(t){const e=ct("$viewer").i18n.locale==="fr";return(i,o)=>e?(M(),_("svg",g_t,[...o[0]||(o[0]=[an('<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)])])):(M(),_("svg",m_t,[...o[1]||(o[1]=[an('<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)])]))}},y_t={key:0,width:"37",height:"129",viewBox:"0 0 37 129",fill:"none",xmlns:"http://www.w3.org/2000/svg"},b_t={key:1,width:"37",height:"129",viewBox:"0 0 37 129",fill:"none",xmlns:"http://www.w3.org/2000/svg"},w_t={__name:"KeyboardStorey",setup(t){const e=ct("$viewer"),i=De(()=>e.i18n.locale==="fr");return(o,r)=>i.value?(M(),_("svg",y_t,[...r[0]||(r[0]=[an('<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)])])):(M(),_("svg",b_t,[...r[1]||(r[1]=[an('<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)])]))}},C_t={},x_t={width:"174",height:"130",viewBox:"0 0 174 130",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function k_t(t,e){return M(),_("svg",x_t,[...e[0]||(e[0]=[an('<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 M_t=j(C_t,[["render",k_t]]),E_t={},B_t={width:"42",height:"55",viewBox:"0 0 42 55",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function P_t(t,e){return M(),_("svg",B_t,[...e[0]||(e[0]=[an('<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 I_t=j(E_t,[["render",P_t]]),S_t={},T_t={width:"124",height:"152",viewBox:"0 0 124 152",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function D_t(t,e){return M(),_("svg",T_t,[...e[0]||(e[0]=[an('<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 R_t=j(S_t,[["render",D_t]]),L_t={name:"FirstPersonViewHelper",components:{KeyboardNavigate:v_t,KeyboardStorey:w_t,MouseMove:M_t,MouseStorey:I_t,MouseZoom:R_t},emits:["close"],methods:{close(){this.$emit("close")},clear(){localStorage.setItem("firstPersonViewHelper","false"),this.close()}}},__t={class:"bimdata-first-person-view-helper"},F_t={class:"bimdata-first-person-view-helper__header"},O_t={class:"bimdata-first-person-view-helper__content"},U_t={class:"bimdata-first-person-view-helper__content__main"},N_t={class:"bimdata-first-person-view-helper__content__main__left"},j_t={class:"bimdata-first-person-view-helper__content__main__left__element"},V_t={class:"bimdata-first-person-view-helper__content__main__left__element__picture"},z_t={class:"bimdata-first-person-view-helper__content__main__left__element__text"},H_t={class:"bimdata-first-person-view-helper__content__main__left__element__text__tilte"},q_t={class:"bimdata-first-person-view-helper__content__main__left__element__text__list"},Q_t={class:"bimdata-first-person-view-helper__content__main__left__element"},G_t={class:"bimdata-first-person-view-helper__content__main__left__element__picture"},K_t={class:"bimdata-first-person-view-helper__content__main__left__element__text"},J_t={class:"bimdata-first-person-view-helper__content__main__left__element__text__tilte"},Z_t={class:"bimdata-first-person-view-helper__content__main__left__element__text__list"},W_t={class:"bimdata-first-person-view-helper__content__main__left__element"},Y_t={class:"bimdata-first-person-view-helper__content__main__left__element__picture"},X_t={class:"bimdata-first-person-view-helper__content__main__left__element__text"},$_t={class:"bimdata-first-person-view-helper__content__main__left__element__text__tilte"},eFt={class:"bimdata-first-person-view-helper__content__main__left__element__text__list"},tFt={class:"bimdata-first-person-view-helper__content__main__right"},iFt={class:"bimdata-first-person-view-helper__content__main__right__title"},oFt={class:"bimdata-first-person-view-helper__content__main__right__content"},rFt={class:"bimdata-first-person-view-helper__content__main__right__content__picture"},nFt={class:"bimdata-first-person-view-helper__content__main__right__content__picture__element"},aFt={class:"bimdata-first-person-view-helper__content__main__right__content__picture__element"},sFt={class:"bimdata-first-person-view-helper__content__main__right__content__text"},lFt={class:"bimdata-first-person-view-helper__content__footer"},cFt={class:"bimdata-first-person-view-helper__footer-buttons"};function dFt(t,e,i,o,r,n){const a=I("KeyboardNavigate"),s=I("MouseMove"),l=I("MouseZoom"),c=I("MouseStorey"),d=I("KeyboardStorey"),u=I("BIMDataButton");return M(),_("div",__t,[w("h1",F_t,z(t.$t("viewer3d.firstPersonViewHelper.title")),1),w("div",O_t,[w("div",U_t,[w("div",N_t,[w("div",j_t,[w("div",V_t,[S(a)]),w("div",z_t,[w("h4",H_t,z(t.$t("viewer3d.firstPersonViewHelper.keyboardUsage")),1),w("ul",q_t,[w("li",null,z(t.$t("viewer3d.firstPersonViewHelper.forward")),1),w("li",null,z(t.$t("viewer3d.firstPersonViewHelper.backward")),1),w("li",null,z(t.$t("viewer3d.firstPersonViewHelper.left")),1),w("li",null,z(t.$t("viewer3d.firstPersonViewHelper.right")),1)])])]),w("div",Q_t,[w("div",G_t,[S(s)]),w("div",K_t,[w("h4",J_t,z(t.$t("viewer3d.firstPersonViewHelper.mouseOrientation")),1),w("ul",Z_t,[w("li",null,z(t.$t("viewer3d.firstPersonViewHelper.pressLeft")),1),w("li",null,z(t.$t("viewer3d.firstPersonViewHelper.mouseMove")),1),w("li",null,z(t.$t("viewer3d.firstPersonViewHelper.mouseVertical")),1)])])]),w("div",W_t,[w("div",Y_t,[S(l)]),w("div",X_t,[w("h4",$_t,z(t.$t("viewer3d.firstPersonViewHelper.mouseZoom")),1),w("ul",eFt,[w("li",null,z(t.$t("viewer3d.firstPersonViewHelper.mouseWheelForward")),1),w("li",null,z(t.$t("viewer3d.firstPersonViewHelper.mouseWheelBackward")),1)])])])]),w("div",tFt,[w("h4",iFt,z(t.$t("viewer3d.firstPersonViewHelper.changeStorey")),1),w("div",oFt,[w("div",rFt,[w("div",nFt,[S(c)]),w("div",aFt,[S(d)])]),w("div",sFt,[w("ul",null,[w("li",null,z(t.$t("viewer3d.firstPersonViewHelper.storeyClick")),1),w("li",null,z(t.$t("viewer3d.firstPersonViewHelper.moveCameraToObject")),1)]),w("ul",null,[w("li",null,z(t.$t("viewer3d.firstPersonViewHelper.keyboardStoreyChange")),1)])])])])]),w("div",lFt,z(t.$t("viewer3d.firstPersonViewHelper.contentFooter")),1)]),w("div",cFt,[S(u,{color:"primary",fill:"",radius:"",width:"200px",onClick:n.close},{default:U(()=>[Je(z(t.$t("viewer3d.firstPersonViewHelper.understand")),1)]),_:1},8,["onClick"]),S(u,{color:"primary",outline:"",radius:"",width:"200px",onClick:n.clear},{default:U(()=>[Je(z(t.$t("viewer3d.firstPersonViewHelper.noRecall")),1)]),_:1},8,["onClick"])])])}const VY=j(L_t,[["render",dFt],["__scopeId","data-v-77cce9d5"]]),uFt={components:{ShortcutsModal:S8,FirstPersonViewHelper:VY},data(){const t=this.$t;return{tabs:[{id:0,get label(){return t("viewer3d.modals.3d")}},{id:1,get label(){return t("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"}]}}},hFt={class:"bimdata-shortcuts-helper__header"};function pFt(t,e,i,o,r,n){const a=I("BIMDataTabs"),s=I("ShortcutsModal"),l=I("FirstPersonViewHelper");return M(),_("div",null,[w("div",hFt,[S(a,{tabs:r.tabs,width:"490px",height:"44px",tabSize:"245",onTabSelected:e[0]||(e[0]=c=>r.activeTab=r.tabs.indexOf(c)),selected:r.activeTab},null,8,["tabs","selected"])]),r.activeTab===0?(M(),K(s,{key:0,elements:r.elements,shortcuts:r.shortcuts,onClose:e[1]||(e[1]=c=>t.$emit("close"))},{title:U(()=>[Je(z(t.$t("shortcuts-helper.title_modal")),1)]),_:1},8,["elements","shortcuts"])):(M(),K(l,{key:1,onClose:e[2]||(e[2]=c=>t.$emit("close"))}))])}const fFt=j(uFt,[["render",pFt],["__scopeId","data-v-a26872a0"]]),AFt="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",gFt="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",mFt="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",vFt="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",yFt="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",bFt={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 wFt({text:t,size:e=1,zOffset:i=0}){const o=[],r=[];let n=0,a=0;const s=10;e/=100;for(const l of t){const c=bFt[l];if(!c)throw new Error("Unknown character: "+l);const d=a;for(let h=0;h<c.positions.length;h+=2)o.push(c.positions[h]*e+d,c.positions[h+1]*e,i);const u=n===0?0:n+1;for(const h of c.indices)r.push(h+u),n=Math.max(n,h+u);a+=(c.width+s)*e}return{positions:o,indices:r,primitive:"triangles"}}function zY(t,{content:e,size:i,matrix:o,offset:r=0}){const{material:n,origin:a,plugin:s}=t,{textSizeRatio:l,textBottomMarginRatio:c,xeokitSdk:d,viewer:u}=s,{Mesh:h,VBOGeometry:p,math:A}=d,{scene:f}=u,{primitive:m,positions:g,indices:y}=wFt({text:e,size:i*l,zOffset:r});let v=g[0],b=g[0];for(let P=0;P<g.length;P+=3){const D=g[P];D<v&&(v=D),D>b&&(b=D)}const x=-(b-v)/2,k=A.mat4(),E=A.translationMat4v([x,i*c,0]);A.mulMat4(o,A.rotationMat4v(Math.PI,[0,1,0],A.mat4()),k),A.mulMat4(o,E),A.mulMat4(k,E);const B=new p(f,{primitive:m,positions:g,indices:y});return[new h(f,{geometry:B,material:n,pickable:!1,origin:a,matrix:o}),new h(f,{geometry:B,material:n,pickable:!1,origin:a,matrix:k})]}class CFt{constructor(e,i,o){this.plugin=e;const{viewer:r}=e;this.line=null,this.texts=null,this.length=0;const{math:n,worldToRTCPos:a,Node:s,PhongMaterial:l}=e.xeokitSdk,c=n.vec3(),d=n.vec3();a(i,d,c),this.material=new l(r.scene,{emissive:a1(e.defaultColor)}),this.node=new s(r.scene,{pickable:!1,origin:d,children:[]}),this.origin=d,this.p1=c,this.normal=o}move(e,i){const{arrowSizeRatio:o,offsetRatio:r,xeokitSdk:n,viewer:a}=this.plugin,{math:s,Mesh:l,VBOGeometry:c}=n,{scene:d}=a,u=this.p1;this.p2=s.subVec3(e,this.origin),this.node.removeChildren(),this.line?.destroy();const h=s.subVec3(e,u,s.vec3());if(h.every(Ce=>Ce===0))return;const p=s.normalizeVec3(h,s.vec3()),A=s.mulVec3Scalar(p,-1,s.vec3()),f=s.lenVec3(h);this.length=f;const m=r*f;let g=0;const y=s.mulVec3Scalar(h,.5,s.vec3()),v=s.addVec3(u,y,s.vec3());let b=s.normalizeVec3(s.cross3Vec3(i,s.normalizeVec3(h,s.vec3()),s.vec3()));const x=s.dotVec3(i,this.normal)>.999,k=s.vec3([0,1,0]),E=s.dotVec3(p,k);if(x){const Ce=Math.abs(E)<.01;g=m;let Le=null;if(Ce){const{look:Fe,up:ve,eye:ge}=d.camera,we=s.normalizeVec3(s.subVec3(Fe,ge,s.vec3())),Re=s.cross3Vec3(we,ve);Le=s.dotVec3(p,Re)}else{const Fe=s.cross3Vec3(k,i,s.vec3());Le=s.dotVec3(p,Fe)}Le<0&&(b=s.negateVec3(b),g=-g)}else if(Math.abs(E)>.99){const{look:Ce,eye:Le}=d.camera,Fe=s.normalizeVec3(s.subVec3(Ce,Le,s.vec3()));b=s.normalizeVec3(s.cross3Vec3(p,Fe,s.vec3())),i=s.normalizeVec3(s.cross3Vec3(b,p,s.vec3()))}else i=s.normalizeVec3(s.cross3Vec3(k,p,s.vec3())),b=s.normalizeVec3(s.cross3Vec3(p,i,s.vec3())),s.dotVec3(b,k)<0&&(b=s.negateVec3(b));const B=s.negateVec3(b,s.vec3()),P=s.mulVec3Scalar(b,f*o,s.vec3()),D=s.mulVec3Scalar(B,f*o,s.vec3()),T=s.addVec3(u,P,s.vec3()),R=s.addVec3(u,D,s.vec3()),F=s.addVec3(e,P,s.vec3()),N=s.addVec3(e,D,s.vec3()),q=s.mulVec3Scalar(s.normalizeVec3(s.addVec3(b,p,s.vec3())),f*o*Math.SQRT2),V=s.addVec3(u,q,s.vec3()),W=s.mulVec3Scalar(s.normalizeVec3(s.addVec3(B,p,s.vec3())),f*o*Math.SQRT2),Y=s.addVec3(u,W,s.vec3()),$=s.mulVec3Scalar(s.normalizeVec3(s.addVec3(b,A,s.vec3())),f*o*Math.SQRT2),me=s.addVec3(e,$,s.vec3()),Ie=s.mulVec3Scalar(s.normalizeVec3(s.addVec3(B,A,s.vec3())),f*o*Math.SQRT2),Se=s.addVec3(e,Ie,s.vec3()),qe=s.translationMat4v(s.mulVec3Scalar(i,m,s.vec3()));this.line=new l(a.scene,{geometry:new c(a.scene,{primitive:"lines",positions:[...u,...e,...T,...R,...F,...N,...V,...Y,...me,...Se],indices:[0,1,0,2,0,3,0,6,0,7,1,4,1,5,1,8,1,9]}),material:this.material,matrix:qe,pickable:!1,origin:this.origin}),this.node.addChild(this.line),this.texts?.forEach(Ce=>Ce.destroy());const Qe=s.mat4([...p,0,...b,0,...i,0,...v,1]);this.texts=this._makeTexts(f.toFixed(2)+" m",f,Qe,g),this.texts.forEach(Ce=>this.node.addChild(Ce))}_makeTexts(e,i,o,r=0){return zY(this,{content:e,size:i,matrix:o,offset:r})}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 NY(this.material.emissive)}set color(e=this.plugin.defaultColor){this.material.emissive=a1(e)}}class HY{constructor(e,i,o={}){this.viewer=e,this.xeokitSdk=i,this.arrowSizeRatio=o.arrowSizeRatio??.04,this.textSizeRatio=o.textSizeRatio??.1,this.textBottomMarginRatio=o.textBottomMarginRatio??.02,this.offsetRatio=o.offsetRatio??.003,this.snapPickRadius=o.snapPickRadius??15,this.defaultColor=o.defaultColor??"#ffffff";const r=document.createElement("img"),n=e.scene.canvas.canvas;n.parentNode.insertBefore(r,n),r.style.width="28px",r.style.height="28px",r.style.position="absolute",r.style.pointerEvents="none",r.style.transform="translate(-50%, -50%)",r.style.display="none",this.imgElement=r,this.measurements=[],this.measurementEndCallbackId=0,this.measurementEndCallbacks={},this.control=new xFt(this)}on(e,i){if(e==="measurementEnd")return this.measurementEndCallbacks[this.measurementEndCallbackId++]=i,this.measurementEndCallbackId}off(e){this.measurementEndCallbacks[e]=null}}class xFt{constructor(e){this.plugin=e,this.currentMeasurement=null,this.lastPosition=null,this.mouseDown=!1,this.dragging=!1,this.activated=!1}_updateCursor(e){const{imgElement:i,viewer:o}=this.plugin,{scene:r}=o;r.canvas.canvas.style.cursor=`url("${yFt}") 16 16, auto`;const n=r.pick({canvasPos:e,snapRadius:this.plugin.snapPickRadius,snapToEdge:!0,snapToVertex:!0});if(n?.snappedWorldPos||n?.worldPos){if(n.snappedCanvasPos)i.style.left=`${n.snappedCanvasPos[0]}px`,i.style.top=`${n.snappedCanvasPos[1]}px`,i.src=n.snapType==="vertex"?gFt:AFt;else{const a=n.canvasPos;i.style.left=`${a[0]}px`,i.style.top=`${a[1]}px`,i.src=mFt}this.lastPosition=n.snappedWorldPos??n.worldPos,this.lastPosition.worldNormal=n.snappedWorldNormal??n.worldNormal}else i.style.left=`${e[0]}px`,i.style.top=`${e[1]}px`,i.src=vFt,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(i=>i?.(this.currentMeasurement)),this.currentMeasurement=null):this.currentMeasurement=new CFt(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 i=this._onMouseMove.bind(this),o=this._onMouseDown.bind(this),r=this._onMouseUp.bind(this);e.addEventListener("mousemove",i),e.addEventListener("mousedown",o),document.addEventListener("mouseup",r),this._unsubscribe=()=>{e.removeEventListener("mousemove",i),e.removeEventListener("mousedown",o),document.removeEventListener("mouseup",r)},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 kFt{constructor(e,i){this.plugin=e;const{xeokitSdk:o,viewer:r}=e,{Mesh:n,ReadableGeometry:a,buildSphereGeometry:s,PhongMaterial:l,Node:c,math:d,worldToRTCPos:u}=o,h=d.vec3(),p=d.vec3();this._length=0;const{entity:A,worldPos:f}=i;u(f,p,h);const m=new l(r.scene,{emissive:a1(e.defaultColor),diffuse:[0,0,0]}),g=(k=!0)=>new n(r.scene,{geometry:new a(r.scene,s({radius:.03})),material:m,pickable:!1,visible:k,origin:p}),y=g(),v=g(!1),b=new n(r.scene,{geometry:new a(r.scene,{primitive:"lines",positions:[0,0,0,0,0,0],indices:[0,1]}),material:m,pickable:!1,visible:!1,origin:p}),x=new c(r.scene,{pickable:!1,visible:!0,position:h,origin:p,children:[y,b,v]});this.origin=p,this.modelId=A.model.id,this.node=x,this.toSphere=v,this.fromSphere=y,this.line=b,this.material=m}show(e){const{node:i,fromSphere:o,toSphere:r,line:n,texts:a,plugin:s}=this,{math:l}=s.xeokitSdk;i.position=l.subVec3(e.worldPos,i.origin,l.vec3()),i.visible=!0;const{viewer:c}=s,d=c.scene.pick({pickSurface:!0,origin:e.worldPos,direction:e.worldNormal});if(a&&(a.forEach(u=>u.destroy()),this.texts=null),d){r.visible=!0,n.visible=!0,r.position=l.subVec3(d.worldPos,r.origin,l.vec3()),r.position=l.subVec3(r.position,i.position,l.vec3()),n.position=l.vec3().set(i.position),n.geometry.positions=[0,0,0,...r.position];const u=l.lenVec3(r.position);this._length=u;const h=o.position,p=r.position,A=l.subVec3(p,h,l.vec3()),f=l.normalizeVec3(A,l.vec3()),m=l.mulVec3Scalar(A,.5,l.vec3()),g=l.addVec3(h,m,l.vec3()),y=[0,1,0],v=l.dotVec3(f,y),b=Math.abs(v)>.9;let x;if(b){const k=l.normalizeVec3(l.subVec3(c.scene.camera.eye,c.scene.camera.look,l.vec3()),l.vec3()),E=l.normalizeVec3(l.cross3Vec3(k,f,l.vec3()),l.vec3()),B=l.normalizeVec3(l.cross3Vec3(E,f,l.vec3()),l.vec3());x=l.mat4([...f,0,...E,0,...B,0,...g,1])}else{const k=l.normalizeVec3(l.cross3Vec3(y,f,l.vec3()),l.vec3()),E=l.normalizeVec3(l.cross3Vec3(f,k,l.vec3()),l.vec3());x=l.mat4([...f,0,...E,0,...k,0,...g,1])}this.texts=this._makeTexts(u.toFixed(2)+" m",u,x),this.texts.forEach(k=>i.addChild(k))}else r.visible=!1,n.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 NY(this.material.emissive)}set color(e=this.plugin.defaultColor){this.material.emissive=a1(e)}_makeTexts(e,i,o){return zY(this,{content:e,size:i,matrix:o})}}class qY{constructor(e,i,o={}){this.viewer=e,this.xeokitSdk=i,this.textSizeRatio=o.textSizeRatio??.1,this.textBottomMarginRatio=o.textBottomMarginRatio??.01,this.defaultColor=o.defaultColor??"#ffffff",this.measurements=[],this.measurementEndCallbackId=0,this.measurementEndCallbacks={},this.control=new MFt(this)}on(e,i){if(e==="measurementEnd")return this.measurementEndCallbacks[this.measurementEndCallbackId++]=i,this.measurementEndCallbackId}off(e){this.measurementEndCallbacks[e]=null}}class MFt{constructor(e){this.plugin=e,this.currentMeasure=null,this.pickedSpaceMeasureSubscription=null,this.hitHelperMouseMoveSubscription=null}activate(){const{plugin:e}=this,{viewer:i}=e;this.pickedSpaceMeasureSubscription=i.scene.input.on("mouseclicked",()=>{if(!this.currentMeasure?.length)return;const o=this.currentMeasure;this.currentMeasure=null,Object.values(this.plugin.measurementEndCallbacks).forEach(r=>r(o))}),this.hitHelperMouseMoveSubscription=i.scene.input.on("mousemove",o=>{const r=i.scene.pick({canvasPos:o,pickSurface:!0});r?.entity?.model&&(r?((!this.currentMeasure||this.currentMeasure.modelId!==r.entity.model.id)&&(this.currentMeasure?.destroy(),this.currentMeasure=new kFt(this.plugin,r)),this.currentMeasure.show(r)):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 EFt=`onmessage = async event => {
1378
+ }`}function JZ(t,e=!0,i){const o=i||new Set;if(t){if(ZZ(t))o.add(t);else if(ZZ(t.buffer))o.add(t.buffer);else if(!ArrayBuffer.isView(t)&&e&&typeof t=="object")for(const r in t)JZ(t[r],e,o)}return i===void 0?Array.from(o):[]}function ZZ(t){return t?t instanceof ArrayBuffer||typeof MessagePort<"u"&&t instanceof MessagePort||typeof ImageBitmap<"u"&&t instanceof ImageBitmap||typeof OffscreenCanvas<"u"&&t instanceof OffscreenCanvas:!1}const QB=()=>{};class GB{name;source;url;terminated=!1;worker;onMessage;onError;_loadableURL="";static isSupported(){return typeof Worker<"u"&&Ca||typeof HB<"u"&&!Ca}constructor(e){const{name:i,source:o,url:r}=e;Zl(o||r),this.name=i,this.source=o,this.url=r,this.onMessage=QB,this.onError=n=>console.log(n),this.worker=Ca?this._createBrowserWorker():this._createNodeWorker()}destroy(){this.onMessage=QB,this.onError=QB,this.worker.terminate(),this.terminated=!0}get isRunning(){return!!this.onMessage}postMessage(e,i){i=i||JZ(e),this.worker.postMessage(e,i)}_getErrorFromErrorEvent(e){let i="Failed to load ";return i+=`worker ${this.name} from ${this.url}. `,e.message&&(i+=`${e.message} in `),e.lineno&&(i+=`:${e.lineno}:${e.colno}`),new Error(i)}_createBrowserWorker(){this._loadableURL=bBt({source:this.source,url:this.url});const e=new Worker(this._loadableURL,{name:this.name});return e.onmessage=i=>{i.data?this.onMessage(i.data):this.onError(new Error("No data received"))},e.onerror=i=>{this.onError(this._getErrorFromErrorEvent(i)),this.terminated=!0},e.onmessageerror=i=>console.error(i),e}_createNodeWorker(){let e;if(this.url){const i=this.url.includes(":/")||this.url.startsWith("/")?this.url:`./${this.url}`;e=new HB(i,{eval:!1})}else if(this.source)e=new HB(this.source,{eval:!0});else throw new Error("no worker");return e.on("message",i=>{this.onMessage(i)}),e.on("error",i=>{this.onError(i)}),e.on("exit",i=>{}),e}}class xBt{name="unnamed";source;url;maxConcurrency=1;maxMobileConcurrency=1;onDebug=()=>{};reuseWorkers=!0;props={};jobQueue=[];idleQueue=[];count=0;isDestroyed=!1;static isSupported(){return GB.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,i=(r,n,a)=>r.done(a),o=(r,n)=>r.error(n)){const r=new Promise(n=>(this.jobQueue.push({name:e,onMessage:i,onError:o,onStart:n}),this));return this._startQueuedJob(),await r}async _startQueuedJob(){if(!this.jobQueue.length)return;const e=this._getAvailableWorker();if(!e)return;const i=this.jobQueue.shift();if(i){this.onDebug({message:"Starting job",name:i.name,workerThread:e,backlog:this.jobQueue.length});const o=new yBt(i.name,e);e.onMessage=r=>i.onMessage(o,r.type,r.payload),e.onError=r=>i.onError(o,r),i.onStart(o);try{await o.result}catch(r){console.error(`Worker exception: ${r}`)}finally{this.returnWorkerToQueue(e)}}}returnWorkerToQueue(e){!Ca||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 GB({name:e,source:this.source,url:this.url})}return null}_getMaxConcurrency(){return vBt?this.maxMobileConcurrency:this.maxConcurrency}}const kBt={maxConcurrency:3,maxMobileConcurrency:1,reuseWorkers:!0,onDebug:()=>{}};class Ud{props;workerPools=new Map;static _workerFarm;static isSupported(){return GB.isSupported()}static getWorkerFarm(e={}){return Ud._workerFarm=Ud._workerFarm||new Ud({}),Ud._workerFarm.setProps(e),Ud._workerFarm}constructor(e){this.props={...kBt},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 i of this.workerPools.values())i.setProps(this._getWorkerPoolProps())}getWorkerPool(e){const{name:i,source:o,url:r}=e;let n=this.workerPools.get(i);return n||(n=new xBt({name:i,source:o,url:r}),n.setProps(this._getWorkerPoolProps()),this.workerPools.set(i,n)),n}_getWorkerPoolProps(){return{maxConcurrency:this.props.maxConcurrency,maxMobileConcurrency:this.props.maxMobileConcurrency,reuseWorkers:this.props.reuseWorkers,onDebug:this.props.onDebug}}}function MBt(t,e={}){const i=e[t.id]||{},o=Ca?`${t.id}-worker.js`:`${t.id}-worker-node.js`;let r=i.workerUrl;if(!r&&t.id==="compression"&&(r=e.workerUrl),e._workerType==="test"&&(Ca?r=`modules/${t.module}/dist/${o}`:r=`modules/${t.module}/src/workers/${t.id}-worker-node.ts`),!r){let n=t.version;n==="latest"&&(n=gBt);const a=n?`@${n}`:"";r=`https://unpkg.com/@loaders.gl/${t.module}${a}/dist/${o}`}return Zl(r),r}function EBt(t,e=QZ){Zl(t,"no worker provided");const i=t.version;return!(!e||!i)}const KB={};async function Lu(t,e=null,i={},o=null){return e&&(t=BBt(t,e,i,o)),KB[t]=KB[t]||PBt(t),await KB[t]}function BBt(t,e,i={},o=null){if(!i.useLocalLibraries&&t.startsWith("http"))return t;o=o||t;const r=i.modules||{};return r[o]?r[o]:Ca?i.CDN?(Zl(i.CDN.startsWith("http")),`${i.CDN}/${e}@${QZ}/dist/libs/${o}`):zB?`../src/libs/${o}`:`modules/${e}/src/libs/${o}`:`modules/${e}/dist/libs/${o}`}async function PBt(t){if(t.endsWith("wasm"))return await SBt(t);if(!Ca)try{const{requireFromFile:i}=globalThis.loaders||{};return await i?.(t)}catch(i){return console.error(i),null}if(zB)return importScripts(t);const e=await TBt(t);return IBt(e,t)}function IBt(t,e){if(!Ca){const{requireFromString:o}=globalThis.loaders||{};return o?.(t,e)}if(zB)return eval.call(globalThis,t),null;const i=document.createElement("script");i.id=e;try{i.appendChild(document.createTextNode(t))}catch{i.text=t}return document.body.appendChild(i),null}async function SBt(t){const{readFileAsArrayBuffer:e}=globalThis.loaders||{};return Ca||!e||t.startsWith("http")?await(await fetch(t)).arrayBuffer():await e(t)}async function TBt(t){const{readFileAsText:e}=globalThis.loaders||{};return Ca||!e||t.startsWith("http")?await(await fetch(t)).text():await e(t)}function DBt(t,e){return!Ud.isSupported()||!Ca&&!e?._nodeWorkers?!1:t.worker&&e?.worker}async function RBt(t,e,i,o,r){const n=t.id,a=MBt(t,i),s=Ud.getWorkerFarm(i).getWorkerPool({name:n,url:a});i=JSON.parse(JSON.stringify(i)),o=JSON.parse(JSON.stringify(o||{}));const l=await s.startJob("process-on-worker",LBt.bind(null,r));return l.postMessage("process",{input:e,options:i,context:o}),await(await l.result).result}async function LBt(t,e,i,o){switch(i){case"done":e.done(o);break;case"error":e.error(new Error(o.error));break;case"process":const{id:r,input:n,options:a}=o;try{const s=await t(n,a);e.postMessage("done",{id:r,result:s})}catch(s){const l=s instanceof Error?s.message:"unknown error";e.postMessage("error",{id:r,error:l})}break;default:console.warn(`parse-with-worker unknown message ${i}`)}}function _Bt(t,e=5){return typeof t=="string"?t.slice(0,e):ArrayBuffer.isView(t)?WZ(t.buffer,t.byteOffset,e):t instanceof ArrayBuffer?WZ(t,0,e):""}function WZ(t,e,i){if(t.byteLength<=e+i)return"";const o=new DataView(t);let r="";for(let n=0;n<i;n++)r+=String.fromCharCode(o.getUint8(e+n));return r}function FBt(t){try{return JSON.parse(t)}catch{throw new Error(`Failed to parse JSON from data starting with "${_Bt(t)}"`)}}function OBt(t,e,i){if(i=i||t.byteLength,t.byteLength<i||e.byteLength<i)return!1;const o=new Uint8Array(t),r=new Uint8Array(e);for(let n=0;n<o.length;++n)if(o[n]!==r[n])return!1;return!0}function UBt(...t){return NBt(t)}function NBt(t){const e=t.map(n=>n instanceof ArrayBuffer?new Uint8Array(n):n),i=e.reduce((n,a)=>n+a.byteLength,0),o=new Uint8Array(i);let r=0;for(const n of e)o.set(n,r),r+=n.byteLength;return o.buffer}function YZ(t,e,i){const o=i!==void 0?new Uint8Array(t).subarray(e,e+i):new Uint8Array(t).subarray(e);return new Uint8Array(o).buffer}function Vv(t,e){return Jl(t>=0),Jl(e>0),t+(e-1)&-4}function jBt(t,e,i){let o;if(t instanceof ArrayBuffer)o=new Uint8Array(t);else{const r=t.byteOffset,n=t.byteLength;o=new Uint8Array(t.buffer||t.arrayBuffer,r,n)}return e.set(o,i),i+Vv(o.byteLength,4)}async function VBt(t){const e=[];for await(const i of t)e.push(i);return UBt(...e)}let zBt="";const XZ={};function HBt(t){for(const e in XZ)if(t.startsWith(e)){const i=XZ[e];t=t.replace(e,i)}return!t.startsWith("http://")&&!t.startsWith("https://")&&(t=`${zBt}${t}`),t}function qBt(t){return t&&typeof t=="object"&&t.isBuffer}function $Z(t){if(qBt(t)||t instanceof ArrayBuffer)return t;if(ArrayBuffer.isView(t))return t.byteOffset===0&&t.byteLength===t.buffer.byteLength?t.buffer:t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength);if(typeof t=="string"){const e=t;return new TextEncoder().encode(e).buffer}if(t&&typeof t=="object"&&t._toArrayBuffer)return t._toArrayBuffer();throw new Error("toArrayBuffer")}function eW(t){const e=t?t.lastIndexOf("/"):-1;return e>=0?t.substr(e+1):""}function QBt(t){const e=t?t.lastIndexOf("/"):-1;return e>=0?t.substr(0,e):""}const GBt=t=>typeof t=="boolean",zv=t=>typeof t=="function",Hv=t=>t!==null&&typeof t=="object",tW=t=>Hv(t)&&t.constructor==={}.constructor,KBt=t=>!!t&&typeof t[Symbol.iterator]=="function",JBt=t=>t&&typeof t[Symbol.asyncIterator]=="function",_u=t=>typeof Response<"u"&&t instanceof Response||t&&t.arrayBuffer&&t.text&&t.json,Xp=t=>typeof Blob<"u"&&t instanceof Blob,ZBt=t=>t&&typeof t=="object"&&t.isBuffer,WBt=t=>typeof ReadableStream<"u"&&t instanceof ReadableStream||Hv(t)&&zv(t.tee)&&zv(t.cancel)&&zv(t.getReader),YBt=t=>Hv(t)&&zv(t.read)&&zv(t.pipe)&&GBt(t.readable),iW=t=>WBt(t)||YBt(t);class XBt extends Error{constructor(e,i){super(e),this.reason=i.reason,this.url=i.url,this.response=i.response}reason;url;response}const $Bt=/^data:([-\w.]+\/[-\w.+]+)(;|,)/,ePt=/^([-\w.]+\/[-\w.+]+)/;function oW(t,e){return t.toLowerCase()===e.toLowerCase()}function tPt(t){const e=ePt.exec(t);return e?e[1]:t}function rW(t){const e=$Bt.exec(t);return e?e[1]:""}const nW=/\?.*/;function iPt(t){const e=t.match(nW);return e&&e[0]}function JB(t){return t.replace(nW,"")}function oPt(t){if(t.length<50)return t;const e=t.slice(t.length-15);return`${t.substr(0,32)}...${e}`}function i7(t){return _u(t)?t.url:Xp(t)?t.name||"":typeof t=="string"?t:""}function ZB(t){if(_u(t)){const e=t,i=e.headers.get("content-type")||"",o=JB(e.url);return tPt(i)||rW(o)}return Xp(t)?t.type||"":typeof t=="string"?rW(t):""}function rPt(t){return _u(t)?t.headers["content-length"]||-1:Xp(t)?t.size:typeof t=="string"?t.length:t instanceof ArrayBuffer||ArrayBuffer.isView(t)?t.byteLength:-1}async function aW(t){if(_u(t))return t;const e={},i=rPt(t);i>=0&&(e["content-length"]=String(i));const o=i7(t),r=ZB(t);r&&(e["content-type"]=r);const n=await sPt(t);n&&(e["x-first-bytes"]=n),typeof t=="string"&&(t=new TextEncoder().encode(t));const a=new Response(t,{headers:e});return Object.defineProperty(a,"url",{value:o}),a}async function nPt(t){if(!t.ok)throw await aPt(t)}async function aPt(t){const e=oPt(t.url);let i=`Failed to fetch resource (${t.status}) ${t.statusText}: ${e}`;i=i.length>100?`${i.slice(0,100)}...`:i;const o={reason:t.statusText,url:t.url,response:t};try{const r=t.headers.get("Content-Type");o.reason=!t.bodyUsed&&r?.includes("application/json")?await t.json():await t.text()}catch{}return new XBt(i,o)}async function sPt(t){if(typeof t=="string")return`data:,${t.slice(0,5)}`;if(t instanceof Blob){const e=t.slice(0,5);return await new Promise(i=>{const o=new FileReader;o.onload=r=>i(r?.target?.result),o.readAsDataURL(e)})}if(t instanceof ArrayBuffer){const e=t.slice(0,5);return`data:base64,${lPt(e)}`}return null}function lPt(t){let e="";const i=new Uint8Array(t);for(let o=0;o<i.byteLength;o++)e+=String.fromCharCode(i[o]);return btoa(e)}function cPt(t){return!dPt(t)&&!uPt(t)}function dPt(t){return t.startsWith("http:")||t.startsWith("https:")}function uPt(t){return t.startsWith("data:")}async function sW(t,e){if(typeof t=="string"){const i=HBt(t);return cPt(i)&&globalThis.loaders?.fetchNode?globalThis.loaders?.fetchNode(i,e):await fetch(i,e)}return await aW(t)}const lW=new jB({id:"loaders.gl"});class hPt{log(){return()=>{}}info(){return()=>{}}warn(){return()=>{}}error(){return()=>{}}}class pPt{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 cW={fetch:null,mimeType:void 0,nothrow:!1,log:new pPt,useLocalLibraries:!1,CDN:"https://unpkg.com/@loaders.gl",worker:!0,maxConcurrency:3,maxMobileConcurrency:1,reuseWorkers:e7,_nodeWorkers:!1,_workerType:"",limit:0,_limitMB:0,batchSize:"auto",batchDebounceMs:0,metadata:!1,transforms:[]},fPt={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 dW(){globalThis.loaders=globalThis.loaders||{};const{loaders:t}=globalThis;return t._state||(t._state={}),t._state}function uW(){const t=dW();return t.globalOptions=t.globalOptions||{...cW},t.globalOptions}function APt(t,e,i,o){return i=i||[],i=Array.isArray(i)?i:[i],gPt(t,i),vPt(e,t,o)}function gPt(t,e){hW(t,null,cW,fPt,e);for(const i of e){const o=t&&t[i.id]||{},r=i.options&&i.options[i.id]||{},n=i.deprecatedOptions&&i.deprecatedOptions[i.id]||{};hW(o,i.id,r,n,e)}}function hW(t,e,i,o,r){const n=e||"Top level",a=e?`${e}.`:"";for(const s in t){const l=!e&&Hv(t[s]),c=s==="baseUri"&&!e,d=s==="workerUrl"&&e;if(!(s in i)&&!c&&!d){if(s in o)lW.warn(`${n} loader option '${a}${s}' no longer supported, use '${o[s]}'`)();else if(!l){const u=mPt(s,r);lW.warn(`${n} loader option '${a}${s}' not recognized. ${u}`)()}}}}function mPt(t,e){const i=t.toLowerCase();let o="";for(const r of e)for(const n in r.options){if(t===n)return`Did you mean '${r.id}.${n}'?`;const a=n.toLowerCase();(i.startsWith(a)||a.startsWith(i))&&(o=o||`Did you mean '${r.id}.${n}'?`)}return o}function vPt(t,e,i){const o={...t.options||{}};return yPt(o,i),o.log===null&&(o.log=new hPt),pW(o,uW()),pW(o,e),o}function pW(t,e){for(const i in e)if(i in e){const o=e[i];tW(o)&&tW(t[i])?t[i]={...t[i],...e[i]}:t[i]=e[i]}}function yPt(t,e){e&&!("baseUri"in t)&&(t.baseUri=e)}function fW(t){return t?(Array.isArray(t)&&(t=t[0]),Array.isArray(t?.extensions)):!1}function AW(t){Jl(t,"null loader"),Jl(fW(t),"invalid loader");let e;return Array.isArray(t)&&(e=t[1],t=t[0],t={...t,options:{...t.options,...e}}),(t?.parseTextSync||t?.parseText)&&(t.text=!0),t.text||(t.binary=!0),t}const bPt=()=>{const t=dW();return t.loaderRegistry=t.loaderRegistry||[],t.loaderRegistry};function wPt(){return bPt()}const CPt=/\.([^.]+)$/;async function xPt(t,e=[],i,o){if(!mW(t))return null;let r=gW(t,e,{...i,nothrow:!0},o);if(r)return r;if(Xp(t)&&(t=await t.slice(0,10).arrayBuffer(),r=gW(t,e,i,o)),!r&&!i?.nothrow)throw new Error(vW(t));return r}function gW(t,e=[],i,o){if(!mW(t))return null;if(e&&!Array.isArray(e))return AW(e);let r=[];e&&(r=r.concat(e)),i?.ignoreRegisteredLoaders||r.push(...wPt()),MPt(r);const n=kPt(t,r,i,o);if(!n&&!i?.nothrow)throw new Error(vW(t));return n}function kPt(t,e,i,o){const r=i7(t),n=ZB(t),a=JB(r)||o?.url;let s=null,l="";return i?.mimeType&&(s=WB(e,i?.mimeType),l=`match forced by supplied MIME type ${i?.mimeType}`),s=s||EPt(e,a),l=l||(s?`matched url ${a}`:""),s=s||WB(e,n),l=l||(s?`matched MIME type ${n}`:""),s=s||PPt(e,t),l=l||(s?`matched initial data ${bW(t)}`:""),i?.fallbackMimeType&&(s=s||WB(e,i?.fallbackMimeType),l=l||(s?`matched fallback MIME type ${n}`:"")),l&&hBt.log(1,`selectLoader selected ${s?.name}: ${l}.`),s}function mW(t){return!(t instanceof Response&&t.status===204)}function vW(t){const e=i7(t),i=ZB(t);let o="No valid loader found (";o+=e?`${eW(e)}, `:"no url provided, ",o+=`MIME type: ${i?`"${i}"`:"not provided"}, `;const r=t?bW(t):"";return o+=r?` first bytes: "${r}"`:"first bytes: not available",o+=")",o}function MPt(t){for(const e of t)AW(e)}function EPt(t,e){const i=e&&CPt.exec(e),o=i&&i[1];return o?BPt(t,o):null}function BPt(t,e){e=e.toLowerCase();for(const i of t)for(const o of i.extensions)if(o.toLowerCase()===e)return i;return null}function WB(t,e){for(const i of t)if(i.mimeTypes?.some(o=>oW(e,o))||oW(e,`application/x.${i.id}`))return i;return null}function PPt(t,e){if(!e)return null;for(const i of t)if(typeof e=="string"){if(IPt(e,i))return i}else if(ArrayBuffer.isView(e)){if(yW(e.buffer,e.byteOffset,i))return i}else if(e instanceof ArrayBuffer&&yW(e,0,i))return i;return null}function IPt(t,e){return e.testText?e.testText(t):(Array.isArray(e.tests)?e.tests:[e.tests]).some(i=>t.startsWith(i))}function yW(t,e,i){return(Array.isArray(i.tests)?i.tests:[i.tests]).some(o=>SPt(t,e,i,o))}function SPt(t,e,i,o){if(o instanceof ArrayBuffer)return OBt(o,t,o.byteLength);switch(typeof o){case"function":return o(t);case"string":const r=YB(t,e,o.length);return o===r;default:return!1}}function bW(t,e=5){return typeof t=="string"?t.slice(0,e):ArrayBuffer.isView(t)?YB(t.buffer,t.byteOffset,e):t instanceof ArrayBuffer?YB(t,0,e):""}function YB(t,e,i){if(t.byteLength<e+i)return"";const o=new DataView(t);let r="";for(let n=0;n<i;n++)r+=String.fromCharCode(o.getUint8(e+n));return r}const TPt=256*1024;function*DPt(t,e){const i=e?.chunkSize||TPt;let o=0;const r=new TextEncoder;for(;o<t.length;){const n=Math.min(t.length-o,i),a=t.slice(o,o+n);o+=n,yield r.encode(a)}}const RPt=256*1024;function*LPt(t,e={}){const{chunkSize:i=RPt}=e;let o=0;for(;o<t.byteLength;){const r=Math.min(t.byteLength-o,i),n=new ArrayBuffer(r),a=new Uint8Array(t,o,r);new Uint8Array(n).set(a),o+=r,yield n}}const _Pt=1024*1024;async function*FPt(t,e){const i=e?.chunkSize||_Pt;let o=0;for(;o<t.size;){const r=o+i,n=await t.slice(o,r).arrayBuffer();o=r,yield n}}function wW(t,e){return e7?OPt(t,e):UPt(t)}async function*OPt(t,e){const i=t.getReader();let o;try{for(;;){const r=o||i.read();e?._streamReadAhead&&(o=i.read());const{done:n,value:a}=await r;if(n)return;yield $Z(a)}}catch{i.releaseLock()}}async function*UPt(t,e){for await(const i of t)yield $Z(i)}function NPt(t,e){if(typeof t=="string")return DPt(t,e);if(t instanceof ArrayBuffer)return LPt(t,e);if(Xp(t))return FPt(t,e);if(iW(t))return wW(t,e);if(_u(t))return wW(t.body,e);throw new Error("makeIterator")}const CW="Cannot convert supplied data type";function jPt(t,e,i){if(e.text&&typeof t=="string")return t;if(ZBt(t)&&(t=t.buffer),t instanceof ArrayBuffer){const o=t;return e.text&&!e.binary?new TextDecoder("utf8").decode(o):o}if(ArrayBuffer.isView(t)){if(e.text&&!e.binary)return new TextDecoder("utf8").decode(t);let o=t.buffer;const r=t.byteLength||t.length;return(t.byteOffset!==0||r!==o.byteLength)&&(o=o.slice(t.byteOffset,t.byteOffset+r)),o}throw new Error(CW)}async function VPt(t,e,i){const o=t instanceof ArrayBuffer||ArrayBuffer.isView(t);if(typeof t=="string"||o)return jPt(t,e);if(Xp(t)&&(t=await aW(t)),_u(t)){const r=t;return await nPt(r),e.binary?await r.arrayBuffer():await r.text()}if(iW(t)&&(t=NPt(t,i)),KBt(t)||JBt(t))return VBt(t);throw new Error(CW)}function zPt(t,e){const i=uW(),o=t||i;return typeof o.fetch=="function"?o.fetch:Hv(o.fetch)?r=>sW(r,o.fetch):e?.fetch?e?.fetch:sW}function HPt(t,e,i){if(i)return i;const o={fetch:zPt(e,t),...t};if(o.url){const r=JB(o.url);o.baseUrl=r,o.queryString=iPt(o.url),o.filename=eW(r),o.baseUrl=QBt(r)}return Array.isArray(o.loaders)||(o.loaders=null),o}function qPt(t,e){if(t&&!Array.isArray(t))return t;let i;if(t&&(i=Array.isArray(t)?t:[t]),e&&e.loaders){const o=Array.isArray(e.loaders)?e.loaders:[e.loaders];i=i?[...i,...o]:o}return i&&i.length?i:void 0}async function XB(t,e,i,o){e&&!Array.isArray(e)&&!fW(e)&&(o=void 0,i=e,e=void 0),t=await t,i=i||{};const r=i7(t),n=qPt(e,o),a=await xPt(t,n,i);return a?(i=APt(i,a,n,r),o=HPt({url:r,_parse:XB,loaders:n},i,o||null),await QPt(a,t,i,o)):null}async function QPt(t,e,i,o){if(EBt(t),i=pBt(t.options,i),_u(e)){const n=e,{ok:a,redirected:s,status:l,statusText:c,type:d,url:u}=n,h=Object.fromEntries(n.headers.entries());o.response={headers:h,ok:a,redirected:s,status:l,statusText:c,type:d,url:u}}e=await VPt(e,t,i);const r=t;if(r.parseTextSync&&typeof e=="string")return r.parseTextSync(e,i,o);if(DBt(t,i))return await RBt(t,e,i,o,XB);if(r.parseText&&typeof e=="string")return await r.parseText(e,i,o);if(r.parse)return await r.parse(e,i,o);throw Zl(!r.parseSync),new Error(`${t.id} loader - no parser found and worker is disabled`)}function GPt(t){switch(t.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 KPt(t){let e=1/0,i=1/0,o=1/0,r=-1/0,n=-1/0,a=-1/0;const s=t.POSITION?t.POSITION.value:[],l=s&&s.length;for(let c=0;c<l;c+=3){const d=s[c],u=s[c+1],h=s[c+2];e=d<e?d:e,i=u<i?u:i,o=h<o?h:o,r=d>r?d:r,n=u>n?u:n,a=h>a?h:a}return[[e,i,o],[r,n,a]]}function JPt(t,e,i){const o=GPt(e.value),r=i||ZPt(e);return{name:t,type:{type:"fixed-size-list",listSize:e.size,children:[{name:"value",type:o}]},nullable:!1,metadata:r}}function ZPt(t){const e={};return"byteOffset"in t&&(e.byteOffset=t.byteOffset.toString(10)),"byteStride"in t&&(e.byteStride=t.byteStride.toString(10)),"normalized"in t&&(e.normalized=t.normalized.toString()),e}const WPt="4.3.3",YPt=globalThis.loaders?.parseImageNode,$B=typeof Image<"u",eP=typeof ImageBitmap<"u",XPt=!!YPt,tP=e7?!0:XPt;function $Pt(t){switch(t){case"auto":return eP||$B||tP;case"imagebitmap":return eP;case"image":return $B;case"data":return tP;default:throw new Error(`@loaders.gl/images: image ${t} not supported in this environment`)}}function eIt(){if(eP)return"imagebitmap";if($B)return"image";if(tP)return"data";throw new Error("Install '@loaders.gl/polyfills' to parse images under Node.js")}function tIt(t){const e=iIt(t);if(!e)throw new Error("Not an image");return e}function xW(t){switch(tIt(t)){case"data":return t;case"image":case"imagebitmap":const e=document.createElement("canvas"),i=e.getContext("2d");if(!i)throw new Error("getImageData");return e.width=t.width,e.height=t.height,i.drawImage(t,0,0),i.getImageData(0,0,t.width,t.height);default:throw new Error("getImageData")}}function iIt(t){return typeof ImageBitmap<"u"&&t instanceof ImageBitmap?"imagebitmap":typeof Image<"u"&&t instanceof Image?"image":t&&typeof t=="object"&&t.data&&t.width&&t.height?"data":null}const oIt=/^data:image\/svg\+xml/,rIt=/\.svg((\?|#).*)?$/;function iP(t){return t&&(oIt.test(t)||rIt.test(t))}function nIt(t,e){if(iP(e)){let i=new TextDecoder().decode(t);try{typeof unescape=="function"&&typeof encodeURIComponent=="function"&&(i=unescape(encodeURIComponent(i)))}catch(o){throw new Error(o.message)}return`data:image/svg+xml;base64,${btoa(i)}`}return kW(t,e)}function kW(t,e){if(iP(e))throw new Error("SVG cannot be parsed directly to imagebitmap");return new Blob([new Uint8Array(t)])}async function MW(t,e,i){const o=nIt(t,i),r=self.URL||self.webkitURL,n=typeof o!="string"&&r.createObjectURL(o);try{return await aIt(n||o,e)}finally{n&&r.revokeObjectURL(n)}}async function aIt(t,e){const i=new Image;return i.src=t,e.image&&e.image.decode&&i.decode?(await i.decode(),i):await new Promise((o,r)=>{try{i.onload=()=>o(i),i.onerror=n=>{const a=n instanceof Error?n.message:"error";r(new Error(a))}}catch(n){r(n)}})}const sIt={};let EW=!0;async function lIt(t,e,i){let o;iP(i)?o=await MW(t,e,i):o=kW(t,i);const r=e&&e.imagebitmap;return await cIt(o,r)}async function cIt(t,e=null){if((dIt(e)||!EW)&&(e=null),e)try{return await createImageBitmap(t,e)}catch(i){console.warn(i),EW=!1}return await createImageBitmap(t)}function dIt(t){for(const e in t||sIt)return!1;return!0}function uIt(t){return!AIt(t,"ftyp",4)||(t[8]&96)===0?null:hIt(t)}function hIt(t){switch(pIt(t,8,12).replace("\0"," ").trim()){case"avif":case"avis":return{extension:"avif",mimeType:"image/avif"};default:return null}}function pIt(t,e,i){return String.fromCharCode(...t.slice(e,i))}function fIt(t){return[...t].map(e=>e.charCodeAt(0))}function AIt(t,e,i=0){const o=fIt(e);for(let r=0;r<o.length;++r)if(o[r]!==t[r+i])return!1;return!0}const Gs=!1,qv=!0;function oP(t){const e=Qv(t);return mIt(e)||bIt(e)||vIt(e)||yIt(e)||gIt(e)}function gIt(t){const e=new Uint8Array(t instanceof DataView?t.buffer:t),i=uIt(e);return i?{mimeType:i.mimeType,width:0,height:0}:null}function mIt(t){const e=Qv(t);return e.byteLength>=24&&e.getUint32(0,Gs)===2303741511?{mimeType:"image/png",width:e.getUint32(16,Gs),height:e.getUint32(20,Gs)}:null}function vIt(t){const e=Qv(t);return e.byteLength>=10&&e.getUint32(0,Gs)===1195984440?{mimeType:"image/gif",width:e.getUint16(6,qv),height:e.getUint16(8,qv)}:null}function yIt(t){const e=Qv(t);return e.byteLength>=14&&e.getUint16(0,Gs)===16973&&e.getUint32(2,qv)===e.byteLength?{mimeType:"image/bmp",width:e.getUint32(18,qv),height:e.getUint32(22,qv)}:null}function bIt(t){const e=Qv(t);if(!(e.byteLength>=3&&e.getUint16(0,Gs)===65496&&e.getUint8(2)===255))return null;const{tableMarkers:i,sofMarkers:o}=wIt();let r=2;for(;r+9<e.byteLength;){const n=e.getUint16(r,Gs);if(o.has(n))return{mimeType:"image/jpeg",height:e.getUint16(r+5,Gs),width:e.getUint16(r+7,Gs)};if(!i.has(n))return null;r+=2,r+=e.getUint16(r,Gs)}return null}function wIt(){const t=new Set([65499,65476,65484,65501,65534]);for(let e=65504;e<65520;++e)t.add(e);return{tableMarkers:t,sofMarkers:new Set([65472,65473,65474,65475,65477,65478,65479,65481,65482,65483,65485,65486,65487,65502])}}function Qv(t){if(t instanceof DataView)return t;if(ArrayBuffer.isView(t))return new DataView(t.buffer);if(t instanceof ArrayBuffer)return new DataView(t);throw new Error("toDataView")}async function CIt(t,e){const{mimeType:i}=oP(t)||{},o=globalThis.loaders?.parseImageNode;return Jl(o),await o(t,i)}async function xIt(t,e,i){e=e||{};const o=(e.image||{}).type||"auto",{url:r}=i||{},n=kIt(o);let a;switch(n){case"imagebitmap":a=await lIt(t,e,r);break;case"image":a=await MW(t,e,r);break;case"data":a=await CIt(t);break;default:Jl(!1)}return o==="data"&&(a=xW(a)),a}function kIt(t){switch(t){case"auto":case"data":return eIt();default:return $Pt(t),t}}const MIt=["png","jpg","jpeg","gif","webp","bmp","ico","svg","avif"],EIt=["image/png","image/jpeg","image/gif","image/webp","image/avif","image/bmp","image/vnd.microsoft.icon","image/svg+xml"],BIt={image:{type:"auto",decode:!0}},PIt={dataType:null,batchType:null,id:"image",module:"images",name:"Images",version:WPt,mimeTypes:EIt,extensions:MIt,parse:xIt,tests:[t=>!!oP(new DataView(t))],options:BIt},rP={};function IIt(t){if(rP[t]===void 0){const e=e7?TIt(t):SIt(t);rP[t]=e}return rP[t]}function SIt(t){const e=["image/png","image/jpeg","image/gif"],i=globalThis.loaders?.imageFormatsNode||e;return!!globalThis.loaders?.parseImageNode&&i.includes(t)}function TIt(t){switch(t){case"image/avif":case"image/webp":return DIt(t);default:return!0}}function DIt(t){try{return document.createElement("canvas").toDataURL(t).indexOf(`data:${t}`)===0}catch{return!1}}function $n(t,e){if(!t)throw new Error(e||"assert failed: gltf")}const BW={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},PW={5120:1,5121:1,5122:2,5123:2,5125:4,5126:4},IW=["SCALAR","VEC2","VEC3","VEC4"],RIt=[[Int8Array,5120],[Uint8Array,5121],[Int16Array,5122],[Uint16Array,5123],[Uint32Array,5125],[Float32Array,5126],[Float64Array,5130]],LIt=new Map(RIt),_It={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},FIt={5120:1,5121:1,5122:2,5123:2,5125:4,5126:4},OIt={5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5126:Float32Array};function SW(t){return IW[t-1]||IW[0]}function o7(t){const e=LIt.get(t.constructor);if(!e)throw new Error("Illegal typed array");return e}function nP(t,e){const i=OIt[t.componentType],o=_It[t.type],r=FIt[t.componentType],n=t.count*o,a=t.count*o*r;$n(a>=0&&a<=e.byteLength);const s=PW[t.componentType],l=BW[t.type];return{ArrayType:i,length:n,byteLength:a,componentByteSize:s,numberOfComponentsInElement:l}}function UIt(t,e,i){const o=t.bufferViews[i];$n(o);const r=o.buffer,n=e[r];$n(n);const a=(o.byteOffset||0)+n.byteOffset;return new Uint8Array(n.arrayBuffer,a,o.byteLength)}function NIt(t,e,i){const o=typeof i=="number"?t.accessors?.[i]:i;if(!o)throw new Error(`No gltf accessor ${JSON.stringify(i)}`);const r=t.bufferViews?.[o.bufferView||0];if(!r)throw new Error(`No gltf buffer view for accessor ${r}`);const{arrayBuffer:n,byteOffset:a}=e[r.buffer],s=(a||0)+(o.byteOffset||0)+(r.byteOffset||0),{ArrayType:l,length:c,componentByteSize:d,numberOfComponentsInElement:u}=nP(o,r),h=d*u,p=r.byteStride||h;if(typeof r.byteStride>"u"||r.byteStride===h)return new l(n,s,c);const A=new l(c);for(let f=0;f<o.count;f++){const m=new l(n,s+f*p,u);A.set(m,f*u)}return A}function jIt(){return{asset:{version:"2.0",generator:"loaders.gl"},buffers:[],extensions:{},extensionsRequired:[],extensionsUsed:[]}}class mr{gltf;sourceBuffers;byteLength;constructor(e){this.gltf={json:e?.json||jIt(),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 i=this.getUsedExtensions().find(r=>r===e),o=this.getRequiredExtensions().find(r=>r===e);return typeof i=="string"||typeof o=="string"}getExtension(e){const i=this.getUsedExtensions().find(r=>r===e),o=this.json.extensions||{};return i?o[e]:null}getRequiredExtension(e){return this.getRequiredExtensions().find(i=>i===e)?this.getExtension(e):null}getRequiredExtensions(){return this.json.extensionsRequired||[]}getUsedExtensions(){return this.json.extensionsUsed||[]}getRemovedExtensions(){return this.json.extensionsRemoved||[]}getObjectExtension(e,i){return(e.extensions||{})[i]}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,i){if(typeof i=="object")return i;const o=this.json[e]&&this.json[e][i];if(!o)throw new Error(`glTF file error: Could not find ${e}[${i}]`);return o}getTypedArrayForBufferView(e){e=this.getBufferView(e);const i=e.buffer,o=this.gltf.buffers[i];$n(o);const r=(e.byteOffset||0)+o.byteOffset;return new Uint8Array(o.arrayBuffer,r,e.byteLength)}getTypedArrayForAccessor(e){const i=this.getAccessor(e);return NIt(this.gltf.json,this.gltf.buffers,i)}getTypedArrayForImageData(e){e=this.getAccessor(e);const i=this.getBufferView(e.bufferView),o=this.getBuffer(i.buffer).data,r=i.byteOffset||0;return new Uint8Array(o,r,i.byteLength)}addApplicationData(e,i){return this.json[e]=i,this}addExtraData(e,i){return this.json.extras=this.json.extras||{},this.json.extras[e]=i,this}addObjectExtension(e,i,o){return e.extensions=e.extensions||{},e.extensions[i]=o,this.registerUsedExtension(i),this}setObjectExtension(e,i,o){const r=e.extensions||{};r[i]=o}removeObjectExtension(e,i){const o=e?.extensions||{};if(o[i]){this.json.extensionsRemoved=this.json.extensionsRemoved||[];const r=this.json.extensionsRemoved;r.includes(i)||r.push(i)}delete o[i]}addExtension(e,i={}){return $n(i),this.json.extensions=this.json.extensions||{},this.json.extensions[e]=i,this.registerUsedExtension(e),i}addRequiredExtension(e,i={}){return $n(i),this.addExtension(e,i),this.registerRequiredExtension(e),i}registerUsedExtension(e){this.json.extensionsUsed=this.json.extensionsUsed||[],this.json.extensionsUsed.find(i=>i===e)||this.json.extensionsUsed.push(e)}registerRequiredExtension(e){this.registerUsedExtension(e),this.json.extensionsRequired=this.json.extensionsRequired||[],this.json.extensionsRequired.find(i=>i===e)||this.json.extensionsRequired.push(e)}removeExtension(e){if(this.json.extensions?.[e]){this.json.extensionsRemoved=this.json.extensionsRemoved||[];const i=this.json.extensionsRemoved;i.includes(e)||i.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:i}=e;return this.json.scenes=this.json.scenes||[],this.json.scenes.push({nodes:i}),this.json.scenes.length-1}addNode(e){const{meshIndex:i,matrix:o}=e;this.json.nodes=this.json.nodes||[];const r={mesh:i};return o&&(r.matrix=o),this.json.nodes.push(r),this.json.nodes.length-1}addMesh(e){const{attributes:i,indices:o,material:r,mode:n=4}=e,a={primitives:[{attributes:this._addAttributes(i),mode:n}]};if(o){const s=this._addIndices(o);a.primitives[0].indices=s}return Number.isFinite(r)&&(a.primitives[0].material=r),this.json.meshes=this.json.meshes||[],this.json.meshes.push(a),this.json.meshes.length-1}addPointCloud(e){const i={primitives:[{attributes:this._addAttributes(e),mode:0}]};return this.json.meshes=this.json.meshes||[],this.json.meshes.push(i),this.json.meshes.length-1}addImage(e,i){const o=oP(e),r=i||o?.mimeType,n={bufferView:this.addBufferView(e),mimeType:r};return this.json.images=this.json.images||[],this.json.images.push(n),this.json.images.length-1}addBufferView(e,i=0,o=this.byteLength){const r=e.byteLength;$n(Number.isFinite(r)),this.sourceBuffers=this.sourceBuffers||[],this.sourceBuffers.push(e);const n={buffer:i,byteOffset:o,byteLength:r};return this.byteLength+=Vv(r,4),this.json.bufferViews=this.json.bufferViews||[],this.json.bufferViews.push(n),this.json.bufferViews.length-1}addAccessor(e,i){const o={bufferView:e,type:SW(i.size),componentType:i.componentType,count:i.count,max:i.max,min:i.min};return this.json.accessors=this.json.accessors||[],this.json.accessors.push(o),this.json.accessors.length-1}addBinaryBuffer(e,i={size:3}){const o=this.addBufferView(e);let r={min:i.min,max:i.max};(!r.min||!r.max)&&(r=this._getAccessorMinMax(e,i.size));const n={size:i.size,componentType:o7(e),count:Math.round(e.length/i.size),min:r.min,max:r.max};return this.addAccessor(o,Object.assign(n,i))}addTexture(e){const{imageIndex:i}=e,o={source:i};return this.json.textures=this.json.textures||[],this.json.textures.push(o),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,i=new ArrayBuffer(e),o=new Uint8Array(i);let r=0;for(const n of this.sourceBuffers||[])r=jBt(n,o,r);this.json?.buffers?.[0]?this.json.buffers[0].byteLength=e:this.json.buffers=[{byteLength:e}],this.gltf.binary=i,this.sourceBuffers=[i],this.gltf.buffers=[{arrayBuffer:i,byteOffset:0,byteLength:i.byteLength}]}_removeStringFromArray(e,i){let o=!0;for(;o;){const r=e.indexOf(i);r>-1?e.splice(r,1):o=!1}}_addAttributes(e={}){const i={};for(const o in e){const r=e[o],n=this._getGltfAttributeName(o),a=this.addBinaryBuffer(r.value,r);i[n]=a}return i}_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,i){const o={min:null,max:null};if(e.length<i)return o;o.min=[],o.max=[];const r=e.subarray(0,i);for(const n of r)o.min.push(n),o.max.push(n);for(let n=i;n<e.length;n+=i)for(let a=0;a<i;a++)o.min[0+a]=Math.min(o.min[0+a],e[n+a]),o.max[0+a]=Math.max(o.max[0+a],e[n+a]);return o}}function TW(t){return(t%1+1)%1}const DW={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16,BOOLEAN:1,STRING:1,ENUM:1},VIt={INT8:Int8Array,UINT8:Uint8Array,INT16:Int16Array,UINT16:Uint16Array,INT32:Int32Array,UINT32:Uint32Array,INT64:BigInt64Array,UINT64:BigUint64Array,FLOAT32:Float32Array,FLOAT64:Float64Array},RW={INT8:1,UINT8:1,INT16:2,UINT16:2,INT32:4,UINT32:4,INT64:8,UINT64:8,FLOAT32:4,FLOAT64:8};function aP(t,e){return RW[e]*DW[t]}function r7(t,e,i,o){if(i!=="UINT8"&&i!=="UINT16"&&i!=="UINT32"&&i!=="UINT64")return null;const r=t.getTypedArrayForBufferView(e),n=n7(r,"SCALAR",i,o+1);return n instanceof BigInt64Array||n instanceof BigUint64Array?null:n}function n7(t,e,i,o=1){const r=DW[e],n=VIt[i],a=RW[i],s=o*r,l=s*a;let c=t.buffer,d=t.byteOffset;return d%a!==0&&(c=new Uint8Array(c).slice(d,d+l).buffer,d=0),new n(c,d,s)}function sP(t,e,i){const o=`TEXCOORD_${e.texCoord||0}`,r=i.attributes[o],n=t.getTypedArrayForAccessor(r),a=t.gltf.json,s=e.index,l=a.textures?.[s]?.source;if(typeof l<"u"){const c=a.images?.[l]?.mimeType,d=t.gltf.images?.[l];if(d&&typeof d.width<"u"){const u=[];for(let h=0;h<n.length;h+=2){const p=zIt(d,c,n,h,e.channels);u.push(p)}return u}}return[]}function LW(t,e,i,o,r){if(!i?.length)return;const n=[];for(const d of i){let u=o.findIndex(h=>h===d);u===-1&&(u=o.push(d)-1),n.push(u)}const a=new Uint32Array(n),s=t.gltf.buffers.push({arrayBuffer:a.buffer,byteOffset:a.byteOffset,byteLength:a.byteLength})-1,l=t.addBufferView(a,s,0),c=t.addAccessor(l,{size:1,componentType:o7(a),count:a.length});r.attributes[e]=c}function zIt(t,e,i,o,r=[0]){const n={r:{offset:0,shift:0},g:{offset:1,shift:8},b:{offset:2,shift:16},a:{offset:3,shift:24}},a=i[o],s=i[o+1];let l=1;e&&(e.indexOf("image/jpeg")!==-1||e.indexOf("image/png")!==-1)&&(l=4);const c=HIt(a,s,t,l);let d=0;for(const u of r){const h=typeof u=="number"?Object.values(n)[u]:n[u],p=c+h.offset,A=xW(t);if(A.data.length<=p)throw new Error(`${A.data.length} <= ${p}`);const f=A.data[p];d|=f<<h.shift}return d}function HIt(t,e,i,o=1){const r=i.width,n=TW(t)*(r-1),a=Math.round(n),s=i.height,l=TW(e)*(s-1),c=Math.round(l),d=i.components?i.components:o;return(c*r+a)*d}function _W(t,e,i,o,r){const n=[];for(let a=0;a<e;a++){const s=i[a],l=i[a+1]-i[a];if(l+s>o)break;const c=s/r,d=l/r;n.push(t.slice(c,c+d))}return n}function FW(t,e,i){const o=[];for(let r=0;r<e;r++){const n=r*i;o.push(t.slice(n,n+i))}return o}function OW(t,e,i,o){if(i)throw new Error("Not implemented - arrayOffsets for strings is specified");if(o){const r=[],n=new TextDecoder("utf8");let a=0;for(let s=0;s<t;s++){const l=o[s+1]-o[s];if(l+a<=e.length){const c=e.subarray(a,l+a),d=n.decode(c);r.push(d),a+=l}}return r}return[]}const $p="EXT_mesh_features",qIt=$p;async function QIt(t,e){const i=new mr(t);KIt(i,e)}function GIt(t,e){const i=new mr(t);return ZIt(i),i.createBinaryChunk(),i.gltf}function KIt(t,e){const i=t.gltf.json;if(i.meshes)for(const o of i.meshes)for(const r of o.primitives)JIt(t,r,e)}function JIt(t,e,i){if(!i?.gltf?.loadBuffers)return;const o=e.extensions?.[$p]?.featureIds;if(o)for(const r of o){let n;if(typeof r.attribute<"u"){const a=`_FEATURE_ID_${r.attribute}`,s=e.attributes[a];n=t.getTypedArrayForAccessor(s)}else typeof r.texture<"u"&&i?.gltf?.loadImages?n=sP(t,r.texture,e):n=[];r.data=n}}function ZIt(t,e){const i=t.gltf.json.meshes;if(i)for(const o of i)for(const r of o.primitives)YIt(t,r)}function WIt(t,e,i,o){e.extensions||(e.extensions={});let r=e.extensions[$p];r||(r={featureIds:[]},e.extensions[$p]=r);const{featureIds:n}=r,a={featureCount:i.length,propertyTable:o,data:i};n.push(a),t.addObjectExtension(e,$p,r)}function YIt(t,e){const i=e.extensions?.[$p];if(!i)return;const o=i.featureIds;o.forEach((r,n)=>{if(r.data){const{accessorKey:a,index:s}=XIt(e.attributes),l=new Uint32Array(r.data);o[n]={featureCount:l.length,propertyTable:r.propertyTable,attribute:s},t.gltf.buffers.push({arrayBuffer:l.buffer,byteOffset:l.byteOffset,byteLength:l.byteLength});const c=t.addBufferView(l),d=t.addAccessor(c,{size:1,componentType:o7(l),count:l.length});e.attributes[a]=d}})}function XIt(t){const e="_FEATURE_ID_",i=Object.keys(t).filter(r=>r.indexOf(e)===0);let o=-1;for(const r of i){const n=Number(r.substring(e.length));n>o&&(o=n)}return o++,{accessorKey:`${e}${o}`,index:o}}const $It=Object.freeze(Object.defineProperty({__proto__:null,createExtMeshFeatures:WIt,decode:QIt,encode:GIt,name:qIt},Symbol.toStringTag,{value:"Module"})),e1="EXT_structural_metadata",eSt=e1;async function tSt(t,e){const i=new mr(t);oSt(i,e)}function iSt(t,e){const i=new mr(t);return ySt(i),i.createBinaryChunk(),i.gltf}function oSt(t,e){if(!e.gltf?.loadBuffers)return;const i=t.getExtension(e1);i&&(e.gltf?.loadImages&&rSt(t,i),nSt(t,i))}function rSt(t,e){const i=e.propertyTextures,o=t.gltf.json;if(i&&o.meshes)for(const r of o.meshes)for(const n of r.primitives)sSt(t,i,n,e)}function nSt(t,e){const i=e.schema;if(!i)return;const o=i.classes,r=e.propertyTables;if(o&&r)for(const n in o){const a=aSt(r,n);a&&cSt(t,i,a)}}function aSt(t,e){for(const i of t)if(i.class===e)return i;return null}function sSt(t,e,i,o){if(!e)return;const r=i.extensions?.[e1]?.propertyTextures;if(r)for(const n of r){const a=e[n];lSt(t,a,i,o)}}function lSt(t,e,i,o){if(!e.properties)return;o.dataAttributeNames||(o.dataAttributeNames=[]);const r=e.class;for(const n in e.properties){const a=`${r}_${n}`,s=e.properties?.[n];if(!s)continue;s.data||(s.data=[]);const l=s.data,c=sP(t,s,i);c!==null&&(LW(t,a,c,l,i),s.data=l,o.dataAttributeNames.push(a))}}function cSt(t,e,i){const o=e.classes?.[i.class];if(!o)throw new Error(`Incorrect data in the EXT_structural_metadata extension: no schema class with name ${i.class}`);const r=i.count;for(const n in o.properties){const a=o.properties[n],s=i.properties?.[n];if(s){const l=dSt(t,e,a,r,s);s.data=l}}}function dSt(t,e,i,o,r){let n=[];const a=r.values,s=t.getTypedArrayForBufferView(a),l=uSt(t,i,r,o),c=hSt(t,r,o);switch(i.type){case"SCALAR":case"VEC2":case"VEC3":case"VEC4":case"MAT2":case"MAT3":case"MAT4":{n=pSt(i,o,s,l);break}case"BOOLEAN":throw new Error(`Not implemented - classProperty.type=${i.type}`);case"STRING":{n=OW(o,s,l,c);break}case"ENUM":{n=fSt(e,i,o,s,l);break}default:throw new Error(`Unknown classProperty type ${i.type}`)}return n}function uSt(t,e,i,o){return e.array&&typeof e.count>"u"&&typeof i.arrayOffsets<"u"?r7(t,i.arrayOffsets,i.arrayOffsetType||"UINT32",o):null}function hSt(t,e,i){return typeof e.stringOffsets<"u"?r7(t,e.stringOffsets,e.stringOffsetType||"UINT32",i):null}function pSt(t,e,i,o){const r=t.array,n=t.count,a=aP(t.type,t.componentType),s=i.byteLength/a;let l;return t.componentType?l=n7(i,t.type,t.componentType,s):l=i,r?o?_W(l,e,o,i.length,a):n?FW(l,e,n):[]:l}function fSt(t,e,i,o,r){const n=e.enumType;if(!n)throw new Error("Incorrect data in the EXT_structural_metadata extension: classProperty.enumType is not set for type ENUM");const a=t.enums?.[n];if(!a)throw new Error(`Incorrect data in the EXT_structural_metadata extension: schema.enums does't contain ${n}`);const s=a.valueType||"UINT16",l=aP(e.type,s),c=o.byteLength/l;let d=n7(o,e.type,s,c);if(d||(d=o),e.array){if(r)return ASt({valuesData:d,numberOfElements:i,arrayOffsets:r,valuesDataBytesLength:o.length,elementSize:l,enumEntry:a});const u=e.count;return u?gSt(d,i,u,a):[]}return lP(d,0,i,a)}function ASt(t){const{valuesData:e,numberOfElements:i,arrayOffsets:o,valuesDataBytesLength:r,elementSize:n,enumEntry:a}=t,s=[];for(let l=0;l<i;l++){const c=o[l],d=o[l+1]-o[l];if(d+c>r)break;const u=c/n,h=d/n,p=lP(e,u,h,a);s.push(p)}return s}function gSt(t,e,i,o){const r=[];for(let n=0;n<e;n++){const a=i*n,s=lP(t,a,i,o);r.push(s)}return r}function lP(t,e,i,o){const r=[];for(let n=0;n<i;n++)if(t instanceof BigInt64Array||t instanceof BigUint64Array)r.push("");else{const a=t[e+n],s=mSt(o,a);s?r.push(s.name):r.push("")}return r}function mSt(t,e){for(const i of t.values)if(i.value===e)return i;return null}const vSt="schemaClassId";function ySt(t,e){const i=t.getExtension(e1);if(i&&i.propertyTables)for(const o of i.propertyTables){const r=o.class,n=i.schema?.classes?.[r];o.properties&&n&&bSt(o,n,t)}}function bSt(t,e,i){for(const o in t.properties){const r=t.properties[o].data;if(r){const n=e.properties[o];if(n){const a=kSt(r,n,i);t.properties[o]=a}}}}function wSt(t,e,i=vSt){let o=t.getExtension(e1);o||(o=t.addExtension(e1)),o.schema=CSt(e,i,o.schema);const r=xSt(e,i,o.schema);return o.propertyTables||(o.propertyTables=[]),o.propertyTables.push(r)-1}function CSt(t,e,i){const o=i??{id:"schema_id"},r={properties:{}};for(const n of t){const a={type:n.elementType,componentType:n.componentType};r.properties[n.name]=a}return o.classes={},o.classes[e]=r,o}function xSt(t,e,i){const o={class:e,count:0};let r=0;const n=i.classes?.[e];for(const a of t){if(r===0&&(r=a.values.length),r!==a.values.length&&a.values.length)throw new Error("Illegal values in attributes");n?.properties[a.name]&&(o.properties||(o.properties={}),o.properties[a.name]={values:0,data:a.values})}return o.count=r,o}function kSt(t,e,i){const o={values:0};if(e.type==="STRING"){const{stringData:r,stringOffsets:n}=BSt(t);o.stringOffsets=cP(n,i),o.values=cP(r,i)}else if(e.type==="SCALAR"&&e.componentType){const r=ESt(t,e.componentType);o.values=cP(r,i)}return o}const MSt={INT8:Int8Array,UINT8:Uint8Array,INT16:Int16Array,UINT16:Uint16Array,INT32:Int32Array,UINT32:Uint32Array,INT64:Int32Array,UINT64:Uint32Array,FLOAT32:Float32Array,FLOAT64:Float64Array};function ESt(t,e){const i=[];for(const r of t)i.push(Number(r));const o=MSt[e];if(!o)throw new Error("Illegal component type");return new o(i)}function BSt(t){const e=new TextEncoder,i=[];let o=0;for(const l of t){const c=e.encode(l);o+=c.length,i.push(c)}const r=new Uint8Array(o),n=[];let a=0;for(const l of i)r.set(l,a),n.push(a),a+=l.length;n.push(a);const s=new Uint32Array(n);return{stringData:r,stringOffsets:s}}function cP(t,e){return e.gltf.buffers.push({arrayBuffer:t.buffer,byteOffset:t.byteOffset,byteLength:t.byteLength}),e.addBufferView(t)}const PSt=Object.freeze(Object.defineProperty({__proto__:null,createExtStructuralMetadata:wSt,decode:tSt,encode:iSt,name:eSt},Symbol.toStringTag,{value:"Module"})),UW="EXT_feature_metadata",ISt=UW;async function SSt(t,e){const i=new mr(t);TSt(i,e)}function TSt(t,e){if(!e.gltf?.loadBuffers)return;const i=t.getExtension(UW);i&&(e.gltf?.loadImages&&DSt(t,i),RSt(t,i))}function DSt(t,e){const i=e.schema;if(!i)return;const o=i.classes,{featureTextures:r}=e;if(o&&r)for(const n in o){const a=o[n],s=_St(r,n);s&&OSt(t,s,a)}}function RSt(t,e){const i=e.schema;if(!i)return;const o=i.classes,r=e.featureTables;if(o&&r)for(const n in o){const a=LSt(r,n);a&&FSt(t,i,a)}}function LSt(t,e){for(const i in t){const o=t[i];if(o.class===e)return o}return null}function _St(t,e){for(const i in t){const o=t[i];if(o.class===e)return o}return null}function FSt(t,e,i){if(!i.class)return;const o=e.classes?.[i.class];if(!o)throw new Error(`Incorrect data in the EXT_structural_metadata extension: no schema class with name ${i.class}`);const r=i.count;for(const n in o.properties){const a=o.properties[n],s=i.properties?.[n];if(s){const l=USt(t,e,a,r,s);s.data=l}}}function OSt(t,e,i){const o=e.class;for(const r in i.properties){const n=e?.properties?.[r];if(n){const a=HSt(t,n,o);n.data=a}}}function USt(t,e,i,o,r){let n=[];const a=r.bufferView,s=t.getTypedArrayForBufferView(a),l=NSt(t,i,r,o),c=jSt(t,i,r,o);return i.type==="STRING"||i.componentType==="STRING"?n=OW(o,s,l,c):VSt(i)&&(n=zSt(i,o,s,l)),n}function NSt(t,e,i,o){return e.type==="ARRAY"&&typeof e.componentCount>"u"&&typeof i.arrayOffsetBufferView<"u"?r7(t,i.arrayOffsetBufferView,i.offsetType||"UINT32",o):null}function jSt(t,e,i,o){return typeof i.stringOffsetBufferView<"u"?r7(t,i.stringOffsetBufferView,i.offsetType||"UINT32",o):null}function VSt(t){const e=["UINT8","INT16","UINT16","INT32","UINT32","INT64","UINT64","FLOAT32","FLOAT64"];return e.includes(t.type)||typeof t.componentType<"u"&&e.includes(t.componentType)}function zSt(t,e,i,o){const r=t.type==="ARRAY",n=t.componentCount,a="SCALAR",s=t.componentType||t.type,l=aP(a,s),c=i.byteLength/l,d=n7(i,a,s,c);return r?o?_W(d,e,o,i.length,l):n?FW(d,e,n):[]:d}function HSt(t,e,i){const o=t.gltf.json;if(!o.meshes)return[];const r=[];for(const n of o.meshes)for(const a of n.primitives)qSt(t,i,e,r,a);return r}function qSt(t,e,i,o,r){const n={channels:i.channels,...i.texture},a=sP(t,n,r);a&&LW(t,e,a,o,r)}const QSt=Object.freeze(Object.defineProperty({__proto__:null,decode:SSt,name:ISt},Symbol.toStringTag,{value:"Module"})),GSt="4.3.3",KSt="4.3.3",a7={TRANSCODER:"basis_transcoder.js",TRANSCODER_WASM:"basis_transcoder.wasm",ENCODER:"basis_encoder.js",ENCODER_WASM:"basis_encoder.wasm"};let NW;async function jW(t){return fBt(t.modules),ABt("basis")||(NW||=JSt(t),await NW)}async function JSt(t){let e=null,i=null;return[e,i]=await Promise.all([await Lu(a7.TRANSCODER,"textures",t),await Lu(a7.TRANSCODER_WASM,"textures",t)]),e=e||globalThis.BASIS,await ZSt(e,i)}function ZSt(t,e){const i={};return e&&(i.wasmBinary=e),new Promise(o=>{t(i).then(r=>{const{BasisFile:n,initializeBasis:a}=r;a(),o({BasisFile:n})})})}let dP;async function VW(t){const e=t.modules||{};return e.basisEncoder?e.basisEncoder:(dP=dP||WSt(t),await dP)}async function WSt(t){let e=null,i=null;return[e,i]=await Promise.all([await Lu(a7.ENCODER,"textures",t),await Lu(a7.ENCODER_WASM,"textures",t)]),e=e||globalThis.BASIS,await YSt(e,i)}function YSt(t,e){const i={};return e&&(i.wasmBinary=e),new Promise(o=>{t(i).then(r=>{const{BasisFile:n,KTX2File:a,initializeBasis:s,BasisEncoder:l}=r;s(),o({BasisFile:n,KTX2File:a,BasisEncoder:l})})})}const t1={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},XSt=["","WEBKIT_","MOZ_"],zW={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 s7=null;function $St(t){if(!s7){t=t||eTt()||void 0,s7=new Set;for(const e of XSt)for(const i in zW)if(t&&t.getExtension(`${e}${i}`)){const o=zW[i];s7.add(o)}}return s7}function eTt(){try{return document.createElement("canvas").getContext("webgl")}catch{return null}}const ea=[171,75,84,88,32,50,48,187,13,10,26,10];function tTt(t){const e=new Uint8Array(t);return!(e.byteLength<ea.length||e[0]!==ea[0]||e[1]!==ea[1]||e[2]!==ea[2]||e[3]!==ea[3]||e[4]!==ea[4]||e[5]!==ea[5]||e[6]!==ea[6]||e[7]!==ea[7]||e[8]!==ea[8]||e[9]!==ea[9]||e[10]!==ea[10]||e[11]!==ea[11])}const iTt={etc1:{basisFormat:0,compressed:!0,format:t1.COMPRESSED_RGB_ETC1_WEBGL},etc2:{basisFormat:1,compressed:!0},bc1:{basisFormat:2,compressed:!0,format:t1.COMPRESSED_RGB_S3TC_DXT1_EXT},bc3:{basisFormat:3,compressed:!0,format:t1.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:t1.COMPRESSED_RGB_PVRTC_4BPPV1_IMG},"pvrtc1-4-rgba":{basisFormat:9,compressed:!0,format:t1.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG},"astc-4x4":{basisFormat:10,compressed:!0,format:t1.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 oTt(t,e){if(e.basis.containerFormat==="auto"){if(tTt(t)){const o=await VW(e);return HW(o.KTX2File,t,e)}const{BasisFile:i}=await jW(e);return uP(i,t,e)}if(e.basis.module==="encoder"){const i=await VW(e);return e.basis.containerFormat==="ktx2"?HW(i.KTX2File,t,e):uP(i.BasisFile,t,e)}else{const{BasisFile:i}=await jW(e);return uP(i,t,e)}}function uP(t,e,i){const o=new t(new Uint8Array(e));try{if(!o.startTranscoding())throw new Error("Failed to start basis transcoding");const r=o.getNumImages(),n=[];for(let a=0;a<r;a++){const s=o.getNumLevels(a),l=[];for(let c=0;c<s;c++)l.push(rTt(o,a,c,i));n.push(l)}return n}finally{o.close(),o.delete()}}function rTt(t,e,i,o){const r=t.getImageWidth(e,i),n=t.getImageHeight(e,i),a=t.getHasAlpha(),{compressed:s,format:l,basisFormat:c}=qW(o,a),d=t.getImageTranscodedSizeInBytes(e,i,c),u=new Uint8Array(d);if(!t.transcodeImage(u,e,i,c,0,0))throw new Error("failed to start Basis transcoding");return{width:r,height:n,data:u,compressed:s,format:l,hasAlpha:a}}function HW(t,e,i){const o=new t(new Uint8Array(e));try{if(!o.startTranscoding())throw new Error("failed to start KTX2 transcoding");const r=o.getLevels(),n=[];for(let a=0;a<r;a++)n.push(nTt(o,a,i));return[n]}finally{o.close(),o.delete()}}function nTt(t,e,i){const{alphaFlag:o,height:r,width:n}=t.getImageLevelInfo(e,0,0),{compressed:a,format:s,basisFormat:l}=qW(i,o),c=t.getImageTranscodedSizeInBytes(e,0,0,l),d=new Uint8Array(c);if(!t.transcodeImage(d,e,0,0,l,0,-1,-1))throw new Error("Failed to transcode KTX2 image");return{width:n,height:r,data:d,compressed:a,levelSize:c,hasAlpha:o,format:s}}function qW(t,e){let i=t&&t.basis&&t.basis.format;return i==="auto"&&(i=QW()),typeof i=="object"&&(i=e?i.alpha:i.noAlpha),i=i.toLowerCase(),iTt[i]}function QW(){const t=$St();return t.has("astc")?"astc-4x4":t.has("dxt")?{alpha:"bc3",noAlpha:"bc1"}:t.has("pvrtc")?{alpha:"pvrtc1-4-rgba",noAlpha:"pvrtc1-4-rgb"}:t.has("etc1")?"etc1":t.has("etc2")?"etc2":"rgb565"}const aTt={dataType:null,batchType:null,name:"Basis",id:"basis",module:"textures",version:KSt,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"}}},sTt={...aTt,parse:oTt},i1=!0,GW=1735152710,hP=12,l7=8,lTt=1313821514,cTt=5130562,dTt=0,uTt=0,hTt=1;function pTt(t,e=0){return`${String.fromCharCode(t.getUint8(e+0))}${String.fromCharCode(t.getUint8(e+1))}${String.fromCharCode(t.getUint8(e+2))}${String.fromCharCode(t.getUint8(e+3))}`}function fTt(t,e=0,i={}){const o=new DataView(t),{magic:r=GW}=i,n=o.getUint32(e,!1);return n===r||n===GW}function ATt(t,e,i=0,o={}){const r=new DataView(e),n=pTt(r,i+0),a=r.getUint32(i+4,i1),s=r.getUint32(i+8,i1);switch(Object.assign(t,{header:{byteOffset:i,byteLength:s,hasBinChunk:!1},type:n,version:a,json:{},binChunks:[]}),i+=hP,t.version){case 1:return gTt(t,r,i);case 2:return mTt(t,r,i,o={});default:throw new Error(`Invalid GLB version ${t.version}. Only supports version 1 and 2.`)}}function gTt(t,e,i){Jl(t.header.byteLength>hP+l7);const o=e.getUint32(i+0,i1),r=e.getUint32(i+4,i1);return i+=l7,Jl(r===dTt),pP(t,e,i,o),i+=o,i+=fP(t,e,i,t.header.byteLength),i}function mTt(t,e,i,o){return Jl(t.header.byteLength>hP+l7),vTt(t,e,i,o),i+t.header.byteLength}function vTt(t,e,i,o){for(;i+8<=t.header.byteLength;){const r=e.getUint32(i+0,i1),n=e.getUint32(i+4,i1);switch(i+=l7,n){case lTt:pP(t,e,i,r);break;case cTt:fP(t,e,i,r);break;case uTt:o.strict||pP(t,e,i,r);break;case hTt:o.strict||fP(t,e,i,r);break}i+=Vv(r,4)}return i}function pP(t,e,i,o){const r=new Uint8Array(e.buffer,i,o),n=new TextDecoder("utf8").decode(r);return t.json=JSON.parse(n),Vv(o,4)}function fP(t,e,i,o){return t.header.hasBinChunk=!0,t.binChunks.push({byteOffset:i,byteLength:o,arrayBuffer:e.buffer}),Vv(o,4)}function KW(t,e){if(t.startsWith("data:")||t.startsWith("http:")||t.startsWith("https:"))return t;const i=e.baseUri||e.uri;if(!i)throw new Error(`'baseUri' must be provided to resolve relative url ${t}`);return i.substr(0,i.lastIndexOf("/")+1)+t}const yTt="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",bTt="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",wTt=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]),CTt=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]),xTt={0:"",1:"meshopt_decodeFilterOct",2:"meshopt_decodeFilterQuat",3:"meshopt_decodeFilterExp",NONE:"",OCTAHEDRAL:"meshopt_decodeFilterOct",QUATERNION:"meshopt_decodeFilterQuat",EXPONENTIAL:"meshopt_decodeFilterExp"},kTt={0:"meshopt_decodeVertexBuffer",1:"meshopt_decodeIndexBuffer",2:"meshopt_decodeIndexSequence",ATTRIBUTES:"meshopt_decodeVertexBuffer",TRIANGLES:"meshopt_decodeIndexBuffer",INDICES:"meshopt_decodeIndexSequence"};async function MTt(t,e,i,o,r,n="NONE"){const a=await ETt();ITt(a,a.exports[kTt[r]],t,e,i,o,a.exports[xTt[n||"NONE"]])}let AP;async function ETt(){return AP||(AP=BTt()),AP}async function BTt(){let t=yTt;WebAssembly.validate(wTt)&&(t=bTt,console.log("Warning: meshopt_decoder is using experimental SIMD support"));const e=await WebAssembly.instantiate(PTt(t),{});return await e.instance.exports.__wasm_call_ctors(),e.instance}function PTt(t){const e=new Uint8Array(t.length);for(let o=0;o<t.length;++o){const r=t.charCodeAt(o);e[o]=r>96?r-71:r>64?r-65:r>47?r+4:r>46?63:62}let i=0;for(let o=0;o<t.length;++o)e[i++]=e[o]<60?CTt[e[o]]:(e[o]-60)*64+e[++o];return e.buffer.slice(0,i)}function ITt(t,e,i,o,r,n,a){const s=t.exports.sbrk,l=o+3&-4,c=s(l*r),d=s(n.length),u=new Uint8Array(t.exports.memory.buffer);u.set(n,d);const h=e(c,o,r,d,n.length);if(h===0&&a&&a(c,l,r),i.set(u.subarray(c,c+o*r)),s(c-s(0)),h!==0)throw new Error(`Malformed buffer data: ${h}`)}const c7="EXT_meshopt_compression",STt=c7;async function TTt(t,e){const i=new mr(t);if(!e?.gltf?.decompressMeshes||!e.gltf?.loadBuffers)return;const o=[];for(const r of t.json.bufferViews||[])o.push(DTt(i,r));await Promise.all(o),i.removeExtension(c7)}async function DTt(t,e){const i=t.getObjectExtension(e,c7);if(i){const{byteOffset:o=0,byteLength:r=0,byteStride:n,count:a,mode:s,filter:l="NONE",buffer:c}=i,d=t.gltf.buffers[c],u=new Uint8Array(d.arrayBuffer,d.byteOffset+o,r),h=new Uint8Array(t.gltf.buffers[e.buffer].arrayBuffer,e.byteOffset,e.byteLength);await MTt(h,a,n,u,s,l),t.removeObjectExtension(e,c7)}}const RTt=Object.freeze(Object.defineProperty({__proto__:null,decode:TTt,name:STt},Symbol.toStringTag,{value:"Module"})),o1="EXT_texture_webp",LTt=o1;function _Tt(t,e){const i=new mr(t);if(!IIt("image/webp")){if(i.getRequiredExtensions().includes(o1))throw new Error(`gltf: Required extension ${o1} not supported by browser`);return}const{json:o}=i;for(const r of o.textures||[]){const n=i.getObjectExtension(r,o1);n&&(r.source=n.source),i.removeObjectExtension(r,o1)}i.removeExtension(o1)}const FTt=Object.freeze(Object.defineProperty({__proto__:null,name:LTt,preprocess:_Tt},Symbol.toStringTag,{value:"Module"})),d7="KHR_texture_basisu",OTt=d7;function UTt(t,e){const i=new mr(t),{json:o}=i;for(const r of o.textures||[]){const n=i.getObjectExtension(r,d7);n&&(r.source=n.source,i.removeObjectExtension(r,d7))}i.removeExtension(d7)}const NTt=Object.freeze(Object.defineProperty({__proto__:null,name:OTt,preprocess:UTt},Symbol.toStringTag,{value:"Module"})),jTt="4.3.3",VTt={dataType:null,batchType:null,name:"Draco",id:"draco",module:"draco",version:jTt,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 zTt(t,e,i){const o=ZW(e.metadata),r=[],n=HTt(e.attributes);for(const a in t){const s=t[a],l=JW(a,s,n[a]);r.push(l)}if(i){const a=JW("indices",i);r.push(a)}return{fields:r,metadata:o}}function HTt(t){const e={};for(const i in t){const o=t[i];e[o.name||"undefined"]=o}return e}function JW(t,e,i){const o=i?ZW(i.metadata):void 0;return JPt(t,e,o)}function ZW(t){Object.entries(t);const e={};for(const i in t)e[`${i}.string`]=JSON.stringify(t[i]);return e}const WW={POSITION:"POSITION",NORMAL:"NORMAL",COLOR:"COLOR_0",TEX_COORD:"TEXCOORD_0"},qTt={1:Int8Array,2:Uint8Array,3:Int16Array,4:Uint16Array,5:Int32Array,6:Uint32Array,9:Float32Array},QTt=4;class GTt{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,i={}){const o=new this.draco.DecoderBuffer;o.Init(new Int8Array(e),e.byteLength),this._disableAttributeTransforms(i);const r=this.decoder.GetEncodedGeometryType(o),n=r===this.draco.TRIANGULAR_MESH?new this.draco.Mesh:new this.draco.PointCloud;try{let a;switch(r){case this.draco.TRIANGULAR_MESH:a=this.decoder.DecodeBufferToMesh(o,n);break;case this.draco.POINT_CLOUD:a=this.decoder.DecodeBufferToPointCloud(o,n);break;default:throw new Error("DRACO: Unknown geometry type.")}if(!a.ok()||!n.ptr){const u=`DRACO decompression failed: ${a.error_msg()}`;throw new Error(u)}const s=this._getDracoLoaderData(n,r,i),l=this._getMeshData(n,s,i),c=KPt(l.attributes),d=zTt(l.attributes,s,l.indices);return{loader:"draco",loaderData:s,header:{vertexCount:n.num_points(),boundingBox:c},...l,schema:d}}finally{this.draco.destroy(o),n&&this.draco.destroy(n)}}_getDracoLoaderData(e,i,o){const r=this._getTopLevelMetadata(e),n=this._getDracoAttributes(e,o);return{geometry_type:i,num_attributes:e.num_attributes(),num_points:e.num_points(),num_faces:e instanceof this.draco.Mesh?e.num_faces():0,metadata:r,attributes:n}}_getDracoAttributes(e,i){const o={};for(let r=0;r<e.num_attributes();r++){const n=this.decoder.GetAttribute(e,r),a=this._getAttributeMetadata(e,r);o[n.unique_id()]={unique_id:n.unique_id(),attribute_type:n.attribute_type(),data_type:n.data_type(),num_components:n.num_components(),byte_offset:n.byte_offset(),byte_stride:n.byte_stride(),normalized:n.normalized(),attribute_index:r,metadata:a};const s=this._getQuantizationTransform(n,i);s&&(o[n.unique_id()].quantization_transform=s);const l=this._getOctahedronTransform(n,i);l&&(o[n.unique_id()].octahedron_transform=l)}return o}_getMeshData(e,i,o){const r=this._getMeshAttributes(i,e,o);if(!r.POSITION)throw new Error("DRACO: No position attribute found.");return e instanceof this.draco.Mesh?o.topology==="triangle-strip"?{topology:"triangle-strip",mode:4,attributes:r,indices:{value:this._getTriangleStripIndices(e),size:1}}:{topology:"triangle-list",mode:5,attributes:r,indices:{value:this._getTriangleListIndices(e),size:1}}:{topology:"point-list",mode:0,attributes:r}}_getMeshAttributes(e,i,o){const r={};for(const n of Object.values(e.attributes)){const a=this._deduceAttributeName(n,o);n.name=a;const s=this._getAttributeValues(i,n);if(s){const{value:l,size:c}=s;r[a]={value:l,size:c,byteOffset:n.byte_offset,byteStride:n.byte_stride,normalized:n.normalized}}}return r}_getTriangleListIndices(e){const i=e.num_faces()*3,o=i*QTt,r=this.draco._malloc(o);try{return this.decoder.GetTrianglesUInt32Array(e,o,r),new Uint32Array(this.draco.HEAPF32.buffer,r,i).slice()}finally{this.draco._free(r)}}_getTriangleStripIndices(e){const i=new this.draco.DracoInt32Array;try{return this.decoder.GetTriangleStripsFromMesh(e,i),ZTt(i)}finally{this.draco.destroy(i)}}_getAttributeValues(e,i){const o=qTt[i.data_type];if(!o)return console.warn(`DRACO: Unsupported attribute type ${i.data_type}`),null;const r=i.num_components,n=e.num_points()*r,a=n*o.BYTES_PER_ELEMENT,s=KTt(this.draco,o);let l;const c=this.draco._malloc(a);try{const d=this.decoder.GetAttribute(e,i.attribute_index);this.decoder.GetAttributeDataArrayForAllPoints(e,d,s,a,c),l=new o(this.draco.HEAPF32.buffer,c,n).slice()}finally{this.draco._free(c)}return{value:l,size:r}}_deduceAttributeName(e,i){const o=e.unique_id;for(const[a,s]of Object.entries(i.extraAttributes||{}))if(s===o)return a;const r=e.attribute_type;for(const a in WW)if(this.draco[a]===r)return WW[a];const n=i.attributeNameEntry||"name";return e.metadata[n]?e.metadata[n].string:`CUSTOM_ATTRIBUTE_${o}`}_getTopLevelMetadata(e){const i=this.decoder.GetMetadata(e);return this._getDracoMetadata(i)}_getAttributeMetadata(e,i){const o=this.decoder.GetAttributeMetadata(e,i);return this._getDracoMetadata(o)}_getDracoMetadata(e){if(!e||!e.ptr)return{};const i={},o=this.metadataQuerier.NumEntries(e);for(let r=0;r<o;r++){const n=this.metadataQuerier.GetEntryName(e,r);i[n]=this._getDracoMetadataField(e,n)}return i}_getDracoMetadataField(e,i){const o=new this.draco.DracoInt32Array;try{this.metadataQuerier.GetIntEntryArray(e,i,o);const r=JTt(o);return{int:this.metadataQuerier.GetIntEntry(e,i),string:this.metadataQuerier.GetStringEntry(e,i),double:this.metadataQuerier.GetDoubleEntry(e,i),intArray:r}}finally{this.draco.destroy(o)}}_disableAttributeTransforms(e){const{quantizedAttributes:i=[],octahedronAttributes:o=[]}=e,r=[...i,...o];for(const n of r)this.decoder.SkipAttributeTransform(this.draco[n])}_getQuantizationTransform(e,i){const{quantizedAttributes:o=[]}=i,r=e.attribute_type();if(o.map(n=>this.decoder[n]).includes(r)){const n=new this.draco.AttributeQuantizationTransform;try{if(n.InitFromAttribute(e))return{quantization_bits:n.quantization_bits(),range:n.range(),min_values:new Float32Array([1,2,3]).map(a=>n.min_value(a))}}finally{this.draco.destroy(n)}}return null}_getOctahedronTransform(e,i){const{octahedronAttributes:o=[]}=i,r=e.attribute_type();if(o.map(n=>this.decoder[n]).includes(r)){const n=new this.draco.AttributeQuantizationTransform;try{if(n.InitFromAttribute(e))return{quantization_bits:n.quantization_bits()}}finally{this.draco.destroy(n)}}return null}}function KTt(t,e){switch(e){case Float32Array:return t.DT_FLOAT32;case Int8Array:return t.DT_INT8;case Int16Array:return t.DT_INT16;case Int32Array:return t.DT_INT32;case Uint8Array:return t.DT_UINT8;case Uint16Array:return t.DT_UINT16;case Uint32Array:return t.DT_UINT32;default:return t.DT_INVALID}}function JTt(t){const e=t.size(),i=new Int32Array(e);for(let o=0;o<e;o++)i[o]=t.GetValue(o);return i}function ZTt(t){const e=t.size(),i=new Int32Array(e);for(let o=0;o<e;o++)i[o]=t.GetValue(o);return i}const WTt="1.5.6",YTt="1.4.1",gP=`https://www.gstatic.com/draco/versioned/decoders/${WTt}`,On={DECODER:"draco_wasm_wrapper.js",DECODER_WASM:"draco_decoder.wasm",FALLBACK_DECODER:"draco_decoder.js",ENCODER:"draco_encoder.js"},mP={[On.DECODER]:`${gP}/${On.DECODER}`,[On.DECODER_WASM]:`${gP}/${On.DECODER_WASM}`,[On.FALLBACK_DECODER]:`${gP}/${On.FALLBACK_DECODER}`,[On.ENCODER]:`https://raw.githubusercontent.com/google/draco/${YTt}/javascript/${On.ENCODER}`};let vP;async function XTt(t){const e=t.modules||{};return e.draco3d?vP||=e.draco3d.createDecoderModule({}).then(i=>({draco:i})):vP||=$Tt(t),await vP}async function $Tt(t){let e,i;return(t.draco&&t.draco.decoderType)==="js"?e=await Lu(mP[On.FALLBACK_DECODER],"draco",t,On.FALLBACK_DECODER):[e,i]=await Promise.all([await Lu(mP[On.DECODER],"draco",t,On.DECODER),await Lu(mP[On.DECODER_WASM],"draco",t,On.DECODER_WASM)]),e=e||globalThis.DracoDecoderModule,await eDt(e,i)}function eDt(t,e){const i={};return e&&(i.wasmBinary=e),new Promise(o=>{t({...i,onModuleLoaded:r=>o({draco:r})})})}const tDt={...VTt,parse:iDt};async function iDt(t,e){const{draco:i}=await XTt(e),o=new GTt(i);try{return o.parseSync(t,e?.draco)}finally{o.destroy()}}function oDt(t){const e={};for(const i in t){const o=t[i];if(i!=="indices"){const r=YW(o);e[i]=r}}return e}function YW(t){const{buffer:e,size:i,count:o}=rDt(t);return{value:e,size:i,byteOffset:0,count:o,type:SW(i),componentType:o7(e)}}function rDt(t){let e=t,i=1,o=0;return t&&t.value&&(e=t.value,i=t.size||1),e&&(ArrayBuffer.isView(e)||(e=nDt(e,Float32Array)),o=e.length/i),{buffer:e,size:i,count:o}}function nDt(t,e,i=!1){return t?Array.isArray(t)?new e(t):i&&!(t instanceof e)?new e(t):t:null}const cd="KHR_draco_mesh_compression",aDt=cd;function sDt(t,e,i){const o=new mr(t);for(const r of XW(o))o.getObjectExtension(r,cd)}async function lDt(t,e,i){if(!e?.gltf?.decompressMeshes)return;const o=new mr(t),r=[];for(const n of XW(o))o.getObjectExtension(n,cd)&&r.push(dDt(o,n,e,i));await Promise.all(r),o.removeExtension(cd)}function cDt(t,e={}){const i=new mr(t);for(const o of i.json.meshes||[])uDt(o),i.addRequiredExtension(cd)}async function dDt(t,e,i,o){const r=t.getObjectExtension(e,cd);if(!r)return;const n=t.getTypedArrayForBufferView(r.bufferView),a=YZ(n.buffer,n.byteOffset),s={...i};delete s["3d-tiles"];const l=await LZ(a,tDt,s,o),c=oDt(l.attributes);for(const[d,u]of Object.entries(c))if(d in e.attributes){const h=e.attributes[d],p=t.getAccessor(h);p?.min&&p?.max&&(u.min=p.min,u.max=p.max)}e.attributes=c,l.indices&&(e.indices=YW(l.indices)),t.removeObjectExtension(e,cd),hDt(e)}function uDt(t,e,i=4,o,r){if(!o.DracoWriter)throw new Error("options.gltf.DracoWriter not provided");const n=o.DracoWriter.encodeSync({attributes:t}),a=r?.parseSync?.({attributes:t}),s=o._addFauxAttributes(a.attributes),l=o.addBufferView(n);return{primitives:[{attributes:s,mode:i,extensions:{[cd]:{bufferView:l,attributes:s}}}]}}function hDt(t){if(!t.attributes&&Object.keys(t.attributes).length>0)throw new Error("glTF: Empty primitive detected: Draco decompression failure?")}function*XW(t){for(const e of t.json.meshes||[])for(const i of e.primitives)yield i}const pDt=Object.freeze(Object.defineProperty({__proto__:null,decode:lDt,encode:cDt,name:aDt,preprocess:sDt},Symbol.toStringTag,{value:"Module"})),fDt={EPSILON:1e-12,debug:!1,precision:4,printTypes:!1,printDegrees:!1,printRowMajor:!0,_cartographicRadians:!1};globalThis.mathgl=globalThis.mathgl||{config:{...fDt}};const xa=globalThis.mathgl.config;function ADt(t,{precision:e=xa.precision}={}){return t=gDt(t),`${parseFloat(t.toPrecision(e))}`}function u7(t){return Array.isArray(t)||ArrayBuffer.isView(t)&&!(t instanceof DataView)}function $W(t,e,i){const o=xa.EPSILON;try{if(t===e)return!0;if(u7(t)&&u7(e)){if(t.length!==e.length)return!1;for(let r=0;r<t.length;++r)if(!$W(t[r],e[r]))return!1;return!0}return t&&t.equals?t.equals(e):e&&e.equals?e.equals(t):typeof t=="number"&&typeof e=="number"?Math.abs(t-e)<=xa.EPSILON*Math.max(1,Math.abs(t),Math.abs(e)):!1}finally{xa.EPSILON=o}}function gDt(t){return Math.round(t/xa.EPSILON)*xa.EPSILON}class eY extends Array{clone(){return new this.constructor().copy(this)}fromArray(e,i=0){for(let o=0;o<this.ELEMENTS;++o)this[o]=e[o+i];return this.check()}toArray(e=[],i=0){for(let o=0;o<this.ELEMENTS;++o)e[i+o]=this[o];return e}toObject(e){return e}from(e){return Array.isArray(e)?this.copy(e):this.fromObject(e)}to(e){return e===this?this:u7(e)?this.toArray(e):this.toObject(e)}toTarget(e){return e?this.to(e):this}toFloat32Array(){return new Float32Array(this)}toString(){return this.formatString(xa)}formatString(e){let i="";for(let o=0;o<this.ELEMENTS;++o)i+=(o>0?", ":"")+ADt(this[o],e);return`${e.printTypes?this.constructor.name:""}[${i}]`}equals(e){if(!e||this.length!==e.length)return!1;for(let i=0;i<this.ELEMENTS;++i)if(!$W(this[i],e[i]))return!1;return!0}exactEquals(e){if(!e||this.length!==e.length)return!1;for(let i=0;i<this.ELEMENTS;++i)if(this[i]!==e[i])return!1;return!0}negate(){for(let e=0;e<this.ELEMENTS;++e)this[e]=-this[e];return this.check()}lerp(e,i,o){if(o===void 0)return this.lerp(this,e,i);for(let r=0;r<this.ELEMENTS;++r){const n=e[r],a=typeof i=="number"?i:i[r];this[r]=n+o*(a-n)}return this.check()}min(e){for(let i=0;i<this.ELEMENTS;++i)this[i]=Math.min(e[i],this[i]);return this.check()}max(e){for(let i=0;i<this.ELEMENTS;++i)this[i]=Math.max(e[i],this[i]);return this.check()}clamp(e,i){for(let o=0;o<this.ELEMENTS;++o)this[o]=Math.min(Math.max(this[o],e[o]),i[o]);return this.check()}add(...e){for(const i of e)for(let o=0;o<this.ELEMENTS;++o)this[o]+=i[o];return this.check()}subtract(...e){for(const i of e)for(let o=0;o<this.ELEMENTS;++o)this[o]-=i[o];return this.check()}scale(e){if(typeof e=="number")for(let i=0;i<this.ELEMENTS;++i)this[i]*=e;else for(let i=0;i<this.ELEMENTS&&i<e.length;++i)this[i]*=e[i];return this.check()}multiplyByScalar(e){for(let i=0;i<this.ELEMENTS;++i)this[i]*=e;return this.check()}check(){if(xa.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 i=0;i<this.ELEMENTS;++i)e=e&&Number.isFinite(this[i]);return e}sub(e){return this.subtract(e)}setScalar(e){for(let i=0;i<this.ELEMENTS;++i)this[i]=e;return this.check()}addScalar(e){for(let i=0;i<this.ELEMENTS;++i)this[i]+=e;return this.check()}subScalar(e){return this.addScalar(-e)}multiplyScalar(e){for(let i=0;i<this.ELEMENTS;++i)this[i]*=e;return this.check()}divideScalar(e){return this.multiplyByScalar(1/e)}clampScalar(e,i){for(let o=0;o<this.ELEMENTS;++o)this[o]=Math.min(Math.max(this[o],e),i);return this.check()}get elements(){return this}}function mDt(t,e){if(t.length!==e)return!1;for(let i=0;i<t.length;++i)if(!Number.isFinite(t[i]))return!1;return!0}function ta(t){if(!Number.isFinite(t))throw new Error(`Invalid number ${JSON.stringify(t)}`);return t}function vDt(t,e,i=""){if(xa.debug&&!mDt(t,e))throw new Error(`math.gl: ${i} some fields set to invalid numbers'`);return t}function tY(t,e){if(!t)throw new Error(`math.gl assertion ${e}`)}class yDt extends eY{get x(){return this[0]}set x(e){this[0]=ta(e)}get y(){return this[1]}set y(e){this[1]=ta(e)}len(){return Math.sqrt(this.lengthSquared())}magnitude(){return this.len()}lengthSquared(){let e=0;for(let i=0;i<this.ELEMENTS;++i)e+=this[i]*this[i];return e}magnitudeSquared(){return this.lengthSquared()}distance(e){return Math.sqrt(this.distanceSquared(e))}distanceSquared(e){let i=0;for(let o=0;o<this.ELEMENTS;++o){const r=this[o]-e[o];i+=r*r}return ta(i)}dot(e){let i=0;for(let o=0;o<this.ELEMENTS;++o)i+=this[o]*e[o];return ta(i)}normalize(){const e=this.magnitude();if(e!==0)for(let i=0;i<this.ELEMENTS;++i)this[i]/=e;return this.check()}multiply(...e){for(const i of e)for(let o=0;o<this.ELEMENTS;++o)this[o]*=i[o];return this.check()}divide(...e){for(const i of e)for(let o=0;o<this.ELEMENTS;++o)this[o]/=i[o];return this.check()}lengthSq(){return this.lengthSquared()}distanceTo(e){return this.distance(e)}distanceToSquared(e){return this.distanceSquared(e)}getComponent(e){return tY(e>=0&&e<this.ELEMENTS,"index is out of range"),ta(this[e])}setComponent(e,i){return tY(e>=0&&e<this.ELEMENTS,"index is out of range"),this[e]=i,this.check()}addVectors(e,i){return this.copy(e).add(i)}subVectors(e,i){return this.copy(e).subtract(i)}multiplyVectors(e,i){return this.copy(e).multiply(i)}addScaledVector(e,i){return this.add(new this.constructor(e).multiplyScalar(i))}}let h7=typeof Float32Array<"u"?Float32Array:Array;function bDt(){const t=new h7(2);return h7!=Float32Array&&(t[0]=0,t[1]=0),t}function wDt(t,e,i){const o=e[0],r=e[1];return t[0]=i[0]*o+i[3]*r+i[6],t[1]=i[1]*o+i[4]*r+i[7],t}(function(){const t=bDt();return function(e,i,o,r,n,a){let s,l;for(i||(i=2),o||(o=0),r?l=Math.min(r*i+o,e.length):l=e.length,s=o;s<l;s+=i)t[0]=e[s],t[1]=e[s+1],n(t,t,a),e[s]=t[0],e[s+1]=t[1];return e}})();function CDt(t,e,i){const o=e[0],r=e[1],n=e[2],a=i[3]*o+i[7]*r+i[11]*n||1;return t[0]=(i[0]*o+i[4]*r+i[8]*n)/a,t[1]=(i[1]*o+i[5]*r+i[9]*n)/a,t[2]=(i[2]*o+i[6]*r+i[10]*n)/a,t}function xDt(t,e,i){const o=e[0],r=e[1];return t[0]=i[0]*o+i[2]*r,t[1]=i[1]*o+i[3]*r,t[2]=e[2],t}function kDt(t,e,i){const o=e[0],r=e[1],n=e[2];return t[0]=i[0]*o+i[3]*r+i[6]*n,t[1]=i[1]*o+i[4]*r+i[7]*n,t[2]=i[2]*o+i[5]*r+i[8]*n,t[3]=e[3],t}function MDt(){const t=new h7(3);return h7!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function EDt(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function BDt(t,e,i){const o=e[0],r=e[1],n=e[2],a=i[0],s=i[1],l=i[2];return t[0]=r*l-n*s,t[1]=n*a-o*l,t[2]=o*s-r*a,t}function PDt(t,e,i){const o=e[0],r=e[1],n=e[2];let a=i[3]*o+i[7]*r+i[11]*n+i[15];return a=a||1,t[0]=(i[0]*o+i[4]*r+i[8]*n+i[12])/a,t[1]=(i[1]*o+i[5]*r+i[9]*n+i[13])/a,t[2]=(i[2]*o+i[6]*r+i[10]*n+i[14])/a,t}function iY(t,e,i){const o=e[0],r=e[1],n=e[2];return t[0]=o*i[0]+r*i[3]+n*i[6],t[1]=o*i[1]+r*i[4]+n*i[7],t[2]=o*i[2]+r*i[5]+n*i[8],t}function IDt(t,e,i){const o=i[0],r=i[1],n=i[2],a=i[3],s=e[0],l=e[1],c=e[2];let d=r*c-n*l,u=n*s-o*c,h=o*l-r*s,p=r*h-n*u,A=n*d-o*h,f=o*u-r*d;const m=a*2;return d*=m,u*=m,h*=m,p*=2,A*=2,f*=2,t[0]=s+d+p,t[1]=l+u+A,t[2]=c+h+f,t}function SDt(t,e,i,o){const r=[],n=[];return r[0]=e[0]-i[0],r[1]=e[1]-i[1],r[2]=e[2]-i[2],n[0]=r[0],n[1]=r[1]*Math.cos(o)-r[2]*Math.sin(o),n[2]=r[1]*Math.sin(o)+r[2]*Math.cos(o),t[0]=n[0]+i[0],t[1]=n[1]+i[1],t[2]=n[2]+i[2],t}function TDt(t,e,i,o){const r=[],n=[];return r[0]=e[0]-i[0],r[1]=e[1]-i[1],r[2]=e[2]-i[2],n[0]=r[2]*Math.sin(o)+r[0]*Math.cos(o),n[1]=r[1],n[2]=r[2]*Math.cos(o)-r[0]*Math.sin(o),t[0]=n[0]+i[0],t[1]=n[1]+i[1],t[2]=n[2]+i[2],t}function DDt(t,e,i,o){const r=[],n=[];return r[0]=e[0]-i[0],r[1]=e[1]-i[1],r[2]=e[2]-i[2],n[0]=r[0]*Math.cos(o)-r[1]*Math.sin(o),n[1]=r[0]*Math.sin(o)+r[1]*Math.cos(o),n[2]=r[2],t[0]=n[0]+i[0],t[1]=n[1]+i[1],t[2]=n[2]+i[2],t}function RDt(t,e){const i=t[0],o=t[1],r=t[2],n=e[0],a=e[1],s=e[2],l=Math.sqrt((i*i+o*o+r*r)*(n*n+a*a+s*s)),c=l&&EDt(t,e)/l;return Math.acos(Math.min(Math.max(c,-1),1))}(function(){const t=MDt();return function(e,i,o,r,n,a){let s,l;for(i||(i=3),o||(o=0),r?l=Math.min(r*i+o,e.length):l=e.length,s=o;s<l;s+=i)t[0]=e[s],t[1]=e[s+1],t[2]=e[s+2],n(t,t,a),e[s]=t[0],e[s+1]=t[1],e[s+2]=t[2];return e}})();const yP=[0,0,0];let p7,LDt=class X1e extends yDt{static get ZERO(){return p7||(p7=new X1e(0,0,0),Object.freeze(p7)),p7}constructor(e=0,i=0,o=0){super(-0,-0,-0),arguments.length===1&&u7(e)?this.copy(e):(xa.debug&&(ta(e),ta(i),ta(o)),this[0]=e,this[1]=i,this[2]=o)}set(e,i,o){return this[0]=e,this[1]=i,this[2]=o,this.check()}copy(e){return this[0]=e[0],this[1]=e[1],this[2]=e[2],this.check()}fromObject(e){return xa.debug&&(ta(e.x),ta(e.y),ta(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]=ta(e)}angle(e){return RDt(this,e)}cross(e){return BDt(this,this,e),this.check()}rotateX({radians:e,origin:i=yP}){return SDt(this,this,i,e),this.check()}rotateY({radians:e,origin:i=yP}){return TDt(this,this,i,e),this.check()}rotateZ({radians:e,origin:i=yP}){return DDt(this,this,i,e),this.check()}transform(e){return this.transformAsPoint(e)}transformAsPoint(e){return PDt(this,this,e),this.check()}transformAsVector(e){return CDt(this,this,e),this.check()}transformByMatrix3(e){return iY(this,this,e),this.check()}transformByMatrix2(e){return xDt(this,this,e),this.check()}transformByQuaternion(e){return IDt(this,this,e),this.check()}};class _Dt extends eY{toString(){let e="[";if(xa.printRowMajor){e+="row-major:";for(let i=0;i<this.RANK;++i)for(let o=0;o<this.RANK;++o)e+=` ${this[o*this.RANK+i]}`}else{e+="column-major:";for(let i=0;i<this.ELEMENTS;++i)e+=` ${this[i]}`}return e+="]",e}getElementIndex(e,i){return i*this.RANK+e}getElement(e,i){return this[i*this.RANK+e]}setElement(e,i,o){return this[i*this.RANK+e]=ta(o),this}getColumn(e,i=new Array(this.RANK).fill(-0)){const o=e*this.RANK;for(let r=0;r<this.RANK;++r)i[r]=this[o+r];return i}setColumn(e,i){const o=e*this.RANK;for(let r=0;r<this.RANK;++r)this[o+r]=i[r];return this}}function FDt(t,e){if(t===e){const i=e[1],o=e[2],r=e[5];t[1]=e[3],t[2]=e[6],t[3]=i,t[5]=e[7],t[6]=o,t[7]=r}else t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8];return t}function ODt(t,e){const i=e[0],o=e[1],r=e[2],n=e[3],a=e[4],s=e[5],l=e[6],c=e[7],d=e[8],u=d*a-s*c,h=-d*n+s*l,p=c*n-a*l;let A=i*u+o*h+r*p;return A?(A=1/A,t[0]=u*A,t[1]=(-d*o+r*c)*A,t[2]=(s*o-r*a)*A,t[3]=h*A,t[4]=(d*i-r*l)*A,t[5]=(-s*i+r*n)*A,t[6]=p*A,t[7]=(-c*i+o*l)*A,t[8]=(a*i-o*n)*A,t):null}function UDt(t){const e=t[0],i=t[1],o=t[2],r=t[3],n=t[4],a=t[5],s=t[6],l=t[7],c=t[8];return e*(c*n-a*l)+i*(-c*r+a*s)+o*(l*r-n*s)}function oY(t,e,i){const o=e[0],r=e[1],n=e[2],a=e[3],s=e[4],l=e[5],c=e[6],d=e[7],u=e[8],h=i[0],p=i[1],A=i[2],f=i[3],m=i[4],g=i[5],y=i[6],v=i[7],b=i[8];return t[0]=h*o+p*a+A*c,t[1]=h*r+p*s+A*d,t[2]=h*n+p*l+A*u,t[3]=f*o+m*a+g*c,t[4]=f*r+m*s+g*d,t[5]=f*n+m*l+g*u,t[6]=y*o+v*a+b*c,t[7]=y*r+v*s+b*d,t[8]=y*n+v*l+b*u,t}function NDt(t,e,i){const o=e[0],r=e[1],n=e[2],a=e[3],s=e[4],l=e[5],c=e[6],d=e[7],u=e[8],h=i[0],p=i[1];return t[0]=o,t[1]=r,t[2]=n,t[3]=a,t[4]=s,t[5]=l,t[6]=h*o+p*a+c,t[7]=h*r+p*s+d,t[8]=h*n+p*l+u,t}function jDt(t,e,i){const o=e[0],r=e[1],n=e[2],a=e[3],s=e[4],l=e[5],c=e[6],d=e[7],u=e[8],h=Math.sin(i),p=Math.cos(i);return t[0]=p*o+h*a,t[1]=p*r+h*s,t[2]=p*n+h*l,t[3]=p*a-h*o,t[4]=p*s-h*r,t[5]=p*l-h*n,t[6]=c,t[7]=d,t[8]=u,t}function rY(t,e,i){const o=i[0],r=i[1];return t[0]=o*e[0],t[1]=o*e[1],t[2]=o*e[2],t[3]=r*e[3],t[4]=r*e[4],t[5]=r*e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t}function VDt(t,e){const i=e[0],o=e[1],r=e[2],n=e[3],a=i+i,s=o+o,l=r+r,c=i*a,d=o*a,u=o*s,h=r*a,p=r*s,A=r*l,f=n*a,m=n*s,g=n*l;return t[0]=1-u-A,t[3]=d-g,t[6]=h+m,t[1]=d+g,t[4]=1-c-A,t[7]=p-f,t[2]=h-m,t[5]=p+f,t[8]=1-c-u,t}var bP;(function(t){t[t.COL0ROW0=0]="COL0ROW0",t[t.COL0ROW1=1]="COL0ROW1",t[t.COL0ROW2=2]="COL0ROW2",t[t.COL1ROW0=3]="COL1ROW0",t[t.COL1ROW1=4]="COL1ROW1",t[t.COL1ROW2=5]="COL1ROW2",t[t.COL2ROW0=6]="COL2ROW0",t[t.COL2ROW1=7]="COL2ROW1",t[t.COL2ROW2=8]="COL2ROW2"})(bP||(bP={}));const zDt=Object.freeze([1,0,0,0,1,0,0,0,1]);let Gv=class extends _Dt{static get IDENTITY(){return qDt()}static get ZERO(){return HDt()}get ELEMENTS(){return 9}get RANK(){return 3}get INDICES(){return bP}constructor(t,...e){super(-0,-0,-0,-0,-0,-0,-0,-0,-0),arguments.length===1&&Array.isArray(t)?this.copy(t):e.length>0?this.copy([t,...e]):this.identity()}copy(t){return this[0]=t[0],this[1]=t[1],this[2]=t[2],this[3]=t[3],this[4]=t[4],this[5]=t[5],this[6]=t[6],this[7]=t[7],this[8]=t[8],this.check()}identity(){return this.copy(zDt)}fromObject(t){return this.check()}fromQuaternion(t){return VDt(this,t),this.check()}set(t,e,i,o,r,n,a,s,l){return this[0]=t,this[1]=e,this[2]=i,this[3]=o,this[4]=r,this[5]=n,this[6]=a,this[7]=s,this[8]=l,this.check()}setRowMajor(t,e,i,o,r,n,a,s,l){return this[0]=t,this[1]=o,this[2]=a,this[3]=e,this[4]=r,this[5]=s,this[6]=i,this[7]=n,this[8]=l,this.check()}determinant(){return UDt(this)}transpose(){return FDt(this,this),this.check()}invert(){return ODt(this,this),this.check()}multiplyLeft(t){return oY(this,t,this),this.check()}multiplyRight(t){return oY(this,this,t),this.check()}rotate(t){return jDt(this,this,t),this.check()}scale(t){return Array.isArray(t)?rY(this,this,t):rY(this,this,[t,t]),this.check()}translate(t){return NDt(this,this,t),this.check()}transform(t,e){let i;switch(t.length){case 2:i=wDt(e||[-0,-0],t,this);break;case 3:i=iY(e||[-0,-0,-0],t,this);break;case 4:i=kDt(e||[-0,-0,-0,-0],t,this);break;default:throw new Error("Illegal vector")}return vDt(i,t.length),i}transformVector(t,e){return this.transform(t,e)}transformVector2(t,e){return this.transform(t,e)}transformVector3(t,e){return this.transform(t,e)}},f7,A7=null;function HDt(){return f7||(f7=new Gv([0,0,0,0,0,0,0,0,0]),Object.freeze(f7)),f7}function qDt(){return A7||(A7=new Gv,Object.freeze(A7)),A7}const g7="KHR_texture_transform",QDt=g7,m7=new LDt,GDt=new Gv,KDt=new Gv;async function JDt(t,e){if(!new mr(t).hasExtension(g7)||!e.gltf?.loadBuffers)return;const i=t.json.materials||[];for(let o=0;o<i.length;o++)ZDt(o,t)}function ZDt(t,e){const i=e.json.materials?.[t],o=[i?.pbrMetallicRoughness?.baseColorTexture,i?.emissiveTexture,i?.normalTexture,i?.occlusionTexture,i?.pbrMetallicRoughness?.metallicRoughnessTexture],r=[];for(const n of o)n&&n?.extensions?.[g7]&&WDt(e,t,n,r)}function WDt(t,e,i,o){const r=YDt(i,o);if(!r)return;const n=t.json.meshes||[];for(const a of n)for(const s of a.primitives){const l=s.material;Number.isFinite(l)&&e===l&&XDt(t,s,r)}}function YDt(t,e){const i=t.extensions?.[g7],{texCoord:o=0}=t,{texCoord:r=o}=i;if(e.findIndex(([n,a])=>n===o&&a===r)===-1){const n=tRt(i);return o!==r&&(t.texCoord=r),e.push([o,r]),{originalTexCoord:o,texCoord:r,matrix:n}}return null}function XDt(t,e,i){const{originalTexCoord:o,texCoord:r,matrix:n}=i,a=e.attributes[`TEXCOORD_${o}`];if(Number.isFinite(a)){const s=t.json.accessors?.[a];if(s&&s.bufferView){const l=t.json.bufferViews?.[s.bufferView];if(l){const{arrayBuffer:c,byteOffset:d}=t.buffers[l.buffer],u=(d||0)+(s.byteOffset||0)+(l.byteOffset||0),{ArrayType:h,length:p}=nP(s,l),A=PW[s.componentType],f=BW[s.type],m=l.byteStride||A*f,g=new Float32Array(p);for(let y=0;y<s.count;y++){const v=new h(c,u+y*m,2);m7.set(v[0],v[1],1),m7.transformByMatrix3(n),g.set([m7[0],m7[1]],y*f)}o===r?$Dt(s,l,t.buffers,g):eRt(r,s,e,t,g)}}}}function $Dt(t,e,i,o){t.componentType=5126,i.push({arrayBuffer:o.buffer,byteOffset:0,byteLength:o.buffer.byteLength}),e.buffer=i.length-1,e.byteLength=o.buffer.byteLength,e.byteOffset=0,delete e.byteStride}function eRt(t,e,i,o,r){o.buffers.push({arrayBuffer:r.buffer,byteOffset:0,byteLength:r.buffer.byteLength});const n=o.json.bufferViews;if(!n)return;n.push({buffer:o.buffers.length-1,byteLength:r.buffer.byteLength,byteOffset:0});const a=o.json.accessors;a&&(a.push({bufferView:n?.length-1,byteOffset:0,componentType:5126,count:e.count,type:"VEC2"}),i.attributes[`TEXCOORD_${t}`]=a.length-1)}function tRt(t){const{offset:e=[0,0],rotation:i=0,scale:o=[1,1]}=t,r=new Gv().set(1,0,0,0,1,0,e[0],e[1],1),n=GDt.set(Math.cos(i),Math.sin(i),0,-Math.sin(i),Math.cos(i),0,0,0,1),a=KDt.set(o[0],0,0,0,o[1],0,0,0,1);return r.multiplyRight(n).multiplyRight(a)}const iRt=Object.freeze(Object.defineProperty({__proto__:null,decode:JDt,name:QDt},Symbol.toStringTag,{value:"Module"})),Fu="KHR_lights_punctual",oRt=Fu;async function rRt(t){const e=new mr(t),{json:i}=e,o=e.getExtension(Fu);o&&(e.json.lights=o.lights,e.removeExtension(Fu));for(const r of i.nodes||[]){const n=e.getObjectExtension(r,Fu);n&&(r.light=n.light),e.removeObjectExtension(r,Fu)}}async function nRt(t){const e=new mr(t),{json:i}=e;if(i.lights){const o=e.addExtension(Fu);$n(!o.lights),o.lights=i.lights,delete i.lights}if(e.json.lights){for(const o of e.json.lights){const r=o.node;e.addObjectExtension(r,Fu,o)}delete e.json.lights}}const aRt=Object.freeze(Object.defineProperty({__proto__:null,decode:rRt,encode:nRt,name:oRt},Symbol.toStringTag,{value:"Module"})),Kv="KHR_materials_unlit",sRt=Kv;async function lRt(t){const e=new mr(t),{json:i}=e;for(const o of i.materials||[])o.extensions&&o.extensions.KHR_materials_unlit&&(o.unlit=!0),e.removeObjectExtension(o,Kv);e.removeExtension(Kv)}function cRt(t){const e=new mr(t),{json:i}=e;if(e.materials)for(const o of i.materials||[])o.unlit&&(delete o.unlit,e.addObjectExtension(o,Kv,{}),e.addExtension(Kv))}const dRt=Object.freeze(Object.defineProperty({__proto__:null,decode:lRt,encode:cRt,name:sRt},Symbol.toStringTag,{value:"Module"})),Jv="KHR_techniques_webgl",uRt=Jv;async function hRt(t){const e=new mr(t),{json:i}=e,o=e.getExtension(Jv);if(o){const r=fRt(o,e);for(const n of i.materials||[]){const a=e.getObjectExtension(n,Jv);a&&(n.technique=Object.assign({},a,r[a.technique]),n.technique.values=ARt(n.technique,e)),e.removeObjectExtension(n,Jv)}e.removeExtension(Jv)}}async function pRt(t,e){}function fRt(t,e){const{programs:i=[],shaders:o=[],techniques:r=[]}=t,n=new TextDecoder;return o.forEach(a=>{if(Number.isFinite(a.bufferView))a.code=n.decode(e.getTypedArrayForBufferView(a.bufferView));else throw new Error("KHR_techniques_webgl: no shader code")}),i.forEach(a=>{a.fragmentShader=o[a.fragmentShader],a.vertexShader=o[a.vertexShader]}),r.forEach(a=>{a.program=i[a.program]}),r}function ARt(t,e){const i=Object.assign({},t.values);return Object.keys(t.uniforms||{}).forEach(o=>{t.uniforms[o].value&&!(o in i)&&(i[o]=t.uniforms[o].value)}),Object.keys(i).forEach(o=>{typeof i[o]=="object"&&i[o].index!==void 0&&(i[o].texture=e.getTexture(i[o].index))}),i}const gRt=Object.freeze(Object.defineProperty({__proto__:null,decode:hRt,encode:pRt,name:uRt},Symbol.toStringTag,{value:"Module"})),nY=[PSt,$It,RTt,FTt,NTt,pDt,aRt,dRt,gRt,iRt,QSt];function mRt(t,e={},i){const o=nY.filter(r=>aY(r.name,e));for(const r of o)r.preprocess?.(t,e,i)}async function vRt(t,e={},i){const o=nY.filter(r=>aY(r.name,e));for(const r of o)await r.decode?.(t,e,i)}function aY(t,e){const i=e?.gltf?.excludeExtensions||{};return!(t in i&&!i[t])}const wP="KHR_binary_glTF";function yRt(t){const e=new mr(t),{json:i}=e;for(const o of i.images||[]){const r=e.getObjectExtension(o,wP);r&&Object.assign(o,r),e.removeObjectExtension(o,wP)}i.buffers&&i.buffers[0]&&delete i.buffers[0].uri,e.removeExtension(wP)}const sY={accessors:"accessor",animations:"animation",buffers:"buffer",bufferViews:"bufferView",images:"image",materials:"material",meshes:"mesh",nodes:"node",samplers:"sampler",scenes:"scene",skins:"skin",textures:"texture"},bRt={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 wRt{idToIndexMap={animations:{},accessors:{},buffers:{},bufferViews:{},images:{},materials:{},meshes:{},nodes:{},samplers:{},scenes:{},skins:{},textures:{}};json;normalize(e,i){this.json=e.json;const o=e.json;switch(o.asset&&o.asset.version){case"2.0":return;case void 0:case"1.0":break;default:console.warn(`glTF: Unknown version ${o.asset.version}`);return}if(!i.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(o),this._convertTopLevelObjectsToArrays(o),yRt(e),this._convertObjectIdsToArrayIndices(o),this._updateObjects(o),this._updateMaterial(o)}_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 i in sY)this._convertTopLevelObjectToArray(e,i)}_convertTopLevelObjectToArray(e,i){const o=e[i];if(!(!o||Array.isArray(o))){e[i]=[];for(const r in o){const n=o[r];n.id=n.id||r;const a=e[i].length;e[i].push(n),this.idToIndexMap[i][r]=a}}}_convertObjectIdsToArrayIndices(e){for(const i in sY)this._convertIdsToIndices(e,i);"scene"in e&&(e.scene=this._convertIdToIndex(e.scene,"scene"));for(const i of e.textures)this._convertTextureIds(i);for(const i of e.meshes)this._convertMeshIds(i);for(const i of e.nodes)this._convertNodeIds(i);for(const i of e.scenes)this._convertSceneIds(i)}_convertTextureIds(e){e.source&&(e.source=this._convertIdToIndex(e.source,"image"))}_convertMeshIds(e){for(const i of e.primitives){const{attributes:o,indices:r,material:n}=i;for(const a in o)o[a]=this._convertIdToIndex(o[a],"accessor");r&&(i.indices=this._convertIdToIndex(r,"accessor")),n&&(i.material=this._convertIdToIndex(n,"material"))}}_convertNodeIds(e){e.children&&(e.children=e.children.map(i=>this._convertIdToIndex(i,"node"))),e.meshes&&(e.meshes=e.meshes.map(i=>this._convertIdToIndex(i,"mesh")))}_convertSceneIds(e){e.nodes&&(e.nodes=e.nodes.map(i=>this._convertIdToIndex(i,"node")))}_convertIdsToIndices(e,i){e[i]||(console.warn(`gltf v1: json doesn't contain attribute ${i}`),e[i]=[]);for(const o of e[i])for(const r in o){const n=o[r],a=this._convertIdToIndex(n,r);o[r]=a}}_convertIdToIndex(e,i){const o=bRt[i];if(o in this.idToIndexMap){const r=this.idToIndexMap[o][e];if(!Number.isFinite(r))throw new Error(`gltf v1: failed to resolve ${i} with id ${e}`);return r}return e}_updateObjects(e){for(const i of this.json.buffers)delete i.type}_updateMaterial(e){for(const i of e.materials){i.pbrMetallicRoughness={baseColorFactor:[1,1,1,1],metallicFactor:1,roughnessFactor:1};const o=i.values?.tex||i.values?.texture2d_0||i.values?.diffuseTex,r=e.textures.findIndex(n=>n.id===o);r!==-1&&(i.pbrMetallicRoughness.baseColorTexture={index:r})}}}function CRt(t,e={}){return new wRt().normalize(t,e)}async function xRt(t,e,i=0,o,r){return kRt(t,e,i,o),CRt(t,{normalize:o?.gltf?.normalize}),mRt(t,o,r),o?.gltf?.loadBuffers&&t.json.buffers&&await MRt(t,o,r),o?.gltf?.loadImages&&await ERt(t,o,r),await vRt(t,o,r),t}function kRt(t,e,i,o){if(o.uri&&(t.baseUri=o.uri),e instanceof ArrayBuffer&&!fTt(e,i,o)&&(e=new TextDecoder().decode(e)),typeof e=="string")t.json=FBt(e);else if(e instanceof ArrayBuffer){const a={};i=ATt(a,e,i,o.glb),$n(a.type==="glTF",`Invalid GLB magic string ${a.type}`),t._glb=a,t.json=a.json}else $n(!1,"GLTF: must be ArrayBuffer or string");const r=t.json.buffers||[];if(t.buffers=new Array(r.length).fill(null),t._glb&&t._glb.header.hasBinChunk){const{binChunks:a}=t._glb;t.buffers[0]={arrayBuffer:a[0].arrayBuffer,byteOffset:a[0].byteOffset,byteLength:a[0].byteLength}}const n=t.json.images||[];t.images=new Array(n.length).fill({})}async function MRt(t,e,i){const o=t.json.buffers||[];for(let r=0;r<o.length;++r){const n=o[r];if(n.uri){const{fetch:a}=i;$n(a);const s=KW(n.uri,e),l=await(await i?.fetch?.(s))?.arrayBuffer?.();t.buffers[r]={arrayBuffer:l,byteOffset:0,byteLength:l.byteLength},delete n.uri}else t.buffers[r]===null&&(t.buffers[r]={arrayBuffer:new ArrayBuffer(n.byteLength),byteOffset:0,byteLength:n.byteLength})}}async function ERt(t,e,i){const o=BRt(t),r=t.json.images||[],n=[];for(const a of o)n.push(PRt(t,r[a],a,e,i));return await Promise.all(n)}function BRt(t){const e=new Set,i=t.json.textures||[];for(const o of i)o.source!==void 0&&e.add(o.source);return Array.from(e).sort()}async function PRt(t,e,i,o,r){let n;if(e.uri&&!e.hasOwnProperty("bufferView")){const s=KW(e.uri,o),{fetch:l}=r;n=await(await l(s)).arrayBuffer(),e.bufferView={data:n}}if(Number.isFinite(e.bufferView)){const s=UIt(t.json,t.buffers,e.bufferView);n=YZ(s.buffer,s.byteOffset,s.byteLength)}$n(n,"glTF image has no data");let a=await LZ(n,[PIt,sTt],{...o,mimeType:e.mimeType,basis:o.basis||{format:QW()}},r);a&&a[0]&&(a={compressed:!0,mipmaps:!1,width:a[0].width,height:a[0].height,data:a[0]}),t.images=t.images||[],t.images[i]=a}const CP={dataType:null,batchType:null,name:"glTF",id:"gltf",module:"gltf",version:GSt,extensions:["gltf","glb"],mimeTypes:["model/gltf+json","model/gltf-binary"],text:!0,binary:!0,tests:["glTF"],parse:IRt,options:{gltf:{normalize:!0,loadBuffers:!0,loadImages:!0,decompressMeshes:!0},log:console}};async function IRt(t,e={},i){e={...CP.options,...e},e.gltf={...CP.options.gltf,...e.gltf};const{byteOffset:o=0}=e;return await xRt({},t,o,e,i)}const SRt={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},TRt={5120:1,5121:1,5122:2,5123:2,5125:4,5126:4},ka={TEXTURE_MAG_FILTER:10240,TEXTURE_MIN_FILTER:10241,TEXTURE_WRAP_S:10242,TEXTURE_WRAP_T:10243,REPEAT:10497,LINEAR:9729,NEAREST_MIPMAP_LINEAR:9986},DRt={magFilter:ka.TEXTURE_MAG_FILTER,minFilter:ka.TEXTURE_MIN_FILTER,wrapS:ka.TEXTURE_WRAP_S,wrapT:ka.TEXTURE_WRAP_T},RRt={[ka.TEXTURE_MAG_FILTER]:ka.LINEAR,[ka.TEXTURE_MIN_FILTER]:ka.NEAREST_MIPMAP_LINEAR,[ka.TEXTURE_WRAP_S]:ka.REPEAT,[ka.TEXTURE_WRAP_T]:ka.REPEAT};function LRt(){return{id:"default-sampler",parameters:RRt}}function _Rt(t){return TRt[t]}function FRt(t){return SRt[t]}class ORt{baseUri="";jsonUnprocessed;json;buffers=[];images=[];postProcess(e,i={}){const{json:o,buffers:r=[],images:n=[]}=e,{baseUri:a=""}=e;return $n(o),this.baseUri=a,this.buffers=r,this.images=n,this.jsonUnprocessed=o,this.json=this._resolveTree(e.json,i),this.json}_resolveTree(e,i={}){const o={...e};return this.json=o,e.bufferViews&&(o.bufferViews=e.bufferViews.map((r,n)=>this._resolveBufferView(r,n))),e.images&&(o.images=e.images.map((r,n)=>this._resolveImage(r,n))),e.samplers&&(o.samplers=e.samplers.map((r,n)=>this._resolveSampler(r,n))),e.textures&&(o.textures=e.textures.map((r,n)=>this._resolveTexture(r,n))),e.accessors&&(o.accessors=e.accessors.map((r,n)=>this._resolveAccessor(r,n))),e.materials&&(o.materials=e.materials.map((r,n)=>this._resolveMaterial(r,n))),e.meshes&&(o.meshes=e.meshes.map((r,n)=>this._resolveMesh(r,n))),e.nodes&&(o.nodes=e.nodes.map((r,n)=>this._resolveNode(r,n)),o.nodes=o.nodes.map((r,n)=>this._resolveNodeChildren(r))),e.skins&&(o.skins=e.skins.map((r,n)=>this._resolveSkin(r,n))),e.scenes&&(o.scenes=e.scenes.map((r,n)=>this._resolveScene(r,n))),typeof this.json.scene=="number"&&o.scenes&&(o.scene=o.scenes[this.json.scene]),o}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,i){if(typeof i=="object")return i;const o=e&&e[i];return o||console.warn(`glTF file error: Could not find ${e}[${i}]`),o}_resolveScene(e,i){return{...e,id:e.id||`scene-${i}`,nodes:(e.nodes||[]).map(o=>this.getNode(o))}}_resolveNode(e,i){const o={...e,id:e?.id||`node-${i}`};return e.mesh!==void 0&&(o.mesh=this.getMesh(e.mesh)),e.camera!==void 0&&(o.camera=this.getCamera(e.camera)),e.skin!==void 0&&(o.skin=this.getSkin(e.skin)),e.meshes!==void 0&&e.meshes.length&&(o.mesh=e.meshes.reduce((r,n)=>{const a=this.getMesh(n);return r.id=a.id,r.primitives=r.primitives.concat(a.primitives),r},{primitives:[]})),o}_resolveNodeChildren(e){return e.children&&(e.children=e.children.map(i=>this.getNode(i))),e}_resolveSkin(e,i){const o=typeof e.inverseBindMatrices=="number"?this.getAccessor(e.inverseBindMatrices):void 0;return{...e,id:e.id||`skin-${i}`,inverseBindMatrices:o}}_resolveMesh(e,i){const o={...e,id:e.id||`mesh-${i}`,primitives:[]};return e.primitives&&(o.primitives=e.primitives.map(r=>{const n={...r,attributes:{},indices:void 0,material:void 0},a=r.attributes;for(const s in a)n.attributes[s]=this.getAccessor(a[s]);return r.indices!==void 0&&(n.indices=this.getAccessor(r.indices)),r.material!==void 0&&(n.material=this.getMaterial(r.material)),n})),o}_resolveMaterial(e,i){const o={...e,id:e.id||`material-${i}`};if(o.normalTexture&&(o.normalTexture={...o.normalTexture},o.normalTexture.texture=this.getTexture(o.normalTexture.index)),o.occlusionTexture&&(o.occlusionTexture={...o.occlusionTexture},o.occlusionTexture.texture=this.getTexture(o.occlusionTexture.index)),o.emissiveTexture&&(o.emissiveTexture={...o.emissiveTexture},o.emissiveTexture.texture=this.getTexture(o.emissiveTexture.index)),o.emissiveFactor||(o.emissiveFactor=o.emissiveTexture?[1,1,1]:[0,0,0]),o.pbrMetallicRoughness){o.pbrMetallicRoughness={...o.pbrMetallicRoughness};const r=o.pbrMetallicRoughness;r.baseColorTexture&&(r.baseColorTexture={...r.baseColorTexture},r.baseColorTexture.texture=this.getTexture(r.baseColorTexture.index)),r.metallicRoughnessTexture&&(r.metallicRoughnessTexture={...r.metallicRoughnessTexture},r.metallicRoughnessTexture.texture=this.getTexture(r.metallicRoughnessTexture.index))}return o}_resolveAccessor(e,i){const o=_Rt(e.componentType),r=FRt(e.type),n=o*r,a={...e,id:e.id||`accessor-${i}`,bytesPerComponent:o,components:r,bytesPerElement:n,value:void 0,bufferView:void 0,sparse:void 0};if(e.bufferView!==void 0&&(a.bufferView=this.getBufferView(e.bufferView)),a.bufferView){const s=a.bufferView.buffer,{ArrayType:l,byteLength:c}=nP(a,a.bufferView),d=(a.bufferView.byteOffset||0)+(a.byteOffset||0)+s.byteOffset;let u=s.arrayBuffer.slice(d,d+c);a.bufferView.byteStride&&(u=this._getValueFromInterleavedBuffer(s,d,a.bufferView.byteStride,a.bytesPerElement,a.count)),a.value=new l(u)}return a}_getValueFromInterleavedBuffer(e,i,o,r,n){const a=new Uint8Array(n*r);for(let s=0;s<n;s++){const l=i+s*o;a.set(new Uint8Array(e.arrayBuffer.slice(l,l+r)),s*r)}return a.buffer}_resolveTexture(e,i){return{...e,id:e.id||`texture-${i}`,sampler:typeof e.sampler=="number"?this.getSampler(e.sampler):LRt(),source:typeof e.source=="number"?this.getImage(e.source):void 0}}_resolveSampler(e,i){const o={id:e.id||`sampler-${i}`,...e,parameters:{}};for(const r in o){const n=this._enumSamplerParameter(r);n!==void 0&&(o.parameters[n]=o[r])}return o}_enumSamplerParameter(e){return DRt[e]}_resolveImage(e,i){const o={...e,id:e.id||`image-${i}`,image:null,bufferView:e.bufferView!==void 0?this.getBufferView(e.bufferView):void 0},r=this.images[i];return r&&(o.image=r),o}_resolveBufferView(e,i){const o=e.buffer,r=this.buffers[o].arrayBuffer;let n=this.buffers[o].byteOffset||0;return e.byteOffset&&(n+=e.byteOffset),{id:`bufferView-${i}`,...e,buffer:this.buffers[o],data:new Uint8Array(r,n,e.byteLength)}}_resolveCamera(e,i){const o={...e,id:e.id||`camera-${i}`};return o.perspective,o.orthographic,o}}function URt(t,e){return new ORt().postProcess(t,e)}class NRt{constructor(e){}load(e,i,o,r,n,a,s){r=r||{},jRt(e,i,o,r,n,function(){no.scheduleTask(function(){n.scene.fire("modelLoaded",n.id),n.fire("loaded",!0,!1)}),a&&a()},function(l){e.error(l),s&&s(l),n.fire("error",l)})}parse(e,i,o,r,n,a,s){r=r||{},xP(e,"",i,o,r,n,function(){n.scene.fire("modelLoaded",n.id),n.fire("loaded",!0,!1),a&&a()},function(l){n.error(l),n.fire("error",l),s&&s(l)})}}function jRt(t,e,i,o,r,n,a){const s=t.viewer.scene.canvas.spinner;s.processes++,e.split(".").pop()==="glb"?t.dataSource.getGLB(e,l=>{o.basePath=lY(e),xP(t,e,l,i,o,r,n,a),s.processes--},l=>{s.processes--,a(l)}):t.dataSource.getGLTF(e,l=>{o.basePath=lY(e),xP(t,e,l,i,o,r,n,a),s.processes--},l=>{s.processes--,a(l)})}function lY(t){const e=t.lastIndexOf("/");return e!==0?t.substring(0,e+1):""}function xP(t,e,i,o,r,n,a,s){const l=t.viewer.scene.canvas.spinner;l.processes++,XB(i,CP,{baseUri:r.basePath}).then(c=>{const d=URt(c),u={entityId:r.entityId,autoMetaModel:r.autoMetaModel,globalizeObjectIds:r.globalizeObjectIds,metaObjects:[],loadBuffer:r.loadBuffer,basePath:r.basePath,handlenode:r.handlenode,backfaces:!!r.backfaces,gltfData:d,scene:n.scene,plugin:t,sceneModel:n,numObjects:0,nextId:0};VRt(u),HRt(u),r.autoMetaModel&&u.metaObjects.push({id:n.id,type:"Default",name:n.id}),GRt(u),n.finalize(),r.autoMetaModel&&t.viewer.metaScene.createMetaModel(n.id,{metaObjects:u.metaObjects}),l.processes--,a()}).catch(c=>{s&&s(c)})}function VRt(t){const e=t.gltfData.textures;if(e)for(let i=0,o=e.length;i<o;i++)zRt(t,e[i])}function zRt(t,e){if(!e.source||!e.source.image)return;const i=`texture-${t.nextId++}`;let o=Pp;switch(e.sampler.minFilter){case 9728:o=Eu;break;case 9729:o=Jr;break;case 9984:o=nv;break;case 9985:o=av;break;case 9986:o=Pp;break;case 9987:o=Ip;break}let r=Jr;switch(e.sampler.magFilter){case 9728:r=Eu;break;case 9729:r=Jr;break}let n=vo;switch(e.sampler.wrapS){case 33071:n=Kr;break;case 33648:n=Nl;break;case 10497:n=vo;break}let a=vo;switch(e.sampler.wrapT){case 33071:a=Kr;break;case 33648:a=Nl;break;case 10497:a=vo;break}let s=vo;switch(e.sampler.wrapR){case 33071:s=Kr;break;case 33648:s=Nl;break;case 10497:s=vo;break}t.sceneModel.createTexture({id:i,image:e.source.image,flipY:!!e.flipY,minFilter:o,magFilter:r,wrapS:n,wrapT:a,wrapR:s,encoding:ao}),e._textureId=i}function HRt(t){const e=t.gltfData.materials;if(e)for(let i=0,o=e.length;i<o;i++){const r=e[i];r._textureSetId=qRt(t,r),r._attributes=QRt(t,r)}}function qRt(t,e){const i={};switch(e.normalTexture&&(i.normalTextureId=e.normalTexture.texture._textureId),e.occlusionTexture&&(i.occlusionTextureId=e.occlusionTexture.texture._textureId),e.emissiveTexture&&(i.emissiveTextureId=e.emissiveTexture.texture._textureId),e.alphaMode){case"OPAQUE":break;case"MASK":const n=e.alphaCutoff;i.alphaCutoff=n!==void 0?n:.5;break}const o=e.pbrMetallicRoughness;if(e.pbrMetallicRoughness){const n=e.pbrMetallicRoughness,a=n.baseColorTexture||n.colorTexture;a&&(a.texture?i.colorTextureId=a.texture._textureId:i.colorTextureId=t.gltfData.textures[a.index]._textureId),o.metallicRoughnessTexture&&(i.metallicRoughnessTextureId=o.metallicRoughnessTexture.texture._textureId)}const r=e.extensions;if(r){const n=r.KHR_materials_pbrSpecularGlossiness;if(n){n.specularTexture;const a=n.specularColorTexture;a!=null&&(i.colorTextureId=t.gltfData.textures[a.index]._textureId)}}return i.normalTextureId!==void 0||i.occlusionTextureId!==void 0||i.emissiveTextureId!==void 0||i.colorTextureId!==void 0||i.metallicRoughnessTextureId!==void 0?(i.id=`textureSet-${t.nextId++};`,t.sceneModel.createTextureSet(i),i.id):null}function QRt(t,e){const i=e.extensions,o={color:new Float32Array([1,1,1,1]),opacity:1,metallic:0,roughness:1,doubleSided:!0};if(i){const n=i.KHR_materials_pbrSpecularGlossiness;if(n){const s=n.diffuseFactor;s!=null&&o.color.set(s)}const a=i.KHR_materials_common;if(a){const s=a.technique,l=a.values||{},c=s==="BLINN",d=s==="PHONG",u=s==="LAMBERT",h=l.diffuse;h&&(c||d||u)&&(mt.isString(h)||o.color.set(h));const p=l.transparency;p!=null&&(o.opacity=p);const A=l.transparent;A!=null&&(o.opacity=A)}}const r=e.pbrMetallicRoughness;if(r){const n=r.baseColorFactor;n&&(o.color[0]=n[0],o.color[1]=n[1],o.color[2]=n[2],o.opacity=n[3]);const a=r.metallicFactor;a!=null&&(o.metallic=a);const s=r.roughnessFactor;s!=null&&(o.roughness=s)}return o.doubleSided=e.doubleSided!==!1,o}function GRt(t){const e=t.gltfData,i=e.scene||e.scenes[0];if(!i){ZRt(t,"glTF has no default scene");return}const o=i.nodes;if(!o)return;(function a(s){s.forEach(l=>{const c=l.mesh;c&&(c.instances||=0,c.instances+=1),l.children&&a(l.children)})})(o);const r=[];let n=null;(function a(s,l,c){s.forEach(d=>{const u=d.name;let h=u!=null&&u||l===0&&"entity-"+t.nextId++;if(h){for(;t.sceneModel.objects[h];)h="entity-"+t.nextId++;r.push(n),n=[]}const p=KRt(d,c);if(d.mesh&&JRt(d,t,p,n),d.children&&a(d.children,l+1,p),h){if(n.length>0){const A=t.globalizeObjectIds?C.globalizeObjectId(t.sceneModel.id,h):h;t.sceneModel.createEntity({id:A,meshIds:n,isObject:!0}),t.autoMetaModel&&t.metaObjects.push({id:A,type:"Default",name:A,parent:t.sceneModel.id})}n=r.pop()}})})(o,0,null)}function KRt(t,e){let i;return t.matrix&&(i=t.matrix,e?e=C.mulMat4(e,i,C.mat4()):e=i),t.translation&&(i=C.translationMat4v(t.translation),e?e=C.mulMat4(e,i,C.mat4()):e=i),t.rotation&&(i=C.quaternionToMat4(t.rotation),e?e=C.mulMat4(e,i,C.mat4()):e=i),t.scale&&(i=C.scalingMat4v(t.scale),e?e=C.mulMat4(e,i,C.mat4()):e=i),e}function JRt(t,e,i,o){const r=t.mesh;if(!r)return;const n=r.primitives.length;if(n>0)for(let a=0;a<n;a++){const s=r.primitives[a];if(s.mode<4)continue;const l={id:e.sceneModel.id+"."+e.numObjects++},c=s.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 d=e.backfaces!==!1||c&&c.doubleSided!==!1;switch(s.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=d?"triangles":"solid";break;case 5:l.primitive=d?"triangles":"solid";break;case 6:l.primitive=d?"triangles":"solid";break;default:l.primitive=d?"triangles":"solid"}const u=s.attributes.POSITION;if(!u)continue;l.localPositions=u.value,l.positions=new Float64Array(l.localPositions.length),s.attributes.NORMAL&&(l.normals=s.attributes.NORMAL.value),s.attributes.TEXCOORD_0&&(l.uv=s.attributes.TEXCOORD_0.value),s.indices&&(l.indices=s.indices.value),i?C.transformPositions3(i,l.localPositions,l.positions):l.positions.set(l.localPositions);const h=C.vec3();Q8(l.positions,l.positions,h)&&(l.origin=h),e.sceneModel.createMesh(l),o.push(l.id)}}function ZRt(t,e){t.plugin.error(e)}const cY={DEFAULT:{}};class kP extends ba{constructor(e,i={}){super("GLTFLoader",e,i),this._sceneModelLoader=new NRt(this,i),this.dataSource=i.dataSource,this.objectDefaults=i.objectDefaults}set dataSource(e){this._dataSource=e||new RZ}get dataSource(){return this._dataSource}set objectDefaults(e){this._objectDefaults=e||cY}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 i=new Pv(this.viewer.scene,mt.apply(e,{isModel:!0,dtxEnabled:e.dtxEnabled})),o=i.id;if(!e.src&&!e.gltf)return this.error("load() param expected: src or gltf"),i;if(e.metaModelSrc||e.metaModelJSON){const r=n=>{this.viewer.metaScene.createMetaModel(o,n,{}),this.viewer.scene.canvas.spinner.processes--,e.src?this._sceneModelLoader.load(this,e.src,n,e,i):this._sceneModelLoader.parse(this,e.gltf,n,e,i)};if(e.metaModelSrc){const n=e.metaModelSrc;this.viewer.scene.canvas.spinner.processes++,this._dataSource.getMetaModel(n,a=>{this.viewer.scene.canvas.spinner.processes--,r(a)},a=>{this.error(`load(): Failed to load model metadata for model '${o} from '${n}' - ${a}`),this.viewer.scene.canvas.spinner.processes--})}else e.metaModelJSON&&r(e.metaModelJSON)}else e.src?this._sceneModelLoader.load(this,e.src,null,e,i):this._sceneModelLoader.parse(this,e.gltf,null,e,i);return i.once("destroyed",()=>{this.viewer.metaScene.destroyMetaModel(o)}),i}destroy(){super.destroy()}}function WRt(t,e,i={}){const o="lightgrey",r=i.hoverColor||"rgba(0,0,0,0.4)",n=i.textColor||"black",a=i.canvasElement||document.body,s=500,l=s+s/3,c=l/24,d=[{boundary:[6,6,6,6],color:i.frontColor||i.color||"#55FF55"},{boundary:[18,6,6,6],color:i.backColor||i.color||"#55FF55"},{boundary:[12,6,6,6],color:i.rightColor||i.color||"#FF5555"},{boundary:[0,6,6,6],color:i.leftColor||i.color||"#FF5555"},{boundary:[6,0,6,6],color:i.topColor||i.color||"#7777FF"},{boundary:[6,12,6,6],color:i.bottomColor||i.color||"#7777FF"}],u=[{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]}];i.frontColor||i.color,i.backColor||i.color,i.rightColor||i.color,i.leftColor||i.color,i.topColor||i.color,i.bottomColor||i.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 y=0,v=u.length;y<v;y++)C.normalizeVec3(u[y].dir,u[y].dir),C.normalizeVec3(u[y].up,u[y].up);for(let y=0,v=h.length;y<v;y++)C.normalizeVec3(h[y].dir,h[y].dir),C.normalizeVec3(h[y].up,h[y].up);var p=h;this._textureCanvas=document.createElement("canvas"),this._textureCanvas.width=l,this._textureCanvas.height=s,this._textureCanvas.style.width=l+"px",this._textureCanvas.style.height=s+"px",this._textureCanvas.style.padding="0",this._textureCanvas.style.margin="0",this._textureCanvas.style.top="0",this._textureCanvas.style.background=o,this._textureCanvas.style.position="absolute",this._textureCanvas.style.opacity="1.0",this._textureCanvas.style.visibility="hidden",this._textureCanvas.style["z-index"]=2e6,a.appendChild(this._textureCanvas);const A=this._textureCanvas.getContext("2d");let f=!1;function m(){for(let k=0,E=d.length;k<E;k++){const B=d[k],P=B.boundary,D=Math.round(P[0]*c),T=Math.round(P[1]*c),R=Math.round(P[2]*c),F=Math.round(P[3]*c);A.fillStyle=B.color,A.fillRect(D,T,R,F)}for(let k=0,E=p.length;k<E;k++){let B,P,D,T;const R=p[k],F=R.boundaries;for(var y=0,v=F.length;y<v;y++){const N=F[y];B=Math.round(N[0]*c),P=Math.round(N[1]*c),D=Math.round(N[2]*c),T=Math.round(N[3]*c),R.highlighted&&(A.fillStyle=R.highlighted?r:R.color||o,A.fillRect(B,P,D,T))}if(R.label){A.fillStyle=n,A.font="60px sans-serif",A.textAlign="center";var b=B+D*.5,x=P+T*.7;A.fillText(g(R.label),b,x,80)}}e.glRedraw()}const g=(function(){const 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"},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"},b={"NavCube.front":"FRONT","NavCube.back":"BACK","NavCube.right":"RIGHT","NavCube.left":"LEFT","NavCube.top":"TOP","NavCube.bottom":"BOTTOM"};return function(x){const k=f?v:y,E=k?k[x]:null;return E?t.localeService.translate(E)||b[E]||E:x}})();this.setZUp=function(){f=!0,p=u,this.clear()},this.setYUp=function(){f=!1,p=h,this.clear()},this.clear=function(){A.fillStyle=o,A.fillRect(0,0,l,s);for(var y=0,v=p.length;y<v;y++){const b=p[y];b.highlighted=!1}m()},this.getArea=function(y){const v=y[0]*l,b=s-y[1]*s;for(var x=0,k=p.length;x<k;x++){const P=p[x].boundaries;for(var E=0,B=P.length;E<B;E++){const D=P[E];if(v>=D[0]*c&&v<=(D[0]+D[2])*c&&b>=D[1]*c&&b<=(D[1]+D[3])*c)return x}}return-1},this.setAreaHighlighted=function(y,v){var b=p[y];if(!b)throw"Area not found: "+y;b.highlighted=!!v,m()},this.getAreaDir=function(y){var v=p[y];if(!v)throw"Unknown area: "+y;return v.dir},this.getAreaUp=function(y){var v=p[y];if(!v)throw"Unknown area: "+y;return v.up},this.getImage=function(){return this._textureCanvas},this.destroy=function(){this._textureCanvas&&(this._textureCanvas.parentNode.removeChild(this._textureCanvas),this._textureCanvas=null)}}const dY=C.vec3(),uY=C.vec3();C.mat4();class MP extends ba{constructor(e,i={}){super("NavCube",e,i),e.navCube=this;try{this._navCubeScene=new Ty(e,{canvasId:i.canvasId,canvasElement:i.canvasElement,transparent:!0}),this._navCubeCanvas=this._navCubeScene.canvas.canvas,this._navCubeScene.input.keyboardEnabled=!1}catch(g){this.error(g);return}const o=this._navCubeScene;o.clearLights(),new Xa(o,{dir:[.4,-.4,.8],color:[.8,1,1],intensity:1,space:"view"}),new Xa(o,{dir:[-.8,-.3,-.4],color:[.8,.8,.8],intensity:1,space:"view"}),new Xa(o,{dir:[.8,-.6,-.8],color:[1,1,1],intensity:1,space:"view"}),this._navCubeCamera=o.camera,this._navCubeCamera.ortho.scale=7,this._navCubeCamera.ortho.near=.1,this._navCubeCamera.ortho.far=2e3,o.edgeMaterial.edgeColor=[.2,.2,.2],o.edgeMaterial.edgeAlpha=.6,this._zUp=!!e.camera.zUp;var r=this;this.setIsProjectNorth(i.isProjectNorth),this.setProjectNorthOffsetAngle(i.projectNorthOffsetAngle);const n=(function(){const g=C.mat4();return function(y,v,b){return C.identityMat4(g),C.rotationMat4v(y*r._projectNorthOffsetAngle*C.DEGTORAD,[0,1,0],g),C.transformVec3(g,v,b)}})();this._synchCamera=(function(){var g=C.rotationMat4c(-90*C.DEGTORAD,1,0,0),y=C.vec3(),v=C.vec3(),b=C.vec3();return function(){var x=e.camera.eye,k=e.camera.look,E=e.camera.up;y=C.mulVec3Scalar(C.normalizeVec3(C.subVec3(x,k,y)),5),r._isProjectNorth&&r._projectNorthOffsetAngle&&(y=n(-1,y,dY),E=n(-1,E,uY)),r._zUp?(C.transformVec3(g,y,v),C.transformVec3(g,E,b),r._navCubeCamera.look=[0,0,0],r._navCubeCamera.eye=C.transformVec3(g,y,v),r._navCubeCamera.up=C.transformPoint3(g,E,b)):(r._navCubeCamera.look=[0,0,0],r._navCubeCamera.eye=y,r._navCubeCamera.up=E)}})(),this._cubeTextureCanvas=new WRt(e,o,i),this._cubeSampler=new Sp(o,{image:this._cubeTextureCanvas.getImage(),flipY:!0,wrapS:Kr,wrapT:Kr}),this._cubeMesh=new Ai(o,{geometry:new uo(o,{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 ho(o,{diffuse:[.4,.4,.4],specular:[.4,.4,.4],emissive:[.6,.6,.6],diffuseMap:this._cubeSampler,emissiveMap:this._cubeSampler}),visible:!0,edges:!0}),this._shadow=i.shadowVisible===!1?null:new Ai(o,{geometry:new uo(o,Mp({center:[0,0,0],radiusTop:.001,radiusBottom:1.4,height:.01,radialSegments:20,heightSegments:1,openEnded:!0})),material:new ho(o,{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",g=>{this._synchProjection&&(this._navCubeCamera.perspective.fov=g)}),this._onCameraProjection=e.camera.on("projection",g=>{this._synchProjection&&(this._navCubeCamera.projection=g==="ortho"||g==="perspective"?g:"perspective")});var a=-1;function s(g,y){var v=(g-A)*-p,b=(y-f)*-p;e.camera.orbitYaw(v),e.camera.orbitPitch(-b),A=g,f=y}function l(g){const{left:y,top:v}=r._navCubeCanvas.getBoundingClientRect();return[g.clientX-y,g.clientY-v]}{var c=null,d=null,u=!1,h=!1,p=.5,A,f;r._navCubeCanvas.addEventListener("mouseenter",r._onMouseEnter=function(g){h=!0}),r._navCubeCanvas.addEventListener("mouseleave",r._onMouseLeave=function(g){h=!1}),r._navCubeCanvas.addEventListener("mousedown",r._onMouseDown=function(g){if(g.which===1){c=g.x,d=g.y,A=g.clientX,f=g.clientY;var y=l({clientX:g.clientX,clientY:g.clientY}),v=o.pick({canvasPos:y});v?u=!0:u=!1}}),r._navCubeCanvas.addEventListener("mouseup",r._onMouseUp=function(g){if(g.which===1&&(u=!1,c!==null)){var y=l({clientX:g.clientX,clientY:g.clientY}),v=o.pick({canvasPos:y,pickSurface:!0});if(v&&v.uv){var b=r._cubeTextureCanvas.getArea(v.uv);if(b>=0&&(r._navCubeCanvas.style.cursor="pointer",a>=0&&(r._cubeTextureCanvas.setAreaHighlighted(a,!1),r._repaint(),a=-1),b>=0)){if(r._cubeTextureCanvas.setAreaHighlighted(b,!0),a=b,r._repaint(),g.x<c-3||g.x>c+3||g.y<d-3||g.y>d+3)return;var x=r._cubeTextureCanvas.getAreaDir(b);if(x){var k=r._cubeTextureCanvas.getAreaUp(b);r._isProjectNorth&&r._projectNorthOffsetAngle&&(x=n(1,x,dY),k=n(1,k,uY)),m(x,k,function(){a>=0&&(r._cubeTextureCanvas.setAreaHighlighted(a,!1),r._repaint(),a=-1),r._navCubeCanvas.style.cursor="pointer",a>=0&&(r._cubeTextureCanvas.setAreaHighlighted(a,!1),r._repaint(),a=-1),b>=0&&(r._cubeTextureCanvas.setAreaHighlighted(b,!1),a=-1,r._repaint())})}}}}}),r._navCubeCanvas.addEventListener("mousemove",r._onMouseMove=function(g){if(a>=0&&(r._cubeTextureCanvas.setAreaHighlighted(a,!1),r._repaint(),a=-1),!(g.buttons===1&&!u)){if(u){var y=g.clientX,v=g.clientY;r._navCubeCanvas.style.cursor="move",s(y,v);return}if(h){var b=l({clientX:g.clientX,clientY:g.clientY}),x=o.pick({canvasPos:b,pickSurface:!0});if(x){if(x.uv){r._navCubeCanvas.style.cursor="pointer";var k=r._cubeTextureCanvas.getArea(x.uv);if(k===a)return;a>=0&&r._cubeTextureCanvas.setAreaHighlighted(a,!1),k>=0&&(r._cubeTextureCanvas.setAreaHighlighted(k,!0),r._repaint(),a=k)}}else r._navCubeCanvas.style.cursor="default",a>=0&&(r._cubeTextureCanvas.setAreaHighlighted(a,!1),r._repaint(),a=-1)}}}),r._navCubeCanvas.addEventListener("touchstart",r._onTouchStart=function(g){if(g.touches.length>0){c=g.touches[0].clientX,d=g.touches[0].clientY,A=g.touches[0].clientX,f=g.touches[0].clientY;var y=l({clientX:g.touches[0].clientX,clientY:g.touches[0].clientY}),v=o.pick({canvasPos:y});v?u=!0:u=!1}},{passive:!1}),r._navCubeCanvas.addEventListener("touchmove",r._onTouchMove=function(g){g.preventDefault();var y=g.touches[0],v=y.clientX,b=y.clientY,x=document.elementFromPoint(v,b);if(h=r._navCubeCanvas===x,!!h&&u){s(v,b);return}},{passive:!1}),r._navCubeCanvas.addEventListener("touchend",r._onTouchEnd=function(g){u=!1});var m=(function(){var g=C.vec3();return function(y,v,b){var x=r._fitVisible?e.scene.getAABB(e.scene.visibleObjectIds):e.scene.aabb,k=C.getAABB3Diag(x);C.getAABB3Center(x,g);var E=Math.abs(k/Math.tan(r._cameraFitFOV*C.DEGTORAD));e.cameraControl.pivotPos=g,r._cameraFly?e.cameraFlight.flyTo({look:g,eye:[g[0]-E*y[0],g[1]-E*y[1],g[2]-E*y[2]],up:v||[0,1,0],orthoScale:k*1.1,fitFOV:r._cameraFitFOV,duration:r._cameraFlyDuration},b):e.cameraFlight.jumpTo({look:g,eye:[g[0]-E*y[0],g[1]-E*y[1],g[2]-E*y[2]],up:v||[0,1,0],orthoScale:k*1.1,fitFOV:r._cameraFitFOV},b)}})()}this._onUpdated=e.localeService.on("updated",()=>{this._cubeTextureCanvas.clear(),this._repaint()}),this.setVisible(i.visible),this.setCameraFitFOV(i.cameraFitFOV),this.setCameraFly(i.cameraFly),this.setCameraFlyDuration(i.cameraFlyDuration),this.setFitVisible(i.fitVisible),this.setSynchProjection(i.synchProjection)}send(e,i){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 YRt{constructor(e){const i=e.cameraControl,o=e.scene,r=o.canvas.canvas,n=!1,a=1,s=.09,l=.01,c=new rv(o,{position:[0,0,0],scale:[5,5,5],isObject:!1}),d=C.vec3();this._setPosition=(function(){const x=C.vec3(),k=C.vec3();return function(E){d.set(E),Mu(E,x,k),c.origin=x,c.position=k}})(),this._setQuaternion=x=>{c.quaternion=x};const u=(x,k)=>new uo(c,Mp({radiusTop:.001,radiusBottom:x,radialSegments:32,heightSegments:1,height:k,openEnded:!1})),h=(x,k,E)=>new uo(c,Mp({radiusTop:x,radiusBottom:x,radialSegments:E,heightSegments:1,height:k,openEnded:!1})),p=(x,k,E)=>new uo(c,oE({radius:a-.2,tube:x,radialSegments:64,tubeSegments:E,arc:Math.PI*2*k})),A={curve:p(l,.25,14),curveHandle:p(s,.25,14),hoop:p(l,1,8),arrowHead:u(.07,.2),arrowHeadBig:u(.09,.25),arrowHeadHandle:h(s,.37,8),axis:h(l,a,20),axisHandle:h(s,a,20)},f=x=>new ho(c,{diffuse:x,emissive:x,ambient:[0,0,0],specular:[.6,.6,.3],shininess:80,lineWidth:2}),m=(x,k)=>new Hl(c,{edges:!1,fill:!0,fillColor:x,fillAlpha:k}),g=new ho(c,{diffuse:[1,1,0],alpha:0,alphaMode:"blend"}),y={},v=(x,k)=>{C.mulVec3Scalar(x,-1,C.vec3());const E=f(x),B=C.quaternionToRotationMat4(k,C.identityMat4());C.mulMat4(C.rotationMat4v(Math.PI,[0,1,0],C.mat4()),B,B);const P=C.scaleMat4v([.6,.6,.6],C.identityMat4()),D=(ee,ae)=>{const Me=C.translateMat4v(ee,C.identityMat4()),pe=C.identityMat4();return C.mulMat4(Me,ae,pe),C.mulMat4(B,pe,pe),C.mulMat4(pe,P,C.identityMat4())},T=c.addChild(new Ai(c,{geometry:A.curve,material:E,matrix:B,pickable:!1,collidable:!0,clippable:!1,backfaces:!0,visible:!1,isUI:!0,isObject:!1}),n),R=c.addChild(new Ai(c,{geometry:A.curveHandle,material:g,matrix:B,pickable:!0,collidable:!0,clippable:!1,backfaces:!0,visible:!1,isUI:!0,isObject:!1}),n),F=c.addChild(new Ai(c,{geometry:A.arrowHead,material:E,matrix:D([.8,.07,0],C.rotationMat4v(180*C.DEGTORAD,[0,0,1],C.identityMat4())),pickable:!0,collidable:!0,clippable:!1,visible:!1,isUI:!0,isObject:!1}),n),N=c.addChild(new Ai(c,{geometry:A.arrowHead,material:E,matrix:D([.07,.8,0],C.rotationMat4v(90*C.DEGTORAD,[0,0,1],C.identityMat4())),pickable:!0,collidable:!0,clippable:!1,visible:!1,isUI:!0,isObject:!1}),n),q=c.addChild(new Ai(c,{geometry:A.hoop,material:E,highlighted:!0,highlightMaterial:m(x,.6),matrix:B,pickable:!1,collidable:!0,clippable:!1,visible:!1,isUI:!0,isObject:!1}),n),V=C.quaternionToRotationMat4(C.vec3PairToQuaternion([0,1,0],x),C.identityMat4());C.mulMat4(C.rotationMat4v(Math.PI,[0,1,0],C.mat4()),V,V);const W=ee=>C.mulMat4(V,C.translateMat4c(0,ee,0,C.identityMat4()),C.identityMat4()),Y=W(a+.1),$=W(a/2),me=c.addChild(new Ai(c,{geometry:A.arrowHead,material:E,matrix:Y,pickable:!1,collidable:!0,clippable:!1,visible:!1,isUI:!0,isObject:!1}),n),Ie=c.addChild(new Ai(c,{geometry:A.arrowHeadHandle,material:g,matrix:Y,pickable:!0,collidable:!0,clippable:!1,visible:!1,isUI:!0,isObject:!1}),n),Se=c.addChild(new Ai(c,{geometry:A.axis,material:E,matrix:$,pickable:!1,collidable:!0,clippable:!1,visible:!1,isUI:!0,isObject:!1}),n),qe=c.addChild(new Ai(c,{geometry:A.axisHandle,material:g,matrix:$,pickable:!0,collidable:!0,clippable:!1,visible:!1,isUI:!0,isObject:!1}),n),Qe=c.addChild(new Ai(c,{geometry:A.arrowHeadBig,material:E,matrix:Y,pickable:!1,collidable:!0,clippable:!1,visible:!1,isUI:!0,isObject:!1}),n),Ce=(ee,ae)=>C.vec3ApplyQuaternion(c.quaternion,ee,ae),Le=(function(){const ee=C.vec3(),ae=C.vec3(),Me=C.vec3();return(pe,Q)=>{Ce(x,ee);const Z=d,ie=ee;C.canvasPosToWorldRay(r,o.camera.viewMatrix,o.camera.projMatrix,o.camera.projection,pe,ae,Me);const re=C.dotVec3(ie,Me),ne=C.subVec3(ae,Z,Q),G=C.dotVec3(ne,ie),J=C.dotVec3(ne,Me),ue=1-re*re;if(Math.abs(ue)>1e-10){const xe=(G-re*J)/ue;return C.addVec3(Z,C.mulVec3Scalar(ie,xe,Q),Q),!0}else return!1}})(),Fe=C.vec3(),ve=C.vec3();y[Ie.id]=y[qe.id]={setActivated:ee=>Qe.visible=ee,initDragAction:ee=>Le(ee,Fe)&&C.subVec3(Fe,d,Fe)&&(ae=>{Le(ae,ve)&&(C.subVec3(ve,Fe,ve),this._setPosition(ve),this._handlers&&this._handlers.onPosition(ve))})},y[R.id]={setActivated:ee=>q.visible=ee,initDragAction:ee=>{const ae=(function(){const pe=o.camera.projectWorldPos(d);Ce(x,ve),C.transformVec3(o.camera.normalMatrix,ve,ve);const Q=Math.sign(ve[2]);return Z=>{const ie=Z[0]-pe[0],re=Z[1]-pe[1];return Q*Math.atan2(-re,ie)}})();let Me=ae(ee);return pe=>{const Q=ae(pe);c.rotate(x,(Q-Me)*180/Math.PI),this._handlers&&this._handlers.onQuaternion(c.quaternion),Me=Q}}};let ge=!1,we=!1,Re=!1;const We=()=>{const ee=Re&&ge;Ie.visible=qe.visible=me.visible=Se.visible=!!ee,ee||(Qe.visible=!1)},H=()=>{const ee=Re&&we;R.visible=T.visible=F.visible=N.visible=!!ee,ee||(q.visible=!1)};return{setPositionActive:ee=>{ge=ee,We()},setRotationActive:ee=>{we=ee,H()},set visible(ee){Re=ee,We(),H()}}};this._displayMeshes={center:c.addChild(new Ai(c,{geometry:new uo(c,Ep({radius:.05})),material:new ho(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}),n),x:v([1,0,0],C.vec3PairToQuaternion([1,0,0],[0,0,1])),y:v([0,1,0],C.eulerToQuaternion([90,0,0],"XYZ")),z:v([0,0,1],C.identityQuaternion())};const b=[];{let x=-1;const k=B=>{c.scale[0]!==B&&(c.scale=[B,B,B],this._handlers&&this._handlers.onScreenScale&&this._handlers.onScreenScale(c.scale))},E=o.on("tick",()=>{const B=o.camera,P=Math.abs(C.distVec3(B.eye,d));B.projection==="perspective"?P!==x&&k(.07*P*Math.tan(B.perspective.fov*C.DEGTORAD)):B.projection==="ortho"&&k(B.ortho.scale/10),x=P});b.push(()=>o.off(E))}{let x=null,k=null;b.push(()=>{k&&k.cleanup()});const E=C.vec2(),B=(F,N)=>{N[0]=F.pageX,N[1]=F.pageY,Hs(r.ownerDocument.documentElement,r,N)},P=F=>{B(F,E);const N=o.pick({canvasPos:E}),q=N&&N.entity,V=q&&q.id;return V in y&&y[V]},D=(F,N)=>{const q=P(N(F));if(q){k&&k.cleanup();const V=q.initDragAction(E);return V&&(i.pointerEnabled=!1,q.setActivated(!0),k={onChange:W=>{const Y=N(W);Y&&(B(Y,E),V(E))},cleanup:function(){k=null,i.pointerEnabled=!0,q.setActivated(!1)}}),!!V}else return!1},T=(F,N)=>{r.addEventListener(F,N),b.push(()=>r.removeEventListener(F,N))},R=F=>{F.preventDefault(),F.stopPropagation(),F.stopImmediatePropagation()};T("mousedown",F=>{F.which===1&&D(F,N=>N.which===1&&N)&&R(F)}),T("mousemove",F=>{if(k)k.onChange(F),R(F);else{x&&x();const N=P(F);N?(N.setActivated(!0),x=()=>N.setActivated(!1)):x=null}}),T("mouseup",F=>{k&&(k.onChange(F),k.cleanup())}),T("touchstart",F=>{if(F.preventDefault(),F.touches.length===1){const N=F.touches[0].identifier;D(F,q=>[...q.changedTouches].find(V=>V.identifier===N))&&R(F)}}),T("touchmove",F=>{k&&(k.onChange(F),R(F))}),T("touchend",F=>{k&&(k.onChange(F),k.cleanup())})}this.__destroy=()=>{b.forEach(x=>x()),c.destroy();for(let x in y)delete y[x]}}destroy(){this.__destroy()}setHandlers(e){Object.values(this._displayMeshes).forEach(i=>i.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 XRt=class{constructor(t,e,i){this.id=i.id,this._sectionPlane=i,this._mesh=new Ai(e,{id:i.id,geometry:new uo(e,eE({xSize:.5,ySize:.5,zSize:.001})),material:new ho(e,{emissive:[1,1,1],diffuse:[0,0,0],backfaces:!1}),edgeMaterial:new TE(e,{edgeColor:[0,0,0],edgeAlpha:1,edgeWidth:1}),highlightMaterial:new Hl(e,{fill:!0,fillColor:[.5,1,.5],fillAlpha:.7,edges:!0,edgeColor:[0,0,0],edgeAlpha:1,edgeWidth:1}),selectedMaterial:new Hl(e,{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=C.vec3([0,0,0]),r=C.vec3(),n=C.vec3([0,0,1]),a=C.vec4(4),s=C.vec3(),l=()=>{const c=this._sectionPlane.scene.center,d=[-this._sectionPlane.dir[0],-this._sectionPlane.dir[1],-this._sectionPlane.dir[2]];C.subVec3(c,this._sectionPlane.pos,o);const u=-C.dotVec3(d,o);C.normalizeVec3(d),C.mulVec3Scalar(d,u,r);const h=C.vec3PairToQuaternion(n,this._sectionPlane.dir,a);s[0]=r[0]*.1,s[1]=r[1]*.1,s[2]=r[2]*.1,this._mesh.quaternion=h,this._mesh.position=s};this._onSectionPlanePos=this._sectionPlane.on("pos",l),this._onSectionPlaneDir=this._sectionPlane.on("dir",l)}this._highlighted=!1,this._selected=!1}setHighlighted(t){this._highlighted=!!t,this._mesh.highlighted=this._highlighted,this._mesh.highlightMaterial.fillColor=t?[0,.7,0]:[0,0,0]}getHighlighted(){return this._highlighted}setSelected(t){this._selected=!!t,this._mesh.edgeMaterial.edgeWidth=t?3:1,this._mesh.highlightMaterial.edgeWidth=t?3:1}getSelected(){return this._selected}destroy(){this._sectionPlane.off(this._onSectionPlanePos),this._sectionPlane.off(this._onSectionPlaneDir),this._mesh.destroy()}};class $Rt{constructor(e,i){if(!i.onHoverEnterPlane||!i.onHoverLeavePlane||!i.onClickedNothing||!i.onClickedPlane)throw"Missing config(s): onHoverEnterPlane, onHoverLeavePlane, onClickedNothing || onClickedPlane";this.plugin=e,this._viewer=e.viewer,this._onHoverEnterPlane=i.onHoverEnterPlane,this._onHoverLeavePlane=i.onHoverLeavePlane,this._onClickedNothing=i.onClickedNothing,this._onClickedPlane=i.onClickedPlane,this._visible=!0,this._planes={},this._canvas=i.overviewCanvas,this._scene=new Ty(this._viewer,{canvasId:this._canvas.id,transparent:!0}),this._scene.clearLights(),new Xa(this._scene,{dir:[.4,-.4,.8],color:[.8,1,1],intensity:1,space:"view"}),new Xa(this._scene,{dir:[-.8,-.3,-.4],color:[.8,.8,.8],intensity:1,space:"view"}),new Xa(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 r=this._scene.camera,n=C.rotationMat4c(-90*C.DEGTORAD,1,0,0),a=C.vec3(),s=C.vec3(),l=C.vec3();this._synchCamera=()=>{const c=this._viewer.camera.eye,d=this._viewer.camera.look,u=this._viewer.camera.up;C.mulVec3Scalar(C.normalizeVec3(C.subVec3(c,d,a)),7),this._zUp?(C.transformVec3(n,a,s),C.transformVec3(n,u,l),r.look=[0,0,0],r.eye=C.transformVec3(n,a,s),r.up=C.transformPoint3(n,u,l)):(r.look=[0,0,0],r.eye=a,r.up=u)}}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",r=>{this._scene.camera.perspective.fov=r});{var o=null;this._onInputMouseMove=this._scene.input.on("mousemove",r=>{const n=this._scene.pick({canvasPos:r});n?(!o||n.entity.id!==o.id)&&(o&&this._planes[o.id]&&this._onHoverLeavePlane(o.id),o=n.entity,this._planes[o.id]&&this._onHoverEnterPlane(o.id)):o&&(this._onHoverLeavePlane(o.id),o=null)}),this._scene.canvas.canvas.addEventListener("mouseup",this._onCanvasMouseUp=()=>{o?this._planes[o.id]&&this._onClickedPlane(o.id):this._onClickedNothing()}),this._scene.canvas.canvas.addEventListener("mouseout",this._onCanvasMouseOut=()=>{o&&(this._onHoverLeavePlane(o.id),o=null)})}this.setVisible(i.overviewVisible)}addSectionPlane(e){this._planes[e.id]=new XRt(this,this._scene,e)}setPlaneHighlighted(e,i){const o=this._planes[e];o&&o.setHighlighted(i)}setPlaneSelected(e,i){const o=this._planes[e];o&&o.setSelected(i)}removeSectionPlane(e){const i=this._planes[e.id];i&&(i.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 Wl=C.AABB3(),Ou=C.vec3();class eLt extends ba{constructor(e,i={}){if(super("SectionPlanes",e),this._freeControls=[],this._sectionPlanes=e.scene.sectionPlanes,this._controls={},this._shownControlId=null,i.overviewCanvasId!==null&&i.overviewCanvasId!==void 0){const o=document.getElementById(i.overviewCanvasId);o?this._overview=new $Rt(this,{overviewCanvas:o,visible:i.overviewVisible,onHoverEnterPlane:(r=>{this._overview.setPlaneHighlighted(r,!0)}),onHoverLeavePlane:(r=>{this._overview.setPlaneHighlighted(r,!1)}),onClickedPlane:(r=>{if(this.getShownControl()===r){this.hideControl();return}this.showControl(r);const n=this.sectionPlanes[r].pos;Wl.set(this.viewer.scene.aabb),C.getAABB3Center(Wl,Ou),Wl[0]+=n[0]-Ou[0],Wl[1]+=n[1]-Ou[1],Wl[2]+=n[2]-Ou[2],Wl[3]+=n[0]-Ou[0],Wl[4]+=n[1]-Ou[1],Wl[5]+=n[2]-Ou[2],this.viewer.cameraFlight.flyTo({aabb:Wl,fitFOV:65})}),onClickedNothing:(()=>{this.hideControl()})}):this.warn("Can't find overview canvas: '"+i.overviewCanvasId+"' - will create plugin without overview")}this._onSceneSectionPlaneCreated=e.scene.on("sectionPlaneCreated",o=>{this._sectionPlaneCreated(o)})}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 cB(this.viewer.scene,{id:e.id,pos:e.pos,dir:e.dir,active:!0})}_sectionPlaneCreated(e){const i=this._freeControls.length>0?this._freeControls.pop():(()=>{const o=this.viewer.scene,r=(function(){const u=new rv(o,{isObject:!1});return u.addChild(new Ai(u,{geometry:new uo(u,{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 ho(u,{emissive:[0,0,0],diffuse:[0,0,0],backfaces:!0}),opacity:.6,ghosted:!0,ghostMaterial:new Hl(u,{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})),u.addChild(new Ai(u,{geometry:new uo(u,oE({center:[0,0,0],radius:1.7,tube:.02,radialSegments:4,tubeSegments:4,arc:Math.PI*2})),material:new ho(u,{emissive:[0,0,0],diffuse:[0,0,0],specular:[0,0,0],shininess:0}),highlightMaterial:new Hl(u,{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=C.vec3(),p=C.vec3();return function(A){Mu(A,h,p),u.origin=h,u.position=p}})(),setQuaternion:h=>{u.quaternion=h},setScale:h=>{u.scale=h},setVisible:h=>{u.visible=h},destroy:()=>{u.destroy()}}})();let n=()=>{};const a=new YRt(this.viewer);let s=!1,l=!1,c=null;const d=()=>{const u=l&&!s;r.setVisible(u),a.setHandlers(u&&c)};return{_destroy:()=>{n(),a.destroy(),r.destroy()},setCulled:u=>{s=u,d()},setVisible:u=>{l=u,d()},_setSectionPlane:u=>{if(n(),u){let h=!1;c={onPosition:g=>{r.setPosition(g),u.pos=g},onQuaternion:g=>{r.setQuaternion(g),h=!0,u.quaternion=g},onScreenScale:g=>{r.setScale(g)}};const p=()=>{r.setPosition(u.pos),a.setPosition(u.pos)},A=()=>{r.setQuaternion(u.quaternion),a.setQuaternion(u.quaternion)};p(),A();const f=u.on("pos",p),m=u.on("dir",()=>{h?h=!1:A()});n=()=>{u.off(f),u.off(m),n=()=>{}}}}}})();i._setSectionPlane(e),i.setVisible(!1),this._controls[e.id]=i,this._overview&&this._overview.addSectionPlane(e),e.once("destroyed",()=>{this._sectionPlaneDestroyed(e)})}flipSectionPlanes(){const e=this.viewer.scene.sectionPlanes;for(let i in e)e[i].flipDir()}showControl(e){const i=this._controls[e];if(!i){this.error("Control not found: "+e);return}this.hideControl(),i.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 i=this.viewer.scene.sectionPlanes[e];if(!i){this.error("SectionPlane not found: "+e);return}this._sectionPlaneDestroyed(i),i.destroy(),e===this._shownControlId&&(this._shownControlId=null)}_sectionPlaneDestroyed(e){this._overview&&this._overview.removeSectionPlane(e);const i=this._controls[e.id];i&&(i.setVisible(!1),i._setSectionPlane(null),delete this._controls[e.id],this._freeControls.push(i))}clear(){const e=Object.keys(this._sectionPlanes);for(var i=0,o=e.length;i<o;i++)this.destroySectionPlane(e[i])}send(e,i){switch(e){case"snapshotStarting":for(let o in this._controls)this._controls.hasOwnProperty(o)&&this._controls[o].setCulled(!0);break;case"snapshotFinished":for(let o in this._controls)this._controls.hasOwnProperty(o)&&this._controls[o].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 hY{constructor(e={}){this.cacheBuster=e.cacheBuster!==!1}_cacheBusterURL(e){if(!this.cacheBuster)return e;const i=new Date().getTime();return e.indexOf("?")>-1?e+"&_="+i:e+"?_="+i}getManifest(e,i,o){mt.loadJSON(this._cacheBusterURL(e),r=>{i(r)},function(r){o(r)})}getMetaModel(e,i,o){mt.loadJSON(this._cacheBusterURL(e),r=>{i(r)},function(r){o(r)})}getXKT(e,i,o){var r=()=>{};i=i||r,o=o||r;const n=/^data:(.*?)(;base64)?,(.*)$/,a=e.match(n);if(a){const c=!!a[2];var s=a[3];s=window.decodeURIComponent(s),c&&(s=window.atob(s));try{const d=new ArrayBuffer(s.length),u=new Uint8Array(d);for(var l=0;l<s.length;l++)u[l]=s.charCodeAt(l);i(d)}catch(d){o(d)}}else{const c=new XMLHttpRequest;c.open("GET",this._cacheBusterURL(e),!0),c.responseType="arraybuffer",c.onreadystatechange=function(){c.readyState===4&&(c.status===200?i(c.response):o("getXKT error : "+c.response))},c.send(null)}}}var v7={exports:{}},tLt=v7.exports,pY;function iLt(){return pY||(pY=1,(function(t,e){(function(i,o){o(e)})(tLt,(function(i){function o(L){let X=L.length;for(;--X>=0;)L[X]=0}const r=256,n=286,a=30,s=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]),d=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),u=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);o(h);const p=new Array(60);o(p);const A=new Array(512);o(A);const f=new Array(256);o(f);const m=new Array(29);o(m);const g=new Array(a);function y(L,X,O,ke,ye){this.static_tree=L,this.extra_bits=X,this.extra_base=O,this.elems=ke,this.max_length=ye,this.has_stree=L&&L.length}let v,b,x;function k(L,X){this.dyn_tree=L,this.max_code=0,this.stat_desc=X}o(g);const E=L=>L<256?A[L]:A[256+(L>>>7)],B=(L,X)=>{L.pending_buf[L.pending++]=255&X,L.pending_buf[L.pending++]=X>>>8&255},P=(L,X,O)=>{L.bi_valid>16-O?(L.bi_buf|=X<<L.bi_valid&65535,B(L,L.bi_buf),L.bi_buf=X>>16-L.bi_valid,L.bi_valid+=O-16):(L.bi_buf|=X<<L.bi_valid&65535,L.bi_valid+=O)},D=(L,X,O)=>{P(L,O[2*X],O[2*X+1])},T=(L,X)=>{let O=0;do O|=1&L,L>>>=1,O<<=1;while(--X>0);return O>>>1},R=(L,X,O)=>{const ke=new Array(16);let ye,Ae,tt=0;for(ye=1;ye<=s;ye++)tt=tt+O[ye-1]<<1,ke[ye]=tt;for(Ae=0;Ae<=X;Ae++){let Oe=L[2*Ae+1];Oe!==0&&(L[2*Ae]=T(ke[Oe]++,Oe))}},F=L=>{let X;for(X=0;X<n;X++)L.dyn_ltree[2*X]=0;for(X=0;X<a;X++)L.dyn_dtree[2*X]=0;for(X=0;X<19;X++)L.bl_tree[2*X]=0;L.dyn_ltree[512]=1,L.opt_len=L.static_len=0,L.sym_next=L.matches=0},N=L=>{L.bi_valid>8?B(L,L.bi_buf):L.bi_valid>0&&(L.pending_buf[L.pending++]=L.bi_buf),L.bi_buf=0,L.bi_valid=0},q=(L,X,O,ke)=>{const ye=2*X,Ae=2*O;return L[ye]<L[Ae]||L[ye]===L[Ae]&&ke[X]<=ke[O]},V=(L,X,O)=>{const ke=L.heap[O];let ye=O<<1;for(;ye<=L.heap_len&&(ye<L.heap_len&&q(X,L.heap[ye+1],L.heap[ye],L.depth)&&ye++,!q(X,ke,L.heap[ye],L.depth));)L.heap[O]=L.heap[ye],O=ye,ye<<=1;L.heap[O]=ke},W=(L,X,O)=>{let ke,ye,Ae,tt,Oe=0;if(L.sym_next!==0)do ke=255&L.pending_buf[L.sym_buf+Oe++],ke+=(255&L.pending_buf[L.sym_buf+Oe++])<<8,ye=L.pending_buf[L.sym_buf+Oe++],ke===0?D(L,ye,X):(Ae=f[ye],D(L,Ae+r+1,X),tt=l[Ae],tt!==0&&(ye-=m[Ae],P(L,ye,tt)),ke--,Ae=E(ke),D(L,Ae,O),tt=c[Ae],tt!==0&&(ke-=g[Ae],P(L,ke,tt)));while(Oe<L.sym_next);D(L,256,X)},Y=(L,X)=>{const O=X.dyn_tree,ke=X.stat_desc.static_tree,ye=X.stat_desc.has_stree,Ae=X.stat_desc.elems;let tt,Oe,wt,Ve=-1;for(L.heap_len=0,L.heap_max=573,tt=0;tt<Ae;tt++)O[2*tt]!==0?(L.heap[++L.heap_len]=Ve=tt,L.depth[tt]=0):O[2*tt+1]=0;for(;L.heap_len<2;)wt=L.heap[++L.heap_len]=Ve<2?++Ve:0,O[2*wt]=1,L.depth[wt]=0,L.opt_len--,ye&&(L.static_len-=ke[2*wt+1]);for(X.max_code=Ve,tt=L.heap_len>>1;tt>=1;tt--)V(L,O,tt);wt=Ae;do tt=L.heap[1],L.heap[1]=L.heap[L.heap_len--],V(L,O,1),Oe=L.heap[1],L.heap[--L.heap_max]=tt,L.heap[--L.heap_max]=Oe,O[2*wt]=O[2*tt]+O[2*Oe],L.depth[wt]=(L.depth[tt]>=L.depth[Oe]?L.depth[tt]:L.depth[Oe])+1,O[2*tt+1]=O[2*Oe+1]=wt,L.heap[1]=wt++,V(L,O,1);while(L.heap_len>=2);L.heap[--L.heap_max]=L.heap[1],((et,ii)=>{const zt=ii.dyn_tree,Ct=ii.max_code,Ho=ii.stat_desc.static_tree,Ei=ii.stat_desc.has_stree,Qt=ii.stat_desc.extra_bits,Ri=ii.stat_desc.extra_base,ti=ii.stat_desc.max_length;let kt,ei,Li,Pt,wi,oi,Gt=0;for(Pt=0;Pt<=s;Pt++)et.bl_count[Pt]=0;for(zt[2*et.heap[et.heap_max]+1]=0,kt=et.heap_max+1;kt<573;kt++)ei=et.heap[kt],Pt=zt[2*zt[2*ei+1]+1]+1,Pt>ti&&(Pt=ti,Gt++),zt[2*ei+1]=Pt,ei>Ct||(et.bl_count[Pt]++,wi=0,ei>=Ri&&(wi=Qt[ei-Ri]),oi=zt[2*ei],et.opt_len+=oi*(Pt+wi),Ei&&(et.static_len+=oi*(Ho[2*ei+1]+wi)));if(Gt!==0){do{for(Pt=ti-1;et.bl_count[Pt]===0;)Pt--;et.bl_count[Pt]--,et.bl_count[Pt+1]+=2,et.bl_count[ti]--,Gt-=2}while(Gt>0);for(Pt=ti;Pt!==0;Pt--)for(ei=et.bl_count[Pt];ei!==0;)Li=et.heap[--kt],Li>Ct||(zt[2*Li+1]!==Pt&&(et.opt_len+=(Pt-zt[2*Li+1])*zt[2*Li],zt[2*Li+1]=Pt),ei--)}})(L,X),R(O,Ve,L.bl_count)},$=(L,X,O)=>{let ke,ye,Ae=-1,tt=X[1],Oe=0,wt=7,Ve=4;for(tt===0&&(wt=138,Ve=3),X[2*(O+1)+1]=65535,ke=0;ke<=O;ke++)ye=tt,tt=X[2*(ke+1)+1],++Oe<wt&&ye===tt||(Oe<Ve?L.bl_tree[2*ye]+=Oe:ye!==0?(ye!==Ae&&L.bl_tree[2*ye]++,L.bl_tree[32]++):Oe<=10?L.bl_tree[34]++:L.bl_tree[36]++,Oe=0,Ae=ye,tt===0?(wt=138,Ve=3):ye===tt?(wt=6,Ve=3):(wt=7,Ve=4))},me=(L,X,O)=>{let ke,ye,Ae=-1,tt=X[1],Oe=0,wt=7,Ve=4;for(tt===0&&(wt=138,Ve=3),ke=0;ke<=O;ke++)if(ye=tt,tt=X[2*(ke+1)+1],!(++Oe<wt&&ye===tt)){if(Oe<Ve)do D(L,ye,L.bl_tree);while(--Oe!=0);else ye!==0?(ye!==Ae&&(D(L,ye,L.bl_tree),Oe--),D(L,16,L.bl_tree),P(L,Oe-3,2)):Oe<=10?(D(L,17,L.bl_tree),P(L,Oe-3,3)):(D(L,18,L.bl_tree),P(L,Oe-11,7));Oe=0,Ae=ye,tt===0?(wt=138,Ve=3):ye===tt?(wt=6,Ve=3):(wt=7,Ve=4)}};let Ie=!1;const Se=(L,X,O,ke)=>{P(L,0+(ke?1:0),3),N(L),B(L,O),B(L,~O),O&&L.pending_buf.set(L.window.subarray(X,X+O),L.pending),L.pending+=O};var qe=(L,X,O,ke)=>{let ye,Ae,tt=0;L.level>0?(L.strm.data_type===2&&(L.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<r;wt++)if(Oe.dyn_ltree[2*wt]!==0)return 1;return 0})(L)),Y(L,L.l_desc),Y(L,L.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),Y(Oe,Oe.bl_desc),wt=18;wt>=3&&Oe.bl_tree[2*u[wt]+1]===0;wt--);return Oe.opt_len+=3*(wt+1)+5+5+4,wt})(L),ye=L.opt_len+3+7>>>3,Ae=L.static_len+3+7>>>3,Ae<=ye&&(ye=Ae)):ye=Ae=O+5,O+4<=ye&&X!==-1?Se(L,X,O,ke):L.strategy===4||Ae===ye?(P(L,2+(ke?1:0),3),W(L,h,p)):(P(L,4+(ke?1:0),3),((Oe,wt,Ve,et)=>{let ii;for(P(Oe,wt-257,5),P(Oe,Ve-1,5),P(Oe,et-4,4),ii=0;ii<et;ii++)P(Oe,Oe.bl_tree[2*u[ii]+1],3);me(Oe,Oe.dyn_ltree,wt-1),me(Oe,Oe.dyn_dtree,Ve-1)})(L,L.l_desc.max_code+1,L.d_desc.max_code+1,tt+1),W(L,L.dyn_ltree,L.dyn_dtree)),F(L),ke&&N(L)},Qe={_tr_init:L=>{Ie||((()=>{let X,O,ke,ye,Ae;const tt=new Array(16);for(ke=0,ye=0;ye<28;ye++)for(m[ye]=ke,X=0;X<1<<l[ye];X++)f[ke++]=ye;for(f[ke-1]=ye,Ae=0,ye=0;ye<16;ye++)for(g[ye]=Ae,X=0;X<1<<c[ye];X++)A[Ae++]=ye;for(Ae>>=7;ye<a;ye++)for(g[ye]=Ae<<7,X=0;X<1<<c[ye]-7;X++)A[256+Ae++]=ye;for(O=0;O<=s;O++)tt[O]=0;for(X=0;X<=143;)h[2*X+1]=8,X++,tt[8]++;for(;X<=255;)h[2*X+1]=9,X++,tt[9]++;for(;X<=279;)h[2*X+1]=7,X++,tt[7]++;for(;X<=287;)h[2*X+1]=8,X++,tt[8]++;for(R(h,287,tt),X=0;X<a;X++)p[2*X+1]=5,p[2*X]=T(X,5);v=new y(h,l,257,n,s),b=new y(p,c,0,a,s),x=new y(new Array(0),d,0,19,7)})(),Ie=!0),L.l_desc=new k(L.dyn_ltree,v),L.d_desc=new k(L.dyn_dtree,b),L.bl_desc=new k(L.bl_tree,x),L.bi_buf=0,L.bi_valid=0,F(L)},_tr_stored_block:Se,_tr_flush_block:qe,_tr_tally:(L,X,O)=>(L.pending_buf[L.sym_buf+L.sym_next++]=X,L.pending_buf[L.sym_buf+L.sym_next++]=X>>8,L.pending_buf[L.sym_buf+L.sym_next++]=O,X===0?L.dyn_ltree[2*O]++:(L.matches++,X--,L.dyn_ltree[2*(f[O]+r+1)]++,L.dyn_dtree[2*E(X)]++),L.sym_next===L.sym_end),_tr_align:L=>{P(L,2,3),D(L,256,h),(X=>{X.bi_valid===16?(B(X,X.bi_buf),X.bi_buf=0,X.bi_valid=0):X.bi_valid>=8&&(X.pending_buf[X.pending++]=255&X.bi_buf,X.bi_buf>>=8,X.bi_valid-=8)})(L)}},Ce=(L,X,O,ke)=>{let ye=65535&L|0,Ae=L>>>16&65535|0,tt=0;for(;O!==0;){tt=O>2e3?2e3:O,O-=tt;do ye=ye+X[ke++]|0,Ae=Ae+ye|0;while(--tt);ye%=65521,Ae%=65521}return ye|Ae<<16|0};const Le=new Uint32Array((()=>{let L,X=[];for(var O=0;O<256;O++){L=O;for(var ke=0;ke<8;ke++)L=1&L?3988292384^L>>>1:L>>>1;X[O]=L}return X})());var Fe=(L,X,O,ke)=>{const ye=Le,Ae=ke+O;L^=-1;for(let tt=ke;tt<Ae;tt++)L=L>>>8^ye[255&(L^X[tt])];return-1^L},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:we,_tr_stored_block:Re,_tr_flush_block:We,_tr_tally:H,_tr_align:ee}=Qe,{Z_NO_FLUSH:ae,Z_PARTIAL_FLUSH:Me,Z_FULL_FLUSH:pe,Z_FINISH:Q,Z_BLOCK:Z,Z_OK:ie,Z_STREAM_END:re,Z_STREAM_ERROR:ne,Z_DATA_ERROR:G,Z_BUF_ERROR:J,Z_DEFAULT_COMPRESSION:ue,Z_FILTERED:xe,Z_HUFFMAN_ONLY:oe,Z_RLE:Ee,Z_FIXED:je,Z_DEFAULT_STRATEGY:he,Z_UNKNOWN:Ne,Z_DEFLATED:Be}=ge,He=258,rt=262,At=42,ft=113,lt=666,ut=(L,X)=>(L.msg=ve[X],X),Te=L=>2*L-(L>4?9:0),st=L=>{let X=L.length;for(;--X>=0;)L[X]=0},dt=L=>{let X,O,ke,ye=L.w_size;X=L.hash_size,ke=X;do O=L.head[--ke],L.head[ke]=O>=ye?O-ye:0;while(--X);X=ye,ke=X;do O=L.prev[--ke],L.prev[ke]=O>=ye?O-ye:0;while(--X)};let Ye=(L,X,O)=>(X<<L.hash_shift^O)&L.hash_mask;const fe=L=>{const X=L.state;let O=X.pending;O>L.avail_out&&(O=L.avail_out),O!==0&&(L.output.set(X.pending_buf.subarray(X.pending_out,X.pending_out+O),L.next_out),L.next_out+=O,X.pending_out+=O,L.total_out+=O,L.avail_out-=O,X.pending-=O,X.pending===0&&(X.pending_out=0))},be=(L,X)=>{We(L,L.block_start>=0?L.block_start:-1,L.strstart-L.block_start,X),L.block_start=L.strstart,fe(L.strm)},$e=(L,X)=>{L.pending_buf[L.pending++]=X},ht=(L,X)=>{L.pending_buf[L.pending++]=X>>>8&255,L.pending_buf[L.pending++]=255&X},St=(L,X,O,ke)=>{let ye=L.avail_in;return ye>ke&&(ye=ke),ye===0?0:(L.avail_in-=ye,X.set(L.input.subarray(L.next_in,L.next_in+ye),O),L.state.wrap===1?L.adler=Ce(L.adler,X,ye,O):L.state.wrap===2&&(L.adler=Fe(L.adler,X,ye,O)),L.next_in+=ye,L.total_in+=ye,ye)},xt=(L,X)=>{let O,ke,ye=L.max_chain_length,Ae=L.strstart,tt=L.prev_length,Oe=L.nice_match;const wt=L.strstart>L.w_size-rt?L.strstart-(L.w_size-rt):0,Ve=L.window,et=L.w_mask,ii=L.prev,zt=L.strstart+He;let Ct=Ve[Ae+tt-1],Ho=Ve[Ae+tt];L.prev_length>=L.good_match&&(ye>>=2),Oe>L.lookahead&&(Oe=L.lookahead);do if(O=X,Ve[O+tt]===Ho&&Ve[O+tt-1]===Ct&&Ve[O]===Ve[Ae]&&Ve[++O]===Ve[Ae+1]){Ae+=2,O++;do;while(Ve[++Ae]===Ve[++O]&&Ve[++Ae]===Ve[++O]&&Ve[++Ae]===Ve[++O]&&Ve[++Ae]===Ve[++O]&&Ve[++Ae]===Ve[++O]&&Ve[++Ae]===Ve[++O]&&Ve[++Ae]===Ve[++O]&&Ve[++Ae]===Ve[++O]&&Ae<zt);if(ke=He-(zt-Ae),Ae=zt-He,ke>tt){if(L.match_start=X,tt=ke,ke>=Oe)break;Ct=Ve[Ae+tt-1],Ho=Ve[Ae+tt]}}while((X=ii[X&et])>wt&&--ye!=0);return tt<=L.lookahead?tt:L.lookahead},gi=L=>{const X=L.w_size;let O,ke,ye;do{if(ke=L.window_size-L.lookahead-L.strstart,L.strstart>=X+(X-rt)&&(L.window.set(L.window.subarray(X,X+X-ke),0),L.match_start-=X,L.strstart-=X,L.block_start-=X,L.insert>L.strstart&&(L.insert=L.strstart),dt(L),ke+=X),L.strm.avail_in===0)break;if(O=St(L.strm,L.window,L.strstart+L.lookahead,ke),L.lookahead+=O,L.lookahead+L.insert>=3)for(ye=L.strstart-L.insert,L.ins_h=L.window[ye],L.ins_h=Ye(L,L.ins_h,L.window[ye+1]);L.insert&&(L.ins_h=Ye(L,L.ins_h,L.window[ye+3-1]),L.prev[ye&L.w_mask]=L.head[L.ins_h],L.head[L.ins_h]=ye,ye++,L.insert--,!(L.lookahead+L.insert<3)););}while(L.lookahead<rt&&L.strm.avail_in!==0)},ji=(L,X)=>{let O,ke,ye,Ae=L.pending_buf_size-5>L.w_size?L.w_size:L.pending_buf_size-5,tt=0,Oe=L.strm.avail_in;do{if(O=65535,ye=L.bi_valid+42>>3,L.strm.avail_out<ye||(ye=L.strm.avail_out-ye,ke=L.strstart-L.block_start,O>ke+L.strm.avail_in&&(O=ke+L.strm.avail_in),O>ye&&(O=ye),O<Ae&&(O===0&&X!==Q||X===ae||O!==ke+L.strm.avail_in)))break;tt=X===Q&&O===ke+L.strm.avail_in?1:0,Re(L,0,0,tt),L.pending_buf[L.pending-4]=O,L.pending_buf[L.pending-3]=O>>8,L.pending_buf[L.pending-2]=~O,L.pending_buf[L.pending-1]=~O>>8,fe(L.strm),ke&&(ke>O&&(ke=O),L.strm.output.set(L.window.subarray(L.block_start,L.block_start+ke),L.strm.next_out),L.strm.next_out+=ke,L.strm.avail_out-=ke,L.strm.total_out+=ke,L.block_start+=ke,O-=ke),O&&(St(L.strm,L.strm.output,L.strm.next_out,O),L.strm.next_out+=O,L.strm.avail_out-=O,L.strm.total_out+=O)}while(tt===0);return Oe-=L.strm.avail_in,Oe&&(Oe>=L.w_size?(L.matches=2,L.window.set(L.strm.input.subarray(L.strm.next_in-L.w_size,L.strm.next_in),0),L.strstart=L.w_size,L.insert=L.strstart):(L.window_size-L.strstart<=Oe&&(L.strstart-=L.w_size,L.window.set(L.window.subarray(L.w_size,L.w_size+L.strstart),0),L.matches<2&&L.matches++,L.insert>L.strstart&&(L.insert=L.strstart)),L.window.set(L.strm.input.subarray(L.strm.next_in-Oe,L.strm.next_in),L.strstart),L.strstart+=Oe,L.insert+=Oe>L.w_size-L.insert?L.w_size-L.insert:Oe),L.block_start=L.strstart),L.high_water<L.strstart&&(L.high_water=L.strstart),tt?4:X!==ae&&X!==Q&&L.strm.avail_in===0&&L.strstart===L.block_start?2:(ye=L.window_size-L.strstart,L.strm.avail_in>ye&&L.block_start>=L.w_size&&(L.block_start-=L.w_size,L.strstart-=L.w_size,L.window.set(L.window.subarray(L.w_size,L.w_size+L.strstart),0),L.matches<2&&L.matches++,ye+=L.w_size,L.insert>L.strstart&&(L.insert=L.strstart)),ye>L.strm.avail_in&&(ye=L.strm.avail_in),ye&&(St(L.strm,L.window,L.strstart,ye),L.strstart+=ye,L.insert+=ye>L.w_size-L.insert?L.w_size-L.insert:ye),L.high_water<L.strstart&&(L.high_water=L.strstart),ye=L.bi_valid+42>>3,ye=L.pending_buf_size-ye>65535?65535:L.pending_buf_size-ye,Ae=ye>L.w_size?L.w_size:ye,ke=L.strstart-L.block_start,(ke>=Ae||(ke||X===Q)&&X!==ae&&L.strm.avail_in===0&&ke<=ye)&&(O=ke>ye?ye:ke,tt=X===Q&&L.strm.avail_in===0&&O===ke?1:0,Re(L,L.block_start,O,tt),L.block_start+=O,fe(L.strm)),tt?3:1)},Eo=(L,X)=>{let O,ke;for(;;){if(L.lookahead<rt){if(gi(L),L.lookahead<rt&&X===ae)return 1;if(L.lookahead===0)break}if(O=0,L.lookahead>=3&&(L.ins_h=Ye(L,L.ins_h,L.window[L.strstart+3-1]),O=L.prev[L.strstart&L.w_mask]=L.head[L.ins_h],L.head[L.ins_h]=L.strstart),O!==0&&L.strstart-O<=L.w_size-rt&&(L.match_length=xt(L,O)),L.match_length>=3)if(ke=H(L,L.strstart-L.match_start,L.match_length-3),L.lookahead-=L.match_length,L.match_length<=L.max_lazy_match&&L.lookahead>=3){L.match_length--;do L.strstart++,L.ins_h=Ye(L,L.ins_h,L.window[L.strstart+3-1]),O=L.prev[L.strstart&L.w_mask]=L.head[L.ins_h],L.head[L.ins_h]=L.strstart;while(--L.match_length!=0);L.strstart++}else L.strstart+=L.match_length,L.match_length=0,L.ins_h=L.window[L.strstart],L.ins_h=Ye(L,L.ins_h,L.window[L.strstart+1]);else ke=H(L,0,L.window[L.strstart]),L.lookahead--,L.strstart++;if(ke&&(be(L,!1),L.strm.avail_out===0))return 1}return L.insert=L.strstart<2?L.strstart:2,X===Q?(be(L,!0),L.strm.avail_out===0?3:4):L.sym_next&&(be(L,!1),L.strm.avail_out===0)?1:2},to=(L,X)=>{let O,ke,ye;for(;;){if(L.lookahead<rt){if(gi(L),L.lookahead<rt&&X===ae)return 1;if(L.lookahead===0)break}if(O=0,L.lookahead>=3&&(L.ins_h=Ye(L,L.ins_h,L.window[L.strstart+3-1]),O=L.prev[L.strstart&L.w_mask]=L.head[L.ins_h],L.head[L.ins_h]=L.strstart),L.prev_length=L.match_length,L.prev_match=L.match_start,L.match_length=2,O!==0&&L.prev_length<L.max_lazy_match&&L.strstart-O<=L.w_size-rt&&(L.match_length=xt(L,O),L.match_length<=5&&(L.strategy===xe||L.match_length===3&&L.strstart-L.match_start>4096)&&(L.match_length=2)),L.prev_length>=3&&L.match_length<=L.prev_length){ye=L.strstart+L.lookahead-3,ke=H(L,L.strstart-1-L.prev_match,L.prev_length-3),L.lookahead-=L.prev_length-1,L.prev_length-=2;do++L.strstart<=ye&&(L.ins_h=Ye(L,L.ins_h,L.window[L.strstart+3-1]),O=L.prev[L.strstart&L.w_mask]=L.head[L.ins_h],L.head[L.ins_h]=L.strstart);while(--L.prev_length!=0);if(L.match_available=0,L.match_length=2,L.strstart++,ke&&(be(L,!1),L.strm.avail_out===0))return 1}else if(L.match_available){if(ke=H(L,0,L.window[L.strstart-1]),ke&&be(L,!1),L.strstart++,L.lookahead--,L.strm.avail_out===0)return 1}else L.match_available=1,L.strstart++,L.lookahead--}return L.match_available&&(ke=H(L,0,L.window[L.strstart-1]),L.match_available=0),L.insert=L.strstart<2?L.strstart:2,X===Q?(be(L,!0),L.strm.avail_out===0?3:4):L.sym_next&&(be(L,!1),L.strm.avail_out===0)?1:2};function lr(L,X,O,ke,ye){this.good_length=L,this.max_lazy=X,this.nice_length=O,this.max_chain=ke,this.func=ye}const Vi=[new lr(0,0,0,0,ji),new lr(4,4,8,4,Eo),new lr(4,5,16,8,Eo),new lr(4,6,32,32,Eo),new lr(4,4,16,16,to),new lr(8,16,32,32,to),new lr(8,16,128,128,to),new lr(8,32,128,256,to),new lr(32,128,258,1024,to),new lr(32,258,258,4096,to)];function hh(){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=Be,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),st(this.dyn_ltree),st(this.dyn_dtree),st(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),st(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),st(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 ps=L=>{if(!L)return 1;const X=L.state;return!X||X.strm!==L||X.status!==At&&X.status!==57&&X.status!==69&&X.status!==73&&X.status!==91&&X.status!==103&&X.status!==ft&&X.status!==lt?1:0},y2=L=>{if(ps(L))return ut(L,ne);L.total_in=L.total_out=0,L.data_type=Ne;const X=L.state;return X.pending=0,X.pending_out=0,X.wrap<0&&(X.wrap=-X.wrap),X.status=X.wrap===2?57:X.wrap?At:ft,L.adler=X.wrap===2?0:1,X.last_flush=-2,we(X),ie},Nd=L=>{const X=y2(L);var O;return X===ie&&((O=L.state).window_size=2*O.w_size,st(O.head),O.max_lazy_match=Vi[O.level].max_lazy,O.good_match=Vi[O.level].good_length,O.nice_match=Vi[O.level].nice_length,O.max_chain_length=Vi[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),X},b2=(L,X,O,ke,ye,Ae)=>{if(!L)return ne;let tt=1;if(X===ue&&(X=6),ke<0?(tt=0,ke=-ke):ke>15&&(tt=2,ke-=16),ye<1||ye>9||O!==Be||ke<8||ke>15||X<0||X>9||Ae<0||Ae>je||ke===8&&tt!==1)return ut(L,ne);ke===8&&(ke=9);const Oe=new hh;return L.state=Oe,Oe.strm=L,Oe.status=At,Oe.wrap=tt,Oe.gzhead=null,Oe.w_bits=ke,Oe.w_size=1<<Oe.w_bits,Oe.w_mask=Oe.w_size-1,Oe.hash_bits=ye+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<<ye+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=X,Oe.strategy=Ae,Oe.method=O,Nd(L)};var vc={deflateInit:(L,X)=>b2(L,X,Be,15,8,he),deflateInit2:b2,deflateReset:Nd,deflateResetKeep:y2,deflateSetHeader:(L,X)=>ps(L)||L.state.wrap!==2?ne:(L.state.gzhead=X,ie),deflate:(L,X)=>{if(ps(L)||X>Z||X<0)return L?ut(L,ne):ne;const O=L.state;if(!L.output||L.avail_in!==0&&!L.input||O.status===lt&&X!==Q)return ut(L,L.avail_out===0?J:ne);const ke=O.last_flush;if(O.last_flush=X,O.pending!==0){if(fe(L),L.avail_out===0)return O.last_flush=-1,ie}else if(L.avail_in===0&&Te(X)<=Te(ke)&&X!==Q)return ut(L,J);if(O.status===lt&&L.avail_in!==0)return ut(L,J);if(O.status===At&&O.wrap===0&&(O.status=ft),O.status===At){let ye=Be+(O.w_bits-8<<4)<<8,Ae=-1;if(Ae=O.strategy>=oe||O.level<2?0:O.level<6?1:O.level===6?2:3,ye|=Ae<<6,O.strstart!==0&&(ye|=32),ye+=31-ye%31,ht(O,ye),O.strstart!==0&&(ht(O,L.adler>>>16),ht(O,65535&L.adler)),L.adler=1,O.status=ft,fe(L),O.pending!==0)return O.last_flush=-1,ie}if(O.status===57){if(L.adler=0,$e(O,31),$e(O,139),$e(O,8),O.gzhead)$e(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)),$e(O,255&O.gzhead.time),$e(O,O.gzhead.time>>8&255),$e(O,O.gzhead.time>>16&255),$e(O,O.gzhead.time>>24&255),$e(O,O.level===9?2:O.strategy>=oe||O.level<2?4:0),$e(O,255&O.gzhead.os),O.gzhead.extra&&O.gzhead.extra.length&&($e(O,255&O.gzhead.extra.length),$e(O,O.gzhead.extra.length>>8&255)),O.gzhead.hcrc&&(L.adler=Fe(L.adler,O.pending_buf,O.pending,0)),O.gzindex=0,O.status=69;else if($e(O,0),$e(O,0),$e(O,0),$e(O,0),$e(O,0),$e(O,O.level===9?2:O.strategy>=oe||O.level<2?4:0),$e(O,3),O.status=ft,fe(L),O.pending!==0)return O.last_flush=-1,ie}if(O.status===69){if(O.gzhead.extra){let ye=O.pending,Ae=(65535&O.gzhead.extra.length)-O.gzindex;for(;O.pending+Ae>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>ye&&(L.adler=Fe(L.adler,O.pending_buf,O.pending-ye,ye)),O.gzindex+=Oe,fe(L),O.pending!==0)return O.last_flush=-1,ie;ye=0,Ae-=Oe}let tt=new Uint8Array(O.gzhead.extra);O.pending_buf.set(tt.subarray(O.gzindex,O.gzindex+Ae),O.pending),O.pending+=Ae,O.gzhead.hcrc&&O.pending>ye&&(L.adler=Fe(L.adler,O.pending_buf,O.pending-ye,ye)),O.gzindex=0}O.status=73}if(O.status===73){if(O.gzhead.name){let ye,Ae=O.pending;do{if(O.pending===O.pending_buf_size){if(O.gzhead.hcrc&&O.pending>Ae&&(L.adler=Fe(L.adler,O.pending_buf,O.pending-Ae,Ae)),fe(L),O.pending!==0)return O.last_flush=-1,ie;Ae=0}ye=O.gzindex<O.gzhead.name.length?255&O.gzhead.name.charCodeAt(O.gzindex++):0,$e(O,ye)}while(ye!==0);O.gzhead.hcrc&&O.pending>Ae&&(L.adler=Fe(L.adler,O.pending_buf,O.pending-Ae,Ae)),O.gzindex=0}O.status=91}if(O.status===91){if(O.gzhead.comment){let ye,Ae=O.pending;do{if(O.pending===O.pending_buf_size){if(O.gzhead.hcrc&&O.pending>Ae&&(L.adler=Fe(L.adler,O.pending_buf,O.pending-Ae,Ae)),fe(L),O.pending!==0)return O.last_flush=-1,ie;Ae=0}ye=O.gzindex<O.gzhead.comment.length?255&O.gzhead.comment.charCodeAt(O.gzindex++):0,$e(O,ye)}while(ye!==0);O.gzhead.hcrc&&O.pending>Ae&&(L.adler=Fe(L.adler,O.pending_buf,O.pending-Ae,Ae))}O.status=103}if(O.status===103){if(O.gzhead.hcrc){if(O.pending+2>O.pending_buf_size&&(fe(L),O.pending!==0))return O.last_flush=-1,ie;$e(O,255&L.adler),$e(O,L.adler>>8&255),L.adler=0}if(O.status=ft,fe(L),O.pending!==0)return O.last_flush=-1,ie}if(L.avail_in!==0||O.lookahead!==0||X!==ae&&O.status!==lt){let ye=O.level===0?ji(O,X):O.strategy===oe?((Ae,tt)=>{let Oe;for(;;){if(Ae.lookahead===0&&(gi(Ae),Ae.lookahead===0)){if(tt===ae)return 1;break}if(Ae.match_length=0,Oe=H(Ae,0,Ae.window[Ae.strstart]),Ae.lookahead--,Ae.strstart++,Oe&&(be(Ae,!1),Ae.strm.avail_out===0))return 1}return Ae.insert=0,tt===Q?(be(Ae,!0),Ae.strm.avail_out===0?3:4):Ae.sym_next&&(be(Ae,!1),Ae.strm.avail_out===0)?1:2})(O,X):O.strategy===Ee?((Ae,tt)=>{let Oe,wt,Ve,et;const ii=Ae.window;for(;;){if(Ae.lookahead<=He){if(gi(Ae),Ae.lookahead<=He&&tt===ae)return 1;if(Ae.lookahead===0)break}if(Ae.match_length=0,Ae.lookahead>=3&&Ae.strstart>0&&(Ve=Ae.strstart-1,wt=ii[Ve],wt===ii[++Ve]&&wt===ii[++Ve]&&wt===ii[++Ve])){et=Ae.strstart+He;do;while(wt===ii[++Ve]&&wt===ii[++Ve]&&wt===ii[++Ve]&&wt===ii[++Ve]&&wt===ii[++Ve]&&wt===ii[++Ve]&&wt===ii[++Ve]&&wt===ii[++Ve]&&Ve<et);Ae.match_length=He-(et-Ve),Ae.match_length>Ae.lookahead&&(Ae.match_length=Ae.lookahead)}if(Ae.match_length>=3?(Oe=H(Ae,1,Ae.match_length-3),Ae.lookahead-=Ae.match_length,Ae.strstart+=Ae.match_length,Ae.match_length=0):(Oe=H(Ae,0,Ae.window[Ae.strstart]),Ae.lookahead--,Ae.strstart++),Oe&&(be(Ae,!1),Ae.strm.avail_out===0))return 1}return Ae.insert=0,tt===Q?(be(Ae,!0),Ae.strm.avail_out===0?3:4):Ae.sym_next&&(be(Ae,!1),Ae.strm.avail_out===0)?1:2})(O,X):Vi[O.level].func(O,X);if(ye!==3&&ye!==4||(O.status=lt),ye===1||ye===3)return L.avail_out===0&&(O.last_flush=-1),ie;if(ye===2&&(X===Me?ee(O):X!==Z&&(Re(O,0,0,!1),X===pe&&(st(O.head),O.lookahead===0&&(O.strstart=0,O.block_start=0,O.insert=0))),fe(L),L.avail_out===0))return O.last_flush=-1,ie}return X!==Q?ie:O.wrap<=0?re:(O.wrap===2?($e(O,255&L.adler),$e(O,L.adler>>8&255),$e(O,L.adler>>16&255),$e(O,L.adler>>24&255),$e(O,255&L.total_in),$e(O,L.total_in>>8&255),$e(O,L.total_in>>16&255),$e(O,L.total_in>>24&255)):(ht(O,L.adler>>>16),ht(O,65535&L.adler)),fe(L),O.wrap>0&&(O.wrap=-O.wrap),O.pending!==0?ie:re)},deflateEnd:L=>{if(ps(L))return ne;const X=L.state.status;return L.state=null,X===ft?ut(L,G):ie},deflateSetDictionary:(L,X)=>{let O=X.length;if(ps(L))return ne;const ke=L.state,ye=ke.wrap;if(ye===2||ye===1&&ke.status!==At||ke.lookahead)return ne;if(ye===1&&(L.adler=Ce(L.adler,X,O,0)),ke.wrap=0,O>=ke.w_size){ye===0&&(st(ke.head),ke.strstart=0,ke.block_start=0,ke.insert=0);let wt=new Uint8Array(ke.w_size);wt.set(X.subarray(O-ke.w_size,O),0),X=wt,O=ke.w_size}const Ae=L.avail_in,tt=L.next_in,Oe=L.input;for(L.avail_in=O,L.next_in=0,L.input=X,gi(ke);ke.lookahead>=3;){let wt=ke.strstart,Ve=ke.lookahead-2;do ke.ins_h=Ye(ke,ke.ins_h,ke.window[wt+3-1]),ke.prev[wt&ke.w_mask]=ke.head[ke.ins_h],ke.head[ke.ins_h]=wt,wt++;while(--Ve);ke.strstart=wt,ke.lookahead=2,gi(ke)}return ke.strstart+=ke.lookahead,ke.block_start=ke.strstart,ke.insert=ke.lookahead,ke.lookahead=0,ke.match_length=ke.prev_length=2,ke.match_available=0,L.next_in=tt,L.input=Oe,L.avail_in=Ae,ke.wrap=ye,ie},deflateInfo:"pako deflate (from Nodeca project)"};const y9=(L,X)=>Object.prototype.hasOwnProperty.call(L,X);var o4=function(L){const X=Array.prototype.slice.call(arguments,1);for(;X.length;){const O=X.shift();if(O){if(typeof O!="object")throw new TypeError(O+"must be non-object");for(const ke in O)y9(O,ke)&&(L[ke]=O[ke])}}return L},r4=L=>{let X=0;for(let ke=0,ye=L.length;ke<ye;ke++)X+=L[ke].length;const O=new Uint8Array(X);for(let ke=0,ye=0,Ae=L.length;ke<Ae;ke++){let tt=L[ke];O.set(tt,ye),ye+=tt.length}return O};let n4=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{n4=!1}const jd=new Uint8Array(256);for(let L=0;L<256;L++)jd[L]=L>=252?6:L>=248?5:L>=240?4:L>=224?3:L>=192?2:1;jd[254]=jd[254]=1;var w2=L=>{if(typeof TextEncoder=="function"&&TextEncoder.prototype.encode)return new TextEncoder().encode(L);let X,O,ke,ye,Ae,tt=L.length,Oe=0;for(ye=0;ye<tt;ye++)O=L.charCodeAt(ye),(64512&O)==55296&&ye+1<tt&&(ke=L.charCodeAt(ye+1),(64512&ke)==56320&&(O=65536+(O-55296<<10)+(ke-56320),ye++)),Oe+=O<128?1:O<2048?2:O<65536?3:4;for(X=new Uint8Array(Oe),Ae=0,ye=0;Ae<Oe;ye++)O=L.charCodeAt(ye),(64512&O)==55296&&ye+1<tt&&(ke=L.charCodeAt(ye+1),(64512&ke)==56320&&(O=65536+(O-55296<<10)+(ke-56320),ye++)),O<128?X[Ae++]=O:O<2048?(X[Ae++]=192|O>>>6,X[Ae++]=128|63&O):O<65536?(X[Ae++]=224|O>>>12,X[Ae++]=128|O>>>6&63,X[Ae++]=128|63&O):(X[Ae++]=240|O>>>18,X[Ae++]=128|O>>>12&63,X[Ae++]=128|O>>>6&63,X[Ae++]=128|63&O);return X},se=(L,X)=>{const O=X||L.length;if(typeof TextDecoder=="function"&&TextDecoder.prototype.decode)return new TextDecoder().decode(L.subarray(0,X));let ke,ye;const Ae=new Array(2*O);for(ye=0,ke=0;ke<O;){let tt=L[ke++];if(tt<128){Ae[ye++]=tt;continue}let Oe=jd[tt];if(Oe>4)Ae[ye++]=65533,ke+=Oe-1;else{for(tt&=Oe===2?31:Oe===3?15:7;Oe>1&&ke<O;)tt=tt<<6|63&L[ke++],Oe--;Oe>1?Ae[ye++]=65533:tt<65536?Ae[ye++]=tt:(tt-=65536,Ae[ye++]=55296|tt>>10&1023,Ae[ye++]=56320|1023&tt)}}return((tt,Oe)=>{if(Oe<65534&&tt.subarray&&n4)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})(Ae,ye)},Ke=(L,X)=>{(X=X||L.length)>L.length&&(X=L.length);let O=X-1;for(;O>=0&&(192&L[O])==128;)O--;return O<0||O===0?X:O+jd[L[O]]>X?O:X},nt=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 at=Object.prototype.toString,{Z_NO_FLUSH:Ge,Z_SYNC_FLUSH:bt,Z_FULL_FLUSH:Rt,Z_FINISH:Ot,Z_OK:Ft,Z_STREAM_END:Yt,Z_DEFAULT_COMPRESSION:$t,Z_DEFAULT_STRATEGY:Xt,Z_DEFLATED:bi}=ge;function Di(L){this.options=o4({level:$t,method:bi,chunkSize:16384,windowBits:15,memLevel:8,strategy:Xt},L||{});let X=this.options;X.raw&&X.windowBits>0?X.windowBits=-X.windowBits:X.gzip&&X.windowBits>0&&X.windowBits<16&&(X.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new nt,this.strm.avail_out=0;let O=vc.deflateInit2(this.strm,X.level,X.method,X.windowBits,X.memLevel,X.strategy);if(O!==Ft)throw new Error(ve[O]);if(X.header&&vc.deflateSetHeader(this.strm,X.header),X.dictionary){let ke;if(ke=typeof X.dictionary=="string"?w2(X.dictionary):at.call(X.dictionary)==="[object ArrayBuffer]"?new Uint8Array(X.dictionary):X.dictionary,O=vc.deflateSetDictionary(this.strm,ke),O!==Ft)throw new Error(ve[O]);this._dict_set=!0}}function Zi(L,X){const O=new Di(X);if(O.push(L,!0),O.err)throw O.msg||ve[O.err];return O.result}Di.prototype.push=function(L,X){const O=this.strm,ke=this.options.chunkSize;let ye,Ae;if(this.ended)return!1;for(Ae=X===~~X?X:X===!0?Ot:Ge,typeof L=="string"?O.input=w2(L):at.call(L)==="[object ArrayBuffer]"?O.input=new Uint8Array(L):O.input=L,O.next_in=0,O.avail_in=O.input.length;;)if(O.avail_out===0&&(O.output=new Uint8Array(ke),O.next_out=0,O.avail_out=ke),(Ae===bt||Ae===Rt)&&O.avail_out<=6)this.onData(O.output.subarray(0,O.next_out)),O.avail_out=0;else{if(ye=vc.deflate(O,Ae),ye===Yt)return O.next_out>0&&this.onData(O.output.subarray(0,O.next_out)),ye=vc.deflateEnd(this.strm),this.onEnd(ye),this.ended=!0,ye===Ft;if(O.avail_out!==0){if(Ae>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},Di.prototype.onData=function(L){this.chunks.push(L)},Di.prototype.onEnd=function(L){L===Ft&&(this.result=r4(this.chunks)),this.chunks=[],this.err=L,this.msg=this.strm.msg};var bo={Deflate:Di,deflate:Zi,deflateRaw:function(L,X){return(X=X||{}).raw=!0,Zi(L,X)},gzip:function(L,X){return(X=X||{}).gzip=!0,Zi(L,X)}};const Fi=16209;var qt=function(L,X){let O,ke,ye,Ae,tt,Oe,wt,Ve,et,ii,zt,Ct,Ho,Ei,Qt,Ri,ti,kt,ei,Li,Pt,wi,oi,Gt;const ui=L.state;O=L.next_in,oi=L.input,ke=O+(L.avail_in-5),ye=L.next_out,Gt=L.output,Ae=ye-(X-L.avail_out),tt=ye+(L.avail_out-257),Oe=ui.dmax,wt=ui.wsize,Ve=ui.whave,et=ui.wnext,ii=ui.window,zt=ui.hold,Ct=ui.bits,Ho=ui.lencode,Ei=ui.distcode,Qt=(1<<ui.lenbits)-1,Ri=(1<<ui.distbits)-1;e:do{Ct<15&&(zt+=oi[O++]<<Ct,Ct+=8,zt+=oi[O++]<<Ct,Ct+=8),ti=Ho[zt&Qt];t:for(;;){if(kt=ti>>>24,zt>>>=kt,Ct-=kt,kt=ti>>>16&255,kt===0)Gt[ye++]=65535&ti;else{if(!(16&kt)){if((64&kt)==0){ti=Ho[(65535&ti)+(zt&(1<<kt)-1)];continue t}if(32&kt){ui.mode=16191;break e}L.msg="invalid literal/length code",ui.mode=Fi;break e}ei=65535&ti,kt&=15,kt&&(Ct<kt&&(zt+=oi[O++]<<Ct,Ct+=8),ei+=zt&(1<<kt)-1,zt>>>=kt,Ct-=kt),Ct<15&&(zt+=oi[O++]<<Ct,Ct+=8,zt+=oi[O++]<<Ct,Ct+=8),ti=Ei[zt&Ri];i:for(;;){if(kt=ti>>>24,zt>>>=kt,Ct-=kt,kt=ti>>>16&255,!(16&kt)){if((64&kt)==0){ti=Ei[(65535&ti)+(zt&(1<<kt)-1)];continue i}L.msg="invalid distance code",ui.mode=Fi;break e}if(Li=65535&ti,kt&=15,Ct<kt&&(zt+=oi[O++]<<Ct,Ct+=8,Ct<kt&&(zt+=oi[O++]<<Ct,Ct+=8)),Li+=zt&(1<<kt)-1,Li>Oe){L.msg="invalid distance too far back",ui.mode=Fi;break e}if(zt>>>=kt,Ct-=kt,kt=ye-Ae,Li>kt){if(kt=Li-kt,kt>Ve&&ui.sane){L.msg="invalid distance too far back",ui.mode=Fi;break e}if(Pt=0,wi=ii,et===0){if(Pt+=wt-kt,kt<ei){ei-=kt;do Gt[ye++]=ii[Pt++];while(--kt);Pt=ye-Li,wi=Gt}}else if(et<kt){if(Pt+=wt+et-kt,kt-=et,kt<ei){ei-=kt;do Gt[ye++]=ii[Pt++];while(--kt);if(Pt=0,et<ei){kt=et,ei-=kt;do Gt[ye++]=ii[Pt++];while(--kt);Pt=ye-Li,wi=Gt}}}else if(Pt+=et-kt,kt<ei){ei-=kt;do Gt[ye++]=ii[Pt++];while(--kt);Pt=ye-Li,wi=Gt}for(;ei>2;)Gt[ye++]=wi[Pt++],Gt[ye++]=wi[Pt++],Gt[ye++]=wi[Pt++],ei-=3;ei&&(Gt[ye++]=wi[Pt++],ei>1&&(Gt[ye++]=wi[Pt++]))}else{Pt=ye-Li;do Gt[ye++]=Gt[Pt++],Gt[ye++]=Gt[Pt++],Gt[ye++]=Gt[Pt++],ei-=3;while(ei>2);ei&&(Gt[ye++]=Gt[Pt++],ei>1&&(Gt[ye++]=Gt[Pt++]))}break}}break}}while(O<ke&&ye<tt);ei=Ct>>3,O-=ei,Ct-=ei<<3,zt&=(1<<Ct)-1,L.next_in=O,L.next_out=ye,L.avail_in=O<ke?ke-O+5:5-(O-ke),L.avail_out=ye<tt?tt-ye+257:257-(ye-tt),ui.hold=zt,ui.bits=Ct};const Oo=15,Da=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]),zn=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]),yc=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]),$r=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 Ra=(L,X,O,ke,ye,Ae,tt,Oe)=>{const wt=Oe.bits;let Ve,et,ii,zt,Ct,Ho,Ei=0,Qt=0,Ri=0,ti=0,kt=0,ei=0,Li=0,Pt=0,wi=0,oi=0,Gt=null;const ui=new Uint16Array(16),en=new Uint16Array(16);let M2,d4,u4,h4=null;for(Ei=0;Ei<=Oo;Ei++)ui[Ei]=0;for(Qt=0;Qt<ke;Qt++)ui[X[O+Qt]]++;for(kt=wt,ti=Oo;ti>=1&&ui[ti]===0;ti--);if(kt>ti&&(kt=ti),ti===0)return ye[Ae++]=20971520,ye[Ae++]=20971520,Oe.bits=1,0;for(Ri=1;Ri<ti&&ui[Ri]===0;Ri++);for(kt<Ri&&(kt=Ri),Pt=1,Ei=1;Ei<=Oo;Ei++)if(Pt<<=1,Pt-=ui[Ei],Pt<0)return-1;if(Pt>0&&(L===0||ti!==1))return-1;for(en[1]=0,Ei=1;Ei<Oo;Ei++)en[Ei+1]=en[Ei]+ui[Ei];for(Qt=0;Qt<ke;Qt++)X[O+Qt]!==0&&(tt[en[X[O+Qt]]++]=Qt);if(L===0?(Gt=h4=tt,Ho=20):L===1?(Gt=Da,h4=zn,Ho=257):(Gt=yc,h4=$r,Ho=0),oi=0,Qt=0,Ei=Ri,Ct=Ae,ei=kt,Li=0,ii=-1,wi=1<<kt,zt=wi-1,L===1&&wi>852||L===2&&wi>592)return 1;for(;;){M2=Ei-Li,tt[Qt]+1<Ho?(d4=0,u4=tt[Qt]):tt[Qt]>=Ho?(d4=h4[tt[Qt]-Ho],u4=Gt[tt[Qt]-Ho]):(d4=96,u4=0),Ve=1<<Ei-Li,et=1<<ei,Ri=et;do et-=Ve,ye[Ct+(oi>>Li)+et]=M2<<24|d4<<16|u4|0;while(et!==0);for(Ve=1<<Ei-1;oi&Ve;)Ve>>=1;if(Ve!==0?(oi&=Ve-1,oi+=Ve):oi=0,Qt++,--ui[Ei]==0){if(Ei===ti)break;Ei=X[O+tt[Qt]]}if(Ei>kt&&(oi&zt)!==ii){for(Li===0&&(Li=kt),Ct+=Ri,ei=Ei-Li,Pt=1<<ei;ei+Li<ti&&(Pt-=ui[ei+Li],!(Pt<=0));)ei++,Pt<<=1;if(wi+=1<<ei,L===1&&wi>852||L===2&&wi>592)return 1;ii=oi&zt,ye[ii]=kt<<24|ei<<16|Ct-Ae|0}}return oi!==0&&(ye[Ct+oi]=Ei-Li<<24|64<<16|0),Oe.bits=kt,0};const{Z_FINISH:po,Z_BLOCK:kn,Z_TREES:Mr,Z_OK:wo,Z_STREAM_END:Hn,Z_NEED_DICT:C2,Z_STREAM_ERROR:tr,Z_DATA_ERROR:hL,Z_MEM_ERROR:pL,Z_BUF_ERROR:O0e,Z_DEFLATED:fL}=ge,a4=16180,s4=16190,al=16191,b9=16192,w9=16194,l4=16199,c4=16200,C9=16206,Bo=16209,AL=L=>(L>>>24&255)+(L>>>8&65280)+((65280&L)<<8)+((255&L)<<24);function U0e(){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 Vd=L=>{if(!L)return 1;const X=L.state;return!X||X.strm!==L||X.mode<a4||X.mode>16211?1:0},gL=L=>{if(Vd(L))return tr;const X=L.state;return L.total_in=L.total_out=X.total=0,L.msg="",X.wrap&&(L.adler=1&X.wrap),X.mode=a4,X.last=0,X.havedict=0,X.flags=-1,X.dmax=32768,X.head=null,X.hold=0,X.bits=0,X.lencode=X.lendyn=new Int32Array(852),X.distcode=X.distdyn=new Int32Array(592),X.sane=1,X.back=-1,wo},mL=L=>{if(Vd(L))return tr;const X=L.state;return X.wsize=0,X.whave=0,X.wnext=0,gL(L)},vL=(L,X)=>{let O;if(Vd(L))return tr;const ke=L.state;return X<0?(O=0,X=-X):(O=5+(X>>4),X<48&&(X&=15)),X&&(X<8||X>15)?tr:(ke.window!==null&&ke.wbits!==X&&(ke.window=null),ke.wrap=O,ke.wbits=X,mL(L))},yL=(L,X)=>{if(!L)return tr;const O=new U0e;L.state=O,O.strm=L,O.window=null,O.mode=a4;const ke=vL(L,X);return ke!==wo&&(L.state=null),ke};let x9,k9,bL=!0;const N0e=L=>{if(bL){x9=new Int32Array(512),k9=new Int32Array(32);let X=0;for(;X<144;)L.lens[X++]=8;for(;X<256;)L.lens[X++]=9;for(;X<280;)L.lens[X++]=7;for(;X<288;)L.lens[X++]=8;for(Ra(1,L.lens,0,288,x9,0,L.work,{bits:9}),X=0;X<32;)L.lens[X++]=5;Ra(2,L.lens,0,32,k9,0,L.work,{bits:5}),bL=!1}L.lencode=x9,L.lenbits=9,L.distcode=k9,L.distbits=5},wL=(L,X,O,ke)=>{let ye;const Ae=L.state;return Ae.window===null&&(Ae.wsize=1<<Ae.wbits,Ae.wnext=0,Ae.whave=0,Ae.window=new Uint8Array(Ae.wsize)),ke>=Ae.wsize?(Ae.window.set(X.subarray(O-Ae.wsize,O),0),Ae.wnext=0,Ae.whave=Ae.wsize):(ye=Ae.wsize-Ae.wnext,ye>ke&&(ye=ke),Ae.window.set(X.subarray(O-ke,O-ke+ye),Ae.wnext),(ke-=ye)?(Ae.window.set(X.subarray(O-ke,O),0),Ae.wnext=ke,Ae.whave=Ae.wsize):(Ae.wnext+=ye,Ae.wnext===Ae.wsize&&(Ae.wnext=0),Ae.whave<Ae.wsize&&(Ae.whave+=ye))),0};var sl={inflateReset:mL,inflateReset2:vL,inflateResetKeep:gL,inflateInit:L=>yL(L,15),inflateInit2:yL,inflate:(L,X)=>{let O,ke,ye,Ae,tt,Oe,wt,Ve,et,ii,zt,Ct,Ho,Ei,Qt,Ri,ti,kt,ei,Li,Pt,wi,oi=0;const Gt=new Uint8Array(4);let ui,en;const M2=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(Vd(L)||!L.output||!L.input&&L.avail_in!==0)return tr;O=L.state,O.mode===al&&(O.mode=b9),tt=L.next_out,ye=L.output,wt=L.avail_out,Ae=L.next_in,ke=L.input,Oe=L.avail_in,Ve=O.hold,et=O.bits,ii=Oe,zt=wt,wi=wo;e:for(;;)switch(O.mode){case a4:if(O.wrap===0){O.mode=b9;break}for(;et<16;){if(Oe===0)break e;Oe--,Ve+=ke[Ae++]<<et,et+=8}if(2&O.wrap&&Ve===35615){O.wbits===0&&(O.wbits=15),O.check=0,Gt[0]=255&Ve,Gt[1]=Ve>>>8&255,O.check=Fe(O.check,Gt,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){L.msg="incorrect header check",O.mode=Bo;break}if((15&Ve)!==fL){L.msg="unknown compression method",O.mode=Bo;break}if(Ve>>>=4,et-=4,Pt=8+(15&Ve),O.wbits===0&&(O.wbits=Pt),Pt>15||Pt>O.wbits){L.msg="invalid window size",O.mode=Bo;break}O.dmax=1<<O.wbits,O.flags=0,L.adler=O.check=1,O.mode=512&Ve?16189:al,Ve=0,et=0;break;case 16181:for(;et<16;){if(Oe===0)break e;Oe--,Ve+=ke[Ae++]<<et,et+=8}if(O.flags=Ve,(255&O.flags)!==fL){L.msg="unknown compression method",O.mode=Bo;break}if(57344&O.flags){L.msg="unknown header flags set",O.mode=Bo;break}O.head&&(O.head.text=Ve>>8&1),512&O.flags&&4&O.wrap&&(Gt[0]=255&Ve,Gt[1]=Ve>>>8&255,O.check=Fe(O.check,Gt,2,0)),Ve=0,et=0,O.mode=16182;case 16182:for(;et<32;){if(Oe===0)break e;Oe--,Ve+=ke[Ae++]<<et,et+=8}O.head&&(O.head.time=Ve),512&O.flags&&4&O.wrap&&(Gt[0]=255&Ve,Gt[1]=Ve>>>8&255,Gt[2]=Ve>>>16&255,Gt[3]=Ve>>>24&255,O.check=Fe(O.check,Gt,4,0)),Ve=0,et=0,O.mode=16183;case 16183:for(;et<16;){if(Oe===0)break e;Oe--,Ve+=ke[Ae++]<<et,et+=8}O.head&&(O.head.xflags=255&Ve,O.head.os=Ve>>8),512&O.flags&&4&O.wrap&&(Gt[0]=255&Ve,Gt[1]=Ve>>>8&255,O.check=Fe(O.check,Gt,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+=ke[Ae++]<<et,et+=8}O.length=Ve,O.head&&(O.head.extra_len=Ve),512&O.flags&&4&O.wrap&&(Gt[0]=255&Ve,Gt[1]=Ve>>>8&255,O.check=Fe(O.check,Gt,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(ke.subarray(Ae,Ae+Ct),Pt)),512&O.flags&&4&O.wrap&&(O.check=Fe(O.check,ke,Ct,Ae)),Oe-=Ct,Ae+=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=ke[Ae+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=Fe(O.check,ke,Ct,Ae)),Oe-=Ct,Ae+=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=ke[Ae+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=Fe(O.check,ke,Ct,Ae)),Oe-=Ct,Ae+=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+=ke[Ae++]<<et,et+=8}if(4&O.wrap&&Ve!==(65535&O.check)){L.msg="header crc mismatch",O.mode=Bo;break}Ve=0,et=0}O.head&&(O.head.hcrc=O.flags>>9&1,O.head.done=!0),L.adler=O.check=0,O.mode=al;break;case 16189:for(;et<32;){if(Oe===0)break e;Oe--,Ve+=ke[Ae++]<<et,et+=8}L.adler=O.check=AL(Ve),Ve=0,et=0,O.mode=s4;case s4:if(O.havedict===0)return L.next_out=tt,L.avail_out=wt,L.next_in=Ae,L.avail_in=Oe,O.hold=Ve,O.bits=et,C2;L.adler=O.check=1,O.mode=al;case al:if(X===kn||X===Mr)break e;case b9:if(O.last){Ve>>>=7&et,et-=7&et,O.mode=C9;break}for(;et<3;){if(Oe===0)break e;Oe--,Ve+=ke[Ae++]<<et,et+=8}switch(O.last=1&Ve,Ve>>>=1,et-=1,3&Ve){case 0:O.mode=16193;break;case 1:if(N0e(O),O.mode=l4,X===Mr){Ve>>>=2,et-=2;break e}break;case 2:O.mode=16196;break;case 3:L.msg="invalid block type",O.mode=Bo}Ve>>>=2,et-=2;break;case 16193:for(Ve>>>=7&et,et-=7&et;et<32;){if(Oe===0)break e;Oe--,Ve+=ke[Ae++]<<et,et+=8}if((65535&Ve)!=(Ve>>>16^65535)){L.msg="invalid stored block lengths",O.mode=Bo;break}if(O.length=65535&Ve,Ve=0,et=0,O.mode=w9,X===Mr)break e;case w9:O.mode=16195;case 16195:if(Ct=O.length,Ct){if(Ct>Oe&&(Ct=Oe),Ct>wt&&(Ct=wt),Ct===0)break e;ye.set(ke.subarray(Ae,Ae+Ct),tt),Oe-=Ct,Ae+=Ct,wt-=Ct,tt+=Ct,O.length-=Ct;break}O.mode=al;break;case 16196:for(;et<14;){if(Oe===0)break e;Oe--,Ve+=ke[Ae++]<<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){L.msg="too many length or distance symbols",O.mode=Bo;break}O.have=0,O.mode=16197;case 16197:for(;O.have<O.ncode;){for(;et<3;){if(Oe===0)break e;Oe--,Ve+=ke[Ae++]<<et,et+=8}O.lens[M2[O.have++]]=7&Ve,Ve>>>=3,et-=3}for(;O.have<19;)O.lens[M2[O.have++]]=0;if(O.lencode=O.lendyn,O.lenbits=7,ui={bits:O.lenbits},wi=Ra(0,O.lens,0,19,O.lencode,0,O.work,ui),O.lenbits=ui.bits,wi){L.msg="invalid code lengths set",O.mode=Bo;break}O.have=0,O.mode=16198;case 16198:for(;O.have<O.nlen+O.ndist;){for(;oi=O.lencode[Ve&(1<<O.lenbits)-1],Qt=oi>>>24,Ri=oi>>>16&255,ti=65535&oi,!(Qt<=et);){if(Oe===0)break e;Oe--,Ve+=ke[Ae++]<<et,et+=8}if(ti<16)Ve>>>=Qt,et-=Qt,O.lens[O.have++]=ti;else{if(ti===16){for(en=Qt+2;et<en;){if(Oe===0)break e;Oe--,Ve+=ke[Ae++]<<et,et+=8}if(Ve>>>=Qt,et-=Qt,O.have===0){L.msg="invalid bit length repeat",O.mode=Bo;break}Pt=O.lens[O.have-1],Ct=3+(3&Ve),Ve>>>=2,et-=2}else if(ti===17){for(en=Qt+3;et<en;){if(Oe===0)break e;Oe--,Ve+=ke[Ae++]<<et,et+=8}Ve>>>=Qt,et-=Qt,Pt=0,Ct=3+(7&Ve),Ve>>>=3,et-=3}else{for(en=Qt+7;et<en;){if(Oe===0)break e;Oe--,Ve+=ke[Ae++]<<et,et+=8}Ve>>>=Qt,et-=Qt,Pt=0,Ct=11+(127&Ve),Ve>>>=7,et-=7}if(O.have+Ct>O.nlen+O.ndist){L.msg="invalid bit length repeat",O.mode=Bo;break}for(;Ct--;)O.lens[O.have++]=Pt}}if(O.mode===Bo)break;if(O.lens[256]===0){L.msg="invalid code -- missing end-of-block",O.mode=Bo;break}if(O.lenbits=9,ui={bits:O.lenbits},wi=Ra(1,O.lens,0,O.nlen,O.lencode,0,O.work,ui),O.lenbits=ui.bits,wi){L.msg="invalid literal/lengths set",O.mode=Bo;break}if(O.distbits=6,O.distcode=O.distdyn,ui={bits:O.distbits},wi=Ra(2,O.lens,O.nlen,O.ndist,O.distcode,0,O.work,ui),O.distbits=ui.bits,wi){L.msg="invalid distances set",O.mode=Bo;break}if(O.mode=l4,X===Mr)break e;case l4:O.mode=c4;case c4:if(Oe>=6&&wt>=258){L.next_out=tt,L.avail_out=wt,L.next_in=Ae,L.avail_in=Oe,O.hold=Ve,O.bits=et,qt(L,zt),tt=L.next_out,ye=L.output,wt=L.avail_out,Ae=L.next_in,ke=L.input,Oe=L.avail_in,Ve=O.hold,et=O.bits,O.mode===al&&(O.back=-1);break}for(O.back=0;oi=O.lencode[Ve&(1<<O.lenbits)-1],Qt=oi>>>24,Ri=oi>>>16&255,ti=65535&oi,!(Qt<=et);){if(Oe===0)break e;Oe--,Ve+=ke[Ae++]<<et,et+=8}if(Ri&&(240&Ri)==0){for(kt=Qt,ei=Ri,Li=ti;oi=O.lencode[Li+((Ve&(1<<kt+ei)-1)>>kt)],Qt=oi>>>24,Ri=oi>>>16&255,ti=65535&oi,!(kt+Qt<=et);){if(Oe===0)break e;Oe--,Ve+=ke[Ae++]<<et,et+=8}Ve>>>=kt,et-=kt,O.back+=kt}if(Ve>>>=Qt,et-=Qt,O.back+=Qt,O.length=ti,Ri===0){O.mode=16205;break}if(32&Ri){O.back=-1,O.mode=al;break}if(64&Ri){L.msg="invalid literal/length code",O.mode=Bo;break}O.extra=15&Ri,O.mode=16201;case 16201:if(O.extra){for(en=O.extra;et<en;){if(Oe===0)break e;Oe--,Ve+=ke[Ae++]<<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(;oi=O.distcode[Ve&(1<<O.distbits)-1],Qt=oi>>>24,Ri=oi>>>16&255,ti=65535&oi,!(Qt<=et);){if(Oe===0)break e;Oe--,Ve+=ke[Ae++]<<et,et+=8}if((240&Ri)==0){for(kt=Qt,ei=Ri,Li=ti;oi=O.distcode[Li+((Ve&(1<<kt+ei)-1)>>kt)],Qt=oi>>>24,Ri=oi>>>16&255,ti=65535&oi,!(kt+Qt<=et);){if(Oe===0)break e;Oe--,Ve+=ke[Ae++]<<et,et+=8}Ve>>>=kt,et-=kt,O.back+=kt}if(Ve>>>=Qt,et-=Qt,O.back+=Qt,64&Ri){L.msg="invalid distance code",O.mode=Bo;break}O.offset=ti,O.extra=15&Ri,O.mode=16203;case 16203:if(O.extra){for(en=O.extra;et<en;){if(Oe===0)break e;Oe--,Ve+=ke[Ae++]<<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){L.msg="invalid distance too far back",O.mode=Bo;break}O.mode=16204;case 16204:if(wt===0)break e;if(Ct=zt-wt,O.offset>Ct){if(Ct=O.offset-Ct,Ct>O.whave&&O.sane){L.msg="invalid distance too far back",O.mode=Bo;break}Ct>O.wnext?(Ct-=O.wnext,Ho=O.wsize-Ct):Ho=O.wnext-Ct,Ct>O.length&&(Ct=O.length),Ei=O.window}else Ei=ye,Ho=tt-O.offset,Ct=O.length;Ct>wt&&(Ct=wt),wt-=Ct,O.length-=Ct;do ye[tt++]=Ei[Ho++];while(--Ct);O.length===0&&(O.mode=c4);break;case 16205:if(wt===0)break e;ye[tt++]=O.length,wt--,O.mode=c4;break;case C9:if(O.wrap){for(;et<32;){if(Oe===0)break e;Oe--,Ve|=ke[Ae++]<<et,et+=8}if(zt-=wt,L.total_out+=zt,O.total+=zt,4&O.wrap&&zt&&(L.adler=O.check=O.flags?Fe(O.check,ye,zt,tt-zt):Ce(O.check,ye,zt,tt-zt)),zt=wt,4&O.wrap&&(O.flags?Ve:AL(Ve))!==O.check){L.msg="incorrect data check",O.mode=Bo;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+=ke[Ae++]<<et,et+=8}if(4&O.wrap&&Ve!==(4294967295&O.total)){L.msg="incorrect length check",O.mode=Bo;break}Ve=0,et=0}O.mode=16208;case 16208:wi=Hn;break e;case Bo:wi=hL;break e;case 16210:return pL;default:return tr}return L.next_out=tt,L.avail_out=wt,L.next_in=Ae,L.avail_in=Oe,O.hold=Ve,O.bits=et,(O.wsize||zt!==L.avail_out&&O.mode<Bo&&(O.mode<C9||X!==po))&&wL(L,L.output,L.next_out,zt-L.avail_out),ii-=L.avail_in,zt-=L.avail_out,L.total_in+=ii,L.total_out+=zt,O.total+=zt,4&O.wrap&&zt&&(L.adler=O.check=O.flags?Fe(O.check,ye,zt,L.next_out-zt):Ce(O.check,ye,zt,L.next_out-zt)),L.data_type=O.bits+(O.last?64:0)+(O.mode===al?128:0)+(O.mode===l4||O.mode===w9?256:0),(ii===0&&zt===0||X===po)&&wi===wo&&(wi=O0e),wi},inflateEnd:L=>{if(Vd(L))return tr;let X=L.state;return X.window&&(X.window=null),L.state=null,wo},inflateGetHeader:(L,X)=>{if(Vd(L))return tr;const O=L.state;return(2&O.wrap)==0?tr:(O.head=X,X.done=!1,wo)},inflateSetDictionary:(L,X)=>{const O=X.length;let ke,ye,Ae;return Vd(L)?tr:(ke=L.state,ke.wrap!==0&&ke.mode!==s4?tr:ke.mode===s4&&(ye=1,ye=Ce(ye,X,O,0),ye!==ke.check)?hL:(Ae=wL(L,X,O,O),Ae?(ke.mode=16210,pL):(ke.havedict=1,wo)))},inflateInfo:"pako inflate (from Nodeca project)"},j0e=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 CL=Object.prototype.toString,{Z_NO_FLUSH:V0e,Z_FINISH:z0e,Z_OK:x2,Z_STREAM_END:M9,Z_NEED_DICT:E9,Z_STREAM_ERROR:H0e,Z_DATA_ERROR:xL,Z_MEM_ERROR:q0e}=ge;function k2(L){this.options=o4({chunkSize:65536,windowBits:15,to:""},L||{});const X=this.options;X.raw&&X.windowBits>=0&&X.windowBits<16&&(X.windowBits=-X.windowBits,X.windowBits===0&&(X.windowBits=-15)),!(X.windowBits>=0&&X.windowBits<16)||L&&L.windowBits||(X.windowBits+=32),X.windowBits>15&&X.windowBits<48&&(15&X.windowBits)==0&&(X.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new nt,this.strm.avail_out=0;let O=sl.inflateInit2(this.strm,X.windowBits);if(O!==x2)throw new Error(ve[O]);if(this.header=new j0e,sl.inflateGetHeader(this.strm,this.header),X.dictionary&&(typeof X.dictionary=="string"?X.dictionary=w2(X.dictionary):CL.call(X.dictionary)==="[object ArrayBuffer]"&&(X.dictionary=new Uint8Array(X.dictionary)),X.raw&&(O=sl.inflateSetDictionary(this.strm,X.dictionary),O!==x2)))throw new Error(ve[O])}function B9(L,X){const O=new k2(X);if(O.push(L),O.err)throw O.msg||ve[O.err];return O.result}k2.prototype.push=function(L,X){const O=this.strm,ke=this.options.chunkSize,ye=this.options.dictionary;let Ae,tt,Oe;if(this.ended)return!1;for(tt=X===~~X?X:X===!0?z0e:V0e,CL.call(L)==="[object ArrayBuffer]"?O.input=new Uint8Array(L):O.input=L,O.next_in=0,O.avail_in=O.input.length;;){for(O.avail_out===0&&(O.output=new Uint8Array(ke),O.next_out=0,O.avail_out=ke),Ae=sl.inflate(O,tt),Ae===E9&&ye&&(Ae=sl.inflateSetDictionary(O,ye),Ae===x2?Ae=sl.inflate(O,tt):Ae===xL&&(Ae=E9));O.avail_in>0&&Ae===M9&&O.state.wrap>0&&L[O.next_in]!==0;)sl.inflateReset(O),Ae=sl.inflate(O,tt);switch(Ae){case H0e:case xL:case E9:case q0e:return this.onEnd(Ae),this.ended=!0,!1}if(Oe=O.avail_out,O.next_out&&(O.avail_out===0||Ae===M9))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=ke-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(Ae!==x2||Oe!==0){if(Ae===M9)return Ae=sl.inflateEnd(this.strm),this.onEnd(Ae),this.ended=!0,!0;if(O.avail_in===0)break}}return!0},k2.prototype.onData=function(L){this.chunks.push(L)},k2.prototype.onEnd=function(L){L===x2&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=r4(this.chunks)),this.chunks=[],this.err=L,this.msg=this.strm.msg};var Q0e={Inflate:k2,inflate:B9,inflateRaw:function(L,X){return(X=X||{}).raw=!0,B9(L,X)},ungzip:B9};const{Deflate:G0e,deflate:K0e,deflateRaw:J0e,gzip:Z0e}=bo,{Inflate:W0e,inflate:Y0e,inflateRaw:X0e,ungzip:$0e}=Q0e;var kL=G0e,ML=K0e,EL=J0e,BL=Z0e,PL=W0e,IL=Y0e,SL=X0e,TL=$0e,DL=ge,efe={Deflate:kL,deflate:ML,deflateRaw:EL,gzip:BL,Inflate:PL,inflate:IL,inflateRaw:SL,ungzip:TL,constants:DL};i.Deflate=kL,i.Inflate=PL,i.constants=DL,i.default=efe,i.deflate=ML,i.deflateRaw=EL,i.gzip=BL,i.inflate=IL,i.inflateRaw=SL,i.ungzip=TL,Object.defineProperty(i,"__esModule",{value:!0})}))})(v7,v7.exports)),v7.exports}var fY=iLt();const oLt=rm(fY),ts=tfe({__proto__:null,default:oLt},[fY]);let mn=window.pako||ts;mn.inflate||(mn=mn.default);const rLt=(function(){const t=new Float32Array(3);return function(e){return t[0]=e[0]/255,t[1]=e[1]/255,t[2]=e[2]/255,t}})();function nLt(t){return{positions:t[0],normals:t[1],indices:t[2],edgeIndices:t[3],meshPositions:t[4],meshIndices:t[5],meshEdgesIndices:t[6],meshColors:t[7],entityIDs:t[8],entityMeshes:t[9],entityIsObjects:t[10],positionsDecodeMatrix:t[11]}}function aLt(t){return{positions:new Uint16Array(mn.inflate(t.positions).buffer),normals:new Int8Array(mn.inflate(t.normals).buffer),indices:new Uint32Array(mn.inflate(t.indices).buffer),edgeIndices:new Uint32Array(mn.inflate(t.edgeIndices).buffer),meshPositions:new Uint32Array(mn.inflate(t.meshPositions).buffer),meshIndices:new Uint32Array(mn.inflate(t.meshIndices).buffer),meshEdgesIndices:new Uint32Array(mn.inflate(t.meshEdgesIndices).buffer),meshColors:new Uint8Array(mn.inflate(t.meshColors).buffer),entityIDs:mn.inflate(t.entityIDs,{to:"string"}),entityMeshes:new Uint32Array(mn.inflate(t.entityMeshes).buffer),entityIsObjects:new Uint8Array(mn.inflate(t.entityIsObjects).buffer),positionsDecodeMatrix:new Float32Array(mn.inflate(t.positionsDecodeMatrix).buffer)}}function sLt(t,e,i,o,r,n){n.getNextId(),o.positionsCompression="precompressed",o.normalsCompression="precompressed";const a=i.positions,s=i.normals,l=i.indices,c=i.edgeIndices,d=i.meshPositions,u=i.meshIndices,h=i.meshEdgesIndices,p=i.meshColors,A=JSON.parse(i.entityIDs),f=i.entityMeshes,m=i.entityIsObjects,g=d.length,y=f.length;for(let v=0;v<y;v++){const b=A[v],x=e.globalizeObjectIds?C.globalizeObjectId(o.id,b):b,k=t.metaScene.metaObjects[x],E={},B={};if(k){if(e.excludeTypesMap&&k.type&&e.excludeTypesMap[k.type]||e.includeTypesMap&&k.type&&!e.includeTypesMap[k.type])continue;const T=e.objectDefaults?e.objectDefaults[k.type]||e.objectDefaults.DEFAULT:null;T&&(T.visible===!1&&(E.visible=!1),T.pickable===!1&&(E.pickable=!1),T.colorize&&(B.color=T.colorize),T.opacity!==void 0&&T.opacity!==null&&(B.opacity=T.opacity))}else if(e.excludeUnclassifiedObjects)continue;const P=v===y-1,D=[];for(let T=f[v],R=P?f.length:f[v+1];T<R;T++){const F=T===g-1,N=x+".mesh."+T,q=rLt(p.subarray(T*4,T*4+3)),V=p[T*4+3]/255;o.createMesh(mt.apply(B,{id:N,primitive:"triangles",positionsCompressed:a.subarray(d[T],F?a.length:d[T+1]),normalsCompressed:s.subarray(d[T],F?a.length:d[T+1]),indices:l.subarray(u[T],F?l.length:u[T+1]),edgeIndices:c.subarray(h[T],F?c.length:h[T+1]),positionsDecodeMatrix:i.positionsDecodeMatrix,color:q,opacity:V})),D.push(N)}o.createEntity(mt.apply(E,{id:x,isObject:m[v]===1,meshIds:D}))}}const AY={version:1,parse:function(t,e,i,o,r,n){const a=nLt(i),s=aLt(a);sLt(t,e,s,o,r,n)}};let vr=window.pako||ts;vr.inflate||(vr=vr.default);function lLt(t){return{positions:t[0],normals:t[1],indices:t[2],edgeIndices:t[3],meshPositions:t[4],meshIndices:t[5],meshEdgesIndices:t[6],meshColors:t[7],entityIDs:t[8],entityMeshes:t[9],entityIsObjects:t[10],positionsDecodeMatrix:t[11],entityMeshIds:t[12],entityMatrices:t[13],entityUsesInstancing:t[14]}}function cLt(t){return{positions:new Uint16Array(vr.inflate(t.positions).buffer),normals:new Int8Array(vr.inflate(t.normals).buffer),indices:new Uint32Array(vr.inflate(t.indices).buffer),edgeIndices:new Uint32Array(vr.inflate(t.edgeIndices).buffer),meshPositions:new Uint32Array(vr.inflate(t.meshPositions).buffer),meshIndices:new Uint32Array(vr.inflate(t.meshIndices).buffer),meshEdgesIndices:new Uint32Array(vr.inflate(t.meshEdgesIndices).buffer),meshColors:new Uint8Array(vr.inflate(t.meshColors).buffer),entityIDs:vr.inflate(t.entityIDs,{to:"string"}),entityMeshes:new Uint32Array(vr.inflate(t.entityMeshes).buffer),entityIsObjects:new Uint8Array(vr.inflate(t.entityIsObjects).buffer),positionsDecodeMatrix:new Float32Array(vr.inflate(t.positionsDecodeMatrix).buffer),entityMeshIds:new Uint32Array(vr.inflate(t.entityMeshIds).buffer),entityMatrices:new Float32Array(vr.inflate(t.entityMatrices).buffer),entityUsesInstancing:new Uint8Array(vr.inflate(t.entityUsesInstancing).buffer)}}const dLt=(function(){const t=new Float32Array(3);return function(e){return t[0]=e[0]/255,t[1]=e[1]/255,t[2]=e[2]/255,t}})();function uLt(t,e,i,o,r,n){const a=n.getNextId();o.positionsCompression="precompressed",o.normalsCompression="precompressed";const s=i.positions,l=i.normals,c=i.indices,d=i.edgeIndices,u=i.meshPositions,h=i.meshIndices,p=i.meshEdgesIndices,A=i.meshColors,f=JSON.parse(i.entityIDs),m=i.entityMeshes,g=i.entityIsObjects,y=i.entityMeshIds,v=i.entityMatrices,b=i.entityUsesInstancing,x=u.length,k=m.length,E={};for(let B=0;B<k;B++){const P=f[B],D=e.globalizeObjectIds?C.globalizeObjectId(o.id,P):P,T=t.metaScene.metaObjects[D],R={},F={},N=v.subarray(B*16,B*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&&(R.visible=!1),W.pickable===!1&&(R.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 q=B===k-1,V=[];for(let W=m[B],Y=q?y.length:m[B+1];W<Y;W++){const $=y[W],me=$===x-1,Ie=n.getNextId(),Se=dLt(A.subarray($*4,$*4+3)),qe=A[$*4+3]/255,Qe=s.subarray(u[$],me?s.length:u[$+1]),Ce=l.subarray(u[$],me?s.length:u[$+1]),Le=c.subarray(h[$],me?c.length:h[$+1]),Fe=d.subarray(p[$],me?d.length:p[$+1]);if(b[B]===1){const ve=`${a}.geometry.${Ie}.${$}`;ve in E||(o.createGeometry({id:ve,positionsCompressed:Qe,normalsCompressed:Ce,indices:Le,edgeIndices:Fe,primitive:"triangles",positionsDecodeMatrix:i.positionsDecodeMatrix}),E[ve]=!0),o.createMesh(mt.apply(F,{id:Ie,color:Se,opacity:qe,matrix:N,geometryId:ve})),V.push(Ie)}else o.createMesh(mt.apply(F,{id:Ie,primitive:"triangles",positionsCompressed:Qe,normalsCompressed:Ce,indices:Le,edgeIndices:Fe,positionsDecodeMatrix:i.positionsDecodeMatrix,color:Se,opacity:qe})),V.push(Ie)}V.length&&o.createEntity(mt.apply(R,{id:D,isObject:g[B]===1,meshIds:V}))}}const gY={version:2,parse:function(t,e,i,o,r,n){const a=lLt(i),s=cLt(a);uLt(t,e,s,o,r,n)}};let dr=window.pako||ts;dr.inflate||(dr=dr.default);function hLt(t){return{positions:t[0],normals:t[1],indices:t[2],edgeIndices:t[3],meshPositions:t[4],meshIndices:t[5],meshEdgesIndices:t[6],meshColors:t[7],entityIDs:t[8],entityMeshes:t[9],entityIsObjects:t[10],instancedPositionsDecodeMatrix:t[11],batchedPositionsDecodeMatrix:t[12],entityMeshIds:t[13],entityMatrices:t[14],entityUsesInstancing:t[15]}}function pLt(t){return{positions:new Uint16Array(dr.inflate(t.positions).buffer),normals:new Int8Array(dr.inflate(t.normals).buffer),indices:new Uint32Array(dr.inflate(t.indices).buffer),edgeIndices:new Uint32Array(dr.inflate(t.edgeIndices).buffer),meshPositions:new Uint32Array(dr.inflate(t.meshPositions).buffer),meshIndices:new Uint32Array(dr.inflate(t.meshIndices).buffer),meshEdgesIndices:new Uint32Array(dr.inflate(t.meshEdgesIndices).buffer),meshColors:new Uint8Array(dr.inflate(t.meshColors).buffer),entityIDs:dr.inflate(t.entityIDs,{to:"string"}),entityMeshes:new Uint32Array(dr.inflate(t.entityMeshes).buffer),entityIsObjects:new Uint8Array(dr.inflate(t.entityIsObjects).buffer),instancedPositionsDecodeMatrix:new Float32Array(dr.inflate(t.instancedPositionsDecodeMatrix).buffer),batchedPositionsDecodeMatrix:new Float32Array(dr.inflate(t.batchedPositionsDecodeMatrix).buffer),entityMeshIds:new Uint32Array(dr.inflate(t.entityMeshIds).buffer),entityMatrices:new Float32Array(dr.inflate(t.entityMatrices).buffer),entityUsesInstancing:new Uint8Array(dr.inflate(t.entityUsesInstancing).buffer)}}const fLt=(function(){const t=new Float32Array(3);return function(e){return t[0]=e[0]/255,t[1]=e[1]/255,t[2]=e[2]/255,t}})();function ALt(t,e,i,o,r,n){const a=n.getNextId();o.positionsCompression="precompressed",o.normalsCompression="precompressed";const s=i.positions,l=i.normals,c=i.indices,d=i.edgeIndices,u=i.meshPositions,h=i.meshIndices,p=i.meshEdgesIndices,A=i.meshColors,f=JSON.parse(i.entityIDs),m=i.entityMeshes,g=i.entityIsObjects,y=i.entityMeshIds,v=i.entityMatrices,b=i.entityUsesInstancing,x=u.length,k=m.length,E={};for(let F=0;F<k;F++){const N=f[F],q=e.globalizeObjectIds?C.globalizeObjectId(o.id,N):N,V=t.metaScene.metaObjects[q],W={},Y={},$=v.subarray(F*16,F*16+16);if(V){if(e.excludeTypesMap&&V.type&&e.excludeTypesMap[V.type]||e.includeTypesMap&&V.type&&!e.includeTypesMap[V.type])continue;const Se=e.objectDefaults?e.objectDefaults[V.type]||e.objectDefaults.DEFAULT:null;Se&&(Se.visible===!1&&(W.visible=!1),Se.pickable===!1&&(W.pickable=!1),Se.colorize&&(Y.color=Se.colorize),Se.opacity!==void 0&&Se.opacity!==null&&(Y.opacity=Se.opacity))}else if(e.excludeUnclassifiedObjects)continue;const me=F===k-1,Ie=[];for(let Se=m[F],qe=me?y.length:m[F+1];Se<qe;Se++){var B=y[Se];const Qe=B===x-1,Ce=`${a}.${q}.mesh.${B}`,Le=fLt(A.subarray(B*4,B*4+3)),Fe=A[B*4+3]/255;var P=s.subarray(u[B],Qe?s.length:u[B+1]),D=l.subarray(u[B],Qe?s.length:u[B+1]),T=c.subarray(h[B],Qe?c.length:h[B+1]),R=d.subarray(p[B],Qe?d.length:p[B+1]);if(b[F]===1){const ve=`${a}.geometry.${Ce}.${B}`;ve in E||(o.createGeometry({id:ve,positionsCompressed:P,normalsCompressed:D,indices:T,edgeIndices:R,primitive:"triangles",positionsDecodeMatrix:i.instancedPositionsDecodeMatrix}),E[ve]=!0),o.createMesh(mt.apply(Y,{id:Ce,color:Le,opacity:Fe,matrix:$,geometryId:ve})),Ie.push(Ce)}else o.createMesh(mt.apply(Y,{id:Ce,primitive:"triangles",positionsCompressed:P,normalsCompressed:D,indices:T,edgeIndices:R,positionsDecodeMatrix:i.batchedPositionsDecodeMatrix,color:Le,opacity:Fe})),Ie.push(Ce)}Ie.length&&o.createEntity(mt.apply(W,{id:q,isObject:g[F]===1,meshIds:Ie}))}}const mY={version:3,parse:function(t,e,i,o,r,n){const a=hLt(i),s=pLt(a);ALt(t,e,s,o,r,n)}};let yr=window.pako||ts;yr.inflate||(yr=yr.default);function gLt(t){return{positions:t[0],normals:t[1],indices:t[2],edgeIndices:t[3],decodeMatrices:t[4],matrices:t[5],eachPrimitivePositionsAndNormalsPortion:t[6],eachPrimitiveIndicesPortion:t[7],eachPrimitiveEdgeIndicesPortion:t[8],eachPrimitiveDecodeMatricesPortion:t[9],eachPrimitiveColor:t[10],primitiveInstances:t[11],eachEntityId:t[12],eachEntityPrimitiveInstancesPortion:t[13],eachEntityMatricesPortion:t[14],eachEntityMatrix:t[15]}}function mLt(t){return{positions:new Uint16Array(yr.inflate(t.positions).buffer),normals:new Int8Array(yr.inflate(t.normals).buffer),indices:new Uint32Array(yr.inflate(t.indices).buffer),edgeIndices:new Uint32Array(yr.inflate(t.edgeIndices).buffer),decodeMatrices:new Float32Array(yr.inflate(t.decodeMatrices).buffer),matrices:new Float32Array(yr.inflate(t.matrices).buffer),eachPrimitivePositionsAndNormalsPortion:new Uint32Array(yr.inflate(t.eachPrimitivePositionsAndNormalsPortion).buffer),eachPrimitiveIndicesPortion:new Uint32Array(yr.inflate(t.eachPrimitiveIndicesPortion).buffer),eachPrimitiveEdgeIndicesPortion:new Uint32Array(yr.inflate(t.eachPrimitiveEdgeIndicesPortion).buffer),eachPrimitiveDecodeMatricesPortion:new Uint32Array(yr.inflate(t.eachPrimitiveDecodeMatricesPortion).buffer),eachPrimitiveColor:new Uint8Array(yr.inflate(t.eachPrimitiveColor).buffer),primitiveInstances:new Uint32Array(yr.inflate(t.primitiveInstances).buffer),eachEntityId:yr.inflate(t.eachEntityId,{to:"string"}),eachEntityPrimitiveInstancesPortion:new Uint32Array(yr.inflate(t.eachEntityPrimitiveInstancesPortion).buffer),eachEntityMatricesPortion:new Uint32Array(yr.inflate(t.eachEntityMatricesPortion).buffer)}}const vLt=(function(){const t=new Float32Array(3);return function(e){return t[0]=e[0]/255,t[1]=e[1]/255,t[2]=e[2]/255,t}})();function yLt(t,e,i,o,r,n){const a=n.getNextId();o.positionsCompression="precompressed",o.normalsCompression="precompressed";const s=i.positions,l=i.normals,c=i.indices,d=i.edgeIndices,u=i.decodeMatrices,h=i.matrices,p=i.eachPrimitivePositionsAndNormalsPortion,A=i.eachPrimitiveIndicesPortion,f=i.eachPrimitiveEdgeIndicesPortion,m=i.eachPrimitiveDecodeMatricesPortion,g=i.eachPrimitiveColor,y=i.primitiveInstances,v=JSON.parse(i.eachEntityId),b=i.eachEntityPrimitiveInstancesPortion,x=i.eachEntityMatricesPortion,k=p.length,E=y.length,B=new Uint8Array(k),P=new Uint32Array(k),D=v.length;for(let F=0;F<k;F++)P[F]=F;P.sort((F,N)=>m[F]<m[N]?-1:m[F]>m[N]?1:0);for(let F=0;F<E;F++){const N=y[F];B[N]++}const T={};for(let F=0;F<D;F++){const N=D-1,q=F===N,V=b[F],W=q?b[N]:b[F+1];for(let Y=V;Y<W;Y++){const $=y[Y];B[$]>1||(T[$]=F)}}for(let F=0;F<k;F++){const N=P[F],q=N===k-1,V=B[N]>1,W=vLt(g.subarray(N*4,N*4+3)),Y=g[N*4+3]/255,$=s.subarray(p[N],q?s.length:p[N+1]),me=l.subarray(p[N],q?l.length:p[N+1]),Ie=c.subarray(A[N],q?c.length:A[N+1]),Se=d.subarray(f[N],q?d.length:f[N+1]),qe=u.subarray(m[N],m[N]+16);if(V){const Qe=`${a}-geometry.${N}`;o.createGeometry({id:Qe,primitive:"triangles",positionsCompressed:$,normalsCompressed:me,indices:Ie,edgeIndices:Se,positionsDecodeMatrix:qe})}else{const Qe=`${a}-${N}`,Ce=T[N];v[Ce];const Le={};o.createMesh(mt.apply(Le,{id:Qe,primitive:"triangles",positionsCompressed:$,normalsCompressed:me,indices:Ie,edgeIndices:Se,positionsDecodeMatrix:qe,color:W,opacity:Y}))}}let R=0;for(let F=0;F<D;F++){const N=D-1,q=F===N,V=v[F],W=b[F],Y=q?b[N]:b[F+1],$=[];for(let me=W;me<Y;me++){const Ie=y[me];if(B[Ie]>1){const Se={},qe=`${a}-instance.${R++}`,Qe=`${a}-geometry.${Ie}`,Ce=x[F]*16,Le=h.subarray(Ce,Ce+16);o.createMesh(mt.apply(Se,{id:qe,geometryId:Qe,matrix:Le})),$.push(qe)}else $.push(Ie)}if($.length>0){const me={};o.createEntity(mt.apply(me,{id:V,isObject:!0,meshIds:$}))}}}const vY={version:4,parse:function(t,e,i,o,r,n){const a=gLt(i),s=mLt(a);yLt(t,e,s,o,r,n)}};let Wr=window.pako||ts;Wr.inflate||(Wr=Wr.default);function bLt(t){return{positions:t[0],normals:t[1],indices:t[2],edgeIndices:t[3],matrices:t[4],eachPrimitivePositionsAndNormalsPortion:t[5],eachPrimitiveIndicesPortion:t[6],eachPrimitiveEdgeIndicesPortion:t[7],eachPrimitiveColor:t[8],primitiveInstances:t[9],eachEntityId:t[10],eachEntityPrimitiveInstancesPortion:t[11],eachEntityMatricesPortion:t[12]}}function wLt(t){return{positions:new Float32Array(Wr.inflate(t.positions).buffer),normals:new Int8Array(Wr.inflate(t.normals).buffer),indices:new Uint32Array(Wr.inflate(t.indices).buffer),edgeIndices:new Uint32Array(Wr.inflate(t.edgeIndices).buffer),matrices:new Float32Array(Wr.inflate(t.matrices).buffer),eachPrimitivePositionsAndNormalsPortion:new Uint32Array(Wr.inflate(t.eachPrimitivePositionsAndNormalsPortion).buffer),eachPrimitiveIndicesPortion:new Uint32Array(Wr.inflate(t.eachPrimitiveIndicesPortion).buffer),eachPrimitiveEdgeIndicesPortion:new Uint32Array(Wr.inflate(t.eachPrimitiveEdgeIndicesPortion).buffer),eachPrimitiveColor:new Uint8Array(Wr.inflate(t.eachPrimitiveColor).buffer),primitiveInstances:new Uint32Array(Wr.inflate(t.primitiveInstances).buffer),eachEntityId:Wr.inflate(t.eachEntityId,{to:"string"}),eachEntityPrimitiveInstancesPortion:new Uint32Array(Wr.inflate(t.eachEntityPrimitiveInstancesPortion).buffer),eachEntityMatricesPortion:new Uint32Array(Wr.inflate(t.eachEntityMatricesPortion).buffer)}}const CLt=(function(){const t=new Float32Array(3);return function(e){return t[0]=e[0]/255,t[1]=e[1]/255,t[2]=e[2]/255,t}})();function xLt(t,e,i,o,r,n){const a=n.getNextId();o.positionsCompression="disabled",o.normalsCompression="precompressed";const s=i.positions,l=i.normals,c=i.indices,d=i.edgeIndices,u=i.matrices,h=i.eachPrimitivePositionsAndNormalsPortion,p=i.eachPrimitiveIndicesPortion,A=i.eachPrimitiveEdgeIndicesPortion,f=i.eachPrimitiveColor,m=i.primitiveInstances,g=JSON.parse(i.eachEntityId),y=i.eachEntityPrimitiveInstancesPortion,v=i.eachEntityMatricesPortion,b=h.length,x=m.length,k=new Uint8Array(b),E=g.length;for(let D=0;D<x;D++){const T=m[D];k[T]++}const B={};for(let D=0;D<E;D++){const T=E-1,R=D===T,F=y[D],N=R?y[T]:y[D+1];for(let q=F;q<N;q++){const V=m[q];k[V]>1||(B[V]=D)}}for(let D=0;D<b;D++){const T=D===b-1,R=k[D]>1,F=CLt(f.subarray(D*4,D*4+3)),N=f[D*4+3]/255,q=s.subarray(h[D],T?s.length:h[D+1]),V=l.subarray(h[D],T?l.length:h[D+1]),W=c.subarray(p[D],T?c.length:p[D+1]),Y=d.subarray(A[D],T?d.length:A[D+1]);if(R){const $=`${a}-geometry.${D}`;o.createGeometry({id:$,primitive:"triangles",positionsCompressed:q,normalsCompressed:V,indices:W,edgeIndices:Y})}else{const $=D,me=B[D];g[me];const Ie={};o.createMesh(mt.apply(Ie,{id:$,primitive:"triangles",positionsCompressed:q,normalsCompressed:V,indices:W,edgeIndices:Y,color:F,opacity:N}))}}let P=0;for(let D=0;D<E;D++){const T=E-1,R=D===T,F=g[D],N=y[D],q=R?y[T]:y[D+1],V=[];for(let W=N;W<q;W++){const Y=m[W];if(k[Y]>1){const $={},me="instance."+P++,Ie="geometry"+Y,Se=v[D]*16,qe=u.subarray(Se,Se+16);o.createMesh(mt.apply($,{id:me,geometryId:Ie,matrix:qe})),V.push(me)}else V.push(Y)}if(V.length>0){const W={};o.createEntity(mt.apply(W,{id:F,isObject:!0,meshIds:V}))}}}const yY={version:5,parse:function(t,e,i,o,r,n){const a=bLt(i),s=wLt(a);xLt(t,e,s,o,r,n)}};let Zv=window.pako||ts;Zv.inflate||(Zv=Zv.default);function kLt(t){return{positions:t[0],normals:t[1],indices:t[2],edgeIndices:t[3],matrices:t[4],reusedPrimitivesDecodeMatrix:t[5],eachPrimitivePositionsAndNormalsPortion:t[6],eachPrimitiveIndicesPortion:t[7],eachPrimitiveEdgeIndicesPortion:t[8],eachPrimitiveColorAndOpacity:t[9],primitiveInstances:t[10],eachEntityId:t[11],eachEntityPrimitiveInstancesPortion:t[12],eachEntityMatricesPortion:t[13],eachTileAABB:t[14],eachTileEntitiesPortion:t[15]}}function MLt(t){function e(i,o){return i.length===0?[]:Zv.inflate(i,o).buffer}return{positions:new Uint16Array(e(t.positions)),normals:new Int8Array(e(t.normals)),indices:new Uint32Array(e(t.indices)),edgeIndices:new Uint32Array(e(t.edgeIndices)),matrices:new Float32Array(e(t.matrices)),reusedPrimitivesDecodeMatrix:new Float32Array(e(t.reusedPrimitivesDecodeMatrix)),eachPrimitivePositionsAndNormalsPortion:new Uint32Array(e(t.eachPrimitivePositionsAndNormalsPortion)),eachPrimitiveIndicesPortion:new Uint32Array(e(t.eachPrimitiveIndicesPortion)),eachPrimitiveEdgeIndicesPortion:new Uint32Array(e(t.eachPrimitiveEdgeIndicesPortion)),eachPrimitiveColorAndOpacity:new Uint8Array(e(t.eachPrimitiveColorAndOpacity)),primitiveInstances:new Uint32Array(e(t.primitiveInstances)),eachEntityId:Zv.inflate(t.eachEntityId,{to:"string"}),eachEntityPrimitiveInstancesPortion:new Uint32Array(e(t.eachEntityPrimitiveInstancesPortion)),eachEntityMatricesPortion:new Uint32Array(e(t.eachEntityMatricesPortion)),eachTileAABB:new Float64Array(e(t.eachTileAABB)),eachTileEntitiesPortion:new Uint32Array(e(t.eachTileEntitiesPortion))}}const ELt=(function(){const t=new Float32Array(3);return function(e){return t[0]=e[0]/255,t[1]=e[1]/255,t[2]=e[2]/255,t}})();function BLt(t,e,i,o,r,n){const a=n.getNextId(),s=i.positions,l=i.normals,c=i.indices,d=i.edgeIndices,u=i.matrices,h=i.reusedPrimitivesDecodeMatrix,p=i.eachPrimitivePositionsAndNormalsPortion,A=i.eachPrimitiveIndicesPortion,f=i.eachPrimitiveEdgeIndicesPortion,m=i.eachPrimitiveColorAndOpacity,g=i.primitiveInstances,y=JSON.parse(i.eachEntityId),v=i.eachEntityPrimitiveInstancesPortion,b=i.eachEntityMatricesPortion,x=i.eachTileAABB,k=i.eachTileEntitiesPortion,E=p.length,B=g.length,P=y.length,D=k.length,T=new Uint32Array(E);for(let N=0;N<B;N++){const q=g[N];T[q]!==void 0?T[q]++:T[q]=1}const R=C.vec3(),F=C.AABB3();for(let N=0;N<D;N++){const q=D-1,V=N===q,W=k[N],Y=V?P:k[N+1],$=N*6,me=x.subarray($,$+6);C.getAABB3Center(me,R),F[0]=me[0]-R[0],F[1]=me[1]-R[1],F[2]=me[2]-R[2],F[3]=me[3]-R[0],F[4]=me[4]-R[1],F[5]=me[5]-R[2];const Ie=Jt.createPositionsDecodeMatrix(F),Se={};for(let qe=W;qe<Y;qe++){const Qe=y[qe],Ce=e.globalizeObjectIds?C.globalizeObjectId(o.id,Qe):Qe,Le=b[qe],Fe=u.slice(Le,Le+16),ve=P-1,ge=qe===ve,we=v[qe],Re=ge?g.length:v[qe+1],We=[],H=t.metaScene.metaObjects[Ce],ee={},ae={};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 Me=e.objectDefaults?e.objectDefaults[H.type]||e.objectDefaults.DEFAULT:null;Me&&(Me.visible===!1&&(ee.visible=!1),Me.pickable===!1&&(ee.pickable=!1),Me.colorize&&(ae.color=Me.colorize),Me.opacity!==void 0&&Me.opacity!==null&&(ae.opacity=Me.opacity))}else if(e.excludeUnclassifiedObjects)continue;for(let Me=we;Me<Re;Me++){const pe=g[Me],Q=T[pe]>1,Z=pe===E-1,ie=s.subarray(p[pe],Z?s.length:p[pe+1]),re=l.subarray(p[pe],Z?l.length:p[pe+1]),ne=c.subarray(A[pe],Z?c.length:A[pe+1]),G=d.subarray(f[pe],Z?d.length:f[pe+1]),J=ELt(m.subarray(pe*4,pe*4+3)),ue=m[pe*4+3]/255,xe=n.getNextId();if(Q){const oe=`${a}-geometry.${N}.${pe}`;Se[oe]||(o.createGeometry({id:oe,primitive:"triangles",positionsCompressed:ie,indices:ne,edgeIndices:G,positionsDecodeMatrix:h}),Se[oe]=!0),o.createMesh(mt.apply(ae,{id:xe,geometryId:oe,origin:R,matrix:Fe,color:J,opacity:ue})),We.push(xe)}else o.createMesh(mt.apply(ae,{id:xe,origin:R,primitive:"triangles",positionsCompressed:ie,normalsCompressed:re,indices:ne,edgeIndices:G,positionsDecodeMatrix:Ie,color:J,opacity:ue})),We.push(xe)}We.length>0&&o.createEntity(mt.apply(ee,{id:Ce,isObject:!0,meshIds:We}))}}}const bY={version:6,parse:function(t,e,i,o,r,n){const a=kLt(i),s=MLt(a);BLt(t,e,s,o,r,n)}};let Wv=window.pako||ts;Wv.inflate||(Wv=Wv.default);function PLt(t){return{positions:t[0],normals:t[1],colors:t[2],indices:t[3],edgeIndices:t[4],matrices:t[5],reusedGeometriesDecodeMatrix:t[6],eachGeometryPrimitiveType:t[7],eachGeometryPositionsPortion:t[8],eachGeometryNormalsPortion:t[9],eachGeometryColorsPortion:t[10],eachGeometryIndicesPortion:t[11],eachGeometryEdgeIndicesPortion:t[12],eachMeshGeometriesPortion:t[13],eachMeshMatricesPortion:t[14],eachMeshMaterial:t[15],eachEntityId:t[16],eachEntityMeshesPortion:t[17],eachTileAABB:t[18],eachTileEntitiesPortion:t[19]}}function ILt(t){function e(i,o){return i.length===0?[]:Wv.inflate(i,o).buffer}return{positions:new Uint16Array(e(t.positions)),normals:new Int8Array(e(t.normals)),colors:new Uint8Array(e(t.colors)),indices:new Uint32Array(e(t.indices)),edgeIndices:new Uint32Array(e(t.edgeIndices)),matrices:new Float32Array(e(t.matrices)),reusedGeometriesDecodeMatrix:new Float32Array(e(t.reusedGeometriesDecodeMatrix)),eachGeometryPrimitiveType:new Uint8Array(e(t.eachGeometryPrimitiveType)),eachGeometryPositionsPortion:new Uint32Array(e(t.eachGeometryPositionsPortion)),eachGeometryNormalsPortion:new Uint32Array(e(t.eachGeometryNormalsPortion)),eachGeometryColorsPortion:new Uint32Array(e(t.eachGeometryColorsPortion)),eachGeometryIndicesPortion:new Uint32Array(e(t.eachGeometryIndicesPortion)),eachGeometryEdgeIndicesPortion:new Uint32Array(e(t.eachGeometryEdgeIndicesPortion)),eachMeshGeometriesPortion:new Uint32Array(e(t.eachMeshGeometriesPortion)),eachMeshMatricesPortion:new Uint32Array(e(t.eachMeshMatricesPortion)),eachMeshMaterial:new Uint8Array(e(t.eachMeshMaterial)),eachEntityId:Wv.inflate(t.eachEntityId,{to:"string"}),eachEntityMeshesPortion:new Uint32Array(e(t.eachEntityMeshesPortion)),eachTileAABB:new Float64Array(e(t.eachTileAABB)),eachTileEntitiesPortion:new Uint32Array(e(t.eachTileEntitiesPortion))}}const SLt=(function(){const t=new Float32Array(3);return function(e){return t[0]=e[0]/255,t[1]=e[1]/255,t[2]=e[2]/255,t}})();function wY(t){const e=[];for(let i=0,o=t.length;i<o;i+=3)e.push(t[i]),e.push(t[i+1]),e.push(t[i+2]),e.push(1);return e}function TLt(t,e,i,o,r,n){const a=n.getNextId(),s=i.positions,l=i.normals,c=i.colors,d=i.indices,u=i.edgeIndices,h=i.matrices,p=i.reusedGeometriesDecodeMatrix,A=i.eachGeometryPrimitiveType,f=i.eachGeometryPositionsPortion,m=i.eachGeometryNormalsPortion,g=i.eachGeometryColorsPortion,y=i.eachGeometryIndicesPortion,v=i.eachGeometryEdgeIndicesPortion,b=i.eachMeshGeometriesPortion,x=i.eachMeshMatricesPortion,k=i.eachMeshMaterial,E=JSON.parse(i.eachEntityId),B=i.eachEntityMeshesPortion,P=i.eachTileAABB,D=i.eachTileEntitiesPortion,T=f.length,R=b.length,F=E.length,N=D.length,q=new Uint32Array(T);for(let Y=0;Y<R;Y++){const $=b[Y];q[$]!==void 0?q[$]++:q[$]=1}const V=C.vec3(),W=C.AABB3();for(let Y=0;Y<N;Y++){const $=N-1,me=Y===$,Ie=D[Y],Se=me?F:D[Y+1],qe=Y*6,Qe=P.subarray(qe,qe+6);C.getAABB3Center(Qe,V),W[0]=Qe[0]-V[0],W[1]=Qe[1]-V[1],W[2]=Qe[2]-V[2],W[3]=Qe[3]-V[0],W[4]=Qe[4]-V[1],W[5]=Qe[5]-V[2];const Ce=Jt.createPositionsDecodeMatrix(W),Le={};for(let Fe=Ie;Fe<Se;Fe++){const ve=E[Fe],ge=e.globalizeObjectIds?C.globalizeObjectId(o.id,ve):ve,we=F-1,Re=Fe===we,We=B[Fe],H=Re?b.length:B[Fe+1],ee=[],ae=t.metaScene.metaObjects[ge],Me={},pe={};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 Q=e.objectDefaults?e.objectDefaults[ae.type]||e.objectDefaults.DEFAULT:null;Q&&(Q.visible===!1&&(Me.visible=!1),Q.pickable===!1&&(Me.pickable=!1),Q.colorize&&(pe.color=Q.colorize),Q.opacity!==void 0&&Q.opacity!==null&&(pe.opacity=Q.opacity),Q.metallic!==void 0&&Q.metallic!==null&&(pe.metallic=Q.metallic),Q.roughness!==void 0&&Q.roughness!==null&&(pe.roughness=Q.roughness))}else if(e.excludeUnclassifiedObjects)continue;for(let Q=We;Q<H;Q++){const Z=b[Q],ie=q[Z]>1,re=Z===T-1,ne=SLt(k.subarray(Q*6,Q*6+3)),G=k[Q*6+3]/255,J=k[Q*6+4]/255,ue=k[Q*6+5]/255,xe=n.getNextId();if(ie){const oe=x[Q],Ee=h.slice(oe,oe+16),je=`${a}-geometry.${Y}.${Z}`;if(!Le[je]){const he=A[Z];let Ne,Be,He,rt,At,ft;switch(he){case 0:Ne="solid",Be=s.subarray(f[Z],re?s.length:f[Z+1]),He=l.subarray(m[Z],re?l.length:m[Z+1]),At=d.subarray(y[Z],re?d.length:y[Z+1]),ft=u.subarray(v[Z],re?u.length:v[Z+1]);break;case 1:Ne="surface",Be=s.subarray(f[Z],re?s.length:f[Z+1]),He=l.subarray(m[Z],re?l.length:m[Z+1]),At=d.subarray(y[Z],re?d.length:y[Z+1]),ft=u.subarray(v[Z],re?u.length:v[Z+1]);break;case 2:Ne="points",Be=s.subarray(f[Z],re?s.length:f[Z+1]),rt=wY(c.subarray(g[Z],re?c.length:g[Z+1]));break;case 3:Ne="lines",Be=s.subarray(f[Z],re?s.length:f[Z+1]),At=d.subarray(y[Z],re?d.length:y[Z+1]);break;default:continue}o.createGeometry({id:je,primitive:Ne,positionsCompressed:Be,normalsCompressed:He,colors:rt,indices:At,edgeIndices:ft,positionsDecodeMatrix:p}),Le[je]=!0}o.createMesh(mt.apply(pe,{id:xe,geometryId:je,origin:V,matrix:Ee,color:ne,metallic:J,roughness:ue,opacity:G})),ee.push(xe)}else{const oe=A[Z];let Ee,je,he,Ne,Be,He;switch(oe){case 0:Ee="solid",je=s.subarray(f[Z],re?s.length:f[Z+1]),he=l.subarray(m[Z],re?l.length:m[Z+1]),Be=d.subarray(y[Z],re?d.length:y[Z+1]),He=u.subarray(v[Z],re?u.length:v[Z+1]);break;case 1:Ee="surface",je=s.subarray(f[Z],re?s.length:f[Z+1]),he=l.subarray(m[Z],re?l.length:m[Z+1]),Be=d.subarray(y[Z],re?d.length:y[Z+1]),He=u.subarray(v[Z],re?u.length:v[Z+1]);break;case 2:Ee="points",je=s.subarray(f[Z],re?s.length:f[Z+1]),Ne=wY(c.subarray(g[Z],re?c.length:g[Z+1]));break;case 3:Ee="lines",je=s.subarray(f[Z],re?s.length:f[Z+1]),Be=d.subarray(y[Z],re?d.length:y[Z+1]);break;default:continue}o.createMesh(mt.apply(pe,{id:xe,origin:V,primitive:Ee,positionsCompressed:je,normalsCompressed:he,colors:Ne,indices:Be,edgeIndices:He,positionsDecodeMatrix:Ce,color:ne,metallic:J,roughness:ue,opacity:G})),ee.push(xe)}}ee.length>0&&o.createEntity(mt.apply(Me,{id:ge,isObject:!0,meshIds:ee}))}}}const CY={version:7,parse:function(t,e,i,o,r,n){const a=PLt(i),s=ILt(a);TLt(t,e,s,o,r,n)}};let Uu=window.pako||ts;Uu.inflate||(Uu=Uu.default);const Yl=C.vec4(),xY=C.vec4();function DLt(t){return{types:t[0],eachMetaObjectId:t[1],eachMetaObjectType:t[2],eachMetaObjectName:t[3],eachMetaObjectParent:t[4],positions:t[5],normals:t[6],colors:t[7],indices:t[8],edgeIndices:t[9],matrices:t[10],reusedGeometriesDecodeMatrix:t[11],eachGeometryPrimitiveType:t[12],eachGeometryPositionsPortion:t[13],eachGeometryNormalsPortion:t[14],eachGeometryColorsPortion:t[15],eachGeometryIndicesPortion:t[16],eachGeometryEdgeIndicesPortion:t[17],eachMeshGeometriesPortion:t[18],eachMeshMatricesPortion:t[19],eachMeshMaterial:t[20],eachEntityMetaObject:t[21],eachEntityMeshesPortion:t[22],eachTileAABB:t[23],eachTileEntitiesPortion:t[24]}}function RLt(t){function e(i,o){return i.length===0?[]:Uu.inflate(i,o).buffer}return{types:Uu.inflate(t.types,{to:"string"}),eachMetaObjectId:Uu.inflate(t.eachMetaObjectId,{to:"string"}),eachMetaObjectType:new Uint32Array(e(t.eachMetaObjectType)),eachMetaObjectName:Uu.inflate(t.eachMetaObjectName,{to:"string"}),eachMetaObjectParent:new Uint32Array(e(t.eachMetaObjectParent)),positions:new Uint16Array(e(t.positions)),normals:new Int8Array(e(t.normals)),colors:new Uint8Array(e(t.colors)),indices:new Uint32Array(e(t.indices)),edgeIndices:new Uint32Array(e(t.edgeIndices)),matrices:new Float32Array(e(t.matrices)),reusedGeometriesDecodeMatrix:new Float32Array(e(t.reusedGeometriesDecodeMatrix)),eachGeometryPrimitiveType:new Uint8Array(e(t.eachGeometryPrimitiveType)),eachGeometryPositionsPortion:new Uint32Array(e(t.eachGeometryPositionsPortion)),eachGeometryNormalsPortion:new Uint32Array(e(t.eachGeometryNormalsPortion)),eachGeometryColorsPortion:new Uint32Array(e(t.eachGeometryColorsPortion)),eachGeometryIndicesPortion:new Uint32Array(e(t.eachGeometryIndicesPortion)),eachGeometryEdgeIndicesPortion:new Uint32Array(e(t.eachGeometryEdgeIndicesPortion)),eachMeshGeometriesPortion:new Uint32Array(e(t.eachMeshGeometriesPortion)),eachMeshMatricesPortion:new Uint32Array(e(t.eachMeshMatricesPortion)),eachMeshMaterial:new Uint8Array(e(t.eachMeshMaterial)),eachEntityMetaObject:new Uint32Array(e(t.eachEntityMetaObject)),eachEntityMeshesPortion:new Uint32Array(e(t.eachEntityMeshesPortion)),eachTileAABB:new Float64Array(e(t.eachTileAABB)),eachTileEntitiesPortion:new Uint32Array(e(t.eachTileEntitiesPortion))}}const LLt=(function(){const t=new Float32Array(3);return function(e){return t[0]=e[0]/255,t[1]=e[1]/255,t[2]=e[2]/255,t}})();function kY(t){const e=[];for(let i=0,o=t.length;i<o;i+=3)e.push(t[i]),e.push(t[i+1]),e.push(t[i+2]),e.push(1);return e}function _Lt(t,e,i,o,r,n){const a=n.getNextId(),s=JSON.parse(i.types),l=JSON.parse(i.eachMetaObjectId),c=i.eachMetaObjectType,d=JSON.parse(i.eachMetaObjectName),u=i.eachMetaObjectParent,h=i.positions,p=i.normals,A=i.colors,f=i.indices,m=i.edgeIndices,g=i.matrices,y=i.reusedGeometriesDecodeMatrix,v=i.eachGeometryPrimitiveType,b=i.eachGeometryPositionsPortion,x=i.eachGeometryNormalsPortion,k=i.eachGeometryColorsPortion,E=i.eachGeometryIndicesPortion,B=i.eachGeometryEdgeIndicesPortion,P=i.eachMeshGeometriesPortion,D=i.eachMeshMatricesPortion,T=i.eachMeshMaterial,R=i.eachEntityMetaObject,F=i.eachEntityMeshesPortion,N=i.eachTileAABB,q=i.eachTileEntitiesPortion,V=l.length,W=b.length,Y=P.length,$=R.length,me=q.length;if(r){const Ce={metaObjects:[]};for(let Le=0;Le<V;Le++){const Fe=l[Le],ve=c[Le],ge=s[ve]||"default",we=d[Le],Re=u[Le],We=Re!==Le?l[Re]:null;Ce.metaObjects.push({id:Fe,type:ge,name:we,parent:We})}r.loadData(Ce,{includeTypes:e.includeTypes,excludeTypes:e.excludeTypes,globalizeObjectIds:e.globalizeObjectIds})}const Ie=new Uint32Array(W);for(let Ce=0;Ce<Y;Ce++){const Le=P[Ce];Ie[Le]!==void 0?Ie[Le]++:Ie[Le]=1}const Se=C.vec3(),qe=C.AABB3(),Qe={};for(let Ce=0;Ce<me;Ce++){const Le=me-1,Fe=Ce===Le,ve=q[Ce],ge=Fe?$:q[Ce+1],we=Ce*6,Re=N.subarray(we,we+6);C.getAABB3Center(Re,Se),qe[0]=Re[0]-Se[0],qe[1]=Re[1]-Se[1],qe[2]=Re[2]-Se[2],qe[3]=Re[3]-Se[0],qe[4]=Re[4]-Se[1],qe[5]=Re[5]-Se[2];const We=Jt.createPositionsDecodeMatrix(qe),H={};for(let ee=ve;ee<ge;ee++){const ae=R[ee],Me=l[ae],pe=e.globalizeObjectIds?C.globalizeObjectId(o.id,Me):Me,Q=$-1,Z=ee===Q,ie=F[ee],re=Z?P.length:F[ee+1],ne=[],G=t.metaScene.metaObjects[pe],J={},ue={};if(G){if(e.excludeTypesMap&&G.type&&e.excludeTypesMap[G.type]||e.includeTypesMap&&G.type&&!e.includeTypesMap[G.type]||e.includeIdsMap&&G.id&&!e.includeIdsMap[G.id])continue;const xe=e.objectDefaults?e.objectDefaults[G.type]||e.objectDefaults.DEFAULT:null;xe&&(xe.visible===!1&&(J.visible=!1),xe.pickable===!1&&(J.pickable=!1),xe.colorize&&(ue.color=xe.colorize),xe.opacity!==void 0&&xe.opacity!==null&&(ue.opacity=xe.opacity),xe.metallic!==void 0&&xe.metallic!==null&&(ue.metallic=xe.metallic),xe.roughness!==void 0&&xe.roughness!==null&&(ue.roughness=xe.roughness))}else if(e.excludeUnclassifiedObjects)continue;for(let xe=ie;xe<re;xe++){const oe=P[xe],Ee=Ie[oe]>1,je=oe===W-1,he=LLt(T.subarray(xe*6,xe*6+3)),Ne=T[xe*6+3]/255,Be=T[xe*6+4]/255,He=T[xe*6+5]/255,rt=n.getNextId();if(Ee){const At=D[xe],ft=g.slice(At,At+16),lt=`${a}-geometry.${Ce}.${oe}`;let ut=Qe[lt];if(!ut){ut={batchThisMesh:!e.reuseGeometries};const Te=v[oe];let st=!1;switch(Te){case 0:ut.primitiveName="solid",ut.geometryPositions=h.subarray(b[oe],je?h.length:b[oe+1]),ut.geometryNormals=p.subarray(x[oe],je?p.length:x[oe+1]),ut.geometryIndices=f.subarray(E[oe],je?f.length:E[oe+1]),ut.geometryEdgeIndices=m.subarray(B[oe],je?m.length:B[oe+1]),st=ut.geometryPositions.length>0&&ut.geometryIndices.length>0;break;case 1:ut.primitiveName="surface",ut.geometryPositions=h.subarray(b[oe],je?h.length:b[oe+1]),ut.geometryNormals=p.subarray(x[oe],je?p.length:x[oe+1]),ut.geometryIndices=f.subarray(E[oe],je?f.length:E[oe+1]),ut.geometryEdgeIndices=m.subarray(B[oe],je?m.length:B[oe+1]),st=ut.geometryPositions.length>0&&ut.geometryIndices.length>0;break;case 2:ut.primitiveName="points",ut.geometryPositions=h.subarray(b[oe],je?h.length:b[oe+1]),ut.geometryColors=kY(A.subarray(k[oe],je?A.length:k[oe+1])),st=ut.geometryPositions.length>0;break;case 3:ut.primitiveName="lines",ut.geometryPositions=h.subarray(b[oe],je?h.length:b[oe+1]),ut.geometryIndices=f.subarray(E[oe],je?f.length:E[oe+1]),st=ut.geometryPositions.length>0&&ut.geometryIndices.length>0;break;default:continue}if(st||(ut=null),ut&&(ut.geometryPositions.length>1e3,ut.batchThisMesh)){ut.decompressedPositions=new Float32Array(ut.geometryPositions.length);const dt=ut.geometryPositions,Ye=ut.decompressedPositions;for(let fe=0,be=dt.length;fe<be;fe+=3)Ye[fe+0]=dt[fe+0]*y[0]+y[12],Ye[fe+1]=dt[fe+1]*y[5]+y[13],Ye[fe+2]=dt[fe+2]*y[10]+y[14];ut.geometryPositions=null,Qe[lt]=ut}}if(ut)if(ut.batchThisMesh){const Te=ut.decompressedPositions,st=new Uint16Array(Te.length);for(let dt=0,Ye=Te.length;dt<Ye;dt+=3)Yl[0]=Te[dt+0],Yl[1]=Te[dt+1],Yl[2]=Te[dt+2],Yl[3]=1,C.transformVec4(ft,Yl,xY),Jt.compressPosition(xY,qe,Yl),st[dt+0]=Yl[0],st[dt+1]=Yl[1],st[dt+2]=Yl[2];o.createMesh(mt.apply(ue,{id:rt,origin:Se,primitive:ut.primitiveName,positionsCompressed:st,normalsCompressed:ut.geometryNormals,colorsCompressed:ut.geometryColors,indices:ut.geometryIndices,edgeIndices:ut.geometryEdgeIndices,positionsDecodeMatrix:We,color:he,metallic:Be,roughness:He,opacity:Ne})),ne.push(rt)}else H[lt]||(o.createGeometry({id:lt,primitive:ut.primitiveName,positionsCompressed:ut.geometryPositions,normalsCompressed:ut.geometryNormals,colorsCompressed:ut.geometryColors,indices:ut.geometryIndices,edgeIndices:ut.geometryEdgeIndices,positionsDecodeMatrix:y}),H[lt]=!0),o.createMesh(mt.apply(ue,{id:rt,geometryId:lt,origin:Se,matrix:ft,color:he,metallic:Be,roughness:He,opacity:Ne})),ne.push(rt)}else{const At=v[oe];let ft,lt,ut,Te,st,dt,Ye=!1;switch(At){case 0:ft="solid",lt=h.subarray(b[oe],je?h.length:b[oe+1]),ut=p.subarray(x[oe],je?p.length:x[oe+1]),st=f.subarray(E[oe],je?f.length:E[oe+1]),dt=m.subarray(B[oe],je?m.length:B[oe+1]),Ye=lt.length>0&&st.length>0;break;case 1:ft="surface",lt=h.subarray(b[oe],je?h.length:b[oe+1]),ut=p.subarray(x[oe],je?p.length:x[oe+1]),st=f.subarray(E[oe],je?f.length:E[oe+1]),dt=m.subarray(B[oe],je?m.length:B[oe+1]),Ye=lt.length>0&&st.length>0;break;case 2:ft="points",lt=h.subarray(b[oe],je?h.length:b[oe+1]),Te=kY(A.subarray(k[oe],je?A.length:k[oe+1])),Ye=lt.length>0;break;case 3:ft="lines",lt=h.subarray(b[oe],je?h.length:b[oe+1]),st=f.subarray(E[oe],je?f.length:E[oe+1]),Ye=lt.length>0&&st.length>0;break;default:continue}Ye&&(o.createMesh(mt.apply(ue,{id:rt,origin:Se,primitive:ft,positionsCompressed:lt,normalsCompressed:ut,colorsCompressed:Te,indices:st,edgeIndices:dt,positionsDecodeMatrix:We,color:he,metallic:Be,roughness:He,opacity:Ne})),ne.push(rt))}}ne.length>0&&o.createEntity(mt.apply(J,{id:pe,isObject:!0,meshIds:ne}))}}}const MY={version:8,parse:function(t,e,i,o,r,n){const a=DLt(i),s=RLt(a);_Lt(t,e,s,o,r,n)}};let r1=window.pako||ts;r1.inflate||(r1=r1.default);const Xl=C.vec4(),EY=C.vec4();function FLt(t){return{metadata:t[0],positions:t[1],normals:t[2],colors:t[3],indices:t[4],edgeIndices:t[5],matrices:t[6],reusedGeometriesDecodeMatrix:t[7],eachGeometryPrimitiveType:t[8],eachGeometryPositionsPortion:t[9],eachGeometryNormalsPortion:t[10],eachGeometryColorsPortion:t[11],eachGeometryIndicesPortion:t[12],eachGeometryEdgeIndicesPortion:t[13],eachMeshGeometriesPortion:t[14],eachMeshMatricesPortion:t[15],eachMeshMaterial:t[16],eachEntityId:t[17],eachEntityMeshesPortion:t[18],eachTileAABB:t[19],eachTileEntitiesPortion:t[20]}}function OLt(t){function e(i,o){return i.length===0?[]:r1.inflate(i,o).buffer}return{metadata:JSON.parse(r1.inflate(t.metadata,{to:"string"})),positions:new Uint16Array(e(t.positions)),normals:new Int8Array(e(t.normals)),colors:new Uint8Array(e(t.colors)),indices:new Uint32Array(e(t.indices)),edgeIndices:new Uint32Array(e(t.edgeIndices)),matrices:new Float32Array(e(t.matrices)),reusedGeometriesDecodeMatrix:new Float32Array(e(t.reusedGeometriesDecodeMatrix)),eachGeometryPrimitiveType:new Uint8Array(e(t.eachGeometryPrimitiveType)),eachGeometryPositionsPortion:new Uint32Array(e(t.eachGeometryPositionsPortion)),eachGeometryNormalsPortion:new Uint32Array(e(t.eachGeometryNormalsPortion)),eachGeometryColorsPortion:new Uint32Array(e(t.eachGeometryColorsPortion)),eachGeometryIndicesPortion:new Uint32Array(e(t.eachGeometryIndicesPortion)),eachGeometryEdgeIndicesPortion:new Uint32Array(e(t.eachGeometryEdgeIndicesPortion)),eachMeshGeometriesPortion:new Uint32Array(e(t.eachMeshGeometriesPortion)),eachMeshMatricesPortion:new Uint32Array(e(t.eachMeshMatricesPortion)),eachMeshMaterial:new Uint8Array(e(t.eachMeshMaterial)),eachEntityId:JSON.parse(r1.inflate(t.eachEntityId,{to:"string"})),eachEntityMeshesPortion:new Uint32Array(e(t.eachEntityMeshesPortion)),eachTileAABB:new Float64Array(e(t.eachTileAABB)),eachTileEntitiesPortion:new Uint32Array(e(t.eachTileEntitiesPortion))}}const ULt=(function(){const t=new Float32Array(3);return function(e){return t[0]=e[0]/255,t[1]=e[1]/255,t[2]=e[2]/255,t}})();function NLt(t,e,i,o,r,n){const a=n.getNextId(),s=i.metadata,l=i.positions,c=i.normals,d=i.colors,u=i.indices,h=i.edgeIndices,p=i.matrices,A=i.reusedGeometriesDecodeMatrix,f=i.eachGeometryPrimitiveType,m=i.eachGeometryPositionsPortion,g=i.eachGeometryNormalsPortion,y=i.eachGeometryColorsPortion,v=i.eachGeometryIndicesPortion,b=i.eachGeometryEdgeIndicesPortion,x=i.eachMeshGeometriesPortion,k=i.eachMeshMatricesPortion,E=i.eachMeshMaterial,B=i.eachEntityId,P=i.eachEntityMeshesPortion,D=i.eachTileAABB,T=i.eachTileEntitiesPortion,R=m.length,F=x.length,N=P.length,q=T.length;r&&r.loadData(s,{includeTypes:e.includeTypes,excludeTypes:e.excludeTypes,globalizeObjectIds:e.globalizeObjectIds});const V=new Uint32Array(R);for(let me=0;me<F;me++){const Ie=x[me];V[Ie]!==void 0?V[Ie]++:V[Ie]=1}const W=C.vec3(),Y=C.AABB3(),$={};for(let me=0;me<q;me++){const Ie=q-1,Se=me===Ie,qe=T[me],Qe=Se?N-1:T[me+1]-1,Ce=me*6,Le=D.subarray(Ce,Ce+6);C.getAABB3Center(Le,W),Y[0]=Le[0]-W[0],Y[1]=Le[1]-W[1],Y[2]=Le[2]-W[2],Y[3]=Le[3]-W[0],Y[4]=Le[4]-W[1],Y[5]=Le[5]-W[2];const Fe=Jt.createPositionsDecodeMatrix(Y),ve={};for(let ge=qe;ge<=Qe;ge++){const we=B[ge],Re=e.globalizeObjectIds?C.globalizeObjectId(o.id,we):we,We=N-1,H=ge===We,ee=P[ge],ae=H?x.length-1:P[ge+1]-1,Me=[],pe=t.metaScene.metaObjects[Re],Q={},Z={};if(!(e.includeIdsMap&&we&&!e.includeIdsMap[we])){if(pe){if(e.excludeTypesMap&&pe.type&&e.excludeTypesMap[pe.type]||e.includeTypesMap&&pe.type&&!e.includeTypesMap[pe.type]||e.includeIdsMap&&pe.id&&!e.includeIdsMap[pe.id])continue;const ie=e.objectDefaults?e.objectDefaults[pe.type]||e.objectDefaults.DEFAULT:null;ie&&(ie.visible===!1&&(Q.visible=!1),ie.pickable===!1&&(Q.pickable=!1),ie.colorize&&(Z.color=ie.colorize),ie.opacity!==void 0&&ie.opacity!==null&&(Z.opacity=ie.opacity),ie.metallic!==void 0&&ie.metallic!==null&&(Z.metallic=ie.metallic),ie.roughness!==void 0&&ie.roughness!==null&&(Z.roughness=ie.roughness))}else if(e.excludeUnclassifiedObjects)continue;for(let ie=ee;ie<=ae;ie++){const re=x[ie],ne=V[re]>1,G=re===R-1,J=ULt(E.subarray(ie*6,ie*6+3)),ue=E[ie*6+3]/255,xe=E[ie*6+4]/255,oe=E[ie*6+5]/255,Ee=n.getNextId();if(ne){const je=k[ie],he=p.slice(je,je+16),Ne=`${a}-geometry.${me}.${re}`;let Be=$[Ne];if(!Be){Be={batchThisMesh:!e.reuseGeometries};const He=f[re];let rt=!1;switch(He){case 0:Be.primitiveName="solid",Be.geometryPositions=l.subarray(m[re],G?l.length:m[re+1]),Be.geometryNormals=c.subarray(g[re],G?c.length:g[re+1]),Be.geometryIndices=u.subarray(v[re],G?u.length:v[re+1]),Be.geometryEdgeIndices=h.subarray(b[re],G?h.length:b[re+1]),rt=Be.geometryPositions.length>0&&Be.geometryIndices.length>0;break;case 1:Be.primitiveName="surface",Be.geometryPositions=l.subarray(m[re],G?l.length:m[re+1]),Be.geometryNormals=c.subarray(g[re],G?c.length:g[re+1]),Be.geometryIndices=u.subarray(v[re],G?u.length:v[re+1]),Be.geometryEdgeIndices=h.subarray(b[re],G?h.length:b[re+1]),rt=Be.geometryPositions.length>0&&Be.geometryIndices.length>0;break;case 2:Be.primitiveName="points",Be.geometryPositions=l.subarray(m[re],G?l.length:m[re+1]),Be.geometryColors=d.subarray(y[re],G?d.length:y[re+1]),rt=Be.geometryPositions.length>0;break;case 3:Be.primitiveName="lines",Be.geometryPositions=l.subarray(m[re],G?l.length:m[re+1]),Be.geometryIndices=u.subarray(v[re],G?u.length:v[re+1]),rt=Be.geometryPositions.length>0&&Be.geometryIndices.length>0;break;default:continue}if(rt||(Be=null),Be&&(Be.geometryPositions.length>1e3,Be.batchThisMesh)){Be.decompressedPositions=new Float32Array(Be.geometryPositions.length),Be.transformedAndRecompressedPositions=new Uint16Array(Be.geometryPositions.length);const At=Be.geometryPositions,ft=Be.decompressedPositions;for(let lt=0,ut=At.length;lt<ut;lt+=3)ft[lt+0]=At[lt+0]*A[0]+A[12],ft[lt+1]=At[lt+1]*A[5]+A[13],ft[lt+2]=At[lt+2]*A[10]+A[14];Be.geometryPositions=null,$[Ne]=Be}}if(Be)if(Be.batchThisMesh){const He=Be.decompressedPositions,rt=Be.transformedAndRecompressedPositions;for(let At=0,ft=He.length;At<ft;At+=3)Xl[0]=He[At+0],Xl[1]=He[At+1],Xl[2]=He[At+2],Xl[3]=1,C.transformVec4(he,Xl,EY),Jt.compressPosition(EY,Y,Xl),rt[At+0]=Xl[0],rt[At+1]=Xl[1],rt[At+2]=Xl[2];o.createMesh(mt.apply(Z,{id:Ee,origin:W,primitive:Be.primitiveName,positionsCompressed:rt,normalsCompressed:Be.geometryNormals,colorsCompressed:Be.geometryColors,indices:Be.geometryIndices,edgeIndices:Be.geometryEdgeIndices,positionsDecodeMatrix:Fe,color:J,metallic:xe,roughness:oe,opacity:ue})),Me.push(Ee)}else ve[Ne]||(o.createGeometry({id:Ne,primitive:Be.primitiveName,positionsCompressed:Be.geometryPositions,normalsCompressed:Be.geometryNormals,colorsCompressed:Be.geometryColors,indices:Be.geometryIndices,edgeIndices:Be.geometryEdgeIndices,positionsDecodeMatrix:A}),ve[Ne]=!0),o.createMesh(mt.apply(Z,{id:Ee,geometryId:Ne,origin:W,matrix:he,color:J,metallic:xe,roughness:oe,opacity:ue})),Me.push(Ee)}else{const je=f[re];let he,Ne,Be,He,rt,At,ft=!1;switch(je){case 0:he="solid",Ne=l.subarray(m[re],G?l.length:m[re+1]),Be=c.subarray(g[re],G?c.length:g[re+1]),rt=u.subarray(v[re],G?u.length:v[re+1]),At=h.subarray(b[re],G?h.length:b[re+1]),ft=Ne.length>0&&rt.length>0;break;case 1:he="surface",Ne=l.subarray(m[re],G?l.length:m[re+1]),Be=c.subarray(g[re],G?c.length:g[re+1]),rt=u.subarray(v[re],G?u.length:v[re+1]),At=h.subarray(b[re],G?h.length:b[re+1]),ft=Ne.length>0&&rt.length>0;break;case 2:he="points",Ne=l.subarray(m[re],G?l.length:m[re+1]),He=d.subarray(y[re],G?d.length:y[re+1]),ft=Ne.length>0;break;case 3:he="lines",Ne=l.subarray(m[re],G?l.length:m[re+1]),rt=u.subarray(v[re],G?u.length:v[re+1]),ft=Ne.length>0&&rt.length>0;break;default:continue}ft&&(o.createMesh(mt.apply(Z,{id:Ee,origin:W,primitive:he,positionsCompressed:Ne,normalsCompressed:Be,colorsCompressed:He,indices:rt,edgeIndices:At,positionsDecodeMatrix:Fe,color:J,metallic:xe,roughness:oe,opacity:ue})),Me.push(Ee))}}Me.length>0&&o.createEntity(mt.apply(Q,{id:Re,isObject:!0,meshIds:Me}))}}}}const BY={version:9,parse:function(t,e,i,o,r,n){const a=FLt(i),s=OLt(a);NLt(t,e,s,o,r,n)}};let n1=window.pako||ts;n1.inflate||(n1=n1.default);const $l=C.vec4(),PY=C.vec4(),jLt=9;function VLt(t){let e=0;return{metadata:t[e++],textureData:t[e++],eachTextureDataPortion:t[e++],eachTextureAttributes:t[e++],positions:t[e++],normals:t[e++],colors:t[e++],uvs:t[e++],indices:t[e++],edgeIndices:t[e++],eachTextureSetTextures:t[e++],matrices:t[e++],reusedGeometriesDecodeMatrix:t[e++],eachGeometryPrimitiveType:t[e++],eachGeometryPositionsPortion:t[e++],eachGeometryNormalsPortion:t[e++],eachGeometryColorsPortion:t[e++],eachGeometryUVsPortion:t[e++],eachGeometryIndicesPortion:t[e++],eachGeometryEdgeIndicesPortion:t[e++],eachMeshGeometriesPortion:t[e++],eachMeshMatricesPortion:t[e++],eachMeshTextureSet:t[e++],eachMeshMaterialAttributes:t[e++],eachEntityId:t[e++],eachEntityMeshesPortion:t[e++],eachTileAABB:t[e++],eachTileEntitiesPortion:t[e++]}}function zLt(t){function e(i,o){return i.length===0?[]:n1.inflate(i,o).buffer}return{metadata:JSON.parse(n1.inflate(t.metadata,{to:"string"})),textureData:new Uint8Array(e(t.textureData)),eachTextureDataPortion:new Uint32Array(e(t.eachTextureDataPortion)),eachTextureAttributes:new Uint16Array(e(t.eachTextureAttributes)),positions:new Uint16Array(e(t.positions)),normals:new Int8Array(e(t.normals)),colors:new Uint8Array(e(t.colors)),uvs:new Float32Array(e(t.uvs)),indices:new Uint32Array(e(t.indices)),edgeIndices:new Uint32Array(e(t.edgeIndices)),eachTextureSetTextures:new Int32Array(e(t.eachTextureSetTextures)),matrices:new Float32Array(e(t.matrices)),reusedGeometriesDecodeMatrix:new Float32Array(e(t.reusedGeometriesDecodeMatrix)),eachGeometryPrimitiveType:new Uint8Array(e(t.eachGeometryPrimitiveType)),eachGeometryPositionsPortion:new Uint32Array(e(t.eachGeometryPositionsPortion)),eachGeometryNormalsPortion:new Uint32Array(e(t.eachGeometryNormalsPortion)),eachGeometryColorsPortion:new Uint32Array(e(t.eachGeometryColorsPortion)),eachGeometryUVsPortion:new Uint32Array(e(t.eachGeometryUVsPortion)),eachGeometryIndicesPortion:new Uint32Array(e(t.eachGeometryIndicesPortion)),eachGeometryEdgeIndicesPortion:new Uint32Array(e(t.eachGeometryEdgeIndicesPortion)),eachMeshGeometriesPortion:new Uint32Array(e(t.eachMeshGeometriesPortion)),eachMeshMatricesPortion:new Uint32Array(e(t.eachMeshMatricesPortion)),eachMeshTextureSet:new Int32Array(e(t.eachMeshTextureSet)),eachMeshMaterialAttributes:new Uint8Array(e(t.eachMeshMaterialAttributes)),eachEntityId:JSON.parse(n1.inflate(t.eachEntityId,{to:"string"})),eachEntityMeshesPortion:new Uint32Array(e(t.eachEntityMeshesPortion)),eachTileAABB:new Float64Array(e(t.eachTileAABB)),eachTileEntitiesPortion:new Uint32Array(e(t.eachTileEntitiesPortion))}}const HLt=(function(){const t=new Float32Array(3);return function(e){return t[0]=e[0]/255,t[1]=e[1]/255,t[2]=e[2]/255,t}})();(function(){const t=document.createElement("canvas"),e=t.getContext("2d");return function(i){return t.width=i.width,t.height=i.height,e.putImageData(i,0,0),t.toDataURL()}})();function qLt(t,e,i,o,r,n){const a=n.getNextId(),s=i.metadata,l=i.textureData,c=i.eachTextureDataPortion,d=i.eachTextureAttributes,u=i.positions,h=i.normals,p=i.colors,A=i.uvs,f=i.indices,m=i.edgeIndices,g=i.eachTextureSetTextures,y=i.matrices,v=i.reusedGeometriesDecodeMatrix,b=i.eachGeometryPrimitiveType,x=i.eachGeometryPositionsPortion,k=i.eachGeometryNormalsPortion,E=i.eachGeometryColorsPortion,B=i.eachGeometryUVsPortion,P=i.eachGeometryIndicesPortion,D=i.eachGeometryEdgeIndicesPortion,T=i.eachMeshGeometriesPortion,R=i.eachMeshMatricesPortion,F=i.eachMeshTextureSet,N=i.eachMeshMaterialAttributes,q=i.eachEntityId,V=i.eachEntityMeshesPortion,W=i.eachTileAABB,Y=i.eachTileEntitiesPortion,$=c.length,me=g.length/5,Ie=x.length,Se=T.length,qe=V.length,Qe=Y.length;r&&r.loadData(s,{includeTypes:e.includeTypes,excludeTypes:e.excludeTypes,globalizeObjectIds:e.globalizeObjectIds});for(let ge=0;ge<$;ge++){const we=ge===$-1,Re=c[ge],We=we?l.length:c[ge+1],H=We-Re>0,ee=ge*jLt,ae=d[ee+0]===1,Me=d[ee+1];d[ee+2],d[ee+3];const pe=d[ee+4],Q=d[ee+5],Z=d[ee+6],ie=d[ee+7],re=d[ee+8];if(H){const ne=new Uint8Array(l.subarray(Re,We)).buffer,G=`${a}-texture-${ge}`;if(ae)o.createTexture({id:G,buffers:[ne],minFilter:pe,magFilter:Q,wrapS:Z,wrapT:ie,wrapR:re});else{const J=Me===ey?"image/jpeg":Me===ty?"image/png":"image/gif",ue=new Blob([ne],{type:J}),xe=(window.URL||window.webkitURL).createObjectURL(ue),oe=document.createElement("img");oe.src=xe,o.createTexture({id:G,image:oe,minFilter:pe,magFilter:Q,wrapS:Z,wrapT:ie,wrapR:re})}}}for(let ge=0;ge<me;ge++){const we=ge*5,Re=`${a}-textureSet-${ge}`,We=g[we+0],H=g[we+1],ee=g[we+2],ae=g[we+3],Me=g[we+4];o.createTextureSet({id:Re,colorTextureId:We>=0?`${a}-texture-${We}`:null,normalsTextureId:ee>=0?`${a}-texture-${ee}`:null,metallicRoughnessTextureId:H>=0?`${a}-texture-${H}`:null,emissiveTextureId:ae>=0?`${a}-texture-${ae}`:null,occlusionTextureId:Me>=0?`${a}-texture-${Me}`:null})}const Ce=new Uint32Array(Ie);for(let ge=0;ge<Se;ge++){const we=T[ge];Ce[we]!==void 0?Ce[we]++:Ce[we]=1}const Le=C.vec3(),Fe=C.AABB3(),ve={};for(let ge=0;ge<Qe;ge++){const we=Qe-1,Re=ge===we,We=Y[ge],H=Re?qe-1:Y[ge+1]-1,ee=ge*6,ae=W.subarray(ee,ee+6);C.getAABB3Center(ae,Le),Fe[0]=ae[0]-Le[0],Fe[1]=ae[1]-Le[1],Fe[2]=ae[2]-Le[2],Fe[3]=ae[3]-Le[0],Fe[4]=ae[4]-Le[1],Fe[5]=ae[5]-Le[2];const Me=Jt.createPositionsDecodeMatrix(Fe),pe={};for(let Q=We;Q<=H;Q++){const Z=q[Q],ie=e.globalizeObjectIds?C.globalizeObjectId(o.id,Z):Z,re=qe-1,ne=Q===re,G=V[Q],J=ne?T.length-1:V[Q+1]-1,ue=[],xe=t.metaScene.metaObjects[ie],oe={},Ee={};if(!(e.includeIdsMap&&Z&&!e.includeIdsMap[Z])){if(xe){if(e.excludeTypesMap&&xe.type&&e.excludeTypesMap[xe.type]||e.includeTypesMap&&xe.type&&!e.includeTypesMap[xe.type]||e.includeIdsMap&&xe.id&&!e.includeIdsMap[xe.id])continue;const je=e.objectDefaults?e.objectDefaults[xe.type]||e.objectDefaults.DEFAULT:null;je&&(je.visible===!1&&(oe.visible=!1),je.pickable===!1&&(oe.pickable=!1),je.colorize&&(Ee.color=je.colorize),je.opacity!==void 0&&je.opacity!==null&&(Ee.opacity=je.opacity),je.metallic!==void 0&&je.metallic!==null&&(Ee.metallic=je.metallic),je.roughness!==void 0&&je.roughness!==null&&(Ee.roughness=je.roughness))}else if(e.excludeUnclassifiedObjects)continue;for(let je=G;je<=J;je++){const he=T[je],Ne=Ce[he]>1,Be=he===Ie-1,He=F[je],rt=He>=0?`${a}-textureSet-${He}`:null,At=HLt(N.subarray(je*6,je*6+3)),ft=N[je*6+3]/255,lt=N[je*6+4]/255,ut=N[je*6+5]/255,Te=n.getNextId();if(Ne){const st=R[je],dt=y.slice(st,st+16),Ye=`${a}-geometry.${ge}.${he}`;let fe=ve[Ye];if(!fe){fe={batchThisMesh:!e.reuseGeometries};const be=b[he];let $e=!1;switch(be){case 0:fe.primitiveName="solid",fe.geometryPositions=u.subarray(x[he],Be?u.length:x[he+1]),fe.geometryNormals=h.subarray(k[he],Be?h.length:k[he+1]),fe.geometryUVs=A.subarray(B[he],Be?A.length:B[he+1]),fe.geometryIndices=f.subarray(P[he],Be?f.length:P[he+1]),fe.geometryEdgeIndices=m.subarray(D[he],Be?m.length:D[he+1]),$e=fe.geometryPositions.length>0&&fe.geometryIndices.length>0;break;case 1:fe.primitiveName="surface",fe.geometryPositions=u.subarray(x[he],Be?u.length:x[he+1]),fe.geometryNormals=h.subarray(k[he],Be?h.length:k[he+1]),fe.geometryUVs=A.subarray(B[he],Be?A.length:B[he+1]),fe.geometryIndices=f.subarray(P[he],Be?f.length:P[he+1]),fe.geometryEdgeIndices=m.subarray(D[he],Be?m.length:D[he+1]),$e=fe.geometryPositions.length>0&&fe.geometryIndices.length>0;break;case 2:fe.primitiveName="points",fe.geometryPositions=u.subarray(x[he],Be?u.length:x[he+1]),fe.geometryColors=p.subarray(E[he],Be?p.length:E[he+1]),$e=fe.geometryPositions.length>0;break;case 3:fe.primitiveName="lines",fe.geometryPositions=u.subarray(x[he],Be?u.length:x[he+1]),fe.geometryIndices=f.subarray(P[he],Be?f.length:P[he+1]),$e=fe.geometryPositions.length>0&&fe.geometryIndices.length>0;break;case 4:fe.primitiveName="lines",fe.geometryPositions=u.subarray(x[he],Be?u.length:x[he+1]),fe.geometryIndices=IY(fe.geometryPositions,f.subarray(P[he],Be?f.length:P[he+1])),$e=fe.geometryPositions.length>0&&fe.geometryIndices.length>0;break;default:continue}if($e||(fe=null),fe&&(fe.geometryPositions.length>1e3,fe.batchThisMesh)){fe.decompressedPositions=new Float32Array(fe.geometryPositions.length),fe.transformedAndRecompressedPositions=new Uint16Array(fe.geometryPositions.length);const ht=fe.geometryPositions,St=fe.decompressedPositions;for(let xt=0,gi=ht.length;xt<gi;xt+=3)St[xt+0]=ht[xt+0]*v[0]+v[12],St[xt+1]=ht[xt+1]*v[5]+v[13],St[xt+2]=ht[xt+2]*v[10]+v[14];fe.geometryPositions=null,ve[Ye]=fe}}if(fe)if(fe.batchThisMesh){const be=fe.decompressedPositions,$e=fe.transformedAndRecompressedPositions;for(let ht=0,St=be.length;ht<St;ht+=3)$l[0]=be[ht+0],$l[1]=be[ht+1],$l[2]=be[ht+2],$l[3]=1,C.transformVec4(dt,$l,PY),Jt.compressPosition(PY,Fe,$l),$e[ht+0]=$l[0],$e[ht+1]=$l[1],$e[ht+2]=$l[2];o.createMesh(mt.apply(Ee,{id:Te,textureSetId:rt,origin:Le,primitive:fe.primitiveName,positionsCompressed:$e,normalsCompressed:fe.geometryNormals,uv:fe.geometryUVs,colorsCompressed:fe.geometryColors,indices:fe.geometryIndices,edgeIndices:fe.geometryEdgeIndices,positionsDecodeMatrix:Me,color:At,metallic:lt,roughness:ut,opacity:ft})),ue.push(Te)}else pe[Ye]||(o.createGeometry({id:Ye,primitive:fe.primitiveName,positionsCompressed:fe.geometryPositions,normalsCompressed:fe.geometryNormals,uv:fe.geometryUVs,colorsCompressed:fe.geometryColors,indices:fe.geometryIndices,edgeIndices:fe.geometryEdgeIndices,positionsDecodeMatrix:v}),pe[Ye]=!0),o.createMesh(mt.apply(Ee,{id:Te,geometryId:Ye,textureSetId:rt,matrix:dt,color:At,metallic:lt,roughness:ut,opacity:ft,origin:Le})),ue.push(Te)}else{const st=b[he];let dt,Ye,fe,be,$e,ht,St,xt=!1;switch(st){case 0:dt="solid",Ye=u.subarray(x[he],Be?u.length:x[he+1]),fe=h.subarray(k[he],Be?h.length:k[he+1]),be=A.subarray(B[he],Be?A.length:B[he+1]),ht=f.subarray(P[he],Be?f.length:P[he+1]),St=m.subarray(D[he],Be?m.length:D[he+1]),xt=Ye.length>0&&ht.length>0;break;case 1:dt="surface",Ye=u.subarray(x[he],Be?u.length:x[he+1]),fe=h.subarray(k[he],Be?h.length:k[he+1]),be=A.subarray(B[he],Be?A.length:B[he+1]),ht=f.subarray(P[he],Be?f.length:P[he+1]),St=m.subarray(D[he],Be?m.length:D[he+1]),xt=Ye.length>0&&ht.length>0;break;case 2:dt="points",Ye=u.subarray(x[he],Be?u.length:x[he+1]),$e=p.subarray(E[he],Be?p.length:E[he+1]),xt=Ye.length>0;break;case 3:dt="lines",Ye=u.subarray(x[he],Be?u.length:x[he+1]),ht=f.subarray(P[he],Be?f.length:P[he+1]),xt=Ye.length>0&&ht.length>0;break;case 4:dt="lines",Ye=u.subarray(x[he],Be?u.length:x[he+1]),ht=IY(Ye,f.subarray(P[he],Be?f.length:P[he+1])),xt=Ye.length>0&&ht.length>0;break;default:continue}xt&&(o.createMesh(mt.apply(Ee,{id:Te,textureSetId:rt,origin:Le,primitive:dt,positionsCompressed:Ye,normalsCompressed:fe,uv:be&&be.length>0?be:null,colorsCompressed:$e,indices:ht,edgeIndices:St,positionsDecodeMatrix:Me,color:At,metallic:lt,roughness:ut,opacity:ft})),ue.push(Te))}}ue.length>0&&o.createEntity(mt.apply(oe,{id:ie,isObject:!0,meshIds:ue}))}}}}function IY(t,e){const i=[];if(e.length>1)for(let o=0,r=e.length-1;o<r;o++)i.push(e[o]),i.push(e[o+1]);else if(t.length>1)for(let o=0,r=t.length/3-1;o<r;o++)i.push(o),i.push(o+1);return i}const SY={version:10,parse:function(t,e,i,o,r,n){const a=VLt(i),s=zLt(a);qLt(t,e,s,o,r,n)}},ec=C.vec4(),TY=C.vec4(),QLt=9;function GLt(t){const e=(function(){const r=new ArrayBuffer(2);return new Uint16Array(r)[0]=1,new Uint8Array(r)[0]!==1})(),i=(function(){let r=0;const n=new DataView(t);return function(a){const s=1+2*r++,l=n.getUint32(s*4,!0),c=n.getUint32((s+1)*4,!0),d=a.BYTES_PER_ELEMENT;if(e&&d>1){const u=new Uint8Array(t,l,c),h=d/2,p=u.length/d;for(let A=0;A<p;A++){const f=A*d;for(let m=0;m<h;m++){const g=f+m,y=f-m+d-1,v=u[g];u[g]=u[y],u[y]=v}}}return new a(t,l,c/d)}})(),o=(function(){const r=new TextDecoder;return()=>JSON.parse(r.decode(i(Uint8Array)))})();return{metadata:o(),textureData:i(Uint8Array),eachTextureDataPortion:i(Uint32Array),eachTextureAttributes:i(Uint16Array),positions:i(Uint16Array),normals:i(Int8Array),colors:i(Uint8Array),uvs:i(Float32Array),indices:i(Uint32Array),edgeIndices:i(Uint32Array),eachTextureSetTextures:i(Int32Array),matrices:i(Float32Array),reusedGeometriesDecodeMatrix:i(Float32Array),eachGeometryPrimitiveType:i(Uint8Array),eachGeometryPositionsPortion:i(Uint32Array),eachGeometryNormalsPortion:i(Uint32Array),eachGeometryColorsPortion:i(Uint32Array),eachGeometryUVsPortion:i(Uint32Array),eachGeometryIndicesPortion:i(Uint32Array),eachGeometryEdgeIndicesPortion:i(Uint32Array),eachMeshGeometriesPortion:i(Uint32Array),eachMeshMatricesPortion:i(Uint32Array),eachMeshTextureSet:i(Int32Array),eachMeshMaterialAttributes:i(Uint8Array),eachEntityId:o(),eachEntityMeshesPortion:i(Uint32Array),eachTileAABB:i(Float64Array),eachTileEntitiesPortion:i(Uint32Array)}}const KLt=(function(){const t=new Float32Array(3);return function(e){return t[0]=e[0]/255,t[1]=e[1]/255,t[2]=e[2]/255,t}})();(function(){const t=document.createElement("canvas"),e=t.getContext("2d");return function(i){return t.width=i.width,t.height=i.height,e.putImageData(i,0,0),t.toDataURL()}})();function JLt(t,e,i,o,r,n){const a=n.getNextId(),s=i.metadata,l=i.textureData,c=i.eachTextureDataPortion,d=i.eachTextureAttributes,u=i.positions,h=i.normals,p=i.colors,A=i.uvs,f=i.indices,m=i.edgeIndices,g=i.eachTextureSetTextures,y=i.matrices,v=i.reusedGeometriesDecodeMatrix,b=i.eachGeometryPrimitiveType,x=i.eachGeometryPositionsPortion,k=i.eachGeometryNormalsPortion,E=i.eachGeometryColorsPortion,B=i.eachGeometryUVsPortion,P=i.eachGeometryIndicesPortion,D=i.eachGeometryEdgeIndicesPortion,T=i.eachMeshGeometriesPortion,R=i.eachMeshMatricesPortion,F=i.eachMeshTextureSet,N=i.eachMeshMaterialAttributes,q=i.eachEntityId,V=i.eachEntityMeshesPortion,W=i.eachTileAABB,Y=i.eachTileEntitiesPortion,$=c.length,me=g.length/5,Ie=x.length,Se=T.length,qe=V.length,Qe=Y.length;r&&r.loadData(s,{includeTypes:e.includeTypes,excludeTypes:e.excludeTypes,globalizeObjectIds:e.globalizeObjectIds});for(let ge=0;ge<$;ge++){const we=ge===$-1,Re=c[ge],We=we?l.length:c[ge+1],H=We-Re>0,ee=ge*QLt,ae=d[ee+0]===1,Me=d[ee+1];d[ee+2],d[ee+3];const pe=d[ee+4],Q=d[ee+5],Z=d[ee+6],ie=d[ee+7],re=d[ee+8];if(H){const ne=new Uint8Array(l.subarray(Re,We)).buffer,G=`${a}-texture-${ge}`;if(ae)o.createTexture({id:G,buffers:[ne],minFilter:pe,magFilter:Q,wrapS:Z,wrapT:ie,wrapR:re});else{const J=Me===ey?"image/jpeg":Me===ty?"image/png":"image/gif",ue=new Blob([ne],{type:J}),xe=(window.URL||window.webkitURL).createObjectURL(ue),oe=document.createElement("img");oe.src=xe,o.createTexture({id:G,image:oe,minFilter:pe,magFilter:Q,wrapS:Z,wrapT:ie,wrapR:re})}}}for(let ge=0;ge<me;ge++){const we=ge*5,Re=`${a}-textureSet-${ge}`,We=g[we+0],H=g[we+1],ee=g[we+2],ae=g[we+3],Me=g[we+4];o.createTextureSet({id:Re,colorTextureId:We>=0?`${a}-texture-${We}`:null,normalsTextureId:ee>=0?`${a}-texture-${ee}`:null,metallicRoughnessTextureId:H>=0?`${a}-texture-${H}`:null,emissiveTextureId:ae>=0?`${a}-texture-${ae}`:null,occlusionTextureId:Me>=0?`${a}-texture-${Me}`:null})}const Ce=new Uint32Array(Ie);for(let ge=0;ge<Se;ge++){const we=T[ge];Ce[we]!==void 0?Ce[we]++:Ce[we]=1}const Le=C.vec3(),Fe=C.AABB3(),ve={};for(let ge=0;ge<Qe;ge++){const we=Qe-1,Re=ge===we,We=Y[ge],H=Re?qe-1:Y[ge+1]-1,ee=ge*6,ae=W.subarray(ee,ee+6);C.getAABB3Center(ae,Le),Fe[0]=ae[0]-Le[0],Fe[1]=ae[1]-Le[1],Fe[2]=ae[2]-Le[2],Fe[3]=ae[3]-Le[0],Fe[4]=ae[4]-Le[1],Fe[5]=ae[5]-Le[2];const Me=Jt.createPositionsDecodeMatrix(Fe),pe={};for(let Q=We;Q<=H;Q++){const Z=q[Q],ie=e.globalizeObjectIds?C.globalizeObjectId(o.id,Z):Z,re=qe-1,ne=Q===re,G=V[Q],J=ne?T.length-1:V[Q+1]-1,ue=[],xe=t.metaScene.metaObjects[ie],oe={},Ee={};if(!(e.includeIdsMap&&Z&&!e.includeIdsMap[Z])){if(xe){if(e.excludeTypesMap&&xe.type&&e.excludeTypesMap[xe.type]||e.includeTypesMap&&xe.type&&!e.includeTypesMap[xe.type]||e.includeIdsMap&&xe.id&&!e.includeIdsMap[xe.id])continue;const je=e.objectDefaults?e.objectDefaults[xe.type]||e.objectDefaults.DEFAULT:null;je&&(je.visible===!1&&(oe.visible=!1),je.pickable===!1&&(oe.pickable=!1),je.colorize&&(Ee.color=je.colorize),je.opacity!==void 0&&je.opacity!==null&&(Ee.opacity=je.opacity),je.metallic!==void 0&&je.metallic!==null&&(Ee.metallic=je.metallic),je.roughness!==void 0&&je.roughness!==null&&(Ee.roughness=je.roughness))}else if(e.excludeUnclassifiedObjects)continue;for(let je=G;je<=J;je++){const he=T[je],Ne=Ce[he]>1,Be=he===Ie-1,He=F[je],rt=He>=0?`${a}-textureSet-${He}`:null,At=KLt(N.subarray(je*6,je*6+3)),ft=N[je*6+3]/255,lt=N[je*6+4]/255,ut=N[je*6+5]/255,Te=n.getNextId();if(Ne){const st=R[je],dt=y.slice(st,st+16),Ye=`${a}-geometry.${ge}.${he}`;let fe=ve[Ye];if(!fe){fe={batchThisMesh:!e.reuseGeometries};const be=b[he];let $e=!1;switch(be){case 0:fe.primitiveName="solid",fe.geometryPositions=u.subarray(x[he],Be?u.length:x[he+1]),fe.geometryNormals=h.subarray(k[he],Be?h.length:k[he+1]),fe.geometryUVs=A.subarray(B[he],Be?A.length:B[he+1]),fe.geometryIndices=f.subarray(P[he],Be?f.length:P[he+1]),fe.geometryEdgeIndices=m.subarray(D[he],Be?m.length:D[he+1]),$e=fe.geometryPositions.length>0&&fe.geometryIndices.length>0;break;case 1:fe.primitiveName="surface",fe.geometryPositions=u.subarray(x[he],Be?u.length:x[he+1]),fe.geometryNormals=h.subarray(k[he],Be?h.length:k[he+1]),fe.geometryUVs=A.subarray(B[he],Be?A.length:B[he+1]),fe.geometryIndices=f.subarray(P[he],Be?f.length:P[he+1]),fe.geometryEdgeIndices=m.subarray(D[he],Be?m.length:D[he+1]),$e=fe.geometryPositions.length>0&&fe.geometryIndices.length>0;break;case 2:fe.primitiveName="points",fe.geometryPositions=u.subarray(x[he],Be?u.length:x[he+1]),fe.geometryColors=p.subarray(E[he],Be?p.length:E[he+1]),$e=fe.geometryPositions.length>0;break;case 3:fe.primitiveName="lines",fe.geometryPositions=u.subarray(x[he],Be?u.length:x[he+1]),fe.geometryIndices=f.subarray(P[he],Be?f.length:P[he+1]),$e=fe.geometryPositions.length>0&&fe.geometryIndices.length>0;break;case 4:fe.primitiveName="lines",fe.geometryPositions=u.subarray(x[he],Be?u.length:x[he+1]),fe.geometryIndices=DY(fe.geometryPositions,f.subarray(P[he],Be?f.length:P[he+1])),$e=fe.geometryPositions.length>0&&fe.geometryIndices.length>0;break;default:continue}if($e||(fe=null),fe&&(fe.geometryPositions.length>1e3,fe.batchThisMesh)){fe.decompressedPositions=new Float32Array(fe.geometryPositions.length),fe.transformedAndRecompressedPositions=new Uint16Array(fe.geometryPositions.length);const ht=fe.geometryPositions,St=fe.decompressedPositions;for(let xt=0,gi=ht.length;xt<gi;xt+=3)St[xt+0]=ht[xt+0]*v[0]+v[12],St[xt+1]=ht[xt+1]*v[5]+v[13],St[xt+2]=ht[xt+2]*v[10]+v[14];fe.geometryPositions=null,ve[Ye]=fe}}if(fe)if(fe.batchThisMesh){const be=fe.decompressedPositions,$e=fe.transformedAndRecompressedPositions;for(let ht=0,St=be.length;ht<St;ht+=3)ec[0]=be[ht+0],ec[1]=be[ht+1],ec[2]=be[ht+2],ec[3]=1,C.transformVec4(dt,ec,TY),Jt.compressPosition(TY,Fe,ec),$e[ht+0]=ec[0],$e[ht+1]=ec[1],$e[ht+2]=ec[2];o.createMesh(mt.apply(Ee,{id:Te,textureSetId:rt,origin:Le,primitive:fe.primitiveName,positionsCompressed:$e,normalsCompressed:fe.geometryNormals,uv:fe.geometryUVs,colorsCompressed:fe.geometryColors,indices:fe.geometryIndices,edgeIndices:fe.geometryEdgeIndices,positionsDecodeMatrix:Me,color:At,metallic:lt,roughness:ut,opacity:ft})),ue.push(Te)}else pe[Ye]||(o.createGeometry({id:Ye,primitive:fe.primitiveName,positionsCompressed:fe.geometryPositions,normalsCompressed:fe.geometryNormals,uv:fe.geometryUVs,colorsCompressed:fe.geometryColors,indices:fe.geometryIndices,edgeIndices:fe.geometryEdgeIndices,positionsDecodeMatrix:v}),pe[Ye]=!0),o.createMesh(mt.apply(Ee,{id:Te,geometryId:Ye,textureSetId:rt,matrix:dt,color:At,metallic:lt,roughness:ut,opacity:ft,origin:Le})),ue.push(Te)}else{const st=b[he];let dt,Ye,fe,be,$e,ht,St,xt=!1;switch(st){case 0:dt="solid",Ye=u.subarray(x[he],Be?u.length:x[he+1]),fe=h.subarray(k[he],Be?h.length:k[he+1]),be=A.subarray(B[he],Be?A.length:B[he+1]),ht=f.subarray(P[he],Be?f.length:P[he+1]),St=m.subarray(D[he],Be?m.length:D[he+1]),xt=Ye.length>0&&ht.length>0;break;case 1:dt="surface",Ye=u.subarray(x[he],Be?u.length:x[he+1]),fe=h.subarray(k[he],Be?h.length:k[he+1]),be=A.subarray(B[he],Be?A.length:B[he+1]),ht=f.subarray(P[he],Be?f.length:P[he+1]),St=m.subarray(D[he],Be?m.length:D[he+1]),xt=Ye.length>0&&ht.length>0;break;case 2:dt="points",Ye=u.subarray(x[he],Be?u.length:x[he+1]),$e=p.subarray(E[he],Be?p.length:E[he+1]),xt=Ye.length>0;break;case 3:dt="lines",Ye=u.subarray(x[he],Be?u.length:x[he+1]),ht=f.subarray(P[he],Be?f.length:P[he+1]),xt=Ye.length>0&&ht.length>0;break;case 4:dt="lines",Ye=u.subarray(x[he],Be?u.length:x[he+1]),ht=DY(Ye,f.subarray(P[he],Be?f.length:P[he+1])),xt=Ye.length>0&&ht.length>0;break;default:continue}xt&&(o.createMesh(mt.apply(Ee,{id:Te,textureSetId:rt,origin:Le,primitive:dt,positionsCompressed:Ye,normalsCompressed:fe,uv:be&&be.length>0?be:null,colorsCompressed:$e,indices:ht,edgeIndices:St,positionsDecodeMatrix:Me,color:At,metallic:lt,roughness:ut,opacity:ft})),ue.push(Te))}}ue.length>0&&o.createEntity(mt.apply(oe,{id:ie,isObject:!0,meshIds:ue}))}}}}function DY(t,e){const i=[];if(e.length>1)for(let o=0,r=e.length-1;o<r;o++)i.push(e[o]),i.push(e[o+1]);else if(t.length>1)for(let o=0,r=t.length/3-1;o<r;o++)i.push(o),i.push(o+1);return i}const RY={version:11,parseArrayBuffer:function(t,e,i,o,r,n){const a=GLt(i);JLt(t,e,a,o,r,n)}};let Nu=window.pako||ts;Nu.inflate||(Nu=Nu.default);const tc=C.vec4(),LY=C.vec4(),ZLt=9;function WLt(t){const e=(function(){const r=new ArrayBuffer(2);return new Uint16Array(r)[0]=1,new Uint8Array(r)[0]!==1})(),i=(function(){let r=0;const n=new DataView(t);return function(a){const s=1+2*r++,l=n.getUint32(s*4,!0),c=n.getUint32((s+1)*4,!0),d=a.BYTES_PER_ELEMENT;if(e&&d>1){const u=new Uint8Array(t,l,c),h=d/2,p=u.length/d;for(let A=0;A<p;A++){const f=A*d;for(let m=0;m<h;m++){const g=f+m,y=f-m+d-1,v=u[g];u[g]=u[y],u[y]=v}}}return new a(t,l,c/d)}})(),o=(function(){const r=new TextDecoder;return()=>JSON.parse(r.decode(i(Uint8Array)))})();return{metadata:o(),textureData:i(Uint8Array),eachTextureDataPortion:i(Uint32Array),eachTextureAttributes:i(Uint16Array),positions:i(Uint16Array),normals:i(Int8Array),colors:i(Uint8Array),uvs:i(Float32Array),indices:i(Uint32Array),edgeIndices:i(Uint32Array),eachTextureSetTextures:i(Int32Array),matrices:i(Float32Array),reusedGeometriesDecodeMatrix:i(Float32Array),eachGeometryPrimitiveType:i(Uint8Array),eachGeometryAxisLabel:o(),eachGeometryPositionsPortion:i(Uint32Array),eachGeometryNormalsPortion:i(Uint32Array),eachGeometryColorsPortion:i(Uint32Array),eachGeometryUVsPortion:i(Uint32Array),eachGeometryIndicesPortion:i(Uint32Array),eachGeometryEdgeIndicesPortion:i(Uint32Array),eachMeshGeometriesPortion:i(Uint32Array),eachMeshMatricesPortion:i(Uint32Array),eachMeshTextureSet:i(Int32Array),eachMeshMaterialAttributes:i(Uint8Array),eachEntityId:o(),eachEntityMeshesPortion:i(Uint32Array),eachTileAABB:i(Float64Array),eachTileEntitiesPortion:i(Uint32Array)}}function YLt(t){let e=0;return{metadata:t[e++],textureData:t[e++],eachTextureDataPortion:t[e++],eachTextureAttributes:t[e++],positions:t[e++],normals:t[e++],colors:t[e++],uvs:t[e++],indices:t[e++],edgeIndices:t[e++],eachTextureSetTextures:t[e++],matrices:t[e++],reusedGeometriesDecodeMatrix:t[e++],eachGeometryPrimitiveType:t[e++],eachGeometryAxisLabel:t[e++],eachGeometryPositionsPortion:t[e++],eachGeometryNormalsPortion:t[e++],eachGeometryColorsPortion:t[e++],eachGeometryUVsPortion:t[e++],eachGeometryIndicesPortion:t[e++],eachGeometryEdgeIndicesPortion:t[e++],eachMeshGeometriesPortion:t[e++],eachMeshMatricesPortion:t[e++],eachMeshTextureSet:t[e++],eachMeshMaterialAttributes:t[e++],eachEntityId:t[e++],eachEntityMeshesPortion:t[e++],eachTileAABB:t[e++],eachTileEntitiesPortion:t[e++]}}function XLt(t){function e(i,o){return i.length===0?[]:Nu.inflate(i,o).buffer}return{metadata:JSON.parse(Nu.inflate(t.metadata,{to:"string"})),textureData:new Uint8Array(e(t.textureData)),eachTextureDataPortion:new Uint32Array(e(t.eachTextureDataPortion)),eachTextureAttributes:new Uint16Array(e(t.eachTextureAttributes)),positions:new Uint16Array(e(t.positions)),normals:new Int8Array(e(t.normals)),colors:new Uint8Array(e(t.colors)),uvs:new Float32Array(e(t.uvs)),indices:new Uint32Array(e(t.indices)),edgeIndices:new Uint32Array(e(t.edgeIndices)),eachTextureSetTextures:new Int32Array(e(t.eachTextureSetTextures)),matrices:new Float32Array(e(t.matrices)),reusedGeometriesDecodeMatrix:new Float32Array(e(t.reusedGeometriesDecodeMatrix)),eachGeometryPrimitiveType:new Uint8Array(e(t.eachGeometryPrimitiveType)),eachGeometryAxisLabel:JSON.parse(Nu.inflate(t.eachGeometryAxisLabel,{to:"string"})),eachGeometryPositionsPortion:new Uint32Array(e(t.eachGeometryPositionsPortion)),eachGeometryNormalsPortion:new Uint32Array(e(t.eachGeometryNormalsPortion)),eachGeometryColorsPortion:new Uint32Array(e(t.eachGeometryColorsPortion)),eachGeometryUVsPortion:new Uint32Array(e(t.eachGeometryUVsPortion)),eachGeometryIndicesPortion:new Uint32Array(e(t.eachGeometryIndicesPortion)),eachGeometryEdgeIndicesPortion:new Uint32Array(e(t.eachGeometryEdgeIndicesPortion)),eachMeshGeometriesPortion:new Uint32Array(e(t.eachMeshGeometriesPortion)),eachMeshMatricesPortion:new Uint32Array(e(t.eachMeshMatricesPortion)),eachMeshTextureSet:new Int32Array(e(t.eachMeshTextureSet)),eachMeshMaterialAttributes:new Uint8Array(e(t.eachMeshMaterialAttributes)),eachEntityId:JSON.parse(Nu.inflate(t.eachEntityId,{to:"string"})),eachEntityMeshesPortion:new Uint32Array(e(t.eachEntityMeshesPortion)),eachTileAABB:new Float64Array(e(t.eachTileAABB)),eachTileEntitiesPortion:new Uint32Array(e(t.eachTileEntitiesPortion))}}const $Lt=(function(){const t=new Float32Array(3);return function(e){return t[0]=e[0]/255,t[1]=e[1]/255,t[2]=e[2]/255,t}})();(function(){const t=document.createElement("canvas"),e=t.getContext("2d");return function(i){return t.width=i.width,t.height=i.height,e.putImageData(i,0,0),t.toDataURL()}})();function _Y(t,e,i,o,r,n){const a=n.getNextId(),s=i.metadata,l=i.textureData,c=i.eachTextureDataPortion,d=i.eachTextureAttributes,u=i.positions,h=i.normals,p=i.colors,A=i.uvs,f=i.indices,m=i.edgeIndices,g=i.eachTextureSetTextures,y=i.matrices,v=i.reusedGeometriesDecodeMatrix,b=i.eachGeometryPrimitiveType,x=i.eachGeometryAxisLabel,k=i.eachGeometryPositionsPortion,E=i.eachGeometryNormalsPortion,B=i.eachGeometryColorsPortion,P=i.eachGeometryUVsPortion,D=i.eachGeometryIndicesPortion,T=i.eachGeometryEdgeIndicesPortion,R=i.eachMeshGeometriesPortion,F=i.eachMeshMatricesPortion,N=i.eachMeshTextureSet,q=i.eachMeshMaterialAttributes,V=i.eachEntityId,W=i.eachEntityMeshesPortion,Y=i.eachTileAABB,$=i.eachTileEntitiesPortion,me=c.length,Ie=g.length/5,Se=k.length,qe=R.length,Qe=W.length,Ce=$.length;r&&r.loadData(s,{includeTypes:e.includeTypes,excludeTypes:e.excludeTypes,globalizeObjectIds:e.globalizeObjectIds});for(let we=0;we<me;we++){const Re=we===me-1,We=c[we],H=Re?l.length:c[we+1],ee=H-We>0,ae=we*ZLt,Me=d[ae+0]===1,pe=d[ae+1];d[ae+2],d[ae+3];const Q=d[ae+4],Z=d[ae+5],ie=d[ae+6],re=d[ae+7],ne=d[ae+8];if(ee){const G=new Uint8Array(l.subarray(We,H)).buffer,J=`${a}-texture-${we}`;if(Me)o.createTexture({id:J,buffers:[G],minFilter:Q,magFilter:Z,wrapS:ie,wrapT:re,wrapR:ne});else{const ue=pe===ey?"image/jpeg":pe===ty?"image/png":"image/gif",xe=new Blob([G],{type:ue}),oe=(window.URL||window.webkitURL).createObjectURL(xe),Ee=document.createElement("img");Ee.src=oe,o.createTexture({id:J,image:Ee,minFilter:Q,magFilter:Z,wrapS:ie,wrapT:re,wrapR:ne})}}}for(let we=0;we<Ie;we++){const Re=we*5,We=`${a}-textureSet-${we}`,H=g[Re+0],ee=g[Re+1],ae=g[Re+2],Me=g[Re+3],pe=g[Re+4];o.createTextureSet({id:We,colorTextureId:H>=0?`${a}-texture-${H}`:null,normalsTextureId:ae>=0?`${a}-texture-${ae}`:null,metallicRoughnessTextureId:ee>=0?`${a}-texture-${ee}`:null,emissiveTextureId:Me>=0?`${a}-texture-${Me}`:null,occlusionTextureId:pe>=0?`${a}-texture-${pe}`:null})}const Le=new Uint32Array(Se);for(let we=0;we<qe;we++){const Re=R[we];Le[Re]!==void 0?Le[Re]++:Le[Re]=1}const Fe=C.vec3(),ve=C.AABB3(),ge={};for(let we=0;we<Ce;we++){const Re=Ce-1,We=we===Re,H=$[we],ee=We?Qe-1:$[we+1]-1,ae=we*6,Me=Y.subarray(ae,ae+6);C.getAABB3Center(Me,Fe),ve[0]=Me[0]-Fe[0],ve[1]=Me[1]-Fe[1],ve[2]=Me[2]-Fe[2],ve[3]=Me[3]-Fe[0],ve[4]=Me[4]-Fe[1],ve[5]=Me[5]-Fe[2];const pe=Jt.createPositionsDecodeMatrix(ve),Q={};for(let Z=H;Z<=ee;Z++){const ie=V[Z],re=e.globalizeObjectIds?C.globalizeObjectId(o.id,ie):ie,ne=Qe-1,G=Z===ne,J=W[Z],ue=G?R.length-1:W[Z+1]-1,xe=[],oe=t.metaScene.metaObjects[re],Ee={},je={};if(!(e.includeIdsMap&&ie&&!e.includeIdsMap[ie])){if(oe){if(e.excludeTypesMap&&oe.type&&e.excludeTypesMap[oe.type]||e.includeTypesMap&&oe.type&&!e.includeTypesMap[oe.type]||e.includeIdsMap&&oe.id&&!e.includeIdsMap[oe.id])continue;const he=e.objectDefaults?e.objectDefaults[oe.type]||e.objectDefaults.DEFAULT:null;he&&(he.visible===!1&&(Ee.visible=!1),he.pickable===!1&&(Ee.pickable=!1),he.colorize&&(je.color=he.colorize),he.opacity!==void 0&&he.opacity!==null&&(je.opacity=he.opacity),he.metallic!==void 0&&he.metallic!==null&&(je.metallic=he.metallic),he.roughness!==void 0&&he.roughness!==null&&(je.roughness=he.roughness))}else if(e.excludeUnclassifiedObjects)continue;for(let he=J;he<=ue;he++){const Ne=R[he],Be=Le[Ne]>1,He=Ne===Se-1,rt=N[he],At=rt>=0?`${a}-textureSet-${rt}`:null,ft=$Lt(q.subarray(he*6,he*6+3)),lt=q[he*6+3]/255,ut=q[he*6+4]/255,Te=q[he*6+5]/255,st=n.getNextId();if(Be){const dt=F[he],Ye=y.slice(dt,dt+16),fe=`${a}-geometry.${we}.${Ne}`;let be=ge[fe];if(!be){be={batchThisMesh:!e.reuseGeometries};const $e=b[Ne],ht=x[Ne];let St=!1,xt;switch($e){case 0:be.primitiveName="solid",be.geometryPositions=u.subarray(k[Ne],He?u.length:k[Ne+1]),be.geometryNormals=h.subarray(E[Ne],He?h.length:E[Ne+1]),be.geometryUVs=A.subarray(P[Ne],He?A.length:P[Ne+1]),be.geometryIndices=f.subarray(D[Ne],He?f.length:D[Ne+1]),be.geometryEdgeIndices=m.subarray(T[Ne],He?m.length:T[Ne+1]),St=be.geometryPositions.length>0&&be.geometryIndices.length>0;break;case 1:be.primitiveName="surface",be.geometryPositions=u.subarray(k[Ne],He?u.length:k[Ne+1]),be.geometryNormals=h.subarray(E[Ne],He?h.length:E[Ne+1]),be.geometryUVs=A.subarray(P[Ne],He?A.length:P[Ne+1]),be.geometryIndices=f.subarray(D[Ne],He?f.length:D[Ne+1]),be.geometryEdgeIndices=m.subarray(T[Ne],He?m.length:T[Ne+1]),St=be.geometryPositions.length>0&&be.geometryIndices.length>0;break;case 2:be.primitiveName="points",be.geometryPositions=u.subarray(k[Ne],He?u.length:k[Ne+1]),be.geometryColors=p.subarray(B[Ne],He?p.length:B[Ne+1]),St=be.geometryPositions.length>0;break;case 3:be.primitiveName="lines",be.geometryPositions=u.subarray(k[Ne],He?u.length:k[Ne+1]),be.geometryIndices=f.subarray(D[Ne],He?f.length:D[Ne+1]),St=be.geometryPositions.length>0&&be.geometryIndices.length>0;break;case 4:be.primitiveName="lines",be.geometryPositions=u.subarray(k[Ne],He?u.length:k[Ne+1]),be.geometryIndices=FY(be.geometryPositions,f.subarray(D[Ne],He?f.length:D[Ne+1])),St=be.geometryPositions.length>0&&be.geometryIndices.length>0;break;case 7:be.primitiveName="lines",be.geometryPositions=u.subarray(k[Ne],He?u.length:k[Ne+1]),be.decompressedPositions=Jt.decompressPositions(be.geometryPositions,v),xt=Bp({origin:be.decompressedPositions,text:ht,size:2}),be.decompressedPositions=xt.positions,be.geometryIndices=xt.indices,be.geometryPositions=null,St=be.decompressedPositions.length>0&&be.geometryIndices.length>0;break;default:continue}if(St||(be=null),be&&(be.geometryPositions&&be.geometryPositions.length>1e3,be.batchThisMesh)){if($e===7)be.transformedAndRecompressedPositions=new Uint16Array(be.decompressedPositions.length);else{be.decompressedPositions=new Float32Array(be.geometryPositions.length),be.transformedAndRecompressedPositions=new Uint16Array(be.geometryPositions.length);const gi=be.geometryPositions,ji=be.decompressedPositions;for(let Eo=0,to=gi.length;Eo<to;Eo+=3)ji[Eo+0]=gi[Eo+0]*v[0]+v[12],ji[Eo+1]=gi[Eo+1]*v[5]+v[13],ji[Eo+2]=gi[Eo+2]*v[10]+v[14];be.geometryPositions=null}ge[fe]=be}}if(be)if(be.batchThisMesh){const $e=be.decompressedPositions,ht=be.transformedAndRecompressedPositions;for(let St=0,xt=$e.length;St<xt;St+=3)tc[0]=$e[St+0],tc[1]=$e[St+1],tc[2]=$e[St+2],tc[3]=1,C.transformVec4(Ye,tc,LY),Jt.compressPosition(LY,ve,tc),ht[St+0]=tc[0],ht[St+1]=tc[1],ht[St+2]=tc[2];o.createMesh(mt.apply(je,{id:st,textureSetId:At,origin:Fe,primitive:be.primitiveName,positionsCompressed:ht,normalsCompressed:be.geometryNormals,uv:be.geometryUVs,colorsCompressed:be.geometryColors,indices:be.geometryIndices,edgeIndices:be.geometryEdgeIndices,positionsDecodeMatrix:pe,color:ft,metallic:ut,roughness:Te,opacity:lt})),xe.push(st)}else{if(!Q[fe]){let $e={id:fe,primitive:be.primitiveName,normalsCompressed:be.geometryNormals,uv:be.geometryUVs,colorsCompressed:be.geometryColors,indices:be.geometryIndices,edgeIndices:be.geometryEdgeIndices};be.geometryPositions?$e={...$e,positionsCompressed:be.geometryPositions,positionsDecodeMatrix:v}:$e={...$e,positions:be.decompressedPositions},o.createGeometry($e),Q[fe]=!0}o.createMesh(mt.apply(je,{id:st,geometryId:fe,textureSetId:At,matrix:Ye,color:ft,metallic:ut,roughness:Te,opacity:lt,origin:Fe})),xe.push(st)}}else{const dt=b[Ne],Ye=x[Ne];let fe,be,$e,ht,St,xt,gi,ji=!1,Eo;switch(dt){case 0:fe="solid",be=u.subarray(k[Ne],He?u.length:k[Ne+1]),$e=h.subarray(E[Ne],He?h.length:E[Ne+1]),ht=A.subarray(P[Ne],He?A.length:P[Ne+1]),xt=f.subarray(D[Ne],He?f.length:D[Ne+1]),gi=m.subarray(T[Ne],He?m.length:T[Ne+1]),ji=be.length>0&&xt.length>0;break;case 1:fe="surface",be=u.subarray(k[Ne],He?u.length:k[Ne+1]),$e=h.subarray(E[Ne],He?h.length:E[Ne+1]),ht=A.subarray(P[Ne],He?A.length:P[Ne+1]),xt=f.subarray(D[Ne],He?f.length:D[Ne+1]),gi=m.subarray(T[Ne],He?m.length:T[Ne+1]),ji=be.length>0&&xt.length>0;break;case 2:fe="points",be=u.subarray(k[Ne],He?u.length:k[Ne+1]),St=p.subarray(B[Ne],He?p.length:B[Ne+1]),ji=be.length>0;break;case 3:fe="lines",be=u.subarray(k[Ne],He?u.length:k[Ne+1]),xt=f.subarray(D[Ne],He?f.length:D[Ne+1]),ji=be.length>0&&xt.length>0;break;case 4:fe="lines",be=u.subarray(k[Ne],He?u.length:k[Ne+1]),xt=FY(be,f.subarray(D[Ne],He?f.length:D[Ne+1])),ji=be.length>0&&xt.length>0;break;case 7:fe="lines",be=u.subarray(k[Ne],He?u.length:k[Ne+1]),be=Jt.decompressPositions(be,pe),Eo=Bp({origin:be,text:Ye,size:2}),be=Eo.positions,xt=Eo.indices,ji=be.length>0&&xt.length>0;break;default:continue}if(ji){let to=mt.apply(je,{id:st,textureSetId:At,origin:Fe,primitive:fe,normalsCompressed:$e,uv:ht&&ht.length>0?ht:null,colorsCompressed:St,indices:xt,edgeIndices:gi,color:ft,metallic:ut,roughness:Te,opacity:lt});dt!==7?to={...to,positionsCompressed:be,positionsDecodeMatrix:pe}:to={...to,positions:be},o.createMesh(to),xe.push(st)}}}xe.length>0&&o.createEntity(mt.apply(Ee,{id:re,isObject:!0,meshIds:xe}))}}}}function FY(t,e){const i=[];if(e.length>1)for(let o=0,r=e.length-1;o<r;o++)i.push(e[o]),i.push(e[o+1]);else if(t.length>1)for(let o=0,r=t.length/3-1;o<r;o++)i.push(o),i.push(o+1);return i}const OY={version:12,parseArrayBuffer:function(t,e,i,o,r,n){const a=WLt(i);_Y(t,e,a,o,r,n)},parse:function(t,e,i,o,r,n){const a=YLt(i),s=XLt(a);_Y(t,e,s,o,r,n)}},vn={};vn[AY.version]=AY,vn[gY.version]=gY,vn[mY.version]=mY,vn[vY.version]=vY,vn[yY.version]=yY,vn[bY.version]=bY,vn[CY.version]=CY,vn[MY.version]=MY,vn[BY.version]=BY,vn[SY.version]=SY,vn[RY.version]=RY,vn[OY.version]=OY;class y7 extends ba{constructor(e,i={}){super("XKTLoader",e,i),this._maxGeometryBatchSize=i.maxGeometryBatchSize,this.textureTranscoder=i.textureTranscoder,this.dataSource=i.dataSource,this.objectDefaults=i.objectDefaults,this.includeTypes=i.includeTypes,this.excludeTypes=i.excludeTypes,this.excludeUnclassifiedObjects=i.excludeUnclassifiedObjects,this.reuseGeometries=i.reuseGeometries}get supportedVersions(){return Object.keys(vn)}get textureTranscoder(){return this._textureTranscoder}set textureTranscoder(e){this._textureTranscoder=e}get dataSource(){return this._dataSource}set dataSource(e){this._dataSource=e||new hY}get objectDefaults(){return this._objectDefaults}set objectDefaults(e){this._objectDefaults=e||cY}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 i={},o=e.includeTypes||this._includeTypes,r=e.excludeTypes||this._excludeTypes,n=e.includeIds||this._includeIds,a=e.objectDefaults||this._objectDefaults;if(i.reuseGeometries=e.reuseGeometries!==null&&e.reuseGeometries!==void 0?e.reuseGeometries:this._reuseGeometries!==!1,o){i.includeTypesMap={};for(let A=0,f=o.length;A<f;A++)i.includeTypesMap[o[A]]=!0}if(r){i.excludeTypesMap={};for(let A=0,f=r.length;A<f;A++)i.excludeTypesMap[r[A]]=!0}if(n){i.includeIdsMap={};for(let A=0,f=n.length;A<f;A++)i.includeIdsMap[n[A]]=!0}a&&(i.objectDefaults=a),i.excludeUnclassifiedObjects=e.excludeUnclassifiedObjects!==void 0?!!e.excludeUnclassifiedObjects:this._excludeUnclassifiedObjects,i.globalizeObjectIds=e.globalizeObjectIds!==void 0&&e.globalizeObjectIds!==null?!!e.globalizeObjectIds:this._globalizeObjectIds;const s=new Pv(this.viewer.scene,mt.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=s.id,c=new hZ({metaScene:this.viewer.metaScene,id:l});this.viewer.scene.canvas.spinner.processes++;const d=()=>{s.destroyed||(s.finalize(),c.finalize(),this.viewer.scene.canvas.spinner.processes--,s.once("destroyed",()=>{this.viewer.metaScene.destroyMetaModel(c.id)}),this.scheduleTask(()=>{s.destroyed||(s.scene.fire("modelLoaded",s.id),s.fire("loaded",!0,!1))}))},u=A=>{this.viewer.scene.canvas.spinner.processes--,this.error(A),s.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=>{s.destroyed||(c.loadData(f,{includeTypes:o,excludeTypes:r,globalizeObjectIds:i.globalizeObjectIds}),e.src?this._loadModel(e.src,i,s,null,p,d,u):(this._parseModel(e.xkt,i,s,null,p),d()))},f=>{u(`load(): Failed to load model metadata for model '${l} from '${A}' - ${f}`)})}else e.metaModelData&&(c.loadData(e.metaModelData,{includeTypes:o,excludeTypes:r,globalizeObjectIds:i.globalizeObjectIds}),e.src?this._loadModel(e.src,i,s,null,p,d,u):(this._parseModel(e.xkt,i,s,null,p),d()));else if(e.src)this._loadModel(e.src,i,s,c,p,d,u);else if(e.xkt)this._parseModel(e.xkt,i,s,c,p),d();else if(e.manifestSrc||e.manifest){const A=e.manifestSrc?e_t(e.manifestSrc):"",f=(y,v,b)=>{let x=0;const k=()=>{s.destroyed||x>=y.length?v():this._dataSource.getMetaModel(`${A}${y[x]}`,E=>{c.loadData(E,{includeTypes:o,excludeTypes:r,globalizeObjectIds:i.globalizeObjectIds}),x++,this.scheduleTask(k,200)},b)};k()},m=(y,v,b)=>{let x=0;const k=()=>{s.destroyed||x>=y.length?v():this._dataSource.getXKT(`${A}${y[x]}`,E=>{this._parseModel(E,i,s,null,p),s.preFinalize(),x++,this.scheduleTask(k,200)},b)};k()},g=(y,v,b)=>{let x=0;const k=()=>{s.destroyed||x>=y.length?v():this._dataSource.getXKT(`${A}${y[x]}`,E=>{this._parseModel(E,i,s,c,p),s.preFinalize(),x++,this.scheduleTask(k,200)},b)};k()};if(e.manifest){const y=e.manifest,v=y.xktFiles;if(!v||v.length===0){u("load(): Failed to load model manifest - manifest not valid");return}const b=y.metaModelFiles;b?f(b,()=>{m(v,d,u)},u):g(v,d,u)}else this._dataSource.getManifest(e.manifestSrc,y=>{if(s.destroyed)return;const v=y.xktFiles;if(!v||v.length===0){u("load(): Failed to load model manifest - manifest not valid");return}const b=y.metaModelFiles;b?f(b,()=>{m(v,d,u)},u):g(v,d,u)},u)}return s}_loadModel(e,i,o,r,n,a,s){this._dataSource.getXKT(e,l=>{this._parseModel(l,i,o,r,n),o.preFinalize(),a()},s)}async _parseModel(e,i,o,r,n){if(o.destroyed)return;const a=new DataView(e),s=new Uint8Array(e),l=a.getUint32(0,!0),c=l&2147483647,d=c<11||c>=12&&l>>>31,u=vn[c];if(!u){this.error("Unsupported .XKT file version: "+c+" - this XKTLoaderPlugin supports versions "+Object.keys(vn));return}if(!d){u.parseArrayBuffer(this.viewer,i,e,o,r,n);return}const h=a.getUint32(4,!0),p=[];let A=(h+2)*4;for(let f=0;f<h;f++){const m=a.getUint32((f+2)*4,!0);p.push(s.subarray(A,A+m)),A+=m}u.parse(this.viewer,i,p,o,r,n)}}function e_t(t){t.indexOf("?")>-1&&(t=t.split("?")[0]);const e=t.split("/");return e.pop(),e.join("/")+"/"}let t_t=1;class uL{constructor(e,i,o=null){this.tileset=e,this.computePriority=e.plugin.computePriority,this.distanceFactorToFreeData=e.plugin.distanceFactorToFreeData,this.src=i.content?.uri??null;const r=this.src?new URL(this.src).pathname:null;this.name=`${e.name}_${r?r.substring(r.lastIndexOf("/")+1):`tileWithNoContent_${t_t++}`}`,this.parent=o,this.refine=i.refine,this.data=null,this.fetching=null,this.depth=o?o.depth+1:1,this.model=null,this.loadProcess=null,this.loading=!1,this.currentDistanceFromCamera=null,this._visible=!o,this.priority=1,this.geometricError=i.geometricError;const[n,a,s,l,c,d,u,h,p,A,f,m]=i.boundingVolume.box;let g=[n,a,s],y=1;e.rootTransform&&(C.transformPoint3(e.rootTransform,g,g),y=e.rootTransform[0]),g=[g[0],g[2],-g[1]],this.center=Object.freeze(g);const v=[l,c,d],b=[-u,-h,-p],x=[A,f,m];this.xSize=C.lenVec3(v)*y,this.ySize=C.lenVec3(x)*y,this.zSize=C.lenVec3(b)*y,this.volume=this.xSize*2*this.ySize*2*this.zSize*2,this.children=i.children?.map(k=>new uL(e,k,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=C.distVec3(this.center,e),this.parent&&(this.visible=this.isWithinCameraVisibleRange,this.currentDistanceFromCamera>this.viewDistance*this.distanceFactorToFreeData&&(this.data=null)),this.visible&&this.children.forEach(i=>i.updateVisibility(e)),this.priority=this.computePriority(this)}fetchData(){return this.data?this.data:this.src?(this.fetching||(this.fetching=new Promise((e,i)=>{fetch(this.src).then(o=>{o.ok?o.arrayBuffer().then(r=>{this.data=r,this.fetching=null,e(this.data)}):i(o)})})),this.fetching):null}showBoundingBox(){const{viewer:e}=this.tileset.plugin,{xSize:i,ySize:o,zSize:r,center:n}=this,a=1/this.depth;this.boxLines=new Ai(e.scene,{geometry:new uo(e.scene,tE({center:n,xSize:i,ySize:o,zSize:r})),material:new ho(e.scene,{emissive:[1-a,a,(1-a)/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(i=>{const o=this.tileset.plugin.loader.load({id:this.name,xkt:this.data,metaModelData:{metaObjects:[{id:"metaModelRoot"}]}});o.once("loaded",()=>{this.loading=!1,this.loadProcess=null,this.model=o,this.tileset.destroyed||!this.visible?(this.unload(),i(null)):(this.tileset.loadedTiles.add(this),i(o))}),o.once("destroyed",()=>{this.loading=!1,this.loadProcess=null,i(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 i_t(t,e,i){const o=Array.from(t),r=o.splice(0,e),n=async a=>{if(await i(a),o.length>0){const s=o.shift();n(s)}};r.forEach(n)}function o_t(t){let e=!1;return{cancel(){e=!0},async run(i){for(let o of t){if(e)break;await new Promise(r=>setTimeout(()=>(i(o)||Promise.resolve()).then(r)))}}}}let r_t=0;class n_t{constructor(e,i){this.plugin=e,this.name=i.name||`tileset-${r_t++}`,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,i.root.transform&&(this.rootTransform=i.root.transform),this.root=new uL(this,i.root),this.root.load().then(o=>e.viewer.cameraFlight.flyTo(o))}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(i=>{i.visible||i.unload()});const e=Array.from(this.visibleTiles).filter(i=>!i.loaded).sort((i,o)=>i.priority-o.priority);i_t(e,40,i=>i.fetchData()),this.queue=o_t(e),this.queue.run(i=>i.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 a_t(t){return t.depth}class UY extends ba{constructor(e,i={}){super("TilesetLoader",e);const{computePriority:o=a_t,sensitivity:r=50,distanceFactorToFreeData:n=3,debugMode:a=!1}=i;this._sensitivity=r,this.distanceFactorToFreeData=n,this.computePriority=o,this.debugMode=a,this.tilesets=new Set,e.camera.on("matrix",this.updateTilesetsVisibilityCallback=()=>this.updateTilesetsVisibility()),e.scene.on("tick",this.renderTilesetsCallback=()=>this.renderTilesets()),this.loader=new y7(e)}load(e){const i=new n_t(this,e);return this.tilesets.add(i),i}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(i=>i.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 s_t="2.6.90";typeof window<"u"&&(window.__XEOKIT__?console.warn("WARNING: Multiple instances of xeokit-sdk being imported."):window.__XEOKIT__=s_t);const ic=Object.freeze(Object.defineProperty({__proto__:null,AlphaFormat:yG,AmbientLight:nB,AngleMeasurementEditMouseControl:_Et,AngleMeasurementEditTouchControl:FEt,AngleMeasurementsControl:RB,AngleMeasurementsMouseControl:CZ,AngleMeasurementsPlugin:zy,AngleMeasurementsTouchControl:LEt,AnnotationsPlugin:_B,AxisGizmoPlugin:VEt,BCFViewpointsPlugin:Jy,Bitmap:eK,ByteType:cG,CameraMemento:Ekt,CameraPath:X7t,CameraPathAnimation:kr,ClampToEdgeWrapping:Kr,Component:ni,CompressedMediaType:Cbt,Configs:cy,ContextMenu:A7t,CubicBezierCurve:Ikt,Curve:iv,DefaultLoadingManager:aJ,DepthFormat:xG,DepthStencilFormat:kG,DirLight:Xa,DistanceMeasurementEditControl:OB,DistanceMeasurementEditMouseControl:ZEt,DistanceMeasurementEditTouchControl:WEt,DistanceMeasurementsControl:FB,DistanceMeasurementsMouseControl:BZ,DistanceMeasurementsPlugin:PZ,DistanceMeasurementsTouchControl:JEt,EdgeMaterial:TE,EmphasisMaterial:Hl,FastNavPlugin:DZ,FloatType:fG,Fresnel:A9t,Frustum:Wn,FrustumPlane:Cu,GIFMediaType:wbt,GLTFDefaultDataSource:RZ,GLTFLoaderPlugin:kP,HalfFloatType:AG,ImagePlane:s9t,IntType:hG,JPEGMediaType:ey,KTX2TextureTranscoder:us,LOD:EJ,LambertMaterial:l9t,LightMap:kkt,LineSet:bJ,LinearEncoding:Dn,LinearFilter:Jr,LinearMipMapLinearFilter:Ip,LinearMipMapNearestFilter:av,LinearMipmapLinearFilter:Bu,LinearMipmapNearestFilter:bbt,Loader:sJ,LoadingManager:nJ,LocaleService:HQ,LuminanceAlphaFormat:CG,LuminanceFormat:wG,Map:ya,Marker:Sv,MarqueePicker:nl,MarqueePickerMouseControl:Y7t,Mesh:Ai,MeshSurfaceArea:nK,MeshVolume:iK,MetallicMaterial:u9t,MirroredRepeatWrapping:Nl,ModelMemento:Bkt,NavCubePlugin:MP,NearestFilter:Eu,NearestMipMapLinearFilter:Pp,NearestMipMapNearestFilter:nv,NearestMipmapLinearFilter:lG,NearestMipmapNearestFilter:sG,Node:rv,ObjectsKdTree3:y7t,ObjectsMemento:Pkt,PNGMediaType:ty,Path:Skt,PerformanceModel:Dkt,PhongMaterial:ho,PickResult:Ey,Plugin:ba,PointLight:wkt,PointerCircle:JM,PointerLens:g7t,QuadraticBezierCurve:Tkt,Queue:RQ,RGBAFormat:sv,RGBAIntegerFormat:IG,RGBA_ASTC_10x10_Format:vE,RGBA_ASTC_10x5_Format:AE,RGBA_ASTC_10x6_Format:gE,RGBA_ASTC_10x8_Format:mE,RGBA_ASTC_12x10_Format:yE,RGBA_ASTC_12x12_Format:bE,RGBA_ASTC_4x4_Format:X8,RGBA_ASTC_5x4_Format:lE,RGBA_ASTC_5x5_Format:cE,RGBA_ASTC_6x5_Format:dE,RGBA_ASTC_6x6_Format:uE,RGBA_ASTC_8x5_Format:hE,RGBA_ASTC_8x6_Format:pE,RGBA_ASTC_8x8_Format:fE,RGBA_BPTC_Format:$8,RGBA_ETC2_EAC_Format:Y8,RGBA_PVRTC_2BPPV1_Format:aE,RGBA_PVRTC_4BPPV1_Format:Z8,RGBA_S3TC_DXT1_Format:G8,RGBA_S3TC_DXT3_Format:K8,RGBA_S3TC_DXT5_Format:cv,RGBFormat:bG,RGB_ETC1_Format:sE,RGB_ETC2_Format:W8,RGB_PVRTC_2BPPV1_Format:nE,RGB_PVRTC_4BPPV1_Format:J8,RGB_S3TC_DXT1_Format:lv,RGFormat:BG,RGIntegerFormat:PG,ReadableGeometry:uo,RedFormat:MG,RedIntegerFormat:EG,ReflectionMap:xkt,RepeatWrapping:vo,SceneModel:Pv,SceneModelMesh:sK,SceneModelTransform:pJ,SectionPlane:cB,SectionPlanesPlugin:eLt,ShortType:dG,SpecularMaterial:f9t,SplineCurve:j8,SpriteMarker:Mkt,Texture:Sp,TextureTranscoder:_kt,TilesetLoaderPlugin:UY,UnsignedByteType:rE,UnsignedInt248Type:vG,UnsignedIntType:pG,UnsignedShort4444Type:gG,UnsignedShort5551Type:mG,UnsignedShortType:uG,VBOGeometry:WQ,VFC:NJ,Viewer:wZ,WorkerPool:cJ,XKTDefaultDataSource:hY,XKTLoaderPlugin:y7,buildBoxGeometry:eE,buildBoxLinesGeometry:tE,buildBoxLinesGeometryFromAABB:Abt,buildCylinderGeometry:Mp,buildGridGeometry:YQ,buildLineGeometry:$Q,buildPlaneGeometry:iE,buildPolylineGeometry:XQ,buildPolylineGeometryFromCurve:mbt,buildSphereGeometry:Ep,buildTorusGeometry:oE,buildVectorTextGeometry:Bp,createCombinedTexture:SEt,createRTCViewMat:_i,createSkyboxMesh:TEt,createSphereMapMesh:DEt,frustumIntersectsAABB3:N8,getKTX2TextureTranscoder:dJ,getPlaneRTCPos:Vo,isTriangleMeshSolid:tK,load3DSGeometry:pbt,loadOBJGeometry:fbt,math:C,meshSurfaceArea:pv,meshVolume:Dp,os:fB,rtcToWorldPos:ybt,sRGBEncoding:ao,setFrustum:zQ,stats:Mi,utils:mt,worldToRTCPos:Mu,worldToRTCPositions:Q8},Symbol.toStringTag,{value:"Module"}));function a1(t){let e=t.substring(1);const i=[];let o=null;for(;e.length>0;)o=e.substring(0,2),e=e.substring(2),i.push(parseInt(o,16)/255);return i}function NY(t){let e="";return e+=Math.round(t[0]*255).toString(16).padStart(2,"0"),e+=Math.round(t[1]*255).toString(16).padStart(2,"0"),e+=Math.round(t[2]*255).toString(16).padStart(2,"0"),`#${e}`}const l_t={class:"annotations-3d"},c_t={__name:"Annotations3D",setup(t){const e=ct("$viewer"),{localContext:i}=e,{xeokit:o}=i.viewer,r=o.scene.canvas.canvas,n=T8(),a=Pr(new WeakSet),s=De(()=>n.value.filter(u=>a.has(u))),l=new Map;pt(n,()=>{n.value.forEach(u=>{if(!l.has(u.id)){const{x:h,y:p,z:A}=u,f=new Sv(o.scene,{worldPos:[h,A,p]});l.set(u.id,f);const[m,g]=f.canvasPos;f.style=le(`left: ${m}px; top: ${g}px;`),f.on("canvasPos",([b,x])=>{f.style.value=`left: ${b}px; top: ${x}px;`}),f.on("visible",b=>b?a.add(u):a.delete(u)),f.on("destroyed",()=>{e.state.hub.off(v),e.state.hub.off(y)});const y=e.state.hub.on("annotation-updated",({annotation:b})=>{if(b.id===u.id){const{x,y:k,z:E}=b;f.worldPos=[x,E,k],f._update(),o.scene._renderer._occlusionTester._occlusionTestListDirty=!0}}),v=e.state.hub.on("annotation-removed",({annotation:b})=>{b.id===u.id&&(l.delete(u.id),f.destroy())})}})},{flush:"sync"});const c=(u,h)=>{const{clientX:p,clientY:A}=h,{x:f,y:m}=r.getBoundingClientRect(),g=o.scene.pick({pickSurface:!0,canvasPos:[p-f,A-m]});if(g){const[y,v,b]=g.worldPos;Object.assign(u,{x:y,y:b,z:v})}},d=u=>l.get(u.id).style.value;return(u,h)=>(M(),_("div",l_t,[(M(!0),_(Xe,null,Et(s.value,p=>(M(),K(D8,{key:p.instanceId,annotation:p,canvas:ot(r),style:de(d(p)),onAnnotationDrag:A=>c(p,A)},null,8,["annotation","canvas","style","onAnnotationDrag"]))),128))]))}},jY=j(c_t,[["__scopeId","data-v-10ceb001"]]),d_t={setup(){const t=ct("$viewer"),e=t.localContext.pluginComponentInstances.get("viewer3d"),{math:i}=e.xeokitSdk,o=()=>{const n=e.xeokit,a=[0,0,-1],s=n.scene.aabb,l=i.getAABB3Diag(s),c=i.vec3();i.getAABB3Center(s,c);const d=45,u=Math.abs(l/Math.tan(d*i.DEGTORAD));n.cameraControl.pivotPos=c,n.cameraFlight.jumpTo({look:c,eye:[c[0]-u*a[0],c[1]-u*a[1],c[2]-u*a[2]],up:[0,1,0],orthoScale:l*1.1,fitFOV:d})},r=()=>{const n=t.localContext.loadedModels.flatMap(a=>a.objects.filter(s=>s.visible===!1).map(s=>s.id));t.state.showObjects(n)};return{onClick:()=>{o(),r(),e.reintegrateObjects()}}}};function u_t(t,e,i,o,r,n){const a=I("BIMDataIconHome"),s=I("BIMDataButton");return M(),K(s,{color:"default",ghost:"",rounded:"",icon:"",onClick:o.onClick},{default:U(()=>[S(a,{size:"xs"})]),_:1},8,["onClick"])}const h_t=j(d_t,[["render",u_t]]),p_t={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 f_t(t,e,i,o,r,n){const a=I("BIMDataIcon"),s=I("BIMDataButton"),l=I("BIMDataTooltip");return M(),K(l,{text:t.$t("navigationVersionsModel.tooltip")},{default:U(()=>[S(s,{class:ce(["bimdata-navigation-versions-model",{active:n.active}]),color:"primary",ghost:"",rounded:"",icon:"",onClick:n.onClick},{default:U(()=>[S(a,{name:"versioning",fill:"",color:"primary",size:"xxs"})]),_:1},8,["class","onClick"])]),_:1},8,["text"])}const A_t=j(p_t,[["render",f_t],["__scopeId","data-v-ced27a96"]]),g_t={key:0,width:"159",height:"116",viewBox:"0 0 159 116",fill:"none",xmlns:"http://www.w3.org/2000/svg"},m_t={key:1,width:"159",height:"116",viewBox:"0 0 159 116",fill:"none",xmlns:"http://www.w3.org/2000/svg"},v_t={__name:"KeyboardNavigate",setup(t){const e=ct("$viewer").i18n.locale==="fr";return(i,o)=>e?(M(),_("svg",g_t,[...o[0]||(o[0]=[an('<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)])])):(M(),_("svg",m_t,[...o[1]||(o[1]=[an('<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)])]))}},y_t={key:0,width:"37",height:"129",viewBox:"0 0 37 129",fill:"none",xmlns:"http://www.w3.org/2000/svg"},b_t={key:1,width:"37",height:"129",viewBox:"0 0 37 129",fill:"none",xmlns:"http://www.w3.org/2000/svg"},w_t={__name:"KeyboardStorey",setup(t){const e=ct("$viewer"),i=De(()=>e.i18n.locale==="fr");return(o,r)=>i.value?(M(),_("svg",y_t,[...r[0]||(r[0]=[an('<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)])])):(M(),_("svg",b_t,[...r[1]||(r[1]=[an('<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)])]))}},C_t={},x_t={width:"174",height:"130",viewBox:"0 0 174 130",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function k_t(t,e){return M(),_("svg",x_t,[...e[0]||(e[0]=[an('<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 M_t=j(C_t,[["render",k_t]]),E_t={},B_t={width:"42",height:"55",viewBox:"0 0 42 55",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function P_t(t,e){return M(),_("svg",B_t,[...e[0]||(e[0]=[an('<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 I_t=j(E_t,[["render",P_t]]),S_t={},T_t={width:"124",height:"152",viewBox:"0 0 124 152",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function D_t(t,e){return M(),_("svg",T_t,[...e[0]||(e[0]=[an('<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 R_t=j(S_t,[["render",D_t]]),L_t={name:"FirstPersonViewHelper",components:{KeyboardNavigate:v_t,KeyboardStorey:w_t,MouseMove:M_t,MouseStorey:I_t,MouseZoom:R_t},emits:["close"],methods:{close(){this.$emit("close")},clear(){localStorage.setItem("firstPersonViewHelper","false"),this.close()}}},__t={class:"bimdata-first-person-view-helper"},F_t={class:"bimdata-first-person-view-helper__header"},O_t={class:"bimdata-first-person-view-helper__content"},U_t={class:"bimdata-first-person-view-helper__content__main"},N_t={class:"bimdata-first-person-view-helper__content__main__left"},j_t={class:"bimdata-first-person-view-helper__content__main__left__element"},V_t={class:"bimdata-first-person-view-helper__content__main__left__element__picture"},z_t={class:"bimdata-first-person-view-helper__content__main__left__element__text"},H_t={class:"bimdata-first-person-view-helper__content__main__left__element__text__tilte"},q_t={class:"bimdata-first-person-view-helper__content__main__left__element__text__list"},Q_t={class:"bimdata-first-person-view-helper__content__main__left__element"},G_t={class:"bimdata-first-person-view-helper__content__main__left__element__picture"},K_t={class:"bimdata-first-person-view-helper__content__main__left__element__text"},J_t={class:"bimdata-first-person-view-helper__content__main__left__element__text__tilte"},Z_t={class:"bimdata-first-person-view-helper__content__main__left__element__text__list"},W_t={class:"bimdata-first-person-view-helper__content__main__left__element"},Y_t={class:"bimdata-first-person-view-helper__content__main__left__element__picture"},X_t={class:"bimdata-first-person-view-helper__content__main__left__element__text"},$_t={class:"bimdata-first-person-view-helper__content__main__left__element__text__tilte"},eFt={class:"bimdata-first-person-view-helper__content__main__left__element__text__list"},tFt={class:"bimdata-first-person-view-helper__content__main__right"},iFt={class:"bimdata-first-person-view-helper__content__main__right__title"},oFt={class:"bimdata-first-person-view-helper__content__main__right__content"},rFt={class:"bimdata-first-person-view-helper__content__main__right__content__picture"},nFt={class:"bimdata-first-person-view-helper__content__main__right__content__picture__element"},aFt={class:"bimdata-first-person-view-helper__content__main__right__content__picture__element"},sFt={class:"bimdata-first-person-view-helper__content__main__right__content__text"},lFt={class:"bimdata-first-person-view-helper__content__footer"},cFt={class:"bimdata-first-person-view-helper__footer-buttons"};function dFt(t,e,i,o,r,n){const a=I("KeyboardNavigate"),s=I("MouseMove"),l=I("MouseZoom"),c=I("MouseStorey"),d=I("KeyboardStorey"),u=I("BIMDataButton");return M(),_("div",__t,[w("h1",F_t,z(t.$t("viewer3d.firstPersonViewHelper.title")),1),w("div",O_t,[w("div",U_t,[w("div",N_t,[w("div",j_t,[w("div",V_t,[S(a)]),w("div",z_t,[w("h4",H_t,z(t.$t("viewer3d.firstPersonViewHelper.keyboardUsage")),1),w("ul",q_t,[w("li",null,z(t.$t("viewer3d.firstPersonViewHelper.forward")),1),w("li",null,z(t.$t("viewer3d.firstPersonViewHelper.backward")),1),w("li",null,z(t.$t("viewer3d.firstPersonViewHelper.left")),1),w("li",null,z(t.$t("viewer3d.firstPersonViewHelper.right")),1)])])]),w("div",Q_t,[w("div",G_t,[S(s)]),w("div",K_t,[w("h4",J_t,z(t.$t("viewer3d.firstPersonViewHelper.mouseOrientation")),1),w("ul",Z_t,[w("li",null,z(t.$t("viewer3d.firstPersonViewHelper.pressLeft")),1),w("li",null,z(t.$t("viewer3d.firstPersonViewHelper.mouseMove")),1),w("li",null,z(t.$t("viewer3d.firstPersonViewHelper.mouseVertical")),1)])])]),w("div",W_t,[w("div",Y_t,[S(l)]),w("div",X_t,[w("h4",$_t,z(t.$t("viewer3d.firstPersonViewHelper.mouseZoom")),1),w("ul",eFt,[w("li",null,z(t.$t("viewer3d.firstPersonViewHelper.mouseWheelForward")),1),w("li",null,z(t.$t("viewer3d.firstPersonViewHelper.mouseWheelBackward")),1)])])])]),w("div",tFt,[w("h4",iFt,z(t.$t("viewer3d.firstPersonViewHelper.changeStorey")),1),w("div",oFt,[w("div",rFt,[w("div",nFt,[S(c)]),w("div",aFt,[S(d)])]),w("div",sFt,[w("ul",null,[w("li",null,z(t.$t("viewer3d.firstPersonViewHelper.storeyClick")),1),w("li",null,z(t.$t("viewer3d.firstPersonViewHelper.moveCameraToObject")),1)]),w("ul",null,[w("li",null,z(t.$t("viewer3d.firstPersonViewHelper.keyboardStoreyChange")),1)])])])])]),w("div",lFt,z(t.$t("viewer3d.firstPersonViewHelper.contentFooter")),1)]),w("div",cFt,[S(u,{color:"primary",fill:"",radius:"",width:"200px",onClick:n.close},{default:U(()=>[Je(z(t.$t("viewer3d.firstPersonViewHelper.understand")),1)]),_:1},8,["onClick"]),S(u,{color:"primary",outline:"",radius:"",width:"200px",onClick:n.clear},{default:U(()=>[Je(z(t.$t("viewer3d.firstPersonViewHelper.noRecall")),1)]),_:1},8,["onClick"])])])}const VY=j(L_t,[["render",dFt],["__scopeId","data-v-77cce9d5"]]),uFt={components:{ShortcutsModal:S8,FirstPersonViewHelper:VY},data(){const t=this.$t;return{tabs:[{id:0,get label(){return t("viewer3d.modals.3d")}},{id:1,get label(){return t("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"}]}}},hFt={class:"bimdata-shortcuts-helper__header"};function pFt(t,e,i,o,r,n){const a=I("BIMDataTabs"),s=I("ShortcutsModal"),l=I("FirstPersonViewHelper");return M(),_("div",null,[w("div",hFt,[S(a,{tabs:r.tabs,width:"490px",height:"44px",tabSize:"245",onTabSelected:e[0]||(e[0]=c=>r.activeTab=r.tabs.indexOf(c)),selected:r.activeTab},null,8,["tabs","selected"])]),r.activeTab===0?(M(),K(s,{key:0,elements:r.elements,shortcuts:r.shortcuts,onClose:e[1]||(e[1]=c=>t.$emit("close"))},{title:U(()=>[Je(z(t.$t("shortcuts-helper.title_modal")),1)]),_:1},8,["elements","shortcuts"])):(M(),K(l,{key:1,onClose:e[2]||(e[2]=c=>t.$emit("close"))}))])}const fFt=j(uFt,[["render",pFt],["__scopeId","data-v-a26872a0"]]),AFt="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",gFt="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",mFt="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",vFt="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",yFt="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",bFt={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 wFt({text:t,size:e=1,zOffset:i=0}){const o=[],r=[];let n=0,a=0;const s=10;e/=100;for(const l of t){const c=bFt[l];if(!c)throw new Error("Unknown character: "+l);const d=a;for(let h=0;h<c.positions.length;h+=2)o.push(c.positions[h]*e+d,c.positions[h+1]*e,i);const u=n===0?0:n+1;for(const h of c.indices)r.push(h+u),n=Math.max(n,h+u);a+=(c.width+s)*e}return{positions:o,indices:r,primitive:"triangles"}}function zY(t,{content:e,size:i,matrix:o,offset:r=0}){const{material:n,origin:a,plugin:s}=t,{textSizeRatio:l,textBottomMarginRatio:c,xeokitSdk:d,viewer:u}=s,{Mesh:h,VBOGeometry:p,math:A}=d,{scene:f}=u,{primitive:m,positions:g,indices:y}=wFt({text:e,size:i*l,zOffset:r});let v=g[0],b=g[0];for(let P=0;P<g.length;P+=3){const D=g[P];D<v&&(v=D),D>b&&(b=D)}const x=-(b-v)/2,k=A.mat4(),E=A.translationMat4v([x,i*c,0]);A.mulMat4(o,A.rotationMat4v(Math.PI,[0,1,0],A.mat4()),k),A.mulMat4(o,E),A.mulMat4(k,E);const B=new p(f,{primitive:m,positions:g,indices:y});return[new h(f,{geometry:B,material:n,pickable:!1,origin:a,matrix:o}),new h(f,{geometry:B,material:n,pickable:!1,origin:a,matrix:k})]}class CFt{constructor(e,i,o){this.plugin=e;const{viewer:r}=e;this.line=null,this.texts=null,this.length=0;const{math:n,worldToRTCPos:a,Node:s,PhongMaterial:l}=e.xeokitSdk,c=n.vec3(),d=n.vec3();a(i,d,c),this.material=new l(r.scene,{emissive:a1(e.defaultColor)}),this.node=new s(r.scene,{pickable:!1,origin:d,children:[]}),this.origin=d,this.p1=c,this.normal=o}move(e,i){const{arrowSizeRatio:o,offsetRatio:r,xeokitSdk:n,viewer:a}=this.plugin,{math:s,Mesh:l,VBOGeometry:c}=n,{scene:d}=a,u=this.p1;this.p2=s.subVec3(e,this.origin),this.node.removeChildren(),this.line?.destroy();const h=s.subVec3(e,u,s.vec3());if(h.every(Ce=>Ce===0))return;const p=s.normalizeVec3(h,s.vec3()),A=s.mulVec3Scalar(p,-1,s.vec3()),f=s.lenVec3(h);this.length=f;const m=r*f;let g=0;const y=s.mulVec3Scalar(h,.5,s.vec3()),v=s.addVec3(u,y,s.vec3());let b=s.normalizeVec3(s.cross3Vec3(i,s.normalizeVec3(h,s.vec3()),s.vec3()));const x=s.dotVec3(i,this.normal)>.999,k=s.vec3([0,1,0]),E=s.dotVec3(p,k);if(x){const Ce=Math.abs(E)<.01;g=m;let Le=null;if(Ce){const{look:Fe,up:ve,eye:ge}=d.camera,we=s.normalizeVec3(s.subVec3(Fe,ge,s.vec3())),Re=s.cross3Vec3(we,ve);Le=s.dotVec3(p,Re)}else{const Fe=s.cross3Vec3(k,i,s.vec3());Le=s.dotVec3(p,Fe)}Le<0&&(b=s.negateVec3(b),g=-g)}else if(Math.abs(E)>.99){const{look:Ce,eye:Le}=d.camera,Fe=s.normalizeVec3(s.subVec3(Ce,Le,s.vec3()));b=s.normalizeVec3(s.cross3Vec3(p,Fe,s.vec3())),i=s.normalizeVec3(s.cross3Vec3(b,p,s.vec3()))}else i=s.normalizeVec3(s.cross3Vec3(k,p,s.vec3())),b=s.normalizeVec3(s.cross3Vec3(p,i,s.vec3())),s.dotVec3(b,k)<0&&(b=s.negateVec3(b));const B=s.negateVec3(b,s.vec3()),P=s.mulVec3Scalar(b,f*o,s.vec3()),D=s.mulVec3Scalar(B,f*o,s.vec3()),T=s.addVec3(u,P,s.vec3()),R=s.addVec3(u,D,s.vec3()),F=s.addVec3(e,P,s.vec3()),N=s.addVec3(e,D,s.vec3()),q=s.mulVec3Scalar(s.normalizeVec3(s.addVec3(b,p,s.vec3())),f*o*Math.SQRT2),V=s.addVec3(u,q,s.vec3()),W=s.mulVec3Scalar(s.normalizeVec3(s.addVec3(B,p,s.vec3())),f*o*Math.SQRT2),Y=s.addVec3(u,W,s.vec3()),$=s.mulVec3Scalar(s.normalizeVec3(s.addVec3(b,A,s.vec3())),f*o*Math.SQRT2),me=s.addVec3(e,$,s.vec3()),Ie=s.mulVec3Scalar(s.normalizeVec3(s.addVec3(B,A,s.vec3())),f*o*Math.SQRT2),Se=s.addVec3(e,Ie,s.vec3()),qe=s.translationMat4v(s.mulVec3Scalar(i,m,s.vec3()));this.line=new l(a.scene,{geometry:new c(a.scene,{primitive:"lines",positions:[...u,...e,...T,...R,...F,...N,...V,...Y,...me,...Se],indices:[0,1,0,2,0,3,0,6,0,7,1,4,1,5,1,8,1,9]}),material:this.material,matrix:qe,pickable:!1,origin:this.origin}),this.node.addChild(this.line),this.texts?.forEach(Ce=>Ce.destroy());const Qe=s.mat4([...p,0,...b,0,...i,0,...v,1]);this.texts=this._makeTexts(f.toFixed(2)+" m",f,Qe,g),this.texts.forEach(Ce=>this.node.addChild(Ce))}_makeTexts(e,i,o,r=0){return zY(this,{content:e,size:i,matrix:o,offset:r})}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 NY(this.material.emissive)}set color(e=this.plugin.defaultColor){this.material.emissive=a1(e)}}class HY{constructor(e,i,o={}){this.viewer=e,this.xeokitSdk=i,this.arrowSizeRatio=o.arrowSizeRatio??.04,this.textSizeRatio=o.textSizeRatio??.1,this.textBottomMarginRatio=o.textBottomMarginRatio??.02,this.offsetRatio=o.offsetRatio??.003,this.snapPickRadius=o.snapPickRadius??15,this.defaultColor=o.defaultColor??"#ffffff";const r=document.createElement("img"),n=e.scene.canvas.canvas;n.parentNode.insertBefore(r,n),r.style.width="28px",r.style.height="28px",r.style.position="absolute",r.style.pointerEvents="none",r.style.transform="translate(-50%, -50%)",r.style.display="none",this.imgElement=r,this.measurements=[],this.measurementEndCallbackId=0,this.measurementEndCallbacks={},this.control=new xFt(this)}on(e,i){if(e==="measurementEnd")return this.measurementEndCallbacks[this.measurementEndCallbackId++]=i,this.measurementEndCallbackId}off(e){this.measurementEndCallbacks[e]=null}}class xFt{constructor(e){this.plugin=e,this.currentMeasurement=null,this.lastPosition=null,this.mouseDown=!1,this.dragging=!1,this.activated=!1}_updateCursor(e){const{imgElement:i,viewer:o}=this.plugin,{scene:r}=o;r.canvas.canvas.style.cursor=`url("${yFt}") 16 16, auto`;const n=r.pick({canvasPos:e,snapRadius:this.plugin.snapPickRadius,snapToEdge:!0,snapToVertex:!0});if(n?.snappedWorldPos||n?.worldPos){if(n.snappedCanvasPos)i.style.left=`${n.snappedCanvasPos[0]}px`,i.style.top=`${n.snappedCanvasPos[1]}px`,i.src=n.snapType==="vertex"?gFt:AFt;else{const a=n.canvasPos;i.style.left=`${a[0]}px`,i.style.top=`${a[1]}px`,i.src=mFt}this.lastPosition=n.snappedWorldPos??n.worldPos,this.lastPosition.worldNormal=n.snappedWorldNormal??n.worldNormal}else i.style.left=`${e[0]}px`,i.style.top=`${e[1]}px`,i.src=vFt,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(i=>i?.(this.currentMeasurement)),this.currentMeasurement=null):this.currentMeasurement=new CFt(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 i=this._onMouseMove.bind(this),o=this._onMouseDown.bind(this),r=this._onMouseUp.bind(this);e.addEventListener("mousemove",i),e.addEventListener("mousedown",o),document.addEventListener("mouseup",r),this._unsubscribe=()=>{e.removeEventListener("mousemove",i),e.removeEventListener("mousedown",o),document.removeEventListener("mouseup",r)},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 kFt{constructor(e,i){this.plugin=e;const{xeokitSdk:o,viewer:r}=e,{Mesh:n,ReadableGeometry:a,buildSphereGeometry:s,PhongMaterial:l,Node:c,math:d,worldToRTCPos:u}=o,h=d.vec3(),p=d.vec3();this._length=0;const{entity:A,worldPos:f}=i;u(f,p,h);const m=new l(r.scene,{emissive:a1(e.defaultColor),diffuse:[0,0,0]}),g=(k=!0)=>new n(r.scene,{geometry:new a(r.scene,s({radius:.03})),material:m,pickable:!1,visible:k,origin:p}),y=g(),v=g(!1),b=new n(r.scene,{geometry:new a(r.scene,{primitive:"lines",positions:[0,0,0,0,0,0],indices:[0,1]}),material:m,pickable:!1,visible:!1,origin:p}),x=new c(r.scene,{pickable:!1,visible:!0,position:h,origin:p,children:[y,b,v]});this.origin=p,this.modelId=A.model.id,this.node=x,this.toSphere=v,this.fromSphere=y,this.line=b,this.material=m}show(e){const{node:i,fromSphere:o,toSphere:r,line:n,texts:a,plugin:s}=this,{math:l}=s.xeokitSdk;i.position=l.subVec3(e.worldPos,i.origin,l.vec3()),i.visible=!0;const{viewer:c}=s,d=c.scene.pick({pickSurface:!0,origin:e.worldPos,direction:e.worldNormal});if(a&&(a.forEach(u=>u.destroy()),this.texts=null),d){r.visible=!0,n.visible=!0,r.position=l.subVec3(d.worldPos,r.origin,l.vec3()),r.position=l.subVec3(r.position,i.position,l.vec3()),n.position=l.vec3().set(i.position),n.geometry.positions=[0,0,0,...r.position];const u=l.lenVec3(r.position);this._length=u;const h=o.position,p=r.position,A=l.subVec3(p,h,l.vec3()),f=l.normalizeVec3(A,l.vec3()),m=l.mulVec3Scalar(A,.5,l.vec3()),g=l.addVec3(h,m,l.vec3()),y=[0,1,0],v=l.dotVec3(f,y),b=Math.abs(v)>.9;let x;if(b){const k=l.normalizeVec3(l.subVec3(c.scene.camera.eye,c.scene.camera.look,l.vec3()),l.vec3()),E=l.normalizeVec3(l.cross3Vec3(k,f,l.vec3()),l.vec3()),B=l.normalizeVec3(l.cross3Vec3(E,f,l.vec3()),l.vec3());x=l.mat4([...f,0,...E,0,...B,0,...g,1])}else{const k=l.normalizeVec3(l.cross3Vec3(y,f,l.vec3()),l.vec3()),E=l.normalizeVec3(l.cross3Vec3(f,k,l.vec3()),l.vec3());x=l.mat4([...f,0,...E,0,...k,0,...g,1])}this.texts=this._makeTexts(u.toFixed(2)+" m",u,x),this.texts.forEach(k=>i.addChild(k))}else r.visible=!1,n.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 NY(this.material.emissive)}set color(e=this.plugin.defaultColor){this.material.emissive=a1(e)}_makeTexts(e,i,o){return zY(this,{content:e,size:i,matrix:o})}}class qY{constructor(e,i,o={}){this.viewer=e,this.xeokitSdk=i,this.textSizeRatio=o.textSizeRatio??.1,this.textBottomMarginRatio=o.textBottomMarginRatio??.01,this.defaultColor=o.defaultColor??"#ffffff",this.measurements=[],this.measurementEndCallbackId=0,this.measurementEndCallbacks={},this.control=new MFt(this)}on(e,i){if(e==="measurementEnd")return this.measurementEndCallbacks[this.measurementEndCallbackId++]=i,this.measurementEndCallbackId}off(e){this.measurementEndCallbacks[e]=null}}class MFt{constructor(e){this.plugin=e,this.currentMeasure=null,this.pickedSpaceMeasureSubscription=null,this.hitHelperMouseMoveSubscription=null}activate(){const{plugin:e}=this,{viewer:i}=e;this.pickedSpaceMeasureSubscription=i.scene.input.on("mouseclicked",()=>{if(!this.currentMeasure?.length)return;const o=this.currentMeasure;this.currentMeasure=null,Object.values(this.plugin.measurementEndCallbacks).forEach(r=>r(o))}),this.hitHelperMouseMoveSubscription=i.scene.input.on("mousemove",o=>{const r=i.scene.pick({canvasPos:o,pickSurface:!0});r?.entity?.model&&(r?((!this.currentMeasure||this.currentMeasure.modelId!==r.entity.model.id)&&(this.currentMeasure?.destroy(),this.currentMeasure=new kFt(this.plugin,r)),this.currentMeasure.show(r)):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 EFt=`onmessage = async event => {
1379
1379
  const sources = event.data;
1380
1380
  for (const source of sources) {
1381
1381
  const response = await fetch(source);
@@ -6425,5 +6425,5 @@ void main() {
6425
6425
  --bimdata-local-context-width: ${o.width}px;
6426
6426
  --bimdata-local-context-center-width: ${o.centerWidth}px;
6427
6427
  --bimdata-local-context-resolution: ${o.resolution};
6428
- `),onMouseenter:e[0]||(e[0]=(...h)=>o.onMouseEnter&&o.onMouseEnter(...h)),onMouseleave:e[1]||(e[1]=(...h)=>o.onMouseLeave&&o.onMouseLeave(...h))},[S(a,{ref:"modalManagerTemplateRef"},null,512),w("div",oyi,[o.windowPlugins.leftSidePanel?(M(),K(s,{key:0,plugin:o.windowPlugins.leftSidePanel},null,8,["plugin"])):te("",!0),w("div",ryi,[(M(!0),_(Xe,null,Et(o.windowPlugins.free,h=>(M(),K(l,{key:h.name,class:ce({"window-container__content__center__viewer":h.isViewer}),plugin:h},null,8,["class","plugin"]))),128)),S(c,{position:"left",plugins:o.windowPlugins.leftButtonColumn},null,8,["plugins"]),S(c,{position:"right",plugins:o.windowPlugins.rightButtonColumn},null,8,["plugins"])]),o.windowPlugins.rightSidePanel?(M(),K(s,{key:1,plugin:o.windowPlugins.rightSidePanel},null,8,["plugin"])):te("",!0)]),o.loading?(M(),_("div",nyi,[o.spinner&&o.spinner.component?(M(),K(Po(o.spinner.component),Fa(Pn({key:0},o.spinner.props)),null,16)):(M(),K(d,{key:1,size:"20px",border:"3px"}))])):te("",!0),o.layoutSettingsDisplayed?(M(),_("div",ayi,[S(u)])):te("",!0)],36)}const lyi=j(iyi,[["render",syi],["__scopeId","data-v-485f288e"]]);class cyi{constructor(e=!0){const i=W6i(dU,null,{resizable:e});i.registerContent("default",lyi),this.settings=Pr({edit:!1,swap:!1,full:!1}),this.areas=i}get resizable(){return this.areas.resizable}set resizable(e){this.areas.resizable=e}apply(e=null){this.areas.layout=e?Y6i(e):null}copy(e,i=!0){return X6i(this.areas.layout,e,i)}open({ratio:e,direction:i,insertAfter:o,windowName:r=null,windowState:n=null,localContextId:a=null}={}){const s=r?{options:{windowName:r,windowState:n}}:null;return a===null?this.areas.splitLayout(e,i,o,s):this.areas.split(a,e,i,o,s)}swap(e,i){return this.areas.swap(e,i)}close(e){return this.areas.delete(e)}compare(e,i){if(!e&&!i)return!0;if(!e||!i)return!1;if(typeof e=="string"&&typeof i=="string")return e===i;if(typeof e=="string"||typeof i=="string")return!1;if(e.windowName&&i.windowName){if(e.windowName!==i.windowName)return!1;const o=new Set(e.windowState?.modelIds),r=new Set(i.windowState?.modelIds);return o.size===r.size&&[...o].every(n=>r.has(n))}return e.windowName||i.windowName||e.direction!==i.direction||e.children.length!==i.children.length?!1:e.children.every((o,r)=>this.compare(o,i.children[r]))}}const dyi="2.16.2-beta.2",uyi={version:dyi};let hyi=1;class pyi{constructor({plugins:e,api:i,ui:o,locale:r="fr"}){this.instanceId=hyi++,this.pluginManager=new Uvi(e),this.windowManager=new jvi,this.windowManager.registerAndAddPluginsToWindows([...this.pluginManager.registeredPlugins.values()]),this.api=new i6i(i),this.globalContext=new p3e(this),this.state=A6i(this),this.shortcutManager=rfe(this.state),this.uiSettings=o||{},this.i18n=new u3e(r),this._contextMenu=null,this.layout=new cyi(this.uiSettings.resizable!==!1),this._darkTheme=le(o?.darkTheme??!1),this.localContext=null,window.$viewer=this}get darkTheme(){return this._darkTheme.value}set darkTheme(e){this._darkTheme.value=e}get version(){return uyi.version}get locale(){return this.i18n.locale}get contextMenu(){return this._contextMenu||ife}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 fyi(t,e={}){e.backgroundColor&&(t.style.setProperty("--bimdata-viewer-background-color",e.backgroundColor),e.backgroundColor==="transparent"&&t.style.setProperty("--areas-separator-color","transparent")),e.colorPrimary&&t.style.setProperty("--color-primary",e.colorPrimary),e.colorPrimaryLighter&&t.style.setProperty("--color-primary-lighter",e.colorPrimaryLighter),e.colorPrimaryLight&&t.style.setProperty("--color-primary-light",e.colorPrimaryLight),e.colorPrimaryDark&&t.style.setProperty("--color-primary-dark",e.colorPrimaryDark),e.colorSecondary&&t.style.setProperty("--color-secondary",e.colorSecondary),e.colorSecondaryLighter&&t.style.setProperty("--color-secondary-lighter",e.colorSecondaryLighter),e.colorSecondaryLight&&t.style.setProperty("--color-secondary-light",e.colorSecondaryLight),e.colorSecondaryDark&&t.style.setProperty("--color-secondary-dark",e.colorSecondaryDark),e.colorSilverLight&&t.style.setProperty("--color-silver-light",e.colorSilverLight),e.colorSilver&&t.style.setProperty("--color-silver",e.colorSilver),e.colorSilverDark&&t.style.setProperty("--color-silver-dark",e.colorSilverDark),e.colorGraniteLight&&t.style.setProperty("--color-granite-light",e.colorGraniteLight),e.colorGranite&&t.style.setProperty("--color-granite",e.colorGranite),e.colorSuccess&&t.style.setProperty("--color-success",e.colorSuccess),e.colorSuccessLighter&&t.style.setProperty("--color-success-Lighter",e.colorSuccessLighter),e.colorSuccessLight&&t.style.setProperty("--color-success-Light",e.colorSuccessLight),e.colorSuccessDark&&t.style.setProperty("--color-success-Dark",e.colorSuccessDark),e.colorWarning&&t.style.setProperty("--color-warning",e.colorWarning),e.colorWarningLighter&&t.style.setProperty("--color-warning-Lighter",e.colorWarningLighter),e.colorWarningLight&&t.style.setProperty("--color-warning-Light",e.colorWarningLight),e.colorWarningDark&&t.style.setProperty("--color-warning-Dark",e.colorWarningDark),e.colorHigh&&t.style.setProperty("--color-high",e.colorHigh),e.colorHighLighter&&t.style.setProperty("--color-high-lighter",e.colorHighLighter),e.colorHighLight&&t.style.setProperty("--color-high-light",e.colorHighLight),e.colorHighDark&&t.style.setProperty("--color-high-dark",e.colorHighDark),e.colorText&&t.style.setProperty("--color-text",e.colorText),(!e.backgroundColor||e.backgroundColor!=="transparent")&&t.style.setProperty("--areas-separator-color","rgba(216, 216, 216, 1)"),e.headerHeight!=null&&t.style.setProperty("--bimdata-viewer-header-height",e.headerHeight),t.style.setProperty("--areas-background-color","transparent")}const Ayi=Object.freeze({25:"GUEST",50:"USER",100:"ADMIN"}),v2=Object.freeze({READ:"read",WRITE:"write"});function M1e(t){const e={};return t.forEach(i=>{const[o,r]=i.split(":");e[o]?e[o].push(r):e[o]=[r]}),e}const gyi={token_scopes:[],usable_scopes:[],user_role:25};function E1e(t=gyi){const e=M1e(t.token_scopes),i=M1e(t.usable_scopes);return{...hH(t),tokenScopes:e,usableScopes:i,userRole:Ayi[t.user_role],user:t.user?hH(t.user):null,hasBcfReadPermission:i.bcf?.includes(v2.READ)??!1,hasBcfWritePermission:i.bcf?.includes(v2.WRITE)??!1,hasModelReadPermission:i.model?.includes(v2.READ)??!1,hasModelWritePermission:i.model?.includes(v2.WRITE)??!1,hasDocReadPermission:i.document?.includes(v2.READ)??!1,hasDocWritePermission:i.document?.includes(v2.WRITE)??!1}}const myi={back:"Zur\xFCck",BcfFilters:{filtersButton:"Filter",filtersTitle:"Filter",priorityLabel:"Priorit\xE4t",statusLabel:"Status",stageLabel:"Phase",assignedToLabel:"Zugewiesen an",creatorsLabel:"Erstellt von",tagsLabel:"Tags",resetButton:"Zur\xFCcksetzen",searchButton:"Suchen",undefined:"Nicht definiert",datePlaceholder:"Erstellungsdatum"},BcfSettings:{title:"BCF-Parameter",text:"Erstellen, f\xFCllen und listen Sie die BCF-Einstellungen auf, die Sie f\xFCr dieses Projekt haben m\xF6chten.",validateButton:"Die BCF-Parameter anerkennen"},BcfStatistics:{emptyText:"F\xFCgen Sie Fragen hinzu, um zugeh\xF6rige Statistiken hier anzuzeigen.",issues:"Probleme",extension:{Priority:"Priorit\xE4t",PriorityNotDefined:"Keine Priorit\xE4t",PriorityTitle:"Priorit\xE4ten",Status:"Status",StatusNotDefined:"Kein Status",StatusTitle:"Status"}},BcfTopicCard:{priority:"Priorit\xE4t",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\xE4hlen Sie eine Datei aus.",addObjectButton:"Objekt",addAnnotationButton:"Annotation",annotationButtonTooltip:"Zu diesem Thema gibt es derzeit keine Ansichten.",addPictureButton:"F\xFCgen Sie ein Bild hinzu.",titlePlaceholder:"Titel *",titleErrorMessage:"Titel fehlt",typeLabel:"Typ",priorityLabel:"Priorit\xE4t",statusLabel:"Status",stageLabel:"Phase",assignedToLabel:"Zugewiesen an",dueDateLabel:"F\xE4lligkeitsdatum (TT.MM.JJJJ)",descriptionLabel:"Beschreibung",labelsLabel:"Tags",createButton:"Best\xE4tigen",updateButton:"\xC4nderungen \xFCbernehmen",modalText:"Sie sind dabei, die Bearbeitung der Ausgabe {Name} zu beenden, aber es gibt noch ungespeicherte \xC4nderungen.",cancelButton:"\xC4nderungen verwerfen",continueButton:"\xC4nderungen 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 \u2013 {count} ausgew\xE4hlte Dokumente",groupsLabel:"Berechtigungen",groupsCount:"Berechtigungen \u2013 {count} ausgew\xE4hlte Gruppen",groupsText:"W\xE4hlen Sie die Benutzergruppen aus, die dieses Thema sehen und damit interagieren d\xFCrfen.",validate:"Best\xE4tigen"},BcfTopicOverview:{openViewer:"Im Viewer \xF6ffnen",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\xE4lligkeitsdatum",noDueDate:"Kein F\xE4lligkeitsdatum",informations:"Informationen",status:"Status",noStatusSpecified:"Kein Status angegeben",stage:"Phase",noStageProvided:"Keine Phase angegeben",priority:"Priorit\xE4t",priorityNotDefined:"Nicht definiert",tags:"Tags",noTags:"Keine Tags",commentButton:"Ein Kommentar ver\xF6ffentlichen",deleteText:"Sie l\xF6schen jetzt {Name}",deleteBcfButton:"Dieses BCF l\xF6schen",keepBcfButton:"Dieses BCF beibehalten",author:"Autor"},BcfTopicsTable:{headers:{index:"#",priority:"Priorit\xE4t",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\xF6ffentlichen",commentsText:"Kommentare",deleteCommentText:"Diesen Kommentar l\xF6schen?",deleteButton:"L\xF6schen",takeSnapshot:"Mach einen Schnappschuss",edited:"bearbeitet"},BcfTopicPriorityCell:{noPriority:"Keine"},SettingCard:{addButton:"ein Element hinzuf\xFCgen",cancelButton:"Abbrechen",validateButton:"Best\xE4tigen",deleteExtensionText:"Diesen Parameter l\xF6schen",deleteButton:"L\xF6schen",title:{Priority:"Priorit\xE4ten",Label:"Tags",Status:"Status",Type:"Typen",Stage:"Phasen"},input:{Priority:"Eine neue Priorit\xE4t hinzuf\xFCgen",Label:"Ein neues Etikett hinzuf\xFCgen",Status:"Einen neuen Status hinzuf\xFCgen",Type:"Einen neuen Typ hinzuf\xFCgen",Stage:"Eine neue Phase hinzuf\xFCgen"},text:{Priority:"Liste der Priorit\xE4ten",Label:"Liste von Tags",Status:"Liste der Status",Type:"Liste der Typen",Stage:"Liste der Phasen"}}},vyi={BcfComponents:myi},yyi={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"}}},byi={BcfComponents:yyi},wyi={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\xF3n"},BcfSettings:{title:"Par\xE1metros del BCF",text:"Cree, rellene y enumere los par\xE1metros del BCF que desea tener en este proyecto",validateButton:"Validar los par\xE1metros del BCF"},BcfStatistics:{emptyText:"A\xF1ada preguntas para ver las estad\xEDsticas asociadas aqu\xED.",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\xF3n",annotationButtonTooltip:"Actualmente este tema no posee ning\xFAn punto de vista",addPictureButton:"A\xF1adir una imagen",titlePlaceholder:"T\xEDtulo *",titleErrorMessage:"Falta el t\xEDtulo",typeLabel:"Tipo",priorityLabel:"Prioridad",statusLabel:"Estado",stageLabel:"Fase",assignedToLabel:"Asignado a",dueDateLabel:"Fecha de vencimiento (DD/MM/AAAA)",descriptionLabel:"Descripci\xF3n",labelsLabel:"Etiquetas",createButton:"Validar",updateButton:"Modificar este BCF",modalText:"Est\xE1 a punto de salir de la edici\xF3n 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\xEDa",takeSnapshot:"Tomar un snapshot",importFile:"Importar un archivo",searchPlaceholder:"Buscar",emptySearch:"No hay resultados"},BcfTopicOverview:{openViewer:"Abrir en el visor",openViewerNoModels:"No hay ning\xFAn modelo listo para la visualizaci\xF3n",elements:"{count} Elementos",noElements:"Ning\xFAn elemento",type:"Tipo",noTypeSpecified:"No se especifica el tipo",description:"Descripci\xF3n",noDescriptionProvided:"No hay descripci\xF3n",assignedTo:"Asignado a",notAssigned:"No asignado",dueDate:"Plazo",noDueDate:"Sin fecha de vencimiento",informations:"Informaci\xF3n",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\xE1s a punto de borrar {name}",deleteBcfButton:"Borrar este BCF",keepBcfButton:"Mantenga este BCF",author:"Autor"},BcfTopicsTable:{headers:{index:"#",priority:"Prioridad",status:"Estado",title:"T\xEDtulo",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:"\xBFBorrar este comentario?",deleteButton:"Borrar",takeSnapshot:"Tomar un snapshot"},BcfTopicPriorityCell:{noPriority:"Sin"},SettingCard:{addButton:"a\xF1adir un elemento",cancelButton:"Cancelar",validateButton:"Validar",deleteExtensionText:"Borrar esta configuraci\xF3n",deleteButton:"Borrar",title:{Priority:"Prioridades",Label:"Etiquetas:",Status:"Estatutos",Type:"Tipos",Stage:"Fases"},input:{Priority:"A\xF1adir una nueva prioridad",Label:"A\xF1adir una nueva etiqueta",Status:"A\xF1adir un nuevo estado",Type:"A\xF1adir un nuevo tipo",Stage:"A\xF1adir una nueva fase"},text:{Priority:"Lista de prioridades",Label:"Lista de etiquetas",Status:"Lista de estatutos",Type:"Lista de tipos",Stage:"Lista de fases"}}},Cyi={BcfComponents:wyi},xyi={back:"Retour",BcfFilters:{filtersButton:"Filtres",filtersTitle:"Filtres",priorityLabel:"Priorit\xE9",statusLabel:"Statut",stageLabel:"Phase",assignedToLabel:"Assign\xE9 \xE0",creatorsLabel:"Cr\xE9\xE9 par",tagsLabel:"Tags",resetButton:"R\xE9initialiser",searchButton:"Rechercher",undefined:"Non d\xE9fini",datePlaceholder:"Date de cr\xE9ation"},BcfSettings:{title:"Param\xE8tres BCF",text:"Cr\xE9ez, renseignez et listez les param\xE8tres BCF que vous souhaitez avoir sur ce projet",validateButton:"Valider les param\xE8tres BCF"},BcfStatistics:{emptyText:"Ajoutez des questions pour voir les statistiques associ\xE9es ici.",issues:"probl\xE8mes",extension:{Priority:"Priorit\xE9",PriorityNotDefined:"Aucune priorit\xE9",PriorityTitle:"Priorit\xE9s",Status:"Statut",StatusNotDefined:"Aucun statut",StatusTitle:"Statuts"}},BcfTopicCard:{priority:"Priorit\xE9",noPriority:"Aucune",assignedTo:"Assign\xE9 \xE0",elements:"{n} \xC9lements",notSpecified:"Non d\xE9fini",see:"Voir"},BcfTopicCreationCard:{text:"Cr\xE9er un nouveau topic BCF",createBcfSideTitle:"Signaler un probl\xE8me"},BcfTopicForm:{dragDropImageText:"Veuillez s\xE9lectionner un fichier",addObjectButton:"Objet",addAnnotationButton:"Annotation",annotationButtonTooltip:"Ce topic ne poss\xE8de actuellement aucun point de vue",addPictureButton:"Ajouter une image",titlePlaceholder:"Titre *",titleErrorMessage:"Titre manquant",typeLabel:"Type",priorityLabel:"Priorit\xE9",statusLabel:"Statut",stageLabel:"Phase",assignedToLabel:"Assign\xE9 \xE0",dueDateLabel:"Date d'\xE9ch\xE9ance",descriptionLabel:"Description",labelsLabel:"Tags",createButton:"Valider",updateButton:"Modifier ce BCF",modalText:"Vous \xEAtes sur le point de quitter l'\xE9dition de l'issue {name} mais il y'a des modifications non enregistr\xE9es.",cancelButton:"Annuler les modifications",continueButton:"Continuer les modifications",createTitle:"Signaler un probl\xE8me",dragDropImageTextTablet:"Prendre une photo",takeSnapshot:"Prendre un snapshot",importFile:"Importer un fichier",searchPlaceholder:"Rechercher",emptySearch:"Pas de r\xE9sultat",documentsLabel:"Documents",documentsCount:"Documents - {count} documents s\xE9lectionn\xE9s",groupsLabel:"Permissions",groupsCount:"Permissions - {count} groupes s\xE9lectionn\xE9s",groupsText:"S\xE9lectionner les groupes utilisateur qui peuvent voir ce topic et int\xE9ragir avec.",validate:"Valider"},BcfTopicOverview:{openViewer:"Ouvrir dans le viewer",openViewerNoModels:"Il n'y a aucun mod\xE8le pr\xEAt pour une visualisation",elements:"{count} \xC9lements",noElements:"Aucun \xE9l\xE9ment concern\xE9",type:"Type",noTypeSpecified:"Pas de type sp\xE9cifi\xE9",description:"Description",noDescriptionProvided:"Pas de description renseign\xE9e",assignedTo:"Assign\xE9 \xE0",notAssigned:"Non assign\xE9",dueDate:"\xC9ch\xE9ance",noDueDate:"Pas de date d'\xE9ch\xE9ance",informations:"Informations",status:"Statut",noStatusSpecified:"Pas de statut sp\xE9cifi\xE9",stage:"Phase",noStageProvided:"Pas de phase renseign\xE9e",priority:"Priorit\xE9",priorityNotDefined:"Non d\xE9fini",tags:"Tags",noTags:"Pas de tags",commentButton:"Poster un commentaire",deleteText:"Vous \xEAtes sur le point de supprimer {name}",deleteBcfButton:"Supprimer ce BCF",keepBcfButton:"Conserver ce BCF",author:"Auteur"},BcfTopicsTable:{headers:{index:"#",priority:"Priorit\xE9",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\xE9"},BcfTopicPriorityCell:{noPriority:"Aucune"},SettingCard:{addButton:"ajouter un \xE9l\xE9ment",cancelButton:"Annuler",validateButton:"Valider",deleteExtensionText:"Supprimmer ce param\xE8tre",deleteButton:"Supprimer",title:{Priority:"Priorit\xE9s",Label:"Tags",Status:"Statuts",Type:"Types",Stage:"Phases"},input:{Priority:"Ajouter une nouvelle priorit\xE9",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\xE9s",Label:"Liste des tags",Status:"Liste des statuts",Type:"Liste des types",Stage:"Liste des phases"}}},kyi={BcfComponents:xyi},Myi={back:"Indietro",BcfFilters:{filtersButton:"Filtri",filtersTitle:"Filtri",priorityLabel:"Priorit\xE0",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\xE0",PriorityNotDefined:"Nessuna priorit\xE0",PriorityTitle:"Priorit\xE0",Status:"Stato",StatusNotDefined:"Nessuno stato",StatusTitle:"Stati"}},BcfTopicCard:{priority:"Priorit\xE0",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\xE0",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\xE0",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\xE0",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\xE0",Label:"Etichette",Status:"Stati",Type:"Tipi",Stage:"Fasi"},input:{Priority:"Aggiungi una nuova priorit\xE0",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\xE0",Label:"Elenco delle etichette",Status:"Elenco degli stati",Type:"Elenco dei tipi",Stage:"Elenco delle fasi"}}},Eyi={BcfComponents:Myi},Byi={de:vyi,en:byi,es:Cyi,fr:kyi,it:Eyi},Pyi=({apiClient:t,fetchUsers:e,i18nPlugin:i}={})=>({install(o){t?Pi.setup({apiClient:t,fetchUsers:e}):console.error("[BCF Components Plugin] No api client provided. You must provide an api client for the components to work properly."),i?Object.entries(Byi).forEach(([r,n])=>{i.global.mergeLocaleMessage(r,n)}):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(r7e).forEach(([r,n])=>{o.component(r,n)})}}),Iyi={title:"Building Maker",back:"Zur\xFCck",list:{text:"Erstellen und bearbeiten Sie die Etagen und laden Sie anschlie\xDFend Ihre PDFs herunter.",createButton:"Neues Projekt",updateButton:"Umbenennen",deleteButton:"L\xF6schen"},form:{text:"Erstellen und bearbeiten Sie die Etagen und laden Sie anschlie\xDFend Ihre PDFs herunter.",input:"Name des Geb\xE4udes",error:"Ung\xFCltiger Name",createButton:"Erstellen",updateButton:"Best\xE4tigen"},view:{addStoreyButton:"Etage",addPlanButton:"Grundriss",closeButton:"Fertigstellen",submitFilesButton:"Best\xE4tigen"},storeyForm:{title:"Neue Etage",input:"Name",error:"Ung\xFCltiger Name",cancelButton:"Abbrechen",submitButton:"Best\xE4tigen"}},Syi={creationFormTitle:"Ordner erstellen",renameFormPlaceholder:"Datei- / Ordnernam",nameInputPlaceholder:"Ordnername",emptyFolder:"Dieser Ordner ist leer",newFolderSuccess:"Neuer Ordner erstellt",renameFolderSuccess:"Umbenannter Ordner",deleteFolderSuccess:"Ordner gel\xF6scht",newFileSuccess:"Datei hinzugef\xFCgt",renameFileSuccess:"Umbenannte Datei",deleteFileSuccess:"Datei gel\xF6scht",nameInputErrorMessage:"Ung\xFCltiger name",cancel:"Abbrechen",submit:"Best\xE4tigen",buttonText:"Neuer Ordner",addFileButtonText:"Datei laden",rename:"Umbenennen",view:"Sehen",download:"Herunterladen",delete:"L\xF6schen",deleteTitle:"Dateien l\xF6schen",deleteDetail:"Sie sind im Begriff, die folgenden Dateien / Ordner endg\xFCltig zu l\xF6schen"},Tyi={BuildingMaker:Iyi,FileManager:Syi},Dyi={t:{back:"Back",cancel:"Cancel",create:"Create",delete:"Delete",download:"Download",finish:"Finish",rename:"Rename",search:"Search",see:"View",storey:"Storey",validate:"Validate"}},Ryi={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"}},Lyi={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"},_yi={title:"Meta-Building Structure",tab:{structure:"Structure",zones:"Zones",equipments:"Equipments"},StoreySelector:{placeholder:"Select a storey"}},Fyi={title:"Photosphere Building"},Oyi={BIMDataComponents:Dyi,BuildingMaker:Ryi,FileManager:Lyi,MetaBuildingStructure:_yi,PhotosphereBuilding:Fyi},Uyi={title:"Building Maker",back:"Vuelta",list:{text:"Cree y edite los pisos despu\xE9s cargue los PDF.",createButton:"Nuevo proyecto",updateButton:"Renombrar",deleteButton:"Suprimir"},form:{text:"Cree y edite los pisos despu\xE9s cargue los PDF.",input:"Nombre del edificio",error:"Nombre no v\xE1lido",createButton:"Crear",updateButton:"Validar"},view:{addStoreyButton:"Piso",addPlanButton:"Plano",closeButton:"Terminar",submitFilesButton:"Validar"},storeyForm:{title:"Nuevo piso",input:"Nombre",error:"Nombre no v\xE1lido",cancelButton:"Anular",submitButton:"Validar"}},Nyi={creationFormTitle:"Crear un archivo",renameFormPlaceholder:"Nombre de archivo / carpeta",nameInputPlaceholder:"Nombre de la carpeta",emptyFolder:"Esta carpeta est\xE1 vac\xEDa",newFolderSuccess:"Nueva carpeta creada",renameFolderSuccess:"Carpeta renombrada",deleteFolderSuccess:"Carpeta eliminada",newFileSuccess:"Archivo agregado",renameFileSuccess:"Archivo renombrado",deleteFileSuccess:"Archivo eliminado",nameInputErrorMessage:"Nombre inv\xE1lida",cancel:"Cancelar",submit:"Validar",buttonText:"Carpeta nueva",addFileButtonText:"Cargar un archivo",rename:"Renombrar",view:"Ver",download:"Descargar",delete:"Borrar",deleteTitle:"Eliminar archivos",deleteDetail:"Est\xE1 a punto de eliminar permanentemente los siguientes archivos / carpetas"},jyi={BuildingMaker:Uyi,FileManager:Nyi},Vyi={t:{back:"Retour",cancel:"Annuler",create:"Cr\xE9er",delete:"Supprimer",download:"T\xE9l\xE9charger",finish:"Terminer",rename:"Renommer",search:"Rechercher",see:"Voir",storey:"\xC9tage",validate:"Valider"}},zyi={title:"Building Maker",list:{text:"Cr\xE9ez et \xE9ditez les \xE9tages puis t\xE9l\xE9chagez vos PDF.",new:"Nouveau projet"},form:{input:"Nom du b\xE2timent",error:"Nom invalide"},view:{addStorey:"Ajouter un \xC9tage",addFile:"Ajouter un fichier",addPlan:"Ajouter un plan"},storeyForm:{title:"Nouvel \xE9tage",input:"Nom",error:"Nom invalide"}},Hyi={creationFormTitle:"Cr\xE9er un dossier",renameFormPlaceholder:"Nom du fichier/dosier",nameInputPlaceholder:"Nom du dossier",emptyFolder:"Ce dossier est vide",newFolderSuccess:"Nouveau dossier cr\xE9\xE9",renameFolderSuccess:"Dossier renomm\xE9",deleteFolderSuccess:"Dossier supprim\xE9",newFileSuccess:"Fichier ajout\xE9",renameFileSuccess:"Fichier renomm\xE9",deleteFileSuccess:"Fichier supprim\xE9",nameInputErrorMessage:"Nom invalide",buttonText:"Nouveau dossier",addFileButtonText:"Charger un fichier",deleteTitle:"Supression de fichiers",deleteDetail:"Vous \xEAtes sur le point de supprimer d\xE9finitivement les fichiers/dossiers suivants",dmsRoot:"Racine de la GED du projet",pdfPageSelectorTitle:"S\xE9lectionner une page"},qyi={title:"Structure M\xE9ta-Building",tab:{structure:"Structure",zones:"Zones",equipments:"\xC9quipements"},StoreySelector:{placeholder:"S\xE9lectionner un \xE9tage"}},Qyi={title:"Photosph\xE8re Building"},Gyi={BIMDataComponents:Vyi,BuildingMaker:zyi,FileManager:Hyi,MetaBuildingStructure:qyi,PhotosphereBuilding:Qyi},Kyi={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"}},Jyi={creationFormTitle:"Crea una cartella",renameFormPlaceholder:"Nome file/cartella",nameInputPlaceholder:"Nome della cartella",emptyFolder:"Questa cartella \xE8 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"},Zyi={BuildingMaker:Kyi,FileManager:Jyi},Wyi={de:Tyi,en:Oyi,es:jyi,fr:Gyi,it:Zyi},Yyi=({i18nPlugin:t}={})=>({install(e){t?Object.entries(Wyi).forEach(([i,o])=>{t.global.mergeLocaleMessage(i,o)}):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(Jei).forEach(([i,o])=>{e.component(i,o)})}}),Xyi={beforeMount(t,e){if(typeof e.value!="function")throw Error(`click away directive needs function, got ${typeof e.value}`);t.clickAwayHandler=i=>{(i.path||i.composedPath&&i.composedPath()).find(o=>o===t)||e.value()},window.addEventListener("mousedown",t.clickAwayHandler,!0)},unmounted(t){window.removeEventListener("mousedown",t.clickAwayHandler,!0),delete t.clickAwayHandler}},$yi=Object.freeze(Object.defineProperty({__proto__:null,BIMDataClickAway:Ms,BIMDataClickInputAway:Xyi},Symbol.toStringTag,{value:"Module"})),e7i=t=>({install(e){Object.entries(JZe).forEach(([i,o])=>{e.component(i,o)}),Object.entries($yi).forEach(([i,o])=>e.directive(i.split("BIMData")[1],o))}}),t7i={name:"LiWrapper",render(){return go("li",this.$slots.default())}};function i7i(t,e){var i=new Set([]);return t.forEach(o=>{e.has(o)||i.add(o)}),i}const ol=jr("id"),o7i=({contextMenu:t,objects:e=[],state:i=t.$viewer.state,pictos:o})=>[{name:"selectAll",get group(){return t.groupPositions.select},position:1,get label(){return t.$t("context_menu.select_all")},get picto(){return o.get(this.name)},execute:()=>i.selectObjects(e.filter(fs(Ci("visible"),zd("selected"))).map(ol)),predicate:()=>e.some(fs(Ci("visible"),zd("selected")))},{name:"deselectAll",get group(){return t.groupPositions.select},position:2,get label(){return t.$t("context_menu.deselect_all")},get picto(){return o.get(this.name)},execute:()=>i.deselectObjects(e.filter(Ci("selected")).map(ol)),predicate:()=>e.some(Ci("selected"))},{name:"selectSimilar",get group(){return t.groupPositions.select},position:3,get label(){return t.$t("context_menu.select_similar")},get picto(){return o.get(this.name)},execute(){const r=e.filter(n=>n.visible&&n.type===this.selectedObject.type&&n.id!==this.selectedObject.id).map(ol);i.selectObjects(r)},selectedObject:null,predicate(){const r=e.filter(fs(Ci("visible"),Ci("selected")));return r.length===1&&r[0].type!==void 0?(this.selectedObject=r[0],!0):(this.selectedObject=null,!1)}},{name:"reverseSelection",get label(){return t.$t("context_menu.reverse_selection")},get group(){return t.groupPositions.select},position:4,execute:()=>{const r=new Set(e.filter(Ci("selected")).map(ol)),n=new Set(e.filter(Ci("visible")).map(ol));i.selectObjects(Array.from(i7i(n,r)),{exclusive:!0})},predicate:()=>e.some(fs(zd("selected"),Ci("visible")))&&e.some(fs(Ci("selected"),Ci("visible")))},{name:"showAll",get group(){return t.groupPositions.visibility},position:1,get label(){return t.$t("context_menu.show_all")},get picto(){return o.get(this.name)},execute:()=>i.showObjects(e.filter(zd("visible")).map(ol)),predicate:()=>e.some(zd("visible"))},{name:"hide",get group(){return t.groupPositions.visibility},position:2,get label(){return t.$t("context_menu.hide")},get picto(){return o.get(this.name)},objectsToHide:null,execute(){const r=this.objectsToHide.filter(Ci("selected"));r.length>0&&i.deselectObjects(r.map(ol)),i.hideObjects(this.objectsToHide.map(ol))},predicate(){return this.objectsToHide=e.filter(fs(Ci("selected"),Ci("visible"))),this.objectsToHide.length>0}},{name:"hideAll",get group(){return t.groupPositions.visibility},position:3,get label(){return t.$t("context_menu.hide_all")},execute:()=>{const r=e.filter(Ci("visible"));r.some(Ci("selected"))&&i.deselectObjects(r.filter(Ci("selected")).map(ol)),i.hideObjects(r.map(ol))},predicate:()=>e.some(Ci("visible"))}].filter(r=>r.predicate()),r7i={components:{LiWrapper:t7i},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(t){t?document.addEventListener("keydown",this.onKeyDown):document.removeEventListener("keydown",this.onKeyDown)}},created(){this.$viewer.contextMenu=this,this.asyncPredicates=new Set},methods:{onKeyDown(t){t.key==="Escape"&&this.away()},setPosition(t){const e=(document.fullscreenElement?document.fullscreenElement:this.$parent.$el).getBoundingClientRect();this.left=t.clientX-e.left,this.top=t.clientY-e.top,this.left+this.width>e.width&&(this.left=this.left-this.width),t.clientY>e.top+e.height/2?(this.bottom=e.height-this.top,this.top=null):this.bottom=null},typeCheckCommand(t={}){let e=null;if((!t.execute||typeof t.execute!="function")&!t.component&&(e="Cannot register context menu command. A command must have an execute function or a component property."),t.label||(e="Cannot register context menu command. A command must have a label."),e)throw console.error(e),new Error(e);return t.id=this.nextCommandId++,t},open(t){this.currentCommands=[],this.setPosition(t),this.originEvent=t,t.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 t=>{if(typeof t.predicate=="function"){const e=t.predicate(this.$viewer.globalContext.activeLocalContext);if(e===!0)this.currentCommands.push(t);else if(typeof e?.then=="function"){this.asyncPredicates.add(e),this.asyncPredicateRunning=!0;const i=await e;this.asyncPredicates.has(e)&&(this.asyncPredicates.delete(e),this.asyncPredicateRunning=this.asyncPredicates.size>0,i===!0&&this.currentCommands.push(t))}}else this.currentCommands.push(t)}),this.currentCommands.push(...this.contextCommands),this.contextCommands=[]},getDefaultCommands({objects:t=[],state:e=this.$viewer.state,context:i=null}){const o=new Map;return i&&this.$viewer.shortcutManager.getShortcuts(i).forEach(r=>o.set(r.name,r.key)),o7i({contextMenu:this,objects:t,state:e,pictos:o})},executeCommand(t){if(t.execute&&(t.execute(this.originEvent),this.displayed=!1),t.component&&!t.menu)throw new Error("Command with component property must have a `menu` property")},away(){this.displayed=!1},groupCurrentCommands(){const t=new Map;this.currentCommands.forEach(i=>{(i.group===null||i.group===void 0)&&(i.group=0),t.has(i.group)?t.get(i.group).push(i):t.set(i.group,[i])}),t.forEach(i=>i.sort((o,r)=>(o.position=o.position||0,r.position=r.position||0,o.position-r.position)));const e=[...t.keys()].sort((i,o)=>i-o).map(i=>t.get(i)).flat();this.currentCommands=e},isGroupIntersection(t){if(t===0)return!1;const e=this.currentCommands[t-1],i=this.currentCommands[t];return e.group<i.group},registerContextCommand(t){const e=this.typeCheckCommand(t);return this.contextCommands.push(e),t.id},registerCommand(t){const e=this.typeCheckCommand(t);return this.registeredCommands.push(e),t.id},unregisterCommand(t){return this.registeredCommands.find(e=>e.id===t)?(this.registeredCommands=this.registeredCommands.filter(e=>e.id!==t),!0):!1},preventDefault(){this.defaultPrevented=!0}}},n7i={key:0,class:"separator"},a7i={class:"menu-text"},s7i={key:1,class:"menu-picto"},l7i={key:0,class:"context-menu__spinner"};function c7i(t,e,i,o,r,n){const a=I("BIMDataIconChevron"),s=I("LiWrapper"),l=I("BIMDataSpinner"),c=ai("click-away");return r.displayed&&(r.currentCommands.length||r.asyncPredicateRunning)?yt((M(),_("ul",{key:0,class:"bimdata-list context-menu",style:de(n.position)},[(M(!0),_(Xe,null,Et(r.currentCommands,(d,u)=>(M(),K(s,{key:d.label,class:"context-menu__element",onClick:h=>n.executeCommand(d)},{default:U(()=>[n.isGroupIntersection(u)?(M(),_("div",n7i)):te("",!0),w("div",a7i,z(d.label),1),!d.component&&d.picto?(M(),_("span",s7i,z(d.picto),1)):d.component?(M(),K(a,{key:2,size:"xxs",class:"fill-primary"})):te("",!0)]),_:2},1032,["onClick"]))),128)),r.asyncPredicateRunning?(M(),_("li",l7i,[S(l)])):te("",!0)],4)),[[c,n.away]]):te("",!0)}const d7i=j(r7i,[["render",c7i],["__scopeId","data-v-5b87d4a3"]]),u7i={name:"ViewerHeader",inject:["$viewer"],props:{visible:{type:Boolean,default:!0}},setup(){const t=ct("$viewer"),e=Pr(new Map),i=r=>{if(!r.name)throw new TypeError("[Viewer Header] Content must have a name");if(e.has(r.name))throw new Error(`[Viewer Header] Content with name ${r.name} already exists`);e.set(r.name,r)},o=r=>e.has(r)?(e.delete(r),!0):!1;return{logo:t.uiSettings.bimdataLogo!==!1,version:t.uiSettings.version!==!1?t.version:null,headerContent:e,headerRightContentComponents:De(()=>Array.from(e.values()).filter(r=>r.position==="right").sort((r,n)=>r.order-n.order).map(r=>r.component)),headerLeftContentComponents:De(()=>Array.from(e.values()).filter(r=>r.position==="left").sort((r,n)=>r.order-n.order).map(r=>r.component)),addContent:i,removeContent:o}}},h7i={class:"viewer-header"},p7i={class:"viewer-header__content"},f7i={class:"viewer-header__content__left"},A7i={class:"viewer-header__content__right"},g7i={key:0,class:"m-l-6 flex items-center"},m7i={key:1,class:"viewer-header__version"};function v7i(t,e,i,o,r,n){const a=I("BIMDataIllustration");return yt((M(),_("div",h7i,[w("div",p7i,[w("div",f7i,[(M(!0),_(Xe,null,Et(o.headerLeftContentComponents,s=>(M(),K(Po(s),{key:s.name}))),128))]),w("div",A7i,[(M(!0),_(Xe,null,Et(o.headerRightContentComponents,s=>(M(),K(Po(s),{key:s.name}))),128))])]),o.logo||o.version?(M(),_("div",g7i,[o.logo?(M(),K(a,{key:0,name:"logo",width:"30px",height:"30px"})):te("",!0),o.version?(M(),_("div",m7i,z(o.version),1)):te("",!0)])):te("",!0)],512)),[[Ht,i.visible]])}const y7i=j(u7i,[["render",v7i],["__scopeId","data-v-5c9ea6b6"]]),b7i={emits:["resize"],setup(t,{emit:e}){return{onResizerMousedown:i=>{i.preventDefault();let o=i.clientX;const r=a=>{a.preventDefault();const s=a.clientX-o;o=a.clientX,e("resize",s)},n=a=>{a.preventDefault(),window.removeEventListener("mousemove",r),window.removeEventListener("mouseup",n)};window.addEventListener("mousemove",r),window.addEventListener("mouseup",n)}}}},w7i={class:"bimdata-separator"};function C7i(t,e,i,o,r,n){return M(),_("div",w7i,[e[1]||(e[1]=w("div",{class:"bimdata-separator__line"},null,-1)),w("div",{class:"bimdata-separator__resizer",onMousedown:e[0]||(e[0]=(...a)=>o.onResizerMousedown&&o.onResizerMousedown(...a))},null,32)])}const x7i=j(b7i,[["render",C7i],["__scopeId","data-v-79a3b3af"]]),k7i={components:{Separator:x7i},props:{position:{type:String,required:!0,validator(t){return["left","right"].includes(t)}},sidePanel:{type:Object,required:!0,validator(t){if(t.width&&(typeof t.width!="number"||t.width<0))return console.error(`[GlobalSidePanel] sidePanel.width must be a strictly positive number, received ${typeof t.width}`),!1;const e=typeof t?.component=="object";return e||console.error("[GlobalSidePanel] sidePanel must have a component property"),e}}},setup(t){const e=le(null),i=le(t.sidePanel.width??400),o=(r,n=1)=>{const a=i.value+r*n;i.value=Math.max(0,a)};return pt(()=>t.sidePanel,()=>{Object.defineProperty(t.sidePanel,"width",{get(){return i.value},set(r){if(typeof r!="number"||r<=0){console.error(`[GlobalSidePanel] sidePanel.width must be a strictly positive number, received ${typeof r}`);return}i.value=r}}),Object.defineProperty(t.sidePanel,"componentInstance",{get(){return e.value},enumerable:!0})},{immediate:!0}),{componentInstance:e,width:i,onResize:o}}},M7i={class:"bimdata-global-side-panel__component"};function E7i(t,e,i,o,r,n){const a=I("Separator");return M(),_("div",{class:"bimdata-global-side-panel",style:de(`width: ${o.width}px`)},[i.sidePanel.resizable&&i.position==="right"?(M(),K(a,{key:0,onResize:e[0]||(e[0]=s=>o.onResize(s,-1))})):te("",!0),w("div",M7i,[(M(),K(Po(i.sidePanel.component),{ref:"componentInstance"},null,512))]),i.sidePanel.resizable&&i.position==="left"?(M(),K(a,{key:1,onResize:e[1]||(e[1]=s=>o.onResize(s))})):te("",!0)],4)}const B7i=j(k7i,[["render",E7i],["__scopeId","data-v-82d0d4cb"]]),P7i={name:"BimdataViewer",components:{ContextMenu:d7i,ViewerHeader:y7i,ModalManager:C1e,GlobalSidePanel:B7i},setup(){const t=ct("$viewer"),{globalContext:e,shortcutManager:i}=t;ki(()=>{i&&i.destroy(),e.hub.clear()}),si(()=>{t.pluginManager.runPluginsScripts(t)});const o=De(()=>t.uiSettings.bimdataLogo!==!1&&(e.localContexts.length!==1||e.localContexts[0].window?.logoAndVersion)),r=De(()=>t.uiSettings.version!==!1&&(e.localContexts.length!==1||e.localContexts[0].window?.logoAndVersion)?t.version:null),n=De(()=>e.leftSidePanel),a=De(()=>e.rightSidePanel),s=De(()=>{const p=t.uiSettings.header!==!1,A=e.localContexts.length===1&&e.localContexts[0].window?.header===!1,f=!!(n.value||a.value);return p&&(!A||f)}),l=t.uiSettings.contextMenu!==!1,c=le(null);function d(p){l&&c.value.open(p)}function u(){t.shortcutManager.active=!0}function h(){t.shortcutManager.active=!1}return{Layout:t.layout.areas.component,onContextMenu:d,onMouseenter:u,onMouseleave:h,isHeaderVisible:s,viewerTemplateRef:e.templateRef,modalManagerTemplateRef:e.modalManagerTemplateRef,headerTemplateRef:e.headerTemplateRef,contextMenuTemplateRef:c,contextMenuEnabled:l,bimdataLogoOnSingleWindow:o,viewerVersionOnSingleWindow:r,version:t.version,loading:De(()=>e.loading),spinner:De(()=>e.spinner),leftSidePanel:n,rightSidePanel:a}}},I7i={key:1,class:"bimdata-context-loading-overlay",style:{"z-index":"3"}},S7i={key:2,class:"viewer__logo"},T7i={key:1,class:"version m-t-6"};function D7i(t,e,i,o,r,n){const a=I("ModalManager"),s=I("ContextMenu"),l=I("ViewerHeader"),c=I("GlobalSidePanel"),d=I("BIMDataSpinner"),u=I("BIMDataIllustration");return M(),_("div",{id:"bimdata-viewer",ref:"viewerTemplateRef",class:"bimdata-viewer bimdata-design-system bimdata-scrollbar",onContextmenu:e[0]||(e[0]=(...h)=>o.onContextMenu&&o.onContextMenu(...h)),onMouseenter:e[1]||(e[1]=(...h)=>o.onMouseenter&&o.onMouseenter(...h)),onMouseleave:e[2]||(e[2]=(...h)=>o.onMouseleave&&o.onMouseleave(...h))},[S(a,{ref:"modalManagerTemplateRef"},null,512),o.contextMenuEnabled?(M(),K(s,{key:0,ref:"contextMenuTemplateRef"},null,512)):te("",!0),S(l,{ref:"headerTemplateRef",visible:o.isHeaderVisible},null,8,["visible"]),w("div",{class:"bimdata-viewer__content",style:de(o.isHeaderVisible?"height: calc(100% - var(--bimdata-viewer-header-height, 40px))":"height: 100%")},[o.leftSidePanel?(M(),K(c,{key:0,"side-panel":o.leftSidePanel,position:"left"},null,8,["side-panel"])):te("",!0),(M(),K(Po(o.Layout),{style:"height: 100%; flex-grow: 1;"})),o.rightSidePanel?(M(),K(c,{key:1,"side-panel":o.rightSidePanel,position:"right"},null,8,["side-panel"])):te("",!0)],4),o.loading?(M(),_("div",I7i,[o.spinner&&o.spinner.component?(M(),K(Po(o.spinner.component),Fa(Pn({key:0},o.spinner.props)),null,16)):(M(),K(d,{key:1,size:"40px",border:"5px"}))])):te("",!0),!o.isHeaderVisible&&(o.bimdataLogoOnSingleWindow||o.viewerVersionOnSingleWindow)?(M(),_("div",S7i,[o.bimdataLogoOnSingleWindow?(M(),K(u,{key:0,name:"logo"})):te("",!0),o.viewerVersionOnSingleWindow?(M(),_("div",T7i,z(o.version),1)):te("",!0)])):te("",!0)],544)}const R7i=j(P7i,[["render",D7i],["__scopeId","data-v-0c1c941a"]]),L7i=["src"],_7i={class:"bimdata-models__header"},F7i={key:0,class:"bimdata-models__header__loader"},O7i={class:"bimdata-models__header__picto"},U7i={class:"bimdata-models__header__name"},N7i={key:0,class:"bimdata-models__header__name--empty"},j7i={key:1,class:"bimdata-models__header__name--empty"},V7i={key:3},z7i=["onMousemove","onClick"],H7i={__name:"Models",props:{preview:{type:Boolean,default:!1},windowPositioning:{type:Boolean,default:!0},customFilter:{type:Function,default:null},width:{type:String,default:"350px"}},setup(t){const e=t,i=ct("$viewer"),o=le(),r=le(0),n=le(0),a=le(),s=pi([]),l=le(!1),c=De(()=>i.localContext.loadedModels),d=De(()=>i.localContext.loadedModelIds),u=De(()=>i.localContext.loadingModelIds),h=De(()=>i.localContext.multiModel),p=De(()=>(e.customFilter?s.value.filter(e.customFilter):s.value).map(k=>c.value.find(E=>E.document?.head_id!=null&&E.document.head_id===k.document.id)??k)),A=k=>d.value.includes(k),f=k=>u.value.includes(k),m=De(()=>{const{x:k,y:E}=a.value?.getBoundingClientRect()??{x:0,y:0};return`top:${n.value-E}px; left:${r.value-k}px;`}),g=k=>{!h.value&&A(k.id)||u.value.length>0||(i.localContext.loadedModelIds.includes(k.id)?i.localContext.unloadModels([k.id]):i.localContext.loadModels([k.id]))},y=k=>{switch(k){case"C":return"success";case"E":return"failed";case"P":case"I":return"sandglass"}},v=(k,E)=>{k?.viewer_360_file&&(r.value=E.clientX,n.value=E.clientY),o.value=k?.viewer_360_file},b=async k=>{l.value=!0;try{return(await i.api.apiClient.modelApi.getModels(i.api.cloudId,i.api.projectId,void 0,void 0,k)).filter(E=>i.state.models.some(B=>B.archived)||!E.archived).sort(Ss("updated_at",!1))}catch(E){console.error("[Models] Cannot get project models. Error: ",E)}finally{l.value=!1}return[]},x=k=>k.children?.some(E=>A(E.id))??!1;return b(i.localContext.modelTypes).then(k=>{s.value=k}),(k,E)=>{const B=I("BIMDataSpinner"),P=I("BIMDataIconModel3D"),D=I("BIMDataTextbox"),T=I("BIMDataCheckbox"),R=I("BIMDataRadio"),F=I("BIMDataIcon"),N=I("BIMDataDropdownList");return M(),_("div",{ref_key:"templateRef",ref:a,class:ce(["bimdata-models",{"bimdata-models--window-positioning":t.windowPositioning}])},[o.value?(M(),_("div",{key:0,class:"bimdata-models__preview",style:de(m.value)},[w("img",{src:o.value},null,8,L7i)],4)):te("",!0),S(N,{style:de(`--bimdata-models-width: ${t.width};`),width:t.width,list:p.value,"element-key":"id","per-page":40,loading:l.value,class:"bimdata-models__list",disabled:p.value.length===0,onElementClick:g},{header:U(({isOpen:q})=>[w("div",_7i,[l.value||u.value.length>0?(M(),_("div",F7i,[S(B)])):(M(),_(Xe,{key:1},[w("div",O7i,[S(P)]),w("div",{class:ce(["bimdata-models__header__number bimdata-info-length",{"bimdata-models__header__number--empty":d.value.length===0}])},[w("span",null,z(d.value.length),1)],2),w("div",U7i,[p.value.length===0?(M(),_("span",N7i,z(k.$t("model.no_model")),1)):d.value.length===0?(M(),_("span",j7i,z(k.$t("model.no_loaded_model")),1)):d.value.length===1?(M(),K(D,{key:2,text:c.value[0].name,tooltip:!q},null,8,["text","tooltip"])):d.value.length>1?(M(),_("span",V7i,z(k.$t("model.selected_models")),1)):te("",!0)])],64))])]),element:U(({element:q,close:V})=>[w("div",{class:"bimdata-models__model",onMousemove:W=>t.preview&&v(q,W),onMouseout:E[0]||(E[0]=W=>t.preview&&v()),onClick:()=>{!h.value&&!A(q.id)&&V()}},[h.value?(M(),K(T,{key:0,"model-value":A(q.id)||x(q),disabled:q.status!=="C"||u.value.length>0},null,8,["model-value","disabled"])):(M(),K(R,{key:1,"model-value":A(q.id)||x(q),disabled:q.status!=="C"||u.value.length>0},null,8,["model-value","disabled"])),S(F,{margin:"0 calc(var(--spacing-unit) / 2)",name:y(q.status),size:"xs",class:ce({"fill-success":q.status==="C","fill-high":q.status==="E"})},null,8,["name","class"]),S(D,{class:ce({"bimdata-models__model__name":!0,"bimdata-models__model__name--disabled":q.status!=="C"||u.value.length>0}),text:q.name,width:`calc(100% -
6428
+ `),onMouseenter:e[0]||(e[0]=(...h)=>o.onMouseEnter&&o.onMouseEnter(...h)),onMouseleave:e[1]||(e[1]=(...h)=>o.onMouseLeave&&o.onMouseLeave(...h))},[S(a,{ref:"modalManagerTemplateRef"},null,512),w("div",oyi,[o.windowPlugins.leftSidePanel?(M(),K(s,{key:0,plugin:o.windowPlugins.leftSidePanel},null,8,["plugin"])):te("",!0),w("div",ryi,[(M(!0),_(Xe,null,Et(o.windowPlugins.free,h=>(M(),K(l,{key:h.name,class:ce({"window-container__content__center__viewer":h.isViewer}),plugin:h},null,8,["class","plugin"]))),128)),S(c,{position:"left",plugins:o.windowPlugins.leftButtonColumn},null,8,["plugins"]),S(c,{position:"right",plugins:o.windowPlugins.rightButtonColumn},null,8,["plugins"])]),o.windowPlugins.rightSidePanel?(M(),K(s,{key:1,plugin:o.windowPlugins.rightSidePanel},null,8,["plugin"])):te("",!0)]),o.loading?(M(),_("div",nyi,[o.spinner&&o.spinner.component?(M(),K(Po(o.spinner.component),Fa(Pn({key:0},o.spinner.props)),null,16)):(M(),K(d,{key:1,size:"20px",border:"3px"}))])):te("",!0),o.layoutSettingsDisplayed?(M(),_("div",ayi,[S(u)])):te("",!0)],36)}const lyi=j(iyi,[["render",syi],["__scopeId","data-v-485f288e"]]);class cyi{constructor(e=!0){const i=W6i(dU,null,{resizable:e});i.registerContent("default",lyi),this.settings=Pr({edit:!1,swap:!1,full:!1}),this.areas=i}get resizable(){return this.areas.resizable}set resizable(e){this.areas.resizable=e}apply(e=null){this.areas.layout=e?Y6i(e):null}copy(e,i=!0){return X6i(this.areas.layout,e,i)}open({ratio:e,direction:i,insertAfter:o,windowName:r=null,windowState:n=null,localContextId:a=null}={}){const s=r?{options:{windowName:r,windowState:n}}:null;return a===null?this.areas.splitLayout(e,i,o,s):this.areas.split(a,e,i,o,s)}swap(e,i){return this.areas.swap(e,i)}close(e){return this.areas.delete(e)}compare(e,i){if(!e&&!i)return!0;if(!e||!i)return!1;if(typeof e=="string"&&typeof i=="string")return e===i;if(typeof e=="string"||typeof i=="string")return!1;if(e.windowName&&i.windowName){if(e.windowName!==i.windowName)return!1;const o=new Set(e.windowState?.modelIds),r=new Set(i.windowState?.modelIds);return o.size===r.size&&[...o].every(n=>r.has(n))}return e.windowName||i.windowName||e.direction!==i.direction||e.children.length!==i.children.length?!1:e.children.every((o,r)=>this.compare(o,i.children[r]))}}const dyi="2.16.2-beta.3",uyi={version:dyi};let hyi=1;class pyi{constructor({plugins:e,api:i,ui:o,locale:r="fr"}){this.instanceId=hyi++,this.pluginManager=new Uvi(e),this.windowManager=new jvi,this.windowManager.registerAndAddPluginsToWindows([...this.pluginManager.registeredPlugins.values()]),this.api=new i6i(i),this.globalContext=new p3e(this),this.state=A6i(this),this.shortcutManager=rfe(this.state),this.uiSettings=o||{},this.i18n=new u3e(r),this._contextMenu=null,this.layout=new cyi(this.uiSettings.resizable!==!1),this._darkTheme=le(o?.darkTheme??!1),this.localContext=null,window.$viewer=this}get darkTheme(){return this._darkTheme.value}set darkTheme(e){this._darkTheme.value=e}get version(){return uyi.version}get locale(){return this.i18n.locale}get contextMenu(){return this._contextMenu||ife}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 fyi(t,e={}){e.backgroundColor&&(t.style.setProperty("--bimdata-viewer-background-color",e.backgroundColor),e.backgroundColor==="transparent"&&t.style.setProperty("--areas-separator-color","transparent")),e.colorPrimary&&t.style.setProperty("--color-primary",e.colorPrimary),e.colorPrimaryLighter&&t.style.setProperty("--color-primary-lighter",e.colorPrimaryLighter),e.colorPrimaryLight&&t.style.setProperty("--color-primary-light",e.colorPrimaryLight),e.colorPrimaryDark&&t.style.setProperty("--color-primary-dark",e.colorPrimaryDark),e.colorSecondary&&t.style.setProperty("--color-secondary",e.colorSecondary),e.colorSecondaryLighter&&t.style.setProperty("--color-secondary-lighter",e.colorSecondaryLighter),e.colorSecondaryLight&&t.style.setProperty("--color-secondary-light",e.colorSecondaryLight),e.colorSecondaryDark&&t.style.setProperty("--color-secondary-dark",e.colorSecondaryDark),e.colorSilverLight&&t.style.setProperty("--color-silver-light",e.colorSilverLight),e.colorSilver&&t.style.setProperty("--color-silver",e.colorSilver),e.colorSilverDark&&t.style.setProperty("--color-silver-dark",e.colorSilverDark),e.colorGraniteLight&&t.style.setProperty("--color-granite-light",e.colorGraniteLight),e.colorGranite&&t.style.setProperty("--color-granite",e.colorGranite),e.colorSuccess&&t.style.setProperty("--color-success",e.colorSuccess),e.colorSuccessLighter&&t.style.setProperty("--color-success-Lighter",e.colorSuccessLighter),e.colorSuccessLight&&t.style.setProperty("--color-success-Light",e.colorSuccessLight),e.colorSuccessDark&&t.style.setProperty("--color-success-Dark",e.colorSuccessDark),e.colorWarning&&t.style.setProperty("--color-warning",e.colorWarning),e.colorWarningLighter&&t.style.setProperty("--color-warning-Lighter",e.colorWarningLighter),e.colorWarningLight&&t.style.setProperty("--color-warning-Light",e.colorWarningLight),e.colorWarningDark&&t.style.setProperty("--color-warning-Dark",e.colorWarningDark),e.colorHigh&&t.style.setProperty("--color-high",e.colorHigh),e.colorHighLighter&&t.style.setProperty("--color-high-lighter",e.colorHighLighter),e.colorHighLight&&t.style.setProperty("--color-high-light",e.colorHighLight),e.colorHighDark&&t.style.setProperty("--color-high-dark",e.colorHighDark),e.colorText&&t.style.setProperty("--color-text",e.colorText),(!e.backgroundColor||e.backgroundColor!=="transparent")&&t.style.setProperty("--areas-separator-color","rgba(216, 216, 216, 1)"),e.headerHeight!=null&&t.style.setProperty("--bimdata-viewer-header-height",e.headerHeight),t.style.setProperty("--areas-background-color","transparent")}const Ayi=Object.freeze({25:"GUEST",50:"USER",100:"ADMIN"}),v2=Object.freeze({READ:"read",WRITE:"write"});function M1e(t){const e={};return t.forEach(i=>{const[o,r]=i.split(":");e[o]?e[o].push(r):e[o]=[r]}),e}const gyi={token_scopes:[],usable_scopes:[],user_role:25};function E1e(t=gyi){const e=M1e(t.token_scopes),i=M1e(t.usable_scopes);return{...hH(t),tokenScopes:e,usableScopes:i,userRole:Ayi[t.user_role],user:t.user?hH(t.user):null,hasBcfReadPermission:i.bcf?.includes(v2.READ)??!1,hasBcfWritePermission:i.bcf?.includes(v2.WRITE)??!1,hasModelReadPermission:i.model?.includes(v2.READ)??!1,hasModelWritePermission:i.model?.includes(v2.WRITE)??!1,hasDocReadPermission:i.document?.includes(v2.READ)??!1,hasDocWritePermission:i.document?.includes(v2.WRITE)??!1}}const myi={back:"Zur\xFCck",BcfFilters:{filtersButton:"Filter",filtersTitle:"Filter",priorityLabel:"Priorit\xE4t",statusLabel:"Status",stageLabel:"Phase",assignedToLabel:"Zugewiesen an",creatorsLabel:"Erstellt von",tagsLabel:"Tags",resetButton:"Zur\xFCcksetzen",searchButton:"Suchen",undefined:"Nicht definiert",datePlaceholder:"Erstellungsdatum"},BcfSettings:{title:"BCF-Parameter",text:"Erstellen, f\xFCllen und listen Sie die BCF-Einstellungen auf, die Sie f\xFCr dieses Projekt haben m\xF6chten.",validateButton:"Die BCF-Parameter anerkennen"},BcfStatistics:{emptyText:"F\xFCgen Sie Fragen hinzu, um zugeh\xF6rige Statistiken hier anzuzeigen.",issues:"Probleme",extension:{Priority:"Priorit\xE4t",PriorityNotDefined:"Keine Priorit\xE4t",PriorityTitle:"Priorit\xE4ten",Status:"Status",StatusNotDefined:"Kein Status",StatusTitle:"Status"}},BcfTopicCard:{priority:"Priorit\xE4t",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\xE4hlen Sie eine Datei aus.",addObjectButton:"Objekt",addAnnotationButton:"Annotation",annotationButtonTooltip:"Zu diesem Thema gibt es derzeit keine Ansichten.",addPictureButton:"F\xFCgen Sie ein Bild hinzu.",titlePlaceholder:"Titel *",titleErrorMessage:"Titel fehlt",typeLabel:"Typ",priorityLabel:"Priorit\xE4t",statusLabel:"Status",stageLabel:"Phase",assignedToLabel:"Zugewiesen an",dueDateLabel:"F\xE4lligkeitsdatum (TT.MM.JJJJ)",descriptionLabel:"Beschreibung",labelsLabel:"Tags",createButton:"Best\xE4tigen",updateButton:"\xC4nderungen \xFCbernehmen",modalText:"Sie sind dabei, die Bearbeitung der Ausgabe {Name} zu beenden, aber es gibt noch ungespeicherte \xC4nderungen.",cancelButton:"\xC4nderungen verwerfen",continueButton:"\xC4nderungen 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 \u2013 {count} ausgew\xE4hlte Dokumente",groupsLabel:"Berechtigungen",groupsCount:"Berechtigungen \u2013 {count} ausgew\xE4hlte Gruppen",groupsText:"W\xE4hlen Sie die Benutzergruppen aus, die dieses Thema sehen und damit interagieren d\xFCrfen.",validate:"Best\xE4tigen"},BcfTopicOverview:{openViewer:"Im Viewer \xF6ffnen",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\xE4lligkeitsdatum",noDueDate:"Kein F\xE4lligkeitsdatum",informations:"Informationen",status:"Status",noStatusSpecified:"Kein Status angegeben",stage:"Phase",noStageProvided:"Keine Phase angegeben",priority:"Priorit\xE4t",priorityNotDefined:"Nicht definiert",tags:"Tags",noTags:"Keine Tags",commentButton:"Ein Kommentar ver\xF6ffentlichen",deleteText:"Sie l\xF6schen jetzt {Name}",deleteBcfButton:"Dieses BCF l\xF6schen",keepBcfButton:"Dieses BCF beibehalten",author:"Autor"},BcfTopicsTable:{headers:{index:"#",priority:"Priorit\xE4t",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\xF6ffentlichen",commentsText:"Kommentare",deleteCommentText:"Diesen Kommentar l\xF6schen?",deleteButton:"L\xF6schen",takeSnapshot:"Mach einen Schnappschuss",edited:"bearbeitet"},BcfTopicPriorityCell:{noPriority:"Keine"},SettingCard:{addButton:"ein Element hinzuf\xFCgen",cancelButton:"Abbrechen",validateButton:"Best\xE4tigen",deleteExtensionText:"Diesen Parameter l\xF6schen",deleteButton:"L\xF6schen",title:{Priority:"Priorit\xE4ten",Label:"Tags",Status:"Status",Type:"Typen",Stage:"Phasen"},input:{Priority:"Eine neue Priorit\xE4t hinzuf\xFCgen",Label:"Ein neues Etikett hinzuf\xFCgen",Status:"Einen neuen Status hinzuf\xFCgen",Type:"Einen neuen Typ hinzuf\xFCgen",Stage:"Eine neue Phase hinzuf\xFCgen"},text:{Priority:"Liste der Priorit\xE4ten",Label:"Liste von Tags",Status:"Liste der Status",Type:"Liste der Typen",Stage:"Liste der Phasen"}}},vyi={BcfComponents:myi},yyi={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"}}},byi={BcfComponents:yyi},wyi={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\xF3n"},BcfSettings:{title:"Par\xE1metros del BCF",text:"Cree, rellene y enumere los par\xE1metros del BCF que desea tener en este proyecto",validateButton:"Validar los par\xE1metros del BCF"},BcfStatistics:{emptyText:"A\xF1ada preguntas para ver las estad\xEDsticas asociadas aqu\xED.",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\xF3n",annotationButtonTooltip:"Actualmente este tema no posee ning\xFAn punto de vista",addPictureButton:"A\xF1adir una imagen",titlePlaceholder:"T\xEDtulo *",titleErrorMessage:"Falta el t\xEDtulo",typeLabel:"Tipo",priorityLabel:"Prioridad",statusLabel:"Estado",stageLabel:"Fase",assignedToLabel:"Asignado a",dueDateLabel:"Fecha de vencimiento (DD/MM/AAAA)",descriptionLabel:"Descripci\xF3n",labelsLabel:"Etiquetas",createButton:"Validar",updateButton:"Modificar este BCF",modalText:"Est\xE1 a punto de salir de la edici\xF3n 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\xEDa",takeSnapshot:"Tomar un snapshot",importFile:"Importar un archivo",searchPlaceholder:"Buscar",emptySearch:"No hay resultados"},BcfTopicOverview:{openViewer:"Abrir en el visor",openViewerNoModels:"No hay ning\xFAn modelo listo para la visualizaci\xF3n",elements:"{count} Elementos",noElements:"Ning\xFAn elemento",type:"Tipo",noTypeSpecified:"No se especifica el tipo",description:"Descripci\xF3n",noDescriptionProvided:"No hay descripci\xF3n",assignedTo:"Asignado a",notAssigned:"No asignado",dueDate:"Plazo",noDueDate:"Sin fecha de vencimiento",informations:"Informaci\xF3n",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\xE1s a punto de borrar {name}",deleteBcfButton:"Borrar este BCF",keepBcfButton:"Mantenga este BCF",author:"Autor"},BcfTopicsTable:{headers:{index:"#",priority:"Prioridad",status:"Estado",title:"T\xEDtulo",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:"\xBFBorrar este comentario?",deleteButton:"Borrar",takeSnapshot:"Tomar un snapshot"},BcfTopicPriorityCell:{noPriority:"Sin"},SettingCard:{addButton:"a\xF1adir un elemento",cancelButton:"Cancelar",validateButton:"Validar",deleteExtensionText:"Borrar esta configuraci\xF3n",deleteButton:"Borrar",title:{Priority:"Prioridades",Label:"Etiquetas:",Status:"Estatutos",Type:"Tipos",Stage:"Fases"},input:{Priority:"A\xF1adir una nueva prioridad",Label:"A\xF1adir una nueva etiqueta",Status:"A\xF1adir un nuevo estado",Type:"A\xF1adir un nuevo tipo",Stage:"A\xF1adir una nueva fase"},text:{Priority:"Lista de prioridades",Label:"Lista de etiquetas",Status:"Lista de estatutos",Type:"Lista de tipos",Stage:"Lista de fases"}}},Cyi={BcfComponents:wyi},xyi={back:"Retour",BcfFilters:{filtersButton:"Filtres",filtersTitle:"Filtres",priorityLabel:"Priorit\xE9",statusLabel:"Statut",stageLabel:"Phase",assignedToLabel:"Assign\xE9 \xE0",creatorsLabel:"Cr\xE9\xE9 par",tagsLabel:"Tags",resetButton:"R\xE9initialiser",searchButton:"Rechercher",undefined:"Non d\xE9fini",datePlaceholder:"Date de cr\xE9ation"},BcfSettings:{title:"Param\xE8tres BCF",text:"Cr\xE9ez, renseignez et listez les param\xE8tres BCF que vous souhaitez avoir sur ce projet",validateButton:"Valider les param\xE8tres BCF"},BcfStatistics:{emptyText:"Ajoutez des questions pour voir les statistiques associ\xE9es ici.",issues:"probl\xE8mes",extension:{Priority:"Priorit\xE9",PriorityNotDefined:"Aucune priorit\xE9",PriorityTitle:"Priorit\xE9s",Status:"Statut",StatusNotDefined:"Aucun statut",StatusTitle:"Statuts"}},BcfTopicCard:{priority:"Priorit\xE9",noPriority:"Aucune",assignedTo:"Assign\xE9 \xE0",elements:"{n} \xC9lements",notSpecified:"Non d\xE9fini",see:"Voir"},BcfTopicCreationCard:{text:"Cr\xE9er un nouveau topic BCF",createBcfSideTitle:"Signaler un probl\xE8me"},BcfTopicForm:{dragDropImageText:"Veuillez s\xE9lectionner un fichier",addObjectButton:"Objet",addAnnotationButton:"Annotation",annotationButtonTooltip:"Ce topic ne poss\xE8de actuellement aucun point de vue",addPictureButton:"Ajouter une image",titlePlaceholder:"Titre *",titleErrorMessage:"Titre manquant",typeLabel:"Type",priorityLabel:"Priorit\xE9",statusLabel:"Statut",stageLabel:"Phase",assignedToLabel:"Assign\xE9 \xE0",dueDateLabel:"Date d'\xE9ch\xE9ance",descriptionLabel:"Description",labelsLabel:"Tags",createButton:"Valider",updateButton:"Modifier ce BCF",modalText:"Vous \xEAtes sur le point de quitter l'\xE9dition de l'issue {name} mais il y'a des modifications non enregistr\xE9es.",cancelButton:"Annuler les modifications",continueButton:"Continuer les modifications",createTitle:"Signaler un probl\xE8me",dragDropImageTextTablet:"Prendre une photo",takeSnapshot:"Prendre un snapshot",importFile:"Importer un fichier",searchPlaceholder:"Rechercher",emptySearch:"Pas de r\xE9sultat",documentsLabel:"Documents",documentsCount:"Documents - {count} documents s\xE9lectionn\xE9s",groupsLabel:"Permissions",groupsCount:"Permissions - {count} groupes s\xE9lectionn\xE9s",groupsText:"S\xE9lectionner les groupes utilisateur qui peuvent voir ce topic et int\xE9ragir avec.",validate:"Valider"},BcfTopicOverview:{openViewer:"Ouvrir dans le viewer",openViewerNoModels:"Il n'y a aucun mod\xE8le pr\xEAt pour une visualisation",elements:"{count} \xC9lements",noElements:"Aucun \xE9l\xE9ment concern\xE9",type:"Type",noTypeSpecified:"Pas de type sp\xE9cifi\xE9",description:"Description",noDescriptionProvided:"Pas de description renseign\xE9e",assignedTo:"Assign\xE9 \xE0",notAssigned:"Non assign\xE9",dueDate:"\xC9ch\xE9ance",noDueDate:"Pas de date d'\xE9ch\xE9ance",informations:"Informations",status:"Statut",noStatusSpecified:"Pas de statut sp\xE9cifi\xE9",stage:"Phase",noStageProvided:"Pas de phase renseign\xE9e",priority:"Priorit\xE9",priorityNotDefined:"Non d\xE9fini",tags:"Tags",noTags:"Pas de tags",commentButton:"Poster un commentaire",deleteText:"Vous \xEAtes sur le point de supprimer {name}",deleteBcfButton:"Supprimer ce BCF",keepBcfButton:"Conserver ce BCF",author:"Auteur"},BcfTopicsTable:{headers:{index:"#",priority:"Priorit\xE9",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\xE9"},BcfTopicPriorityCell:{noPriority:"Aucune"},SettingCard:{addButton:"ajouter un \xE9l\xE9ment",cancelButton:"Annuler",validateButton:"Valider",deleteExtensionText:"Supprimmer ce param\xE8tre",deleteButton:"Supprimer",title:{Priority:"Priorit\xE9s",Label:"Tags",Status:"Statuts",Type:"Types",Stage:"Phases"},input:{Priority:"Ajouter une nouvelle priorit\xE9",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\xE9s",Label:"Liste des tags",Status:"Liste des statuts",Type:"Liste des types",Stage:"Liste des phases"}}},kyi={BcfComponents:xyi},Myi={back:"Indietro",BcfFilters:{filtersButton:"Filtri",filtersTitle:"Filtri",priorityLabel:"Priorit\xE0",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\xE0",PriorityNotDefined:"Nessuna priorit\xE0",PriorityTitle:"Priorit\xE0",Status:"Stato",StatusNotDefined:"Nessuno stato",StatusTitle:"Stati"}},BcfTopicCard:{priority:"Priorit\xE0",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\xE0",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\xE0",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\xE0",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\xE0",Label:"Etichette",Status:"Stati",Type:"Tipi",Stage:"Fasi"},input:{Priority:"Aggiungi una nuova priorit\xE0",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\xE0",Label:"Elenco delle etichette",Status:"Elenco degli stati",Type:"Elenco dei tipi",Stage:"Elenco delle fasi"}}},Eyi={BcfComponents:Myi},Byi={de:vyi,en:byi,es:Cyi,fr:kyi,it:Eyi},Pyi=({apiClient:t,fetchUsers:e,i18nPlugin:i}={})=>({install(o){t?Pi.setup({apiClient:t,fetchUsers:e}):console.error("[BCF Components Plugin] No api client provided. You must provide an api client for the components to work properly."),i?Object.entries(Byi).forEach(([r,n])=>{i.global.mergeLocaleMessage(r,n)}):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(r7e).forEach(([r,n])=>{o.component(r,n)})}}),Iyi={title:"Building Maker",back:"Zur\xFCck",list:{text:"Erstellen und bearbeiten Sie die Etagen und laden Sie anschlie\xDFend Ihre PDFs herunter.",createButton:"Neues Projekt",updateButton:"Umbenennen",deleteButton:"L\xF6schen"},form:{text:"Erstellen und bearbeiten Sie die Etagen und laden Sie anschlie\xDFend Ihre PDFs herunter.",input:"Name des Geb\xE4udes",error:"Ung\xFCltiger Name",createButton:"Erstellen",updateButton:"Best\xE4tigen"},view:{addStoreyButton:"Etage",addPlanButton:"Grundriss",closeButton:"Fertigstellen",submitFilesButton:"Best\xE4tigen"},storeyForm:{title:"Neue Etage",input:"Name",error:"Ung\xFCltiger Name",cancelButton:"Abbrechen",submitButton:"Best\xE4tigen"}},Syi={creationFormTitle:"Ordner erstellen",renameFormPlaceholder:"Datei- / Ordnernam",nameInputPlaceholder:"Ordnername",emptyFolder:"Dieser Ordner ist leer",newFolderSuccess:"Neuer Ordner erstellt",renameFolderSuccess:"Umbenannter Ordner",deleteFolderSuccess:"Ordner gel\xF6scht",newFileSuccess:"Datei hinzugef\xFCgt",renameFileSuccess:"Umbenannte Datei",deleteFileSuccess:"Datei gel\xF6scht",nameInputErrorMessage:"Ung\xFCltiger name",cancel:"Abbrechen",submit:"Best\xE4tigen",buttonText:"Neuer Ordner",addFileButtonText:"Datei laden",rename:"Umbenennen",view:"Sehen",download:"Herunterladen",delete:"L\xF6schen",deleteTitle:"Dateien l\xF6schen",deleteDetail:"Sie sind im Begriff, die folgenden Dateien / Ordner endg\xFCltig zu l\xF6schen"},Tyi={BuildingMaker:Iyi,FileManager:Syi},Dyi={t:{back:"Back",cancel:"Cancel",create:"Create",delete:"Delete",download:"Download",finish:"Finish",rename:"Rename",search:"Search",see:"View",storey:"Storey",validate:"Validate"}},Ryi={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"}},Lyi={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"},_yi={title:"Meta-Building Structure",tab:{structure:"Structure",zones:"Zones",equipments:"Equipments"},StoreySelector:{placeholder:"Select a storey"}},Fyi={title:"Photosphere Building"},Oyi={BIMDataComponents:Dyi,BuildingMaker:Ryi,FileManager:Lyi,MetaBuildingStructure:_yi,PhotosphereBuilding:Fyi},Uyi={title:"Building Maker",back:"Vuelta",list:{text:"Cree y edite los pisos despu\xE9s cargue los PDF.",createButton:"Nuevo proyecto",updateButton:"Renombrar",deleteButton:"Suprimir"},form:{text:"Cree y edite los pisos despu\xE9s cargue los PDF.",input:"Nombre del edificio",error:"Nombre no v\xE1lido",createButton:"Crear",updateButton:"Validar"},view:{addStoreyButton:"Piso",addPlanButton:"Plano",closeButton:"Terminar",submitFilesButton:"Validar"},storeyForm:{title:"Nuevo piso",input:"Nombre",error:"Nombre no v\xE1lido",cancelButton:"Anular",submitButton:"Validar"}},Nyi={creationFormTitle:"Crear un archivo",renameFormPlaceholder:"Nombre de archivo / carpeta",nameInputPlaceholder:"Nombre de la carpeta",emptyFolder:"Esta carpeta est\xE1 vac\xEDa",newFolderSuccess:"Nueva carpeta creada",renameFolderSuccess:"Carpeta renombrada",deleteFolderSuccess:"Carpeta eliminada",newFileSuccess:"Archivo agregado",renameFileSuccess:"Archivo renombrado",deleteFileSuccess:"Archivo eliminado",nameInputErrorMessage:"Nombre inv\xE1lida",cancel:"Cancelar",submit:"Validar",buttonText:"Carpeta nueva",addFileButtonText:"Cargar un archivo",rename:"Renombrar",view:"Ver",download:"Descargar",delete:"Borrar",deleteTitle:"Eliminar archivos",deleteDetail:"Est\xE1 a punto de eliminar permanentemente los siguientes archivos / carpetas"},jyi={BuildingMaker:Uyi,FileManager:Nyi},Vyi={t:{back:"Retour",cancel:"Annuler",create:"Cr\xE9er",delete:"Supprimer",download:"T\xE9l\xE9charger",finish:"Terminer",rename:"Renommer",search:"Rechercher",see:"Voir",storey:"\xC9tage",validate:"Valider"}},zyi={title:"Building Maker",list:{text:"Cr\xE9ez et \xE9ditez les \xE9tages puis t\xE9l\xE9chagez vos PDF.",new:"Nouveau projet"},form:{input:"Nom du b\xE2timent",error:"Nom invalide"},view:{addStorey:"Ajouter un \xC9tage",addFile:"Ajouter un fichier",addPlan:"Ajouter un plan"},storeyForm:{title:"Nouvel \xE9tage",input:"Nom",error:"Nom invalide"}},Hyi={creationFormTitle:"Cr\xE9er un dossier",renameFormPlaceholder:"Nom du fichier/dosier",nameInputPlaceholder:"Nom du dossier",emptyFolder:"Ce dossier est vide",newFolderSuccess:"Nouveau dossier cr\xE9\xE9",renameFolderSuccess:"Dossier renomm\xE9",deleteFolderSuccess:"Dossier supprim\xE9",newFileSuccess:"Fichier ajout\xE9",renameFileSuccess:"Fichier renomm\xE9",deleteFileSuccess:"Fichier supprim\xE9",nameInputErrorMessage:"Nom invalide",buttonText:"Nouveau dossier",addFileButtonText:"Charger un fichier",deleteTitle:"Supression de fichiers",deleteDetail:"Vous \xEAtes sur le point de supprimer d\xE9finitivement les fichiers/dossiers suivants",dmsRoot:"Racine de la GED du projet",pdfPageSelectorTitle:"S\xE9lectionner une page"},qyi={title:"Structure M\xE9ta-Building",tab:{structure:"Structure",zones:"Zones",equipments:"\xC9quipements"},StoreySelector:{placeholder:"S\xE9lectionner un \xE9tage"}},Qyi={title:"Photosph\xE8re Building"},Gyi={BIMDataComponents:Vyi,BuildingMaker:zyi,FileManager:Hyi,MetaBuildingStructure:qyi,PhotosphereBuilding:Qyi},Kyi={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"}},Jyi={creationFormTitle:"Crea una cartella",renameFormPlaceholder:"Nome file/cartella",nameInputPlaceholder:"Nome della cartella",emptyFolder:"Questa cartella \xE8 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"},Zyi={BuildingMaker:Kyi,FileManager:Jyi},Wyi={de:Tyi,en:Oyi,es:jyi,fr:Gyi,it:Zyi},Yyi=({i18nPlugin:t}={})=>({install(e){t?Object.entries(Wyi).forEach(([i,o])=>{t.global.mergeLocaleMessage(i,o)}):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(Jei).forEach(([i,o])=>{e.component(i,o)})}}),Xyi={beforeMount(t,e){if(typeof e.value!="function")throw Error(`click away directive needs function, got ${typeof e.value}`);t.clickAwayHandler=i=>{(i.path||i.composedPath&&i.composedPath()).find(o=>o===t)||e.value()},window.addEventListener("mousedown",t.clickAwayHandler,!0)},unmounted(t){window.removeEventListener("mousedown",t.clickAwayHandler,!0),delete t.clickAwayHandler}},$yi=Object.freeze(Object.defineProperty({__proto__:null,BIMDataClickAway:Ms,BIMDataClickInputAway:Xyi},Symbol.toStringTag,{value:"Module"})),e7i=t=>({install(e){Object.entries(JZe).forEach(([i,o])=>{e.component(i,o)}),Object.entries($yi).forEach(([i,o])=>e.directive(i.split("BIMData")[1],o))}}),t7i={name:"LiWrapper",render(){return go("li",this.$slots.default())}};function i7i(t,e){var i=new Set([]);return t.forEach(o=>{e.has(o)||i.add(o)}),i}const ol=jr("id"),o7i=({contextMenu:t,objects:e=[],state:i=t.$viewer.state,pictos:o})=>[{name:"selectAll",get group(){return t.groupPositions.select},position:1,get label(){return t.$t("context_menu.select_all")},get picto(){return o.get(this.name)},execute:()=>i.selectObjects(e.filter(fs(Ci("visible"),zd("selected"))).map(ol)),predicate:()=>e.some(fs(Ci("visible"),zd("selected")))},{name:"deselectAll",get group(){return t.groupPositions.select},position:2,get label(){return t.$t("context_menu.deselect_all")},get picto(){return o.get(this.name)},execute:()=>i.deselectObjects(e.filter(Ci("selected")).map(ol)),predicate:()=>e.some(Ci("selected"))},{name:"selectSimilar",get group(){return t.groupPositions.select},position:3,get label(){return t.$t("context_menu.select_similar")},get picto(){return o.get(this.name)},execute(){const r=e.filter(n=>n.visible&&n.type===this.selectedObject.type&&n.id!==this.selectedObject.id).map(ol);i.selectObjects(r)},selectedObject:null,predicate(){const r=e.filter(fs(Ci("visible"),Ci("selected")));return r.length===1&&r[0].type!==void 0?(this.selectedObject=r[0],!0):(this.selectedObject=null,!1)}},{name:"reverseSelection",get label(){return t.$t("context_menu.reverse_selection")},get group(){return t.groupPositions.select},position:4,execute:()=>{const r=new Set(e.filter(Ci("selected")).map(ol)),n=new Set(e.filter(Ci("visible")).map(ol));i.selectObjects(Array.from(i7i(n,r)),{exclusive:!0})},predicate:()=>e.some(fs(zd("selected"),Ci("visible")))&&e.some(fs(Ci("selected"),Ci("visible")))},{name:"showAll",get group(){return t.groupPositions.visibility},position:1,get label(){return t.$t("context_menu.show_all")},get picto(){return o.get(this.name)},execute:()=>i.showObjects(e.filter(zd("visible")).map(ol)),predicate:()=>e.some(zd("visible"))},{name:"hide",get group(){return t.groupPositions.visibility},position:2,get label(){return t.$t("context_menu.hide")},get picto(){return o.get(this.name)},objectsToHide:null,execute(){const r=this.objectsToHide.filter(Ci("selected"));r.length>0&&i.deselectObjects(r.map(ol)),i.hideObjects(this.objectsToHide.map(ol))},predicate(){return this.objectsToHide=e.filter(fs(Ci("selected"),Ci("visible"))),this.objectsToHide.length>0}},{name:"hideAll",get group(){return t.groupPositions.visibility},position:3,get label(){return t.$t("context_menu.hide_all")},execute:()=>{const r=e.filter(Ci("visible"));r.some(Ci("selected"))&&i.deselectObjects(r.filter(Ci("selected")).map(ol)),i.hideObjects(r.map(ol))},predicate:()=>e.some(Ci("visible"))}].filter(r=>r.predicate()),r7i={components:{LiWrapper:t7i},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(t){t?document.addEventListener("keydown",this.onKeyDown):document.removeEventListener("keydown",this.onKeyDown)}},created(){this.$viewer.contextMenu=this,this.asyncPredicates=new Set},methods:{onKeyDown(t){t.key==="Escape"&&this.away()},setPosition(t){const e=(document.fullscreenElement?document.fullscreenElement:this.$parent.$el).getBoundingClientRect();this.left=t.clientX-e.left,this.top=t.clientY-e.top,this.left+this.width>e.width&&(this.left=this.left-this.width),t.clientY>e.top+e.height/2?(this.bottom=e.height-this.top,this.top=null):this.bottom=null},typeCheckCommand(t={}){let e=null;if((!t.execute||typeof t.execute!="function")&!t.component&&(e="Cannot register context menu command. A command must have an execute function or a component property."),t.label||(e="Cannot register context menu command. A command must have a label."),e)throw console.error(e),new Error(e);return t.id=this.nextCommandId++,t},open(t){this.currentCommands=[],this.setPosition(t),this.originEvent=t,t.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 t=>{if(typeof t.predicate=="function"){const e=t.predicate(this.$viewer.globalContext.activeLocalContext);if(e===!0)this.currentCommands.push(t);else if(typeof e?.then=="function"){this.asyncPredicates.add(e),this.asyncPredicateRunning=!0;const i=await e;this.asyncPredicates.has(e)&&(this.asyncPredicates.delete(e),this.asyncPredicateRunning=this.asyncPredicates.size>0,i===!0&&this.currentCommands.push(t))}}else this.currentCommands.push(t)}),this.currentCommands.push(...this.contextCommands),this.contextCommands=[]},getDefaultCommands({objects:t=[],state:e=this.$viewer.state,context:i=null}){const o=new Map;return i&&this.$viewer.shortcutManager.getShortcuts(i).forEach(r=>o.set(r.name,r.key)),o7i({contextMenu:this,objects:t,state:e,pictos:o})},executeCommand(t){if(t.execute&&(t.execute(this.originEvent),this.displayed=!1),t.component&&!t.menu)throw new Error("Command with component property must have a `menu` property")},away(){this.displayed=!1},groupCurrentCommands(){const t=new Map;this.currentCommands.forEach(i=>{(i.group===null||i.group===void 0)&&(i.group=0),t.has(i.group)?t.get(i.group).push(i):t.set(i.group,[i])}),t.forEach(i=>i.sort((o,r)=>(o.position=o.position||0,r.position=r.position||0,o.position-r.position)));const e=[...t.keys()].sort((i,o)=>i-o).map(i=>t.get(i)).flat();this.currentCommands=e},isGroupIntersection(t){if(t===0)return!1;const e=this.currentCommands[t-1],i=this.currentCommands[t];return e.group<i.group},registerContextCommand(t){const e=this.typeCheckCommand(t);return this.contextCommands.push(e),t.id},registerCommand(t){const e=this.typeCheckCommand(t);return this.registeredCommands.push(e),t.id},unregisterCommand(t){return this.registeredCommands.find(e=>e.id===t)?(this.registeredCommands=this.registeredCommands.filter(e=>e.id!==t),!0):!1},preventDefault(){this.defaultPrevented=!0}}},n7i={key:0,class:"separator"},a7i={class:"menu-text"},s7i={key:1,class:"menu-picto"},l7i={key:0,class:"context-menu__spinner"};function c7i(t,e,i,o,r,n){const a=I("BIMDataIconChevron"),s=I("LiWrapper"),l=I("BIMDataSpinner"),c=ai("click-away");return r.displayed&&(r.currentCommands.length||r.asyncPredicateRunning)?yt((M(),_("ul",{key:0,class:"bimdata-list context-menu",style:de(n.position)},[(M(!0),_(Xe,null,Et(r.currentCommands,(d,u)=>(M(),K(s,{key:d.label,class:"context-menu__element",onClick:h=>n.executeCommand(d)},{default:U(()=>[n.isGroupIntersection(u)?(M(),_("div",n7i)):te("",!0),w("div",a7i,z(d.label),1),!d.component&&d.picto?(M(),_("span",s7i,z(d.picto),1)):d.component?(M(),K(a,{key:2,size:"xxs",class:"fill-primary"})):te("",!0)]),_:2},1032,["onClick"]))),128)),r.asyncPredicateRunning?(M(),_("li",l7i,[S(l)])):te("",!0)],4)),[[c,n.away]]):te("",!0)}const d7i=j(r7i,[["render",c7i],["__scopeId","data-v-5b87d4a3"]]),u7i={name:"ViewerHeader",inject:["$viewer"],props:{visible:{type:Boolean,default:!0}},setup(){const t=ct("$viewer"),e=Pr(new Map),i=r=>{if(!r.name)throw new TypeError("[Viewer Header] Content must have a name");if(e.has(r.name))throw new Error(`[Viewer Header] Content with name ${r.name} already exists`);e.set(r.name,r)},o=r=>e.has(r)?(e.delete(r),!0):!1;return{logo:t.uiSettings.bimdataLogo!==!1,version:t.uiSettings.version!==!1?t.version:null,headerContent:e,headerRightContentComponents:De(()=>Array.from(e.values()).filter(r=>r.position==="right").sort((r,n)=>r.order-n.order).map(r=>r.component)),headerLeftContentComponents:De(()=>Array.from(e.values()).filter(r=>r.position==="left").sort((r,n)=>r.order-n.order).map(r=>r.component)),addContent:i,removeContent:o}}},h7i={class:"viewer-header"},p7i={class:"viewer-header__content"},f7i={class:"viewer-header__content__left"},A7i={class:"viewer-header__content__right"},g7i={key:0,class:"m-l-6 flex items-center"},m7i={key:1,class:"viewer-header__version"};function v7i(t,e,i,o,r,n){const a=I("BIMDataIllustration");return yt((M(),_("div",h7i,[w("div",p7i,[w("div",f7i,[(M(!0),_(Xe,null,Et(o.headerLeftContentComponents,s=>(M(),K(Po(s),{key:s.name}))),128))]),w("div",A7i,[(M(!0),_(Xe,null,Et(o.headerRightContentComponents,s=>(M(),K(Po(s),{key:s.name}))),128))])]),o.logo||o.version?(M(),_("div",g7i,[o.logo?(M(),K(a,{key:0,name:"logo",width:"30px",height:"30px"})):te("",!0),o.version?(M(),_("div",m7i,z(o.version),1)):te("",!0)])):te("",!0)],512)),[[Ht,i.visible]])}const y7i=j(u7i,[["render",v7i],["__scopeId","data-v-5c9ea6b6"]]),b7i={emits:["resize"],setup(t,{emit:e}){return{onResizerMousedown:i=>{i.preventDefault();let o=i.clientX;const r=a=>{a.preventDefault();const s=a.clientX-o;o=a.clientX,e("resize",s)},n=a=>{a.preventDefault(),window.removeEventListener("mousemove",r),window.removeEventListener("mouseup",n)};window.addEventListener("mousemove",r),window.addEventListener("mouseup",n)}}}},w7i={class:"bimdata-separator"};function C7i(t,e,i,o,r,n){return M(),_("div",w7i,[e[1]||(e[1]=w("div",{class:"bimdata-separator__line"},null,-1)),w("div",{class:"bimdata-separator__resizer",onMousedown:e[0]||(e[0]=(...a)=>o.onResizerMousedown&&o.onResizerMousedown(...a))},null,32)])}const x7i=j(b7i,[["render",C7i],["__scopeId","data-v-79a3b3af"]]),k7i={components:{Separator:x7i},props:{position:{type:String,required:!0,validator(t){return["left","right"].includes(t)}},sidePanel:{type:Object,required:!0,validator(t){if(t.width&&(typeof t.width!="number"||t.width<0))return console.error(`[GlobalSidePanel] sidePanel.width must be a strictly positive number, received ${typeof t.width}`),!1;const e=typeof t?.component=="object";return e||console.error("[GlobalSidePanel] sidePanel must have a component property"),e}}},setup(t){const e=le(null),i=le(t.sidePanel.width??400),o=(r,n=1)=>{const a=i.value+r*n;i.value=Math.max(0,a)};return pt(()=>t.sidePanel,()=>{Object.defineProperty(t.sidePanel,"width",{get(){return i.value},set(r){if(typeof r!="number"||r<=0){console.error(`[GlobalSidePanel] sidePanel.width must be a strictly positive number, received ${typeof r}`);return}i.value=r}}),Object.defineProperty(t.sidePanel,"componentInstance",{get(){return e.value},enumerable:!0})},{immediate:!0}),{componentInstance:e,width:i,onResize:o}}},M7i={class:"bimdata-global-side-panel__component"};function E7i(t,e,i,o,r,n){const a=I("Separator");return M(),_("div",{class:"bimdata-global-side-panel",style:de(`width: ${o.width}px`)},[i.sidePanel.resizable&&i.position==="right"?(M(),K(a,{key:0,onResize:e[0]||(e[0]=s=>o.onResize(s,-1))})):te("",!0),w("div",M7i,[(M(),K(Po(i.sidePanel.component),{ref:"componentInstance"},null,512))]),i.sidePanel.resizable&&i.position==="left"?(M(),K(a,{key:1,onResize:e[1]||(e[1]=s=>o.onResize(s))})):te("",!0)],4)}const B7i=j(k7i,[["render",E7i],["__scopeId","data-v-82d0d4cb"]]),P7i={name:"BimdataViewer",components:{ContextMenu:d7i,ViewerHeader:y7i,ModalManager:C1e,GlobalSidePanel:B7i},setup(){const t=ct("$viewer"),{globalContext:e,shortcutManager:i}=t;ki(()=>{i&&i.destroy(),e.hub.clear()}),si(()=>{t.pluginManager.runPluginsScripts(t)});const o=De(()=>t.uiSettings.bimdataLogo!==!1&&(e.localContexts.length!==1||e.localContexts[0].window?.logoAndVersion)),r=De(()=>t.uiSettings.version!==!1&&(e.localContexts.length!==1||e.localContexts[0].window?.logoAndVersion)?t.version:null),n=De(()=>e.leftSidePanel),a=De(()=>e.rightSidePanel),s=De(()=>{const p=t.uiSettings.header!==!1,A=e.localContexts.length===1&&e.localContexts[0].window?.header===!1,f=!!(n.value||a.value);return p&&(!A||f)}),l=t.uiSettings.contextMenu!==!1,c=le(null);function d(p){l&&c.value.open(p)}function u(){t.shortcutManager.active=!0}function h(){t.shortcutManager.active=!1}return{Layout:t.layout.areas.component,onContextMenu:d,onMouseenter:u,onMouseleave:h,isHeaderVisible:s,viewerTemplateRef:e.templateRef,modalManagerTemplateRef:e.modalManagerTemplateRef,headerTemplateRef:e.headerTemplateRef,contextMenuTemplateRef:c,contextMenuEnabled:l,bimdataLogoOnSingleWindow:o,viewerVersionOnSingleWindow:r,version:t.version,loading:De(()=>e.loading),spinner:De(()=>e.spinner),leftSidePanel:n,rightSidePanel:a}}},I7i={key:1,class:"bimdata-context-loading-overlay",style:{"z-index":"3"}},S7i={key:2,class:"viewer__logo"},T7i={key:1,class:"version m-t-6"};function D7i(t,e,i,o,r,n){const a=I("ModalManager"),s=I("ContextMenu"),l=I("ViewerHeader"),c=I("GlobalSidePanel"),d=I("BIMDataSpinner"),u=I("BIMDataIllustration");return M(),_("div",{id:"bimdata-viewer",ref:"viewerTemplateRef",class:"bimdata-viewer bimdata-design-system bimdata-scrollbar",onContextmenu:e[0]||(e[0]=(...h)=>o.onContextMenu&&o.onContextMenu(...h)),onMouseenter:e[1]||(e[1]=(...h)=>o.onMouseenter&&o.onMouseenter(...h)),onMouseleave:e[2]||(e[2]=(...h)=>o.onMouseleave&&o.onMouseleave(...h))},[S(a,{ref:"modalManagerTemplateRef"},null,512),o.contextMenuEnabled?(M(),K(s,{key:0,ref:"contextMenuTemplateRef"},null,512)):te("",!0),S(l,{ref:"headerTemplateRef",visible:o.isHeaderVisible},null,8,["visible"]),w("div",{class:"bimdata-viewer__content",style:de(o.isHeaderVisible?"height: calc(100% - var(--bimdata-viewer-header-height, 40px))":"height: 100%")},[o.leftSidePanel?(M(),K(c,{key:0,"side-panel":o.leftSidePanel,position:"left"},null,8,["side-panel"])):te("",!0),(M(),K(Po(o.Layout),{style:"height: 100%; flex-grow: 1;"})),o.rightSidePanel?(M(),K(c,{key:1,"side-panel":o.rightSidePanel,position:"right"},null,8,["side-panel"])):te("",!0)],4),o.loading?(M(),_("div",I7i,[o.spinner&&o.spinner.component?(M(),K(Po(o.spinner.component),Fa(Pn({key:0},o.spinner.props)),null,16)):(M(),K(d,{key:1,size:"40px",border:"5px"}))])):te("",!0),!o.isHeaderVisible&&(o.bimdataLogoOnSingleWindow||o.viewerVersionOnSingleWindow)?(M(),_("div",S7i,[o.bimdataLogoOnSingleWindow?(M(),K(u,{key:0,name:"logo"})):te("",!0),o.viewerVersionOnSingleWindow?(M(),_("div",T7i,z(o.version),1)):te("",!0)])):te("",!0)],544)}const R7i=j(P7i,[["render",D7i],["__scopeId","data-v-0c1c941a"]]),L7i=["src"],_7i={class:"bimdata-models__header"},F7i={key:0,class:"bimdata-models__header__loader"},O7i={class:"bimdata-models__header__picto"},U7i={class:"bimdata-models__header__name"},N7i={key:0,class:"bimdata-models__header__name--empty"},j7i={key:1,class:"bimdata-models__header__name--empty"},V7i={key:3},z7i=["onMousemove","onClick"],H7i={__name:"Models",props:{preview:{type:Boolean,default:!1},windowPositioning:{type:Boolean,default:!0},customFilter:{type:Function,default:null},width:{type:String,default:"350px"}},setup(t){const e=t,i=ct("$viewer"),o=le(),r=le(0),n=le(0),a=le(),s=pi([]),l=le(!1),c=De(()=>i.localContext.loadedModels),d=De(()=>i.localContext.loadedModelIds),u=De(()=>i.localContext.loadingModelIds),h=De(()=>i.localContext.multiModel),p=De(()=>(e.customFilter?s.value.filter(e.customFilter):s.value).map(k=>c.value.find(E=>E.document?.head_id!=null&&E.document.head_id===k.document.id)??k)),A=k=>d.value.includes(k),f=k=>u.value.includes(k),m=De(()=>{const{x:k,y:E}=a.value?.getBoundingClientRect()??{x:0,y:0};return`top:${n.value-E}px; left:${r.value-k}px;`}),g=k=>{!h.value&&A(k.id)||u.value.length>0||(i.localContext.loadedModelIds.includes(k.id)?i.localContext.unloadModels([k.id]):i.localContext.loadModels([k.id]))},y=k=>{switch(k){case"C":return"success";case"E":return"failed";case"P":case"I":return"sandglass"}},v=(k,E)=>{k?.viewer_360_file&&(r.value=E.clientX,n.value=E.clientY),o.value=k?.viewer_360_file},b=async k=>{l.value=!0;try{return(await i.api.apiClient.modelApi.getModels(i.api.cloudId,i.api.projectId,void 0,void 0,k)).filter(E=>i.state.models.some(B=>B.archived)||!E.archived).sort(Ss("updated_at",!1))}catch(E){console.error("[Models] Cannot get project models. Error: ",E)}finally{l.value=!1}return[]},x=k=>k.children?.some(E=>A(E.id))??!1;return b(i.localContext.modelTypes).then(k=>{s.value=k}),(k,E)=>{const B=I("BIMDataSpinner"),P=I("BIMDataIconModel3D"),D=I("BIMDataTextbox"),T=I("BIMDataCheckbox"),R=I("BIMDataRadio"),F=I("BIMDataIcon"),N=I("BIMDataDropdownList");return M(),_("div",{ref_key:"templateRef",ref:a,class:ce(["bimdata-models",{"bimdata-models--window-positioning":t.windowPositioning}])},[o.value?(M(),_("div",{key:0,class:"bimdata-models__preview",style:de(m.value)},[w("img",{src:o.value},null,8,L7i)],4)):te("",!0),S(N,{style:de(`--bimdata-models-width: ${t.width};`),width:t.width,list:p.value,"element-key":"id","per-page":40,loading:l.value,class:"bimdata-models__list",disabled:p.value.length===0,onElementClick:g},{header:U(({isOpen:q})=>[w("div",_7i,[l.value||u.value.length>0?(M(),_("div",F7i,[S(B)])):(M(),_(Xe,{key:1},[w("div",O7i,[S(P)]),w("div",{class:ce(["bimdata-models__header__number bimdata-info-length",{"bimdata-models__header__number--empty":d.value.length===0}])},[w("span",null,z(d.value.length),1)],2),w("div",U7i,[p.value.length===0?(M(),_("span",N7i,z(k.$t("model.no_model")),1)):d.value.length===0?(M(),_("span",j7i,z(k.$t("model.no_loaded_model")),1)):d.value.length===1?(M(),K(D,{key:2,text:c.value[0].name,tooltip:!q},null,8,["text","tooltip"])):d.value.length>1?(M(),_("span",V7i,z(k.$t("model.selected_models")),1)):te("",!0)])],64))])]),element:U(({element:q,close:V})=>[w("div",{class:"bimdata-models__model",onMousemove:W=>t.preview&&v(q,W),onMouseout:E[0]||(E[0]=W=>t.preview&&v()),onClick:()=>{!h.value&&!A(q.id)&&V()}},[h.value?(M(),K(T,{key:0,"model-value":A(q.id)||x(q),disabled:q.status!=="C"||u.value.length>0},null,8,["model-value","disabled"])):(M(),K(R,{key:1,"model-value":A(q.id)||x(q),disabled:q.status!=="C"||u.value.length>0},null,8,["model-value","disabled"])),S(F,{margin:"0 calc(var(--spacing-unit) / 2)",name:y(q.status),size:"xs",class:ce({"fill-success":q.status==="C","fill-high":q.status==="E"})},null,8,["name","class"]),S(D,{class:ce({"bimdata-models__model__name":!0,"bimdata-models__model__name--disabled":q.status!=="C"||u.value.length>0}),text:q.name,width:`calc(100% -
6429
6429
  ${h.value?13:23}px - 2 * 6px - 16px)`},null,8,["class","text","width"]),q.document&&!q.document.is_head_version?(M(),K(F,{key:2,name:"versioning",fill:"",color:"default",size:"xs",margin:"0 0 0 6px"})):te("",!0)],40,z7i),f(q.id)?(M(),K(B,{key:0,class:"bimdata-models__model__spinner"})):te("",!0)]),_:1},8,["style","width","list","loading","disabled"])],2)}}},B1e=j(H7i,[["__scopeId","data-v-34c2cf79"]]),q7i="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",Q7i=["src"],G7i={key:0,class:"bimdata-multi-model-loader__header-container"},K7i={key:0,class:"bimdata-multi-model-loader__header__loader"},J7i={class:"bimdata-multi-model-loader__header__picto"},Z7i=["src"],W7i={class:"bimdata-multi-model-loader__header__name"},Y7i={key:0,class:"bimdata-multi-model-loader__header__name--empty"},X7i={key:1,class:"bimdata-multi-model-loader__header__name--empty"},$7i={key:3},ebi={key:1,class:"bimdata-multi-model-loader__main"},tbi=["onMousemove","onClick"],ibi={__name:"BIMDataMultiModelLoader",props:{preview:{type:Boolean,default:!1},windowPositioning:{type:Boolean,default:!0},customFilter:{type:Function,default:null},width:{type:String,default:"350px"}},setup(t){const e=t,i=ct("$viewer"),o=le(),r=le(0),n=le(0),a=le(),s=pi([]),l=le(!1),c=le(!0),d=R=>{R.key==="Escape"?c.value=!0:R.key==="Enter"&&B()};pt(c,R=>{R?(window.removeEventListener("keydown",d),v.clear(),y.clear(),o.value=null):window.addEventListener("keydown",d)});const u=De(()=>i.localContext.loadedModels),h=De(()=>i.localContext.loadedModelIds),p=De(()=>i.localContext.loadingModelIds),A=De(()=>i.localContext.multiModel),f=De(()=>(e.customFilter?s.value.filter(e.customFilter):s.value).map(R=>u.value.find(F=>F.document?.head_id!=null&&F.document.head_id===R.document.id)??R)),m=R=>h.value.includes(R),g=R=>p.value.includes(R),y=Pr(new Set),v=Pr(new Set),b=R=>R.children?.some(F=>m(F.id))??!1,x=R=>(m(R.id)||b(R)||y.has(R))&&!v.has(R),k=De(()=>{const{x:R,y:F}=a.value.getBoundingClientRect();return`top:${n.value-F}px; left:${r.value-R}px;`}),E=R=>{R.status==="C"&&(!A.value&&m(R.id)||(m(R.id)?v.has(R)?v.delete(R):v.add(R):y.has(R)?y.delete(R):y.add(R)))},B=()=>{y.size>0&&i.localContext.loadModels(Array.from(y).map(R=>R.id)),v.size>0&&i.localContext.unloadModels(Array.from(v).map(R=>R.id)),c.value=!0},P=R=>{switch(R){case"C":return"success";case"E":return"failed";case"P":case"I":return"sandglass"}},D=R=>R.document&&!R.document.is_head_version,T=(R,F)=>{!e.preview||c.value||(R?.viewer_360_file&&(r.value=F.clientX,n.value=F.clientY),o.value=R?.viewer_360_file)};return(async R=>{l.value=!0;try{return(await i.api.apiClient.modelApi.getModels(i.api.cloudId,i.api.projectId,void 0,void 0,R)).filter(F=>i.state.models.some(N=>N.archived)||!F.archived).sort(Ss("updated_at",!1))}catch(F){console.error("[Models] Cannot get project models. Error: ",F)}finally{l.value=!1}return[]})(i.localContext.modelTypes).then(R=>{s.value=R}),(R,F)=>{const N=I("BIMDataSpinner"),q=I("BIMDataTextbox"),V=I("BIMDataIconChevron"),W=I("BIMDataButton"),Y=I("BIMDataIconFileIfcPolychrome"),$=I("BIMDataCheckbox"),me=I("BIMDataRadio"),Ie=I("BIMDataIcon"),Se=I("BIMDataPaginatedList"),qe=ai("click-away");return M(),_("div",{ref_key:"templateRef",ref:a,class:ce(["bimdata-multi-model-loader",{"bimdata-multi-model-loader--window-positioning":t.windowPositioning}])},[o.value?(M(),_("div",{key:0,class:"bimdata-multi-model-loader__preview",style:de(k.value)},[w("img",{src:o.value},null,8,Q7i)],4)):te("",!0),S(fi,{name:"fade",mode:"out-in"},{default:U(()=>[c.value?(M(),_("div",G7i,[gt(R.$slots,"left",{},void 0,!0),w("div",{class:"bimdata-multi-model-loader__header",onClick:F[0]||(F[0]=Qe=>c.value=!1)},[l.value||p.value.length>0?(M(),_("div",K7i,[S(N)])):(M(),_(Xe,{key:1},[w("div",J7i,[w("img",{src:ot(q7i),alt:"file icon"},null,8,Z7i)]),w("div",{class:ce(["bimdata-multi-model-loader__header__number bimdata-info-length",{"bimdata-multi-model-loader__header__number--empty":h.value.length===0}])},[w("span",null,z(h.value.length),1)],2),w("div",W7i,[f.value.length===0?(M(),_("span",Y7i,z(R.$t("model.no_model")),1)):h.value.length===0?(M(),_("span",X7i,z(R.$t("model.no_loaded_model")),1)):h.value.length===1?(M(),K(q,{key:2,text:u.value[0].name,tooltip:c.value,width:"233px"},null,8,["text","tooltip"])):h.value.length>1?(M(),_("span",$7i,z(R.$t("model.selected_models")),1)):te("",!0)]),S(W,{color:"default",icon:"",radius:"",fill:"",width:"21px",height:"21px"},{default:U(()=>[S(V,{size:"xxxs"})]),_:1})],64))]),gt(R.$slots,"right",{},void 0,!0)])):yt((M(),_("div",ebi,[S(Se,{list:f.value,"per-page":10},{element:U(({element:Qe})=>[w("div",{class:ce(["bimdata-multi-model-loader__main__model",{"bimdata-multi-model-loader__main__model--disabled":Qe.status!=="C"}]),onMousemove:Ce=>T(Qe,Ce),onMouseout:F[1]||(F[1]=Ce=>T()),onClick:Ce=>E(Qe)},[S(Y,{fill:"",color:"default",size:"xs"}),A.value?(M(),K($,{key:0,"model-value":x(Qe),disabled:Qe.status!=="C"},null,8,["model-value","disabled"])):(M(),K(me,{key:1,"model-value":x(Qe),disabled:Qe.status!=="C"},null,8,["model-value","disabled"])),S(q,{class:ce({"bimdata-multi-model-loader__main__model__name":!0,"bimdata-multi-model-loader__main__model__name--disabled":Qe.status!=="C"}),text:Qe.name,width:D(Qe)?"333px":"363px"},null,8,["class","text","width"]),D(Qe)?(M(),K(Ie,{key:2,name:"versioning",fill:"",color:"default",size:"xs",margin:"0 0 0 6px"})):te("",!0),g(Qe.id)?(M(),K(N,{key:3,class:"bimdata-multi-model-loader__main__model__spinner"})):(M(),K(Ie,{key:4,name:P(Qe.status),size:"xs",class:ce({"fill-success":Qe.status==="C","fill-high":Qe.status==="E"})},null,8,["name","class"]))],42,tbi)]),_:1},8,["list"]),S(W,{class:"bimdata-multi-model-loader__main__validate",width:"93px",color:"primary",fill:"",radius:"",disabled:ot(y).size===0&&ot(v).size===0,onClick:B},{default:U(()=>[Je(z(R.$t("global.validate")),1)]),_:1},8,["disabled"])])),[[qe,()=>c.value=!0]])]),_:3})],2)}}},obi=j(ibi,[["__scopeId","data-v-44e6af66"]]),rbi={data(){return{shown:!1}},mounted(){setTimeout(()=>{this.shown=!0},500)}};function nbi(t,e,i,o,r,n){const a=I("BIMDataIllustration");return M(),_("div",{class:"bimdata__no-model",style:de({"--no-model--opacity":r.shown?1:0})},[S(a,{name:"emptyViewer",x:"90",y:"90"}),w("span",null,z(t.$t("model.select_model")),1)],4)}const P1e=j(rbi,[["render",nbi],["__scopeId","data-v-5ffd9bc0"]]);window.BIMDataViewerVue=dU;class abi{constructor(e={}){const{api:i={},ui:o}=e;this.uiCfg=o,i.apiUrl||(console.info("[BIMData Viewer] INFO - Viewer config - `apiUrl` not set, use 'https://api.bimdata.io' by default."),i.apiUrl="https://api.bimdata.io"),i.archiveUrl||(console.info("[BIMData Viewer] INFO - Viewer config - `archiveUrl` not set, use 'https://archive.bimdata.io' by default."),i.archiveUrl="https://archive.bimdata.io"),i.pdfBackendUrl||(console.info("[BIMData Viewer] INFO - Viewer config - `pdfBackendUrl` not set, use 'https://pdf-backend.bimdata.io' by default."),i.pdfBackendUrl="https://pdf-backend.bimdata.io"),i.ifcIds&&(console.warn("[BIMData Viewer] DEPRECATED - Viewer config - please use the `modelIds` property instead of `ifcIds`."),i.modelIds===void 0&&(i.modelIds=i.ifcIds)),i.modelIds||(i.modelIds=[]),i.offline?.dataFile&&(i.offline.data=i.offline.dataFile),this.$viewer=new pyi(e),i.offline?.enabled?this.$viewer.api.enableOfflineMode(i.offline.data,i.offline.options).then(()=>this.state.loadModels(i.modelIds)):(this.$viewer.globalContext.loadingProcessStart(),this.state.loadModels(i.modelIds).finally(()=>this.$viewer.globalContext.loadingProcessEnd())),this.vueApp=null}get state(){return this.$viewer.state}get api(){return this.$viewer.api}async mount(e,i="3d"){const{$viewer:o}=this;await o.api.ready;try{const d=await o.api.apiClient.collaborationApi.checkProjectAccess(o.api.cloudId,o.api.projectId);o.api.permissions=E1e(d)}catch{o.api.permissions=E1e()}const r=this.api.accessToken,{i18n:n}=o;n.registerTranslations(o.pluginManager.pluginTranslations),o.layout.apply(i);const a={i18n:n.i18nVuePlugin,data(){return{accessToken:r}},render(){return go(R7i,{style:"height: 100%"})}},s=m5(a).use(n.i18nVuePlugin).use(e7i()).use(Yyi({i18nPlugin:n.i18nVuePlugin})).use(Pyi({apiClient:o.api.apiClient,i18nPlugin:n.i18nVuePlugin}));s.provide("$viewer",o),s.provide("BIMDATA_DESIGN_SYSTEM_DARK_THEME",De(()=>o.darkTheme)),s.component("BIMDataModelLoader",B1e),s.component("BIMDataMultiModelLoader",obi),s.component("BIMDataNoModelWindowPlaceHolder",P1e),s.component("BIMDataStoreySelector",GM),s.component("ModelsLoader",B1e),s.component("NoModelWindowPlaceHolder",P1e);const l=e instanceof HTMLElement?e:document.querySelector(e);l&&(l.style.height="100%");const c=s.mount(e);return c.$viewer=o,fyi(c.$el,this.uiCfg?.style),typeof window<"u"&&(window.bimdataViewer=c),this.vueApp=s,c}destroy(){this.vueApp?.unmount()}setLocale(e){if(!BU.includes(e))throw new Error(`Viewer available locales are ${BU.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 i=await this.state.loadModels(e);return this.$viewer.globalContext.loadingProcessEnd(),i}loadIfcs(e){return console.warn("[BIMData Viewer] DEPRECATED - Viewer - please use the loadModels method instead of loadIfcs."),this.loadModels(e)}}const I1e=(t={})=>new abi(t);window.makeBIMDataViewer=I1e;export{I1e as default};