@mappedin/mappedin-js 6.0.0-rc.1 → 6.0.0-rc.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/esm/{GLTFExporter-LCU7NXUM.js → GLTFExporter-Z6JPGY7L.js} +2 -2
- package/lib/esm/{GLTFLoader-M52U7R6R.js → GLTFLoader-QCSKNB7G.js} +2 -2
- package/lib/esm/{browser-WC4BWEDX.js → browser-I5Q2RPA3.js} +2 -2
- package/lib/esm/{chunk-4EZCNQDU.js → chunk-6KGIA4EU.js} +2 -2
- package/lib/esm/{chunk-QVO3EAE3.js → chunk-7SIXH4EE.js} +2 -2
- package/lib/esm/chunk-AJPWEERG.js +2 -0
- package/lib/esm/{chunk-SYPB4R2Y.js.map → chunk-AJPWEERG.js.map} +1 -1
- package/lib/esm/{chunk-MTBSFIDI.js → chunk-L4AKE3TV.js} +2 -2
- package/lib/esm/{chunk-OPUPAKD3.js → chunk-VI2AJVL2.js} +7 -7
- package/lib/esm/{chunk-DGI3RI5M.js → chunk-W5WDIXXO.js} +2 -2
- package/lib/esm/index.js +1 -1
- package/lib/esm/{inspector-2WXCEJZC.js → inspector-YD6373IB.js} +2 -2
- package/lib/esm/{internal-MR2VGL5Y.js → internal-JKAX4KK2.js} +2 -2
- package/lib/esm/{outdoor-context-v5-QR4KQTZR.js → outdoor-context-v5-TZEP6AEK.js} +2 -2
- package/lib/esm/{text3d-ROTRSMZX.js → text3d-OX5R3UZU.js} +2 -2
- package/package.json +2 -2
- package/lib/esm/chunk-SYPB4R2Y.js +0 -2
- /package/lib/esm/{GLTFExporter-LCU7NXUM.js.map → GLTFExporter-Z6JPGY7L.js.map} +0 -0
- /package/lib/esm/{GLTFLoader-M52U7R6R.js.map → GLTFLoader-QCSKNB7G.js.map} +0 -0
- /package/lib/esm/{browser-WC4BWEDX.js.map → browser-I5Q2RPA3.js.map} +0 -0
- /package/lib/esm/{chunk-4EZCNQDU.js.map → chunk-6KGIA4EU.js.map} +0 -0
- /package/lib/esm/{chunk-QVO3EAE3.js.map → chunk-7SIXH4EE.js.map} +0 -0
- /package/lib/esm/{chunk-MTBSFIDI.js.map → chunk-L4AKE3TV.js.map} +0 -0
- /package/lib/esm/{chunk-OPUPAKD3.js.map → chunk-VI2AJVL2.js.map} +0 -0
- /package/lib/esm/{chunk-DGI3RI5M.js.map → chunk-W5WDIXXO.js.map} +0 -0
- /package/lib/esm/{inspector-2WXCEJZC.js.map → inspector-YD6373IB.js.map} +0 -0
- /package/lib/esm/{internal-MR2VGL5Y.js.map → internal-JKAX4KK2.js.map} +0 -0
- /package/lib/esm/{outdoor-context-v5-QR4KQTZR.js.map → outdoor-context-v5-TZEP6AEK.js.map} +0 -0
- /package/lib/esm/{text3d-ROTRSMZX.js.map → text3d-OX5R3UZU.js.map} +0 -0
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{i as he,j as Ce}from"./chunk-
|
|
1
|
+
import{i as he,j as Ce}from"./chunk-7SIXH4EE.js";import{$ as de,I as W,Q as g,R as pe,T as fe,V as C,W as U,Y as Pe,aa as we,db as te,qa as Ie}from"./chunk-L4AKE3TV.js";import{a as l,b as c}from"./chunk-AJPWEERG.js";import{e as s,f,g as v,h as y}from"./chunk-ROCNZJLL.js";l();var re="[MappedinJS]",et=(o=>(o[o.LOG=0]="LOG",o[o.WARN=1]="WARN",o[o.ERROR=2]="ERROR",o[o.SILENT=3]="SILENT",o))(et||{});function tt(r="",{prefix:e=re}={}){let t=`${e}${r?`-${r}`:""}`,n=(o,i)=>{if(typeof window<"u"&&window.rnDebug){let a=i.map(u=>u instanceof Error&&u.stack?`${u.message}
|
|
2
2
|
${u.stack}`:u);window.rnDebug(`${r} ${o}: ${a.join(" ")}`)}};return{logState:c.env.NODE_ENV==="test"?3:0,log(...o){this.logState<=0&&(console.log(t,...o),n("log",o))},warn(...o){this.logState<=1&&(console.warn(t,...o),n("warn",o))},error(...o){this.logState<=2&&(console.error(t,...o),n("error",o))},assert(...o){console.assert(...o)},time(o){console.time(o)},timeEnd(o){console.timeEnd(o)},setLevel(o){0<=o&&o<=3&&(this.logState=o)}}}var Le=tt();function Rt(r){0<=r&&r<=3&&(Le.logState=r)}var F=Le;l();l();var B=class extends Error{};B.prototype.name="InvalidTokenError";function rt(r){return decodeURIComponent(atob(r).replace(/(.)/g,(e,t)=>{let n=t.charCodeAt(0).toString(16).toUpperCase();return n.length<2&&(n="0"+n),"%"+n}))}function nt(r){let e=r.replace(/-/g,"+").replace(/_/g,"/");switch(e.length%4){case 0:break;case 2:e+="==";break;case 3:e+="=";break;default:throw new Error("base64 string is not of the correct length")}try{return rt(e)}catch{return atob(e)}}function Oe(r,e){if(typeof r!="string")throw new B("Invalid token specified: must be a string");e||(e={});let t=e.header===!0?0:1,n=r.split(".")[t];if(typeof n!="string")throw new B(`Invalid token specified: missing part #${t+1}`);let o;try{o=nt(n)}catch(i){throw new B(`Invalid token specified: invalid base64 for part #${t+1} (${i.message})`)}try{return JSON.parse(o)}catch(i){throw new B(`Invalid token specified: invalid json for part #${t+1} (${i.message})`)}}l();var j=63710088e-1;l();function ot(r,e,t,n){return(r<e||r>t)&&F.warn(n),Math.min(t,Math.max(e,r))}l();function it(r,e){if(r==null||e==null)return r===e;if(r.length!==e.length)return!1;for(let t=0;t<r.length;t++)if(r[t]!==e[t])return!1;return!0}function tr(r){let e=Oe(r);if(e.sub==null)throw new Error("Access token is missing sub claim.");return{sub:e.sub,aud:typeof e.aud=="string"?[e.aud]:e.aud??[],capabilities:e.capabilities??{}}}function L(r){return r*(Math.PI/180)}function st(r){return r*(180/Math.PI)}function rr(r,e){let t=Math.pow(10,e);return Math.sign(r)*Math.round(Math.abs(r)*t)/t}function Ae(r,e){return(r%e+e)%e}function nr([r,e],[t,n]){let o=L(n-e),i=L(t-r),a=L(e),u=L(n),m=Math.sin(o/2)*Math.sin(o/2)+Math.sin(i/2)*Math.sin(i/2)*Math.cos(a)*Math.cos(u),p=2*Math.atan2(Math.sqrt(m),Math.sqrt(1-m));return j*p}function or([r,e],[t,n]){let o=L(e),i=L(r),a=L(n),m=L(t)-i,p=Math.sin(m)*Math.cos(a),h=Math.cos(o)*Math.sin(a)-Math.sin(o)*Math.cos(a)*Math.cos(m);return st((Math.atan2(p,h)+Math.PI*2)%(Math.PI*2))}function ir(r,e){let t=Ae(r,Math.PI*2),n=Ae(e,Math.PI*2),o=n-t,i=n+(o>Math.PI?-Math.PI*2:o<-Math.PI?Math.PI*2:0);return{start:t,end:i}}function at(r){return r instanceof te?Number.isFinite(r.min.x)&&Number.isFinite(r.min.y)&&Number.isFinite(r.max.x)&&Number.isFinite(r.max.y):Number.isFinite(r.min.x)&&Number.isFinite(r.min.y)&&Number.isFinite(r.max.x)&&Number.isFinite(r.max.y)&&Number.isFinite(r.min.z)&&Number.isFinite(r.max.z)}function sr(){return typeof window<"u"&&window!==null}l();function mr(r,e,t=!1){let n=null,o=0;return function(...i){o++,o===1&&t===!0&&r(...i);let a=()=>{(!t||o>1)&&r(...i),n=null,o=0};clearTimeout(n),n=setTimeout(a,e)}}l();l();function lt(r,e){return`${e} ${r}`}var H=class extends Error{constructor(e,t=re){super(lt(e,t)),this.name="MappedinError"}},ke=class extends H{constructor(e,t=re){super(e,t),this.name="MappedinRenderError"}};l();var ye=class r extends Error{constructor(t){super(t);s(this,"name","AssertionError");Error.captureStackTrace&&Error.captureStackTrace(this,r)}};function _e(r,e){if(r==null){let t;e?.customMessage?t=e.customMessage:t=`Expected ${e?.valueName?`'${e.valueName}'`:"value"} to be defined, but received ${r}`;let n=e?.errorClass||ye,o=new n(t);throw e?.captureStackTrace!==!1&&Error.captureStackTrace&&Error.captureStackTrace(o,_e),o}}function gr(r,e,t){if(_e(r),r?.type!==e){let n=`Expected type ${e} but got ${r?.type}`;throw new Error(t??n)}}l();var ge=[0,4,6,8,10],T=()=>{let r=new Array(16).fill(0),e=Math.random()*4294967296;for(let n=0;n<r.length;n++)n>0&&(n&3)===0&&(e=Math.random()*4294967296),r[n]=e>>>((n&3)<<3)&255;let t=r.map(n=>n.toString(16).padStart(2,"0"));return t[6]="4"+t[6][1],t[8]=["8","9","a","b"].includes(t[7][0])?t[7]:"a"+t[7][1],ge.map((n,o)=>t.slice(n,o===ge.length-1?void 0:ge[o+1]).join("")).join("-")};function Tr(r,e=0){let t=3735928559^e,n=1103547991^e;for(let o=0,i;o<r.length;o++)i=r.charCodeAt(o),t=Math.imul(t^i,2654435761),n=Math.imul(n^i,1597334677);return t=Math.imul(t^t>>>16,2246822507)^Math.imul(n^n>>>13,3266489909),n=Math.imul(n^n>>>16,2246822507)^Math.imul(t^t>>>13,3266489909),4294967296*(2097151&n)+(t>>>0)}l();var be=class{constructor(){s(this,"_subscribers",{});s(this,"_destroyed",!1)}publish(e,t){!this._subscribers||!this._subscribers[e]||this._destroyed||this._subscribers[e].forEach(function(n){typeof n=="function"&&n(t)})}on(e,t){(!this._subscribers||this._destroyed)&&(this._subscribers={}),this._subscribers[e]=this._subscribers[e]||[],this._subscribers[e].push(t)}off(e,t){if(!this._subscribers||this._subscribers[e]==null||this._destroyed)return;let n=this._subscribers[e].indexOf(t);n!==-1&&this._subscribers[e].splice(n,1)}destroy(){this._destroyed=!0,this._subscribers={}}};l();var Ge="mi-session-data",Ne="mi-local-data",$="id",z="deviceId",R,M,D,ne=class ne{constructor(){v(this,M);v(this,D);try{let e=sessionStorage.getItem(Ge);e?y(this,M,JSON.parse(e)):y(this,M,{[$]:T()})}catch{y(this,M,{[$]:T()})}try{let e=localStorage.getItem(Ne);e?y(this,D,JSON.parse(e)):y(this,D,{[z]:T()})}catch{y(this,D,{[z]:T()})}f(this,M)[$]||(f(this,M)[$]=T()),f(this,D)[z]||(f(this,D)[z]=T())}static getInstance(){return f(this,R)||y(this,R,new ne),f(this,R)}static ___clearInstance(){y(this,R,void 0)}saveSessionData(e,t){f(this,M)[e]=t;try{return sessionStorage.setItem(Ge,JSON.stringify(f(this,M))),!0}catch{return!1}}loadSessionData(e){let t=f(this,M)[e];if(t!=null)return t}saveLocalData(e,t){f(this,D)[e]=t;try{return localStorage.setItem(Ne,JSON.stringify(f(this,D))),!0}catch{return!1}}loadLocalData(e){let t=f(this,D)[e];if(t!=null)return t}};R=new WeakMap,M=new WeakMap,D=new WeakMap,v(ne,R);var xe=ne;l();var ut=new Set(Object.keys(U.NAMES)),ve;function Fe(){return ve==null&&(ve=new U),ve}var ct=r=>ut.has(r.toLowerCase()),mt=r=>{if(!r.startsWith("#"))return!1;let e=r.slice(1);if(e.length!==3&&e.length!==6)return!1;for(let t=0;t<e.length;t++)if(!(e[t]>="0"&&e[t]<="9"||e[t]>="A"&&e[t]<="F"||e[t]>="a"&&e[t]<="f"))return!1;return!0},pt=r=>{if(!r.startsWith("rgb(")&&!r.startsWith("rgba("))return!1;let e=r.indexOf("("),t=r.lastIndexOf(")");if(e===-1||t===-1||t<=e||t!==r.length-1)return!1;let n=r.slice(e+1,t).split(",");if(n.length!==3&&n.length!==4)return!1;for(let o=0;o<n.length;o++){let i=n[o].trim();if(o<3)if(i.endsWith("%")){let a=parseFloat(i.slice(0,-1));if(isNaN(a)||a<0||a>100)return!1}else{let a=parseInt(i,10);if(isNaN(a)||a<0||a>255)return!1}else{let a=parseFloat(i);if(isNaN(a)||a<0||a>1)return!1}}return!0},ft=r=>{if(!r.startsWith("hsl(")&&!r.startsWith("hsla("))return!1;let e=r.indexOf("("),t=r.lastIndexOf(")");if(e===-1||t===-1||t<=e||t!==r.length-1)return!1;let n=r.slice(e+1,t).split(",");if(n.length!==3&&n.length!==4)return!1;for(let o=0;o<n.length;o++){let i=n[o].trim();if(o===0){let a=parseFloat(i);if(isNaN(a))return!1}else if(o<3){if(!i.endsWith("%"))return!1;let a=parseFloat(i.slice(0,-1));if(isNaN(a)||a<0||a>100)return!1}else{let a=parseFloat(i);if(isNaN(a)||a<0||a>1)return!1}}return!0},oe=r=>r==null||typeof r!="string"?!1:!!(mt(r)||pt(r)||ft(r)||ct(r)),Ar=r=>{let e=Fe();return e.set(r),[e.r,e.g,e.b]},kr=r=>{let e=Fe();return e.set(r[0],r[1],r[2]),"#"+e.getHexString()};l();var Fr=["ease-in","ease-out","ease-in-out","linear"];var Be=r=>r,dt=r=>r*r,ht=r=>1-Math.cos(r*Math.PI/2),yt=r=>1-(1-r)*(1-r),je={linear:Be,"ease-in":dt,"ease-out":yt,"ease-in-out":ht};function Br(r,e,t,n,o,i=Be){if(e===t)return o;r=Math.max(e,Math.min(r,t));let a=(r-Math.min(e,t))/Math.abs(t-e),u=typeof i=="function"?i(a):je[i](a);return n+u*(o-n)}function gt(r,e){let t=0;if(e.length<2)return t;let o=e[0]<e[1]?(i,a)=>i>a:(i,a)=>i<a;for(;t<e.length-1&&o(r,e[t+1]);)t++;return t>e.length-2?Math.max(0,e.length-2):t}function jr(r,e,t,n="ease-in"){if(e.length!==t.length)throw new H("Input and output ranges must have the same number of values.");r=Math.max(e[0],Math.min(r,e[e.length-1]));let o=gt(r,e),i=(r-e[o])/(e[o+1]-e[o]),a=typeof n=="function"?n(i):je[n](i);return t[o]+a*(t[o+1]-t[o])}l();l();function bt(r){return(r%(2*Math.PI)+2*Math.PI)%(2*Math.PI)}l();l();l();l();l();l();l();l();var b=63710088e-1,Ve={centimeters:b*100,centimetres:b*100,degrees:b/111325,feet:b*3.28084,inches:b*39.37,kilometers:b/1e3,kilometres:b/1e3,meters:b,metres:b,miles:b/1609.344,millimeters:b*1e3,millimetres:b*1e3,nauticalmiles:b/1852,radians:1,yards:b*1.0936},on={centimeters:100,centimetres:100,degrees:1/111325,feet:3.28084,inches:39.37,kilometers:1/1e3,kilometres:1/1e3,meters:1,metres:1,miles:1/1609.344,millimeters:1e3,millimetres:1e3,nauticalmiles:1/1852,radians:1/b,yards:1.0936133};function O(r,e,t){t===void 0&&(t={});var n={type:"Feature"};return(t.id===0||t.id)&&(n.id=t.id),t.bbox&&(n.bbox=t.bbox),n.properties=e||{},n.geometry=r,n}function xt(r,e,t){if(t===void 0&&(t={}),!r)throw new Error("coordinates is required");if(!Array.isArray(r))throw new Error("coordinates must be an Array");if(r.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!Re(r[0])||!Re(r[1]))throw new Error("coordinates must contain numbers");var n={type:"Point",coordinates:r};return O(n,e,t)}function sn(r,e,t){t===void 0&&(t={});for(var n=0,o=r;n<o.length;n++){var i=o[n];if(i.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var a=0;a<i[i.length-1].length;a++)if(i[i.length-1][a]!==i[0][a])throw new Error("First and last Position are not equivalent.")}var u={type:"Polygon",coordinates:r};return O(u,e,t)}function Ue(r,e,t){if(t===void 0&&(t={}),r.length<2)throw new Error("coordinates must be an array of two or more positions");var n={type:"LineString",coordinates:r};return O(n,e,t)}function an(r,e){e===void 0&&(e={});var t={type:"FeatureCollection"};return e.id&&(t.id=e.id),e.bbox&&(t.bbox=e.bbox),t.features=r,t}function ln(r,e,t){t===void 0&&(t={});var n={type:"MultiLineString",coordinates:r};return O(n,e,t)}function un(r,e,t){t===void 0&&(t={});var n={type:"MultiPolygon",coordinates:r};return O(n,e,t)}function cn(r,e){e===void 0&&(e="kilometers");var t=Ve[e];if(!t)throw new Error(e+" units is invalid");return r*t}function mn(r,e){e===void 0&&(e="kilometers");var t=Ve[e];if(!t)throw new Error(e+" units is invalid");return r/t}function pn(r){var e=r%(2*Math.PI);return e*180/Math.PI}function fn(r){var e=r%360;return e*Math.PI/180}function Re(r){return!isNaN(r)&&r!==null&&!Array.isArray(r)}function ie(r,e,t){if(r!==null)for(var n,o,i,a,u,m,p,h=0,d=0,P,w=r.type,E=w==="FeatureCollection",_=w==="Feature",ce=E?r.features.length:1,G=0;G<ce;G++){p=E?r.features[G].geometry:_?r.geometry:r,P=p?p.type==="GeometryCollection":!1,u=P?p.geometries.length:1;for(var me=0;me<u;me++){var S=0,N=0;if(a=P?p.geometries[me]:p,a!==null){m=a.coordinates;var I=a.type;switch(h=t&&(I==="Polygon"||I==="MultiPolygon")?1:0,I){case null:break;case"Point":if(e(m,d,G,S,N)===!1)return!1;d++,S++;break;case"LineString":case"MultiPoint":for(n=0;n<m.length;n++){if(e(m[n],d,G,S,N)===!1)return!1;d++,I==="MultiPoint"&&S++}I==="LineString"&&S++;break;case"Polygon":case"MultiLineString":for(n=0;n<m.length;n++){for(o=0;o<m[n].length-h;o++){if(e(m[n][o],d,G,S,N)===!1)return!1;d++}I==="MultiLineString"&&S++,I==="Polygon"&&N++}I==="Polygon"&&S++;break;case"MultiPolygon":for(n=0;n<m.length;n++){for(N=0,o=0;o<m[n].length;o++){for(i=0;i<m[n][o].length-h;i++){if(e(m[n][o][i],d,G,S,N)===!1)return!1;d++}N++}S++}break;case"GeometryCollection":for(n=0;n<a.geometries.length;n++)if(ie(a.geometries[n],e,t)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function bn(r,e){if(r.type==="Feature")e(r,0);else if(r.type==="FeatureCollection")for(var t=0;t<r.features.length&&e(r.features[t],t)!==!1;t++);}function vt(r,e){var t,n,o,i,a,u,m,p,h,d,P=0,w=r.type==="FeatureCollection",E=r.type==="Feature",_=w?r.features.length:1;for(t=0;t<_;t++){for(u=w?r.features[t].geometry:E?r.geometry:r,p=w?r.features[t].properties:E?r.properties:{},h=w?r.features[t].bbox:E?r.bbox:void 0,d=w?r.features[t].id:E?r.id:void 0,m=u?u.type==="GeometryCollection":!1,a=m?u.geometries.length:1,o=0;o<a;o++){if(i=m?u.geometries[o]:u,i===null){if(e(null,P,p,h,d)===!1)return!1;continue}switch(i.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":{if(e(i,P,p,h,d)===!1)return!1;break}case"GeometryCollection":{for(n=0;n<i.geometries.length;n++)if(e(i.geometries[n],P,p,h,d)===!1)return!1;break}default:throw new Error("Unknown Geometry Type")}}P++}}function Tt(r,e){vt(r,function(t,n,o,i,a){var u=t===null?null:t.type;switch(u){case null:case"Point":case"LineString":case"Polygon":return e(O(t,o,{bbox:i,id:a}),n,0)===!1?!1:void 0}var m;switch(u){case"MultiPoint":m="Point";break;case"MultiLineString":m="LineString";break;case"MultiPolygon":m="Polygon";break}for(var p=0;p<t.coordinates.length;p++){var h=t.coordinates[p],d={type:m,coordinates:h};if(e(O(d,o),n,p)===!1)return!1}})}function Mt(r,e){Tt(r,function(t,n,o){var i=0;if(t.geometry){var a=t.geometry.type;if(!(a==="Point"||a==="MultiPoint")){var u,m=0,p=0,h=0;if(ie(t,function(d,P,w,E,_){if(u===void 0||n>m||E>p||_>h){u=d,m=n,p=E,h=_,i=0;return}var ce=Ue([u,d],t.properties);if(e(ce,n,o,_,i)===!1)return!1;i++,u=d})===!1)return!1}}})}function xn(r,e,t){var n=t,o=!1;return Mt(r,function(i,a,u,m,p){o===!1&&t===void 0?n=i:n=e(n,i,a,u,m,p),o=!0}),n}function Te(r){var e=[1/0,1/0,-1/0,-1/0];return ie(r,function(t){e[0]>t[0]&&(e[0]=t[0]),e[1]>t[1]&&(e[1]=t[1]),e[2]<t[0]&&(e[2]=t[0]),e[3]<t[1]&&(e[3]=t[1])}),e}Te.default=Te;var Ke=Te;function We(r){return Ke(r)}l();var Me="#ffffff",Dt=.1,se=.1,q,Y,J,De=class{constructor(e={}){s(this,"initialColor",Me);v(this,q,Me);s(this,"initialTopColor");v(this,Y);s(this,"topTexture");s(this,"texture");v(this,J);s(this,"dirty",!0);s(this,"visible",!0);s(this,"opacity",1);s(this,"width",Dt);s(this,"height",se);s(this,"initialHeight",se);s(this,"altitude",0);s(this,"join","round");s(this,"cap","round");s(this,"showImage",!0);s(this,"flipImageToFaceCamera",!0);s(this,"url");s(this,"side","double");s(this,"renderOrder",0);s(this,"shading");s(this,"bevel");this.color=e?.color!==void 0?e.color:this.color,this.initialColor=this.color,this.width=e?.width!==void 0?e.width:this.width,this.opacity=e?.opacity!==void 0?e.opacity:this.opacity,this.visible=e?.visible!==void 0?e.visible:this.visible,this.height=e?.height!==void 0?e.height:this.height,this.initialHeight=this.height,this.altitude=e?.altitude!==void 0?e.altitude:this.altitude,this.join=e?.join!==void 0?e.join:this.join,this.cap=e?.cap!==void 0?e.cap:this.cap,this.topColor=e?.topColor,this.initialTopColor=this.topColor,this.texture=e?.texture,this.topTexture=e?.topTexture,this.showImage=e?.showImage!==void 0?e.showImage:this.showImage,this.flipImageToFaceCamera=e?.flipImageToFaceCamera!==void 0?e.flipImageToFaceCamera:this.flipImageToFaceCamera,this.url=e?.url,this.side=e?.side!==void 0?e.side:this.side,this.renderOrder=e?.renderOrder!==void 0?e.renderOrder:this.renderOrder,this.shading=e?.shading,this.bevel=e?.bevel}set color(e){oe(e)?y(this,q,e):F.warn(`Failed to update color. Invalid color "${e}".`)}get color(){return f(this,q)}set topColor(e){e===void 0||oe(e)?y(this,Y,e):F.warn(`Failed to update top color. Invalid color "${e}".`)}get topColor(){return f(this,Y)}set hoverColor(e){oe(e)?y(this,J,e):F.warn(`Failed to update hover color. Invalid color "${e}".`)}get hoverColor(){return f(this,J)}};q=new WeakMap,Y=new WeakMap,J=new WeakMap;var ae=class extends Ie{constructor(){super(...arguments);s(this,"type","entityBatchedMesh");s(this,"userData",{entities:{}})}},X,V,He=class{constructor(e){s(this,"mesh");s(this,"imageMesh");s(this,"textMesh");s(this,"textEntityId");s(this,"type","geometry");s(this,"dirty",!0);s(this,"detached",!1);s(this,"instanceIndex",-1);s(this,"geometry");s(this,"batchedProps");s(this,"material");s(this,"feature");s(this,"currentHeight",se);s(this,"color",new U);s(this,"topColor",new U);s(this,"position",new g);s(this,"altitude",0);v(this,X,1);v(this,V);s(this,"texturesVisible",!1);this.feature=e}get visible(){return this.mesh&&this.instanceIndex!==-1?this.mesh.getVisibleAt(this.instanceIndex):!1}set visible(e){this.mesh&&this.instanceIndex!==-1&&this.mesh.setVisibleAt(this.instanceIndex,e)}get renderOrder(){return this.mesh?this.mesh.renderOrder:0}set renderOrder(e){this.mesh&&(this.mesh.renderOrder=e)}setColor(e,t){this.color.set(e),this.topColor.set(t),this.material&&this.material.setColor(this.instanceIndex,this.color,this.topColor)}getColor(){return this.material?.getColor(this.instanceIndex)}get opacity(){return f(this,X)}set opacity(e){if(this.material&&(this.material.opacity=e,this.material.transparent=e<1,this.material.needsUpdate=!0),this.imageMesh){let t=Array.isArray(this.imageMesh.material)?this.imageMesh.material:[this.imageMesh.material];for(let n of t)n.opacity=e,n.needsUpdate=!0}y(this,X,e)}get texture(){return this.material?.texture?.image.src}set texture(e){this.material&&(this.material.texture=e)}get textureInstance(){return this.material?.texture}set topTexture(e){this.material&&(this.material.topTexture=e)}get topTexture(){return this.material?.topTexture?.image.src}get topTextureInstance(){return this.material?.topTexture}set blendTexture(e){this.material&&(this.material.blendTexture=e)}get featureBbox(){return f(this,V)?f(this,V):(y(this,V,We(this.feature)),f(this,V))}showTextures(){this.material&&(this.material.showTextures(this.instanceIndex),this.texturesVisible=!0)}hideTextures(){this.material&&(this.material.hideTextures(this.instanceIndex),this.texturesVisible=!1)}removeSideTexture(){this.material&&this.material.removeSideTexture(this.instanceIndex)}removeTopTexture(){this.material&&this.material.removeTopTexture(this.instanceIndex)}};X=new WeakMap,V=new WeakMap;var x=class extends C{constructor(t){super();s(this,"visible",!0);s(this,"type","geometry-group");s(this,"components",[]);s(this,"userData",{entityId:"",entities3D:new Set,dirty:!0,shadingDirty:!0});this.userData.entityId=t}setVisible(t){this.visible!==t&&(this.visible=t,this.dispatchEvent({type:"childremoved",child:this}))}removeEntity(){this.dispatchEvent({type:"childremoved",child:this})}getfirstChildEntityId(){let t;for(let o of this.children)if(!o.userData.detached){t=o;break}return t instanceof ae?Object.values(t.userData.entities)[0]:void 0}setAltitude(t){this.position.z!==t&&(this.position.z=t,this.dispatchEvent({type:"childremoved",child:this}))}get altitude(){return this.position.z}};l();var A=class extends C{},Z=class{constructor(e,t,n=0){s(this,"id");s(this,"verticalOffset");s(this,"occluderId");s(this,"object3d",new A);s(this,"components");s(this,"disposed",!1);s(this,"worldPosition",new g);this.id=e.id||T(),this.components=[e],this.verticalOffset=n,this.object3d=new A,this.object3d.position.set(t.x,t.y,t.z+n),this.object3d.userData.entityId=this.id,this.object3d.userData.type=this.type,this.positionDirty=!0}get type(){return this.components[0].type}get parentObject3D(){return this.object3d.parent}get attachedTo(){return this.object3d.userData.attachedEntityId}get position(){return this.positionDirty&&(this.object3d.matrixAutoUpdate=!0,this.object3d.getWorldPosition(this.worldPosition),this.positionDirty=!1,this.object3d.matrixAutoUpdate=!1),this.worldPosition}get positionDirty(){return this.object3d.userData.worldPositionDirty}set positionDirty(e){this.object3d.userData.worldPositionDirty=e}updatePosition(e){this.object3d.position.copy(e),this.positionDirty=!0}setAltitude(e){this.object3d.position.z=e,this.positionDirty=!0}};l();var le=class extends C{constructor(){super(...arguments);s(this,"type","geometry");s(this,"userData",{entityId:"",type:"geometry"})}raycast(t,n){this.userData.type==="model"&&this.children[0]&&t.intersectObject(this.children[0],!0).forEach(o=>{n.push(o)})}},Q=class{constructor(e,t){s(this,"id",T());s(this,"components");s(this,"parentId");s(this,"entities2D",new Map);this.components=[e,t]}get object3d(){return this.components[0].mesh}get parentObject3D(){return this.components[0].mesh?.parent}get type(){return this.components[0].type}attach(e){this.parentObject3D instanceof x?e.object3d.userData.attachedEntityId=this.id:this.entities2D.set(e.id,e)}detach(e){this.parentObject3D instanceof x&&(e.object3d.userData.parentEntityId=void 0),this.entities2D.delete(e.id)}removeAllEntities(){for(let e of this.entities2D.values())this.detach(e)}};var K=class r extends C{constructor(t){super();s(this,"childrenIds",new Set);s(this,"children",[]);s(this,"type","group-container");s(this,"userData",{entityId:"",entities2D:new Set,dirty:!0,occluderDirty:!1,opacity:1,computedOpacity:1,preloadGeometry:!1});s(this,"components",[]);this.userData.entityId=t}addOccluderFeature(t,n){this.userData.occluderFeature=t,this.userData.occluderId=n,this.userData.occluderDirty=!0}addEntity(t){t instanceof r?(this.childrenIds.add(t.userData.entityId),this.add(t)):t instanceof Z?(this.childrenIds.add(t.id),this.add(t.object3d),this.userData.entities2D.add(t.id),t.positionDirty=!0):t instanceof x?(this.childrenIds.add(t.userData.entityId),this.add(t)):t instanceof Q&&t.object3d&&(this.childrenIds.add(t.id),this.add(t.object3d)),this.dispatchEvent({type:"childadded",child:this})}removeEntity(t){t instanceof r?(this.childrenIds.delete(t.userData.entityId),this.remove(t)):t instanceof Z?(this.childrenIds.delete(t.id),this.userData.entities2D.delete(t.id),this.remove(t.object3d)):t instanceof x?(this.childrenIds.delete(t.userData.entityId),this.remove(t)):t instanceof Q&&t.object3d&&(this.childrenIds.delete(t.id),this.add(t.object3d)),this.dispatchEvent({type:"childremoved",child:this})}setVisible(t){this.visible!==t&&(this.visible=t,this.dispatchEvent({type:"childremoved",child:this}))}setAltitude(t){this.position.z!==t&&(this.position.z=t,this.dispatchEvent({type:"childremoved",child:this}),this.set2DGeometryChildrenPositionDirty())}set2DGeometryChildrenPositionDirty(){this.children.forEach(t=>{t instanceof A?t.userData.worldPositionDirty=!0:t instanceof r&&t.set2DGeometryChildrenPositionDirty()})}get altitude(){return this.position.z}setOpacity(t){this.userData.opacity=t}get opacity(){return this.userData.opacity}};l();var ao={top:0,bottom:0,left:0,right:0,type:"pixel"},ee={enabled:!1,thickness:0,size:0,offset:0,segments:3};function lo(r,e){return{bevelEnabled:r?.enabled??ee.enabled,bevelThickness:r?.thickness??ee.thickness,bevelSize:r?.size??(r?.thickness||ee.size),bevelOffset:r?.offset??ee.offset,bevelSegments:r?.segments??ee.segments,depth:e}}var $e="mappedin";var uo={ALWAYS_ON_TOP:10},co=250,mo="collision-worker.csp.js",po="maplibre-worker.csp.js";l();function Et(r){let e=r.min,t=r.max,n=new g(e.x,e.y,e.z),o=new g(t.x,e.y,e.z),i=new g(e.x,t.y,e.z),a=new g(t.x,t.y,e.z);return[n,o,i,a]}l();function ze(r,e){let t;return typeof e=="string"||typeof e=="number"?(t=r.geometry2DMap.get(e),t==null&&(t=r.geometry3DMap.get(e))):typeof e?.id=="string"||typeof e?.id=="number"?(t=r.geometry2DMap.get(e.id),t==null&&(t=r.geometry3DMap.get(e.id))):t=e,t}function vo(r,e,t=[],n=new pe,o){(r.getSystems().renderSystem.threeDdirty||r.getSystems().renderSystem.twoDdirty)&&r.renderSync();let i=ze(r.getInternalState(),e);return qe(i,t,n,o),t}var ue=new g;function qe(r,e=[],t=new pe,n){if(r.visible){if(r.isMesh||r.isLine||r.isPoints){let o=r.geometry;if(o.isBufferGeometry){let i=o.attributes.position;for(let a=0;a<i.count;a++)ue.fromBufferAttribute(i,a),n!==void 0&&(ue.z=n),e.push(ue.clone()),t.expandByPoint(ue)}}for(let o of r.children)qe(o,e,t,n)}}l();function St(){return typeof window>"u"?1:Math.min(window.devicePixelRatio,2)}l();function Pt(r,e,t=!1){let n=null,o=0;return function(...i){o++,o===1&&t===!0&&r(...i);let a=()=>{(!t||o>1)&&r(...i),n=null,o=0};clearTimeout(n),n=setTimeout(a,e)}}l();var wt=(()=>{let r;return{getDeviceType(){if(r)return r;let{userAgent:e,platform:t,maxTouchPoints:n}=window.navigator,o=/(iphone|ipod|ipad)/i.test(e),i=t==="iPad"||t.indexOf("Mac")===0&&n>0&&!window.MSStream,a=/android/i.test(e);return r={isIpad:i,isMobile:a||o||i,isSafari12:/Version\/12.+Safari/.test(e),isFirefox:/Firefox/.test(e),isWindows:/windows/i.test(e)},r},_reset(){r=void 0}}})(),Ye=wt.getDeviceType,Je=(()=>{let r,e,t;function n(){if(e!==void 0)return e;r||(r=document.createElement("canvas"));let i=r.getContext("webgl")||r.getContext("experimental-webgl");if(!i)return e;try{let a=Ye().isFirefox?null:i.getExtension("WEBGL_debug_renderer_info");return e=a?i.getParameter(a.UNMASKED_RENDERER_WEBGL):i.getParameter(i.RENDERER),e}catch{let u=new Error("Failed getting device info");throw u.name="FailedGettingDeviceInfo",u}}function o(){if(!Ye().isWindows)return!1;if(t!==void 0)return t;let i=It()?.toLowerCase()??"";return t=i.includes("intel")&&(i.includes("uhd")||i.includes("iris")),t}return{getInfo:n,shouldDisableOffscreenCanvas:o,_setCanvas(i){r=i,e=void 0,t=void 0}}})(),It=Je.getInfo,Ct=Je.shouldDisableOffscreenCanvas;l();function Lt(r,e){let t={};for(let n=0;n<e.length;n++){let o=e[n];o in r&&(t[o]=r[o])}return t}function Ot(r){return Object.keys(r).length===0}l();var At=r=>e=>{if(!e.includes("mappedin")){let t={};for(let n in r){let o=r[n];e.includes("mappedin")||(r[n]=o)}return{url:e,headers:t}}return{url:e,headers:r}};function Uo(r,e,t,n){let o=r*(Math.PI/180),i=n/j,a=r+i*180/Math.PI,u=t/j/Math.cos(o),m=e+u*180/Math.PI;return{lat:a,lon:m}}function Ko(r,e,t,n){let o=t*(Math.PI/180),i=n*(Math.PI/180),a=r*(Math.PI/180),u=e*(Math.PI/180),m=o-a,p=i-u,h=j*p*Math.cos(a),d=j*m;return{x:h,y:d}}var kt=(r,e,t,n=!1)=>{let o=r instanceof K&&r.userData.preloadGeometry,i=n||o&&!r.visible;if(r.children&&(r.visible||o))for(let a of r.children){if(a.visible&&a.type&&!i)if("entities3D"in a.userData&&a.userData?.entities3D&&a instanceof x){e.add(a.userData.entityId);for(let u of a.userData.entities3D.values())e.add(u)}else(a.type==="group-container"||a.type==="custom-geometry"||a instanceof le)&&e.add(a.userData.entityId);a instanceof x&&a.userData.dirty&&t.add(a.userData.entityId),kt(a,e,t,i)}return e},_t=(r,e)=>{if(r.children&&r.visible&&!r.userData?.hidden)for(let t of r.children)t.visible&&t instanceof A&&e.add(t.userData.entityId),_t(t,e);return e};function Gt(r,e){for(let t in e){if(e[t]==null){r[t]=void 0;continue}typeof e[t]=="object"?Gt(r[t],e[t]):r[t]=e[t]}return r}function Wo(r,e,t){let n={translateX:r.x,translateY:r.y,translateZ:r.z,scale:r.meterInMercatorCoordinateUnits()},o=new fe,i=new g(n.scale,-n.scale,n.scale),a=new fe().makeTranslation(n.translateX,n.translateY,n.translateZ).scale(i);return{id:$e,type:"custom",renderingMode:"3d",render:(u,m)=>{o.fromArray(m.defaultProjectionData.mainMatrix),e.projectionMatrix=o.multiply(a),t()}}}function Nt(r){return fetch(r,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({grant_type:"client_credentials"})})}async function Ho(r){let e=await Nt(r),{access_token:t}=await e.json();return{"x-mappedin-tiles-key":t}}function $o(r,e=0){let t=3735928559^e,n=1103547991^e;for(let o=0,i;o<r.length;o++)i=r.charCodeAt(o),t=Math.imul(t^i,2654435761),n=Math.imul(n^i,1597334677);return t=Math.imul(t^t>>>16,2246822507)^Math.imul(n^n>>>13,3266489909),n=Math.imul(n^n>>>16,2246822507)^Math.imul(t^t>>>13,3266489909),4294967296*(2097151&n)+(t>>>0)}function zo(r,e,t){let n=r*(Math.PI/180)/2,o=e/2;return t*Math.tan(n)/o}function qo(r){return new Ce(new he(r[0][0],r[0][1]),new he(r[1][0],r[1][1])).getCenter().toArray()}function Yo(r,e){return r<e||e<=12}function Jo(r){let e=1;return r.type==="geometry-group"&&r.parent!=null&&r.parent instanceof K?e=r.parent.userData.computedOpacity:(r.type==="geometry"||r.type==="custom-geometry"||r.type==="model")&&r.parentObject3D!=null&&r.parentObject3D instanceof x&&r.parentObject3D.parent!=null&&r.parentObject3D.parent instanceof K&&(e=r.parentObject3D.parent.userData.computedOpacity),e}function Xo(r,e,t=1e-10){if(r.length!==e.length)return!1;let n=Math.abs(r[0]-e[0])<t,o=Math.abs(r[1]-e[1])<t;if(r.length===3&&e.length===3){let i=Math.abs(r[2]-e[2])<t;return n&&o&&i}return n&&o}var Ft="maplibre-frustum-culling-hack";function Zo(){let r=new we(.01,.01,.01),e=new Pe({opacity:0,depthWrite:!1,transparent:!0}),t=new de(r,e);return t.position.copy(new g(0,50,0)),t.frustumCulled=!1,t.name=Ft,t}var k=new g,Xe=new W;function Qo(r,e,t=new te){return r.traverse(n=>{if(n instanceof de){let i=n.geometry.attributes.position;if(e.position.distanceTo(n.position)<e.near)return;for(let u=0;u<i.count;u++)k.fromBufferAttribute(i,u),k.applyMatrix4(n.matrixWorld),k.applyMatrix4(e.matrixWorldInverse),k.applyMatrix4(e.projectionMatrix),k.z<1&&k.z>0&&(Xe.set(k.x,k.y),t.expandByPoint(Xe))}}),t}function Ze(r,e){let t=e.clientWidth,n=e.clientHeight;return new W((r.x+1)*t/2,(1-r.y)*n/2)}function ei(r,e,t){let n=document.createElement("div");n.style.position="absolute",n.style.border=`2px solid ${e}`,n.style.pointerEvents="none";let o=Ze(new W(r.min.x,r.min.y),t),i=Ze(new W(r.max.x,r.max.y),t);n.style.left=`${o.x}px`,n.style.top=`${i.y}px`;let a=Math.abs(i.x-o.x),u=Math.abs(i.y-o.y);return n.style.width=`${a}px`,n.style.height=`${u}px`,t.appendChild(n),n}l();var Ee=class{constructor(e){s(this,"visible");s(this,"altitude");s(this,"color");s(this,"dirty",!0);s(this,"maxWidth");s(this,"maxHeight");s(this,"hoverByPolygon");s(this,"flipToFaceCamera",Qe.flipToFaceCamera);s(this,"font");s(this,"fillOpacity");s(this,"fontSize");s(this,"margin");s(this,"outlineWidth");s(this,"outlineBlur");s(this,"outlineOffsetX");s(this,"strokeColor");s(this,"strokeOpacity");s(this,"strokeWidth");s(this,"hoverColor");s(this,"outlineOffsetY");s(this,"outlineColor");s(this,"outlineOpacity");e&&Object.assign(this,e)}getState(e=!1){let t={};for(let n in this)!e&&n==="dirty"||this[n]!==void 0&&(t[n]=this[n]);return t}},Qe=Object.freeze({visible:!0,color:"black",flipToFaceCamera:!0,fillOpacity:1,font:void 0,fontSize:2,margin:[.2,1,.2,1.5],outlineColor:"black",outlineOpacity:1,outlineWidth:0,outlineOffsetX:0,outlineOffsetY:0,outlineBlur:0,strokeOpacity:1,strokeWidth:0,maxWidth:void 0,maxHeight:void 0,strokeColor:"black",hoverColor:void 0});l();l();var Se=class{constructor(e){s(this,"dirty",!0);s(this,"visible",!0);s(this,"opacity",1);s(this,"verticalOffset",0);s(this,"interactive",!1);s(this,"color");s(this,"material");s(this,"rotation");s(this,"scale");e&&Object.assign(this,e)}};l();var Bt=[1,1,1],jt=[0,0,0];export{et as a,Rt as b,F as c,H as d,ke as e,j as f,ot as g,it as h,tr as i,L as j,rr as k,nr as l,or as m,ir as n,at as o,sr as p,mr as q,gr as r,T as s,Tr as t,be as u,xe as v,oe as w,Ar as x,kr as y,Fr as z,Be as A,ht as B,Br as C,gt as D,jr as E,O as F,xt as G,sn as H,Ue as I,an as J,ln as K,un as L,cn as M,mn as N,pn as O,fn as P,ie as Q,bn as R,Tt as S,xn as T,Ke as U,Me as V,De as W,ae as X,He as Y,x as Z,A as _,Z as $,le as aa,Q as ba,K as ca,ao as da,lo as ea,$e as fa,uo as ga,co as ha,mo as ia,po as ja,Et as ka,ze as la,vo as ma,St as na,Pt as oa,Ct as pa,Lt as qa,Ot as ra,At as sa,bt as ta,Uo as ua,Ko as va,kt as wa,_t as xa,Gt as ya,Wo as za,Ho as Aa,$o as Ba,zo as Ca,qo as Da,Yo as Ea,Jo as Fa,Xo as Ga,Zo as Ha,Qo as Ia,ei as Ja,Ee as Ka,Qe as La,Se as Ma,Bt as Na,jt as Oa};
|
|
3
|
-
//# sourceMappingURL=chunk-
|
|
3
|
+
//# sourceMappingURL=chunk-6KGIA4EU.js.map
|