earthsdk3-ue 3.6.0-beta.7 → 3.6.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.
@@ -109,10 +109,10 @@ Msg: ${e}`;console.warn(t)}};g.verboseLogLevel=5,function(r){r.LIST_STREAMERS="l
109
109
  content: "" !important;
110
110
  display: none !important;
111
111
  }`,dw=function(r){uw(r,"."+$s+lw+Jc+`
112
- .`+Zs+cw+Jc)},uw=function(r,A){var e=r.ownerDocument;if(e){var t=e.createElement("style");t.textContent=A,r.appendChild(t)}},zc=function(){function r(){}return r.getOrigin=function(A){var e=r._link;return e?(e.href=A,e.href=e.href,e.protocol+e.hostname+e.port):"about:blank"},r.isSameOrigin=function(A){return r.getOrigin(A)===r._origin},r.setContext=function(A){r._link=A.document.createElement("a"),r._origin=r.getOrigin(A.location.href)},r._origin="about:blank",r}(),hw=function(){function r(A,e){this.context=A,this._options=e,this._cache={}}return r.prototype.addImage=function(A){var e=Promise.resolve();return this.has(A)||(js(A)||ww(A))&&(this._cache[A]=this.loadImage(A)).catch(function(){}),e},r.prototype.match=function(A){return this._cache[A]},r.prototype.loadImage=function(A){return uA(this,void 0,void 0,function(){var e,t,n,s,i=this;return sA(this,function(o){switch(o.label){case 0:return e=zc.isSameOrigin(A),t=!qs(A)&&this._options.useCORS===!0&&rA.SUPPORT_CORS_IMAGES&&!e,n=!qs(A)&&!e&&!js(A)&&typeof this._options.proxy=="string"&&rA.SUPPORT_CORS_XHR&&!t,!e&&this._options.allowTaint===!1&&!qs(A)&&!js(A)&&!n&&!t?[2]:(s=A,n?[4,this.proxy(s)]:[3,2]);case 1:s=o.sent(),o.label=2;case 2:return this.context.logger.debug("Added image "+A.substring(0,256)),[4,new Promise(function(a,l){var d=new Image;d.onload=function(){return a(d)},d.onerror=l,(pw(s)||t)&&(d.crossOrigin="anonymous"),d.src=s,d.complete===!0&&setTimeout(function(){return a(d)},500),i._options.imageTimeout>0&&setTimeout(function(){return l("Timed out ("+i._options.imageTimeout+"ms) loading image")},i._options.imageTimeout)})];case 3:return[2,o.sent()]}})})},r.prototype.has=function(A){return typeof this._cache[A]<"u"},r.prototype.keys=function(){return Promise.resolve(Object.keys(this._cache))},r.prototype.proxy=function(A){var e=this,t=this._options.proxy;if(!t)throw new Error("No proxy defined");var n=A.substring(0,256);return new Promise(function(s,i){var o=rA.SUPPORT_RESPONSE_TYPE?"blob":"text",a=new XMLHttpRequest;a.onload=function(){if(a.status===200)if(o==="text")s(a.response);else{var h=new FileReader;h.addEventListener("load",function(){return s(h.result)},!1),h.addEventListener("error",function(u){return i(u)},!1),h.readAsDataURL(a.response)}else i("Failed to proxy resource "+n+" with status code "+a.status)},a.onerror=i;var l=t.indexOf("?")>-1?"&":"?";if(a.open("GET",""+t+l+"url="+encodeURIComponent(A)+"&responseType="+o),o!=="text"&&a instanceof XMLHttpRequest&&(a.responseType=o),e._options.imageTimeout){var d=e._options.imageTimeout;a.timeout=d,a.ontimeout=function(){return i("Timed out ("+d+"ms) proxying "+n)}}a.send()})},r}(),gw=/^data:image\/svg\+xml/i,Bw=/^data:image\/.*;base64,/i,fw=/^data:image\/.*/i,ww=function(r){return rA.SUPPORT_SVG_DRAWING||!Cw(r)},qs=function(r){return fw.test(r)},pw=function(r){return Bw.test(r)},js=function(r){return r.substr(0,4)==="blob"},Cw=function(r){return r.substr(-3).toLowerCase()==="svg"||gw.test(r)},S=function(){function r(A,e){this.type=0,this.x=A,this.y=e}return r.prototype.add=function(A,e){return new r(this.x+A,this.y+e)},r}(),Te=function(r,A,e){return new S(r.x+(A.x-r.x)*e,r.y+(A.y-r.y)*e)},Bn=function(){function r(A,e,t,n){this.type=1,this.start=A,this.startControl=e,this.endControl=t,this.end=n}return r.prototype.subdivide=function(A,e){var t=Te(this.start,this.startControl,A),n=Te(this.startControl,this.endControl,A),s=Te(this.endControl,this.end,A),i=Te(t,n,A),o=Te(n,s,A),a=Te(i,o,A);return e?new r(this.start,t,i,a):new r(a,o,s,this.end)},r.prototype.add=function(A,e){return new r(this.start.add(A,e),this.startControl.add(A,e),this.endControl.add(A,e),this.end.add(A,e))},r.prototype.reverse=function(){return new r(this.end,this.endControl,this.startControl,this.start)},r}(),pA=function(r){return r.type===1},vw=function(){function r(A){var e=A.styles,t=A.bounds,n=it(e.borderTopLeftRadius,t.width,t.height),s=n[0],i=n[1],o=it(e.borderTopRightRadius,t.width,t.height),a=o[0],l=o[1],d=it(e.borderBottomRightRadius,t.width,t.height),h=d[0],u=d[1],f=it(e.borderBottomLeftRadius,t.width,t.height),B=f[0],w=f[1],v=[];v.push((s+a)/t.width),v.push((B+h)/t.width),v.push((i+w)/t.height),v.push((l+u)/t.height);var m=Math.max.apply(Math,v);m>1&&(s/=m,i/=m,a/=m,l/=m,h/=m,u/=m,B/=m,w/=m);var F=t.width-a,E=t.height-u,I=t.width-h,y=t.height-w,U=e.borderTopWidth,D=e.borderRightWidth,R=e.borderBottomWidth,M=e.borderLeftWidth,O=N(e.paddingTop,A.bounds.width),oA=N(e.paddingRight,A.bounds.width),Y=N(e.paddingBottom,A.bounds.width),G=N(e.paddingLeft,A.bounds.width);this.topLeftBorderDoubleOuterBox=s>0||i>0?V(t.left+M/3,t.top+U/3,s-M/3,i-U/3,K.TOP_LEFT):new S(t.left+M/3,t.top+U/3),this.topRightBorderDoubleOuterBox=s>0||i>0?V(t.left+F,t.top+U/3,a-D/3,l-U/3,K.TOP_RIGHT):new S(t.left+t.width-D/3,t.top+U/3),this.bottomRightBorderDoubleOuterBox=h>0||u>0?V(t.left+I,t.top+E,h-D/3,u-R/3,K.BOTTOM_RIGHT):new S(t.left+t.width-D/3,t.top+t.height-R/3),this.bottomLeftBorderDoubleOuterBox=B>0||w>0?V(t.left+M/3,t.top+y,B-M/3,w-R/3,K.BOTTOM_LEFT):new S(t.left+M/3,t.top+t.height-R/3),this.topLeftBorderDoubleInnerBox=s>0||i>0?V(t.left+M*2/3,t.top+U*2/3,s-M*2/3,i-U*2/3,K.TOP_LEFT):new S(t.left+M*2/3,t.top+U*2/3),this.topRightBorderDoubleInnerBox=s>0||i>0?V(t.left+F,t.top+U*2/3,a-D*2/3,l-U*2/3,K.TOP_RIGHT):new S(t.left+t.width-D*2/3,t.top+U*2/3),this.bottomRightBorderDoubleInnerBox=h>0||u>0?V(t.left+I,t.top+E,h-D*2/3,u-R*2/3,K.BOTTOM_RIGHT):new S(t.left+t.width-D*2/3,t.top+t.height-R*2/3),this.bottomLeftBorderDoubleInnerBox=B>0||w>0?V(t.left+M*2/3,t.top+y,B-M*2/3,w-R*2/3,K.BOTTOM_LEFT):new S(t.left+M*2/3,t.top+t.height-R*2/3),this.topLeftBorderStroke=s>0||i>0?V(t.left+M/2,t.top+U/2,s-M/2,i-U/2,K.TOP_LEFT):new S(t.left+M/2,t.top+U/2),this.topRightBorderStroke=s>0||i>0?V(t.left+F,t.top+U/2,a-D/2,l-U/2,K.TOP_RIGHT):new S(t.left+t.width-D/2,t.top+U/2),this.bottomRightBorderStroke=h>0||u>0?V(t.left+I,t.top+E,h-D/2,u-R/2,K.BOTTOM_RIGHT):new S(t.left+t.width-D/2,t.top+t.height-R/2),this.bottomLeftBorderStroke=B>0||w>0?V(t.left+M/2,t.top+y,B-M/2,w-R/2,K.BOTTOM_LEFT):new S(t.left+M/2,t.top+t.height-R/2),this.topLeftBorderBox=s>0||i>0?V(t.left,t.top,s,i,K.TOP_LEFT):new S(t.left,t.top),this.topRightBorderBox=a>0||l>0?V(t.left+F,t.top,a,l,K.TOP_RIGHT):new S(t.left+t.width,t.top),this.bottomRightBorderBox=h>0||u>0?V(t.left+I,t.top+E,h,u,K.BOTTOM_RIGHT):new S(t.left+t.width,t.top+t.height),this.bottomLeftBorderBox=B>0||w>0?V(t.left,t.top+y,B,w,K.BOTTOM_LEFT):new S(t.left,t.top+t.height),this.topLeftPaddingBox=s>0||i>0?V(t.left+M,t.top+U,Math.max(0,s-M),Math.max(0,i-U),K.TOP_LEFT):new S(t.left+M,t.top+U),this.topRightPaddingBox=a>0||l>0?V(t.left+Math.min(F,t.width-D),t.top+U,F>t.width+D?0:Math.max(0,a-D),Math.max(0,l-U),K.TOP_RIGHT):new S(t.left+t.width-D,t.top+U),this.bottomRightPaddingBox=h>0||u>0?V(t.left+Math.min(I,t.width-M),t.top+Math.min(E,t.height-R),Math.max(0,h-D),Math.max(0,u-R),K.BOTTOM_RIGHT):new S(t.left+t.width-D,t.top+t.height-R),this.bottomLeftPaddingBox=B>0||w>0?V(t.left+M,t.top+Math.min(y,t.height-R),Math.max(0,B-M),Math.max(0,w-R),K.BOTTOM_LEFT):new S(t.left+M,t.top+t.height-R),this.topLeftContentBox=s>0||i>0?V(t.left+M+G,t.top+U+O,Math.max(0,s-(M+G)),Math.max(0,i-(U+O)),K.TOP_LEFT):new S(t.left+M+G,t.top+U+O),this.topRightContentBox=a>0||l>0?V(t.left+Math.min(F,t.width+M+G),t.top+U+O,F>t.width+M+G?0:a-M+G,l-(U+O),K.TOP_RIGHT):new S(t.left+t.width-(D+oA),t.top+U+O),this.bottomRightContentBox=h>0||u>0?V(t.left+Math.min(I,t.width-(M+G)),t.top+Math.min(E,t.height+U+O),Math.max(0,h-(D+oA)),u-(R+Y),K.BOTTOM_RIGHT):new S(t.left+t.width-(D+oA),t.top+t.height-(R+Y)),this.bottomLeftContentBox=B>0||w>0?V(t.left+M+G,t.top+y,Math.max(0,B-(M+G)),w-(R+Y),K.BOTTOM_LEFT):new S(t.left+M+G,t.top+t.height-(R+Y))}return r}(),K;(function(r){r[r.TOP_LEFT=0]="TOP_LEFT",r[r.TOP_RIGHT=1]="TOP_RIGHT",r[r.BOTTOM_RIGHT=2]="BOTTOM_RIGHT",r[r.BOTTOM_LEFT=3]="BOTTOM_LEFT"})(K||(K={}));var V=function(r,A,e,t,n){var s=4*((Math.sqrt(2)-1)/3),i=e*s,o=t*s,a=r+e,l=A+t;switch(n){case K.TOP_LEFT:return new Bn(new S(r,l),new S(r,l-o),new S(a-i,A),new S(a,A));case K.TOP_RIGHT:return new Bn(new S(r,A),new S(r+i,A),new S(a,l-o),new S(a,l));case K.BOTTOM_RIGHT:return new Bn(new S(a,A),new S(a,A+o),new S(r+i,l),new S(r,l));case K.BOTTOM_LEFT:default:return new Bn(new S(a,l),new S(a-i,l),new S(r,A+o),new S(r,A))}},fn=function(r){return[r.topLeftBorderBox,r.topRightBorderBox,r.bottomRightBorderBox,r.bottomLeftBorderBox]},mw=function(r){return[r.topLeftContentBox,r.topRightContentBox,r.bottomRightContentBox,r.bottomLeftContentBox]},wn=function(r){return[r.topLeftPaddingBox,r.topRightPaddingBox,r.bottomRightPaddingBox,r.bottomLeftPaddingBox]},Fw=function(){function r(A,e,t){this.offsetX=A,this.offsetY=e,this.matrix=t,this.type=0,this.target=6}return r}(),pn=function(){function r(A,e){this.path=A,this.target=e,this.type=1}return r}(),Qw=function(){function r(A){this.opacity=A,this.type=2,this.target=6}return r}(),Uw=function(r){return r.type===0},Yc=function(r){return r.type===1},Ew=function(r){return r.type===2},$c=function(r,A){return r.length===A.length?r.some(function(e,t){return e===A[t]}):!1},yw=function(r,A,e,t,n){return r.map(function(s,i){switch(i){case 0:return s.add(A,e);case 1:return s.add(A+t,e);case 2:return s.add(A+t,e+n);case 3:return s.add(A,e+n)}return s})},Zc=function(){function r(A){this.element=A,this.inlineLevel=[],this.nonInlineLevel=[],this.negativeZIndex=[],this.zeroOrAutoZIndexOrTransformedOrOpacity=[],this.positiveZIndex=[],this.nonPositionedFloats=[],this.nonPositionedInlineLevel=[]}return r}(),qc=function(){function r(A,e){if(this.container=A,this.parent=e,this.effects=[],this.curves=new vw(this.container),this.container.styles.opacity<1&&this.effects.push(new Qw(this.container.styles.opacity)),this.container.styles.transform!==null){var t=this.container.bounds.left+this.container.styles.transformOrigin[0].number,n=this.container.bounds.top+this.container.styles.transformOrigin[1].number,s=this.container.styles.transform;this.effects.push(new Fw(t,n,s))}if(this.container.styles.overflowX!==0){var i=fn(this.curves),o=wn(this.curves);$c(i,o)?this.effects.push(new pn(i,6)):(this.effects.push(new pn(i,2)),this.effects.push(new pn(o,4)))}}return r.prototype.getEffects=function(A){for(var e=[2,3].indexOf(this.container.styles.position)===-1,t=this.parent,n=this.effects.slice(0);t;){var s=t.effects.filter(function(a){return!Yc(a)});if(e||t.container.styles.position!==0||!t.parent){if(n.unshift.apply(n,s),e=[2,3].indexOf(t.container.styles.position)===-1,t.container.styles.overflowX!==0){var i=fn(t.curves),o=wn(t.curves);$c(i,o)||n.unshift(new pn(o,6))}}else n.unshift.apply(n,s);t=t.parent}return n.filter(function(a){return Z(a.target,A)})},r}(),Ai=function(r,A,e,t){r.container.elements.forEach(function(n){var s=Z(n.flags,4),i=Z(n.flags,2),o=new qc(n,r);Z(n.styles.display,2048)&&t.push(o);var a=Z(n.flags,8)?[]:t;if(s||i){var l=s||n.styles.isPositioned()?e:A,d=new Zc(o);if(n.styles.isPositioned()||n.styles.opacity<1||n.styles.isTransformed()){var h=n.styles.zIndex.order;if(h<0){var u=0;l.negativeZIndex.some(function(B,w){return h>B.element.container.styles.zIndex.order?(u=w,!1):u>0}),l.negativeZIndex.splice(u,0,d)}else if(h>0){var f=0;l.positiveZIndex.some(function(B,w){return h>=B.element.container.styles.zIndex.order?(f=w+1,!1):f>0}),l.positiveZIndex.splice(f,0,d)}else l.zeroOrAutoZIndexOrTransformedOrOpacity.push(d)}else n.styles.isFloating()?l.nonPositionedFloats.push(d):l.nonPositionedInlineLevel.push(d);Ai(o,d,s?d:e,a)}else n.styles.isInlineLevel()?A.inlineLevel.push(o):A.nonInlineLevel.push(o),Ai(o,A,e,a);Z(n.flags,8)&&jc(n,a)})},jc=function(r,A){for(var e=r instanceof Vs?r.start:1,t=r instanceof Vs?r.reversed:!1,n=0;n<A.length;n++){var s=A[n];s.container instanceof Uc&&typeof s.container.value=="number"&&s.container.value!==0&&(e=s.container.value),s.listValue=ut(e,s.container.styles.listStyleType,!0),e+=t?-1:1}},Sw=function(r){var A=new qc(r,null),e=new Zc(A),t=[];return Ai(A,e,e,t),jc(A.container,t),e},Ad=function(r,A){switch(A){case 0:return CA(r.topLeftBorderBox,r.topLeftPaddingBox,r.topRightBorderBox,r.topRightPaddingBox);case 1:return CA(r.topRightBorderBox,r.topRightPaddingBox,r.bottomRightBorderBox,r.bottomRightPaddingBox);case 2:return CA(r.bottomRightBorderBox,r.bottomRightPaddingBox,r.bottomLeftBorderBox,r.bottomLeftPaddingBox);case 3:default:return CA(r.bottomLeftBorderBox,r.bottomLeftPaddingBox,r.topLeftBorderBox,r.topLeftPaddingBox)}},Iw=function(r,A){switch(A){case 0:return CA(r.topLeftBorderBox,r.topLeftBorderDoubleOuterBox,r.topRightBorderBox,r.topRightBorderDoubleOuterBox);case 1:return CA(r.topRightBorderBox,r.topRightBorderDoubleOuterBox,r.bottomRightBorderBox,r.bottomRightBorderDoubleOuterBox);case 2:return CA(r.bottomRightBorderBox,r.bottomRightBorderDoubleOuterBox,r.bottomLeftBorderBox,r.bottomLeftBorderDoubleOuterBox);case 3:default:return CA(r.bottomLeftBorderBox,r.bottomLeftBorderDoubleOuterBox,r.topLeftBorderBox,r.topLeftBorderDoubleOuterBox)}},Tw=function(r,A){switch(A){case 0:return CA(r.topLeftBorderDoubleInnerBox,r.topLeftPaddingBox,r.topRightBorderDoubleInnerBox,r.topRightPaddingBox);case 1:return CA(r.topRightBorderDoubleInnerBox,r.topRightPaddingBox,r.bottomRightBorderDoubleInnerBox,r.bottomRightPaddingBox);case 2:return CA(r.bottomRightBorderDoubleInnerBox,r.bottomRightPaddingBox,r.bottomLeftBorderDoubleInnerBox,r.bottomLeftPaddingBox);case 3:default:return CA(r.bottomLeftBorderDoubleInnerBox,r.bottomLeftPaddingBox,r.topLeftBorderDoubleInnerBox,r.topLeftPaddingBox)}},Hw=function(r,A){switch(A){case 0:return Cn(r.topLeftBorderStroke,r.topRightBorderStroke);case 1:return Cn(r.topRightBorderStroke,r.bottomRightBorderStroke);case 2:return Cn(r.bottomRightBorderStroke,r.bottomLeftBorderStroke);case 3:default:return Cn(r.bottomLeftBorderStroke,r.topLeftBorderStroke)}},Cn=function(r,A){var e=[];return pA(r)?e.push(r.subdivide(.5,!1)):e.push(r),pA(A)?e.push(A.subdivide(.5,!0)):e.push(A),e},CA=function(r,A,e,t){var n=[];return pA(r)?n.push(r.subdivide(.5,!1)):n.push(r),pA(e)?n.push(e.subdivide(.5,!0)):n.push(e),pA(t)?n.push(t.subdivide(.5,!0).reverse()):n.push(t),pA(A)?n.push(A.subdivide(.5,!1).reverse()):n.push(A),n},ed=function(r){var A=r.bounds,e=r.styles;return A.add(e.borderLeftWidth,e.borderTopWidth,-(e.borderRightWidth+e.borderLeftWidth),-(e.borderTopWidth+e.borderBottomWidth))},vn=function(r){var A=r.styles,e=r.bounds,t=N(A.paddingLeft,e.width),n=N(A.paddingRight,e.width),s=N(A.paddingTop,e.width),i=N(A.paddingBottom,e.width);return e.add(t+A.borderLeftWidth,s+A.borderTopWidth,-(A.borderRightWidth+A.borderLeftWidth+t+n),-(A.borderTopWidth+A.borderBottomWidth+s+i))},Lw=function(r,A){return r===0?A.bounds:r===2?vn(A):ed(A)},bw=function(r,A){return r===0?A.bounds:r===2?vn(A):ed(A)},ei=function(r,A,e){var t=Lw(Le(r.styles.backgroundOrigin,A),r),n=bw(Le(r.styles.backgroundClip,A),r),s=Mw(Le(r.styles.backgroundSize,A),e,t),i=s[0],o=s[1],a=it(Le(r.styles.backgroundPosition,A),t.width-i,t.height-o),l=Dw(Le(r.styles.backgroundRepeat,A),a,s,t,n),d=Math.round(t.left+a[0]),h=Math.round(t.top+a[1]);return[l,d,h,i,o]},He=function(r){return k(r)&&r.value===Ee.AUTO},mn=function(r){return typeof r=="number"},Mw=function(r,A,e){var t=A[0],n=A[1],s=A[2],i=r[0],o=r[1];if(!i)return[0,0];if(z(i)&&o&&z(o))return[N(i,e.width),N(o,e.height)];var a=mn(s);if(k(i)&&(i.value===Ee.CONTAIN||i.value===Ee.COVER)){if(mn(s)){var l=e.width/e.height;return l<s!=(i.value===Ee.COVER)?[e.width,e.width/s]:[e.height*s,e.height]}return[e.width,e.height]}var d=mn(t),h=mn(n),u=d||h;if(He(i)&&(!o||He(o))){if(d&&h)return[t,n];if(!a&&!u)return[e.width,e.height];if(u&&a){var f=d?t:n*s,B=h?n:t/s;return[f,B]}var w=d?t:e.width,v=h?n:e.height;return[w,v]}if(a){var m=0,F=0;return z(i)?m=N(i,e.width):z(o)&&(F=N(o,e.height)),He(i)?m=F*s:(!o||He(o))&&(F=m/s),[m,F]}var E=null,I=null;if(z(i)?E=N(i,e.width):o&&z(o)&&(I=N(o,e.height)),E!==null&&(!o||He(o))&&(I=d&&h?E/t*n:e.height),I!==null&&He(i)&&(E=d&&h?I/n*t:e.width),E!==null&&I!==null)return[E,I];throw new Error("Unable to calculate background-size for element")},Le=function(r,A){var e=r[A];return typeof e>"u"?r[0]:e},Dw=function(r,A,e,t,n){var s=A[0],i=A[1],o=e[0],a=e[1];switch(r){case 2:return[new S(Math.round(t.left),Math.round(t.top+i)),new S(Math.round(t.left+t.width),Math.round(t.top+i)),new S(Math.round(t.left+t.width),Math.round(a+t.top+i)),new S(Math.round(t.left),Math.round(a+t.top+i))];case 3:return[new S(Math.round(t.left+s),Math.round(t.top)),new S(Math.round(t.left+s+o),Math.round(t.top)),new S(Math.round(t.left+s+o),Math.round(t.height+t.top)),new S(Math.round(t.left+s),Math.round(t.height+t.top))];case 1:return[new S(Math.round(t.left+s),Math.round(t.top+i)),new S(Math.round(t.left+s+o),Math.round(t.top+i)),new S(Math.round(t.left+s+o),Math.round(t.top+i+a)),new S(Math.round(t.left+s),Math.round(t.top+i+a))];default:return[new S(Math.round(n.left),Math.round(n.top)),new S(Math.round(n.left+n.width),Math.round(n.top)),new S(Math.round(n.left+n.width),Math.round(n.height+n.top)),new S(Math.round(n.left),Math.round(n.height+n.top))]}},Rw="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",td="Hidden Text",xw=function(){function r(A){this._data={},this._document=A}return r.prototype.parseMetrics=function(A,e){var t=this._document.createElement("div"),n=this._document.createElement("img"),s=this._document.createElement("span"),i=this._document.body;t.style.visibility="hidden",t.style.fontFamily=A,t.style.fontSize=e,t.style.margin="0",t.style.padding="0",t.style.whiteSpace="nowrap",i.appendChild(t),n.src=Rw,n.width=1,n.height=1,n.style.margin="0",n.style.padding="0",n.style.verticalAlign="baseline",s.style.fontFamily=A,s.style.fontSize=e,s.style.margin="0",s.style.padding="0",s.appendChild(this._document.createTextNode(td)),t.appendChild(s),t.appendChild(n);var o=n.offsetTop-s.offsetTop+2;t.removeChild(s),t.appendChild(this._document.createTextNode(td)),t.style.lineHeight="normal",n.style.verticalAlign="super";var a=n.offsetTop-t.offsetTop+2;return i.removeChild(t),{baseline:o,middle:a}},r.prototype.getMetrics=function(A,e){var t=A+" "+e;return typeof this._data[t]>"u"&&(this._data[t]=this.parseMetrics(A,e)),this._data[t]},r}(),rd=function(){function r(A,e){this.context=A,this.options=e}return r}(),Pw=1e4,Kw=function(r){mA(A,r);function A(e,t){var n=r.call(this,e,t)||this;return n._activeEffects=[],n.canvas=t.canvas?t.canvas:document.createElement("canvas"),n.ctx=n.canvas.getContext("2d"),t.canvas||(n.canvas.width=Math.floor(t.width*t.scale),n.canvas.height=Math.floor(t.height*t.scale),n.canvas.style.width=t.width+"px",n.canvas.style.height=t.height+"px"),n.fontMetrics=new xw(document),n.ctx.scale(n.options.scale,n.options.scale),n.ctx.translate(-t.x,-t.y),n.ctx.textBaseline="bottom",n._activeEffects=[],n.context.logger.debug("Canvas renderer initialized ("+t.width+"x"+t.height+") with scale "+t.scale),n}return A.prototype.applyEffects=function(e){for(var t=this;this._activeEffects.length;)this.popEffect();e.forEach(function(n){return t.applyEffect(n)})},A.prototype.applyEffect=function(e){this.ctx.save(),Ew(e)&&(this.ctx.globalAlpha=e.opacity),Uw(e)&&(this.ctx.translate(e.offsetX,e.offsetY),this.ctx.transform(e.matrix[0],e.matrix[1],e.matrix[2],e.matrix[3],e.matrix[4],e.matrix[5]),this.ctx.translate(-e.offsetX,-e.offsetY)),Yc(e)&&(this.path(e.path),this.ctx.clip()),this._activeEffects.push(e)},A.prototype.popEffect=function(){this._activeEffects.pop(),this.ctx.restore()},A.prototype.renderStack=function(e){return uA(this,void 0,void 0,function(){var t;return sA(this,function(n){switch(n.label){case 0:return t=e.element.container.styles,t.isVisible()?[4,this.renderStackContent(e)]:[3,2];case 1:n.sent(),n.label=2;case 2:return[2]}})})},A.prototype.renderNode=function(e){return uA(this,void 0,void 0,function(){return sA(this,function(t){switch(t.label){case 0:if(Z(e.container.flags,16))debugger;return e.container.styles.isVisible()?[4,this.renderNodeBackgroundAndBorders(e)]:[3,3];case 1:return t.sent(),[4,this.renderNodeContent(e)];case 2:t.sent(),t.label=3;case 3:return[2]}})})},A.prototype.renderTextWithLetterSpacing=function(e,t,n){var s=this;if(t===0)this.ctx.fillText(e.text,e.bounds.left,e.bounds.top+n);else{var i=_s(e.text);i.reduce(function(o,a){return s.ctx.fillText(a,o,e.bounds.top+n),o+s.ctx.measureText(a).width},e.bounds.left)}},A.prototype.createFontStyle=function(e){var t=e.fontVariant.filter(function(i){return i==="normal"||i==="small-caps"}).join(""),n=Vw(e.fontFamily).join(", "),s=st(e.fontSize)?""+e.fontSize.number+e.fontSize.unit:e.fontSize.number+"px";return[[e.fontStyle,t,e.fontWeight,s,n].join(" "),n,s]},A.prototype.renderTextNode=function(e,t){return uA(this,void 0,void 0,function(){var n,s,i,o,a,l,d,h,u=this;return sA(this,function(f){return n=this.createFontStyle(t),s=n[0],i=n[1],o=n[2],this.ctx.font=s,this.ctx.direction=t.direction===1?"rtl":"ltr",this.ctx.textAlign="left",this.ctx.textBaseline="alphabetic",a=this.fontMetrics.getMetrics(i,o),l=a.baseline,d=a.middle,h=t.paintOrder,e.textBounds.forEach(function(B){h.forEach(function(w){switch(w){case 0:u.ctx.fillStyle=j(t.color),u.renderTextWithLetterSpacing(B,t.letterSpacing,l);var v=t.textShadow;v.length&&B.text.trim().length&&(v.slice(0).reverse().forEach(function(m){u.ctx.shadowColor=j(m.color),u.ctx.shadowOffsetX=m.offsetX.number*u.options.scale,u.ctx.shadowOffsetY=m.offsetY.number*u.options.scale,u.ctx.shadowBlur=m.blur.number,u.renderTextWithLetterSpacing(B,t.letterSpacing,l)}),u.ctx.shadowColor="",u.ctx.shadowOffsetX=0,u.ctx.shadowOffsetY=0,u.ctx.shadowBlur=0),t.textDecorationLine.length&&(u.ctx.fillStyle=j(t.textDecorationColor||t.color),t.textDecorationLine.forEach(function(m){switch(m){case 1:u.ctx.fillRect(B.bounds.left,Math.round(B.bounds.top+l),B.bounds.width,1);break;case 2:u.ctx.fillRect(B.bounds.left,Math.round(B.bounds.top),B.bounds.width,1);break;case 3:u.ctx.fillRect(B.bounds.left,Math.ceil(B.bounds.top+d),B.bounds.width,1);break}}));break;case 1:t.webkitTextStrokeWidth&&B.text.trim().length&&(u.ctx.strokeStyle=j(t.webkitTextStrokeColor),u.ctx.lineWidth=t.webkitTextStrokeWidth,u.ctx.lineJoin=window.chrome?"miter":"round",u.ctx.strokeText(B.text,B.bounds.left,B.bounds.top+l)),u.ctx.strokeStyle="",u.ctx.lineWidth=0,u.ctx.lineJoin="miter";break}})}),[2]})})},A.prototype.renderReplacedElement=function(e,t,n){if(n&&e.intrinsicWidth>0&&e.intrinsicHeight>0){var s=vn(e),i=wn(t);this.path(i),this.ctx.save(),this.ctx.clip(),this.ctx.drawImage(n,0,0,e.intrinsicWidth,e.intrinsicHeight,s.left,s.top,s.width,s.height),this.ctx.restore()}},A.prototype.renderNodeContent=function(e){return uA(this,void 0,void 0,function(){var t,n,s,i,o,a,F,F,l,d,h,u,I,f,B,y,w,v,m,F,E,I,y;return sA(this,function(U){switch(U.label){case 0:this.applyEffects(e.getEffects(4)),t=e.container,n=e.curves,s=t.styles,i=0,o=t.textNodes,U.label=1;case 1:return i<o.length?(a=o[i],[4,this.renderTextNode(a,s)]):[3,4];case 2:U.sent(),U.label=3;case 3:return i++,[3,1];case 4:if(!(t instanceof mc))return[3,8];U.label=5;case 5:return U.trys.push([5,7,,8]),[4,this.context.cache.match(t.src)];case 6:return F=U.sent(),this.renderReplacedElement(t,n,F),[3,8];case 7:return U.sent(),this.context.logger.error("Error loading image "+t.src),[3,8];case 8:if(t instanceof Fc&&this.renderReplacedElement(t,n,t.canvas),!(t instanceof Qc))return[3,12];U.label=9;case 9:return U.trys.push([9,11,,12]),[4,this.context.cache.match(t.svg)];case 10:return F=U.sent(),this.renderReplacedElement(t,n,F),[3,12];case 11:return U.sent(),this.context.logger.error("Error loading svg "+t.svg.substring(0,255)),[3,12];case 12:return t instanceof Ic&&t.tree?(l=new A(this.context,{scale:this.options.scale,backgroundColor:t.backgroundColor,x:0,y:0,width:t.width,height:t.height}),[4,l.render(t.tree)]):[3,14];case 13:d=U.sent(),t.width&&t.height&&this.ctx.drawImage(d,0,0,t.width,t.height,t.bounds.left,t.bounds.top,t.bounds.width,t.bounds.height),U.label=14;case 14:if(t instanceof Os&&(h=Math.min(t.bounds.width,t.bounds.height),t.type===ln?t.checked&&(this.ctx.save(),this.path([new S(t.bounds.left+h*.39363,t.bounds.top+h*.79),new S(t.bounds.left+h*.16,t.bounds.top+h*.5549),new S(t.bounds.left+h*.27347,t.bounds.top+h*.44071),new S(t.bounds.left+h*.39694,t.bounds.top+h*.5649),new S(t.bounds.left+h*.72983,t.bounds.top+h*.23),new S(t.bounds.left+h*.84,t.bounds.top+h*.34085),new S(t.bounds.left+h*.39363,t.bounds.top+h*.79)]),this.ctx.fillStyle=j(Ec),this.ctx.fill(),this.ctx.restore()):t.type===cn&&t.checked&&(this.ctx.save(),this.ctx.beginPath(),this.ctx.arc(t.bounds.left+h/2,t.bounds.top+h/2,h/4,0,Math.PI*2,!0),this.ctx.fillStyle=j(Ec),this.ctx.fill(),this.ctx.restore())),Gw(t)&&t.value.length){switch(u=this.createFontStyle(s),I=u[0],f=u[1],B=this.fontMetrics.getMetrics(I,f).baseline,this.ctx.font=I,this.ctx.fillStyle=j(s.color),this.ctx.textBaseline="alphabetic",this.ctx.textAlign=Nw(t.styles.textAlign),y=vn(t),w=0,t.styles.textAlign){case 1:w+=y.width/2;break;case 2:w+=y.width;break}v=y.add(w,0,0,-y.height/2+1),this.ctx.save(),this.path([new S(y.left,y.top),new S(y.left+y.width,y.top),new S(y.left+y.width,y.top+y.height),new S(y.left,y.top+y.height)]),this.ctx.clip(),this.renderTextWithLetterSpacing(new ct(t.value,v),s.letterSpacing,B),this.ctx.restore(),this.ctx.textBaseline="alphabetic",this.ctx.textAlign="left"}if(!Z(t.styles.display,2048))return[3,20];if(t.styles.listStyleImage===null)return[3,19];if(m=t.styles.listStyleImage,m.type!==0)return[3,18];F=void 0,E=m.url,U.label=15;case 15:return U.trys.push([15,17,,18]),[4,this.context.cache.match(E)];case 16:return F=U.sent(),this.ctx.drawImage(F,t.bounds.left-(F.width+10),t.bounds.top),[3,18];case 17:return U.sent(),this.context.logger.error("Error loading list-style-image "+E),[3,18];case 18:return[3,20];case 19:e.listValue&&t.styles.listStyleType!==-1&&(I=this.createFontStyle(s)[0],this.ctx.font=I,this.ctx.fillStyle=j(s.color),this.ctx.textBaseline="middle",this.ctx.textAlign="right",y=new bA(t.bounds.left,t.bounds.top+N(t.styles.paddingTop,t.bounds.width),t.bounds.width,tc(s.lineHeight,s.fontSize.number)/2+1),this.renderTextWithLetterSpacing(new ct(e.listValue,y),s.letterSpacing,tc(s.lineHeight,s.fontSize.number)/2+2),this.ctx.textBaseline="bottom",this.ctx.textAlign="left"),U.label=20;case 20:return[2]}})})},A.prototype.renderStackContent=function(e){return uA(this,void 0,void 0,function(){var t,n,m,s,i,m,o,a,m,l,d,m,h,u,m,f,B,m,w,v,m;return sA(this,function(F){switch(F.label){case 0:if(Z(e.element.container.flags,16))debugger;return[4,this.renderNodeBackgroundAndBorders(e.element)];case 1:F.sent(),t=0,n=e.negativeZIndex,F.label=2;case 2:return t<n.length?(m=n[t],[4,this.renderStack(m)]):[3,5];case 3:F.sent(),F.label=4;case 4:return t++,[3,2];case 5:return[4,this.renderNodeContent(e.element)];case 6:F.sent(),s=0,i=e.nonInlineLevel,F.label=7;case 7:return s<i.length?(m=i[s],[4,this.renderNode(m)]):[3,10];case 8:F.sent(),F.label=9;case 9:return s++,[3,7];case 10:o=0,a=e.nonPositionedFloats,F.label=11;case 11:return o<a.length?(m=a[o],[4,this.renderStack(m)]):[3,14];case 12:F.sent(),F.label=13;case 13:return o++,[3,11];case 14:l=0,d=e.nonPositionedInlineLevel,F.label=15;case 15:return l<d.length?(m=d[l],[4,this.renderStack(m)]):[3,18];case 16:F.sent(),F.label=17;case 17:return l++,[3,15];case 18:h=0,u=e.inlineLevel,F.label=19;case 19:return h<u.length?(m=u[h],[4,this.renderNode(m)]):[3,22];case 20:F.sent(),F.label=21;case 21:return h++,[3,19];case 22:f=0,B=e.zeroOrAutoZIndexOrTransformedOrOpacity,F.label=23;case 23:return f<B.length?(m=B[f],[4,this.renderStack(m)]):[3,26];case 24:F.sent(),F.label=25;case 25:return f++,[3,23];case 26:w=0,v=e.positiveZIndex,F.label=27;case 27:return w<v.length?(m=v[w],[4,this.renderStack(m)]):[3,30];case 28:F.sent(),F.label=29;case 29:return w++,[3,27];case 30:return[2]}})})},A.prototype.mask=function(e){this.ctx.beginPath(),this.ctx.moveTo(0,0),this.ctx.lineTo(this.canvas.width,0),this.ctx.lineTo(this.canvas.width,this.canvas.height),this.ctx.lineTo(0,this.canvas.height),this.ctx.lineTo(0,0),this.formatPath(e.slice(0).reverse()),this.ctx.closePath()},A.prototype.path=function(e){this.ctx.beginPath(),this.formatPath(e),this.ctx.closePath()},A.prototype.formatPath=function(e){var t=this;e.forEach(function(n,s){var i=pA(n)?n.start:n;s===0?t.ctx.moveTo(i.x,i.y):t.ctx.lineTo(i.x,i.y),pA(n)&&t.ctx.bezierCurveTo(n.startControl.x,n.startControl.y,n.endControl.x,n.endControl.y,n.end.x,n.end.y)})},A.prototype.renderRepeat=function(e,t,n,s){this.path(e),this.ctx.fillStyle=t,this.ctx.translate(n,s),this.ctx.fill(),this.ctx.translate(-n,-s)},A.prototype.resizeImage=function(e,t,n){var s;if(e.width===t&&e.height===n)return e;var i=(s=this.canvas.ownerDocument)!==null&&s!==void 0?s:document,o=i.createElement("canvas");o.width=Math.max(1,t),o.height=Math.max(1,n);var a=o.getContext("2d");return a.drawImage(e,0,0,e.width,e.height,0,0,t,n),o},A.prototype.renderBackgroundImage=function(e){return uA(this,void 0,void 0,function(){var t,n,s,i,o,a;return sA(this,function(l){switch(l.label){case 0:t=e.styles.backgroundImage.length-1,n=function(d){var h,u,f,O,aA,gA,G,q,R,B,O,aA,gA,G,q,w,v,m,F,E,I,y,U,D,R,M,O,oA,Y,G,q,SA,aA,gA,de,IA,zA,ue,he,xA,ge,PA;return sA(this,function(Ke){switch(Ke.label){case 0:if(d.type!==0)return[3,5];h=void 0,u=d.url,Ke.label=1;case 1:return Ke.trys.push([1,3,,4]),[4,s.context.cache.match(u)];case 2:return h=Ke.sent(),[3,4];case 3:return Ke.sent(),s.context.logger.error("Error loading background-image "+u),[3,4];case 4:return h&&(f=ei(e,t,[h.width,h.height,h.width/h.height]),O=f[0],aA=f[1],gA=f[2],G=f[3],q=f[4],R=s.ctx.createPattern(s.resizeImage(h,G,q),"repeat"),s.renderRepeat(O,R,aA,gA)),[3,6];case 5:Qg(d)?(B=ei(e,t,[null,null,null]),O=B[0],aA=B[1],gA=B[2],G=B[3],q=B[4],w=pg(d.angle,G,q),v=w[0],m=w[1],F=w[2],E=w[3],I=w[4],y=document.createElement("canvas"),y.width=G,y.height=q,U=y.getContext("2d"),D=U.createLinearGradient(m,E,F,I),Wl(d.stops,v).forEach(function(vr){return D.addColorStop(vr.stop,j(vr.color))}),U.fillStyle=D,U.fillRect(0,0,G,q),G>0&&q>0&&(R=s.ctx.createPattern(y,"repeat"),s.renderRepeat(O,R,aA,gA))):Ug(d)&&(M=ei(e,t,[null,null,null]),O=M[0],oA=M[1],Y=M[2],G=M[3],q=M[4],SA=d.position.length===0?[Ss]:d.position,aA=N(SA[0],G),gA=N(SA[SA.length-1],q),de=Cg(d,aA,gA,G,q),IA=de[0],zA=de[1],IA>0&&zA>0&&(ue=s.ctx.createRadialGradient(oA+aA,Y+gA,0,oA+aA,Y+gA,IA),Wl(d.stops,IA*2).forEach(function(vr){return ue.addColorStop(vr.stop,j(vr.color))}),s.path(O),s.ctx.fillStyle=ue,IA!==zA?(he=e.bounds.left+.5*e.bounds.width,xA=e.bounds.top+.5*e.bounds.height,ge=zA/IA,PA=1/ge,s.ctx.save(),s.ctx.translate(he,xA),s.ctx.transform(1,0,0,ge,0,0),s.ctx.translate(-he,-xA),s.ctx.fillRect(oA,PA*(Y-xA)+xA,G,q*PA),s.ctx.restore()):s.ctx.fill())),Ke.label=6;case 6:return t--,[2]}})},s=this,i=0,o=e.styles.backgroundImage.slice(0).reverse(),l.label=1;case 1:return i<o.length?(a=o[i],[5,n(a)]):[3,4];case 2:l.sent(),l.label=3;case 3:return i++,[3,1];case 4:return[2]}})})},A.prototype.renderSolidBorder=function(e,t,n){return uA(this,void 0,void 0,function(){return sA(this,function(s){return this.path(Ad(n,t)),this.ctx.fillStyle=j(e),this.ctx.fill(),[2]})})},A.prototype.renderDoubleBorder=function(e,t,n,s){return uA(this,void 0,void 0,function(){var i,o;return sA(this,function(a){switch(a.label){case 0:return t<3?[4,this.renderSolidBorder(e,n,s)]:[3,2];case 1:return a.sent(),[2];case 2:return i=Iw(s,n),this.path(i),this.ctx.fillStyle=j(e),this.ctx.fill(),o=Tw(s,n),this.path(o),this.ctx.fill(),[2]}})})},A.prototype.renderNodeBackgroundAndBorders=function(e){return uA(this,void 0,void 0,function(){var t,n,s,i,o,a,l,d,h=this;return sA(this,function(u){switch(u.label){case 0:return this.applyEffects(e.getEffects(2)),t=e.container.styles,n=!OA(t.backgroundColor)||t.backgroundImage.length,s=[{style:t.borderTopStyle,color:t.borderTopColor,width:t.borderTopWidth},{style:t.borderRightStyle,color:t.borderRightColor,width:t.borderRightWidth},{style:t.borderBottomStyle,color:t.borderBottomColor,width:t.borderBottomWidth},{style:t.borderLeftStyle,color:t.borderLeftColor,width:t.borderLeftWidth}],i=kw(Le(t.backgroundClip,0),e.curves),n||t.boxShadow.length?(this.ctx.save(),this.path(i),this.ctx.clip(),OA(t.backgroundColor)||(this.ctx.fillStyle=j(t.backgroundColor),this.ctx.fill()),[4,this.renderBackgroundImage(e.container)]):[3,2];case 1:u.sent(),this.ctx.restore(),t.boxShadow.slice(0).reverse().forEach(function(f){h.ctx.save();var B=fn(e.curves),w=f.inset?0:Pw,v=yw(B,-w+(f.inset?1:-1)*f.spread.number,(f.inset?1:-1)*f.spread.number,f.spread.number*(f.inset?-2:2),f.spread.number*(f.inset?-2:2));f.inset?(h.path(B),h.ctx.clip(),h.mask(v)):(h.mask(B),h.ctx.clip(),h.path(v)),h.ctx.shadowOffsetX=f.offsetX.number+w,h.ctx.shadowOffsetY=f.offsetY.number,h.ctx.shadowColor=j(f.color),h.ctx.shadowBlur=f.blur.number,h.ctx.fillStyle=f.inset?j(f.color):"rgba(0,0,0,1)",h.ctx.fill(),h.ctx.restore()}),u.label=2;case 2:o=0,a=0,l=s,u.label=3;case 3:return a<l.length?(d=l[a],d.style!==0&&!OA(d.color)&&d.width>0?d.style!==2?[3,5]:[4,this.renderDashedDottedBorder(d.color,d.width,o,e.curves,2)]:[3,11]):[3,13];case 4:return u.sent(),[3,11];case 5:return d.style!==3?[3,7]:[4,this.renderDashedDottedBorder(d.color,d.width,o,e.curves,3)];case 6:return u.sent(),[3,11];case 7:return d.style!==4?[3,9]:[4,this.renderDoubleBorder(d.color,d.width,o,e.curves)];case 8:return u.sent(),[3,11];case 9:return[4,this.renderSolidBorder(d.color,o,e.curves)];case 10:u.sent(),u.label=11;case 11:o++,u.label=12;case 12:return a++,[3,3];case 13:return[2]}})})},A.prototype.renderDashedDottedBorder=function(e,t,n,s,i){return uA(this,void 0,void 0,function(){var o,a,l,d,h,u,f,B,w,v,m,F,E,I,y,U,y,U;return sA(this,function(D){return this.ctx.save(),o=Hw(s,n),a=Ad(s,n),i===2&&(this.path(a),this.ctx.clip()),pA(a[0])?(l=a[0].start.x,d=a[0].start.y):(l=a[0].x,d=a[0].y),pA(a[1])?(h=a[1].end.x,u=a[1].end.y):(h=a[1].x,u=a[1].y),n===0||n===2?f=Math.abs(l-h):f=Math.abs(d-u),this.ctx.beginPath(),i===3?this.formatPath(o):this.formatPath(a.slice(0,2)),B=t<3?t*3:t*2,w=t<3?t*2:t,i===3&&(B=t,w=t),v=!0,f<=B*2?v=!1:f<=B*2+w?(m=f/(2*B+w),B*=m,w*=m):(F=Math.floor((f+w)/(B+w)),E=(f-F*B)/(F-1),I=(f-(F+1)*B)/F,w=I<=0||Math.abs(w-E)<Math.abs(w-I)?E:I),v&&(i===3?this.ctx.setLineDash([0,B+w]):this.ctx.setLineDash([B,w])),i===3?(this.ctx.lineCap="round",this.ctx.lineWidth=t):this.ctx.lineWidth=t*2+1.1,this.ctx.strokeStyle=j(e),this.ctx.stroke(),this.ctx.setLineDash([]),i===2&&(pA(a[0])&&(y=a[3],U=a[0],this.ctx.beginPath(),this.formatPath([new S(y.end.x,y.end.y),new S(U.start.x,U.start.y)]),this.ctx.stroke()),pA(a[1])&&(y=a[1],U=a[2],this.ctx.beginPath(),this.formatPath([new S(y.end.x,y.end.y),new S(U.start.x,U.start.y)]),this.ctx.stroke())),this.ctx.restore(),[2]})})},A.prototype.render=function(e){return uA(this,void 0,void 0,function(){var t;return sA(this,function(n){switch(n.label){case 0:return this.options.backgroundColor&&(this.ctx.fillStyle=j(this.options.backgroundColor),this.ctx.fillRect(this.options.x,this.options.y,this.options.width,this.options.height)),t=Sw(e),[4,this.renderStack(t)];case 1:return n.sent(),this.applyEffects([]),[2,this.canvas]}})})},A}(rd),Gw=function(r){return r instanceof Sc||r instanceof yc?!0:r instanceof Os&&r.type!==cn&&r.type!==ln},kw=function(r,A){switch(r){case 0:return fn(A);case 2:return mw(A);case 1:default:return wn(A)}},Nw=function(r){switch(r){case 1:return"center";case 2:return"right";case 0:default:return"left"}},_w=["-apple-system","system-ui"],Vw=function(r){return/iPhone OS 15_(0|1)/.test(window.navigator.userAgent)?r.filter(function(A){return _w.indexOf(A)===-1}):r},Ow=function(r){mA(A,r);function A(e,t){var n=r.call(this,e,t)||this;return n.canvas=t.canvas?t.canvas:document.createElement("canvas"),n.ctx=n.canvas.getContext("2d"),n.options=t,n.canvas.width=Math.floor(t.width*t.scale),n.canvas.height=Math.floor(t.height*t.scale),n.canvas.style.width=t.width+"px",n.canvas.style.height=t.height+"px",n.ctx.scale(n.options.scale,n.options.scale),n.ctx.translate(-t.x,-t.y),n.context.logger.debug("EXPERIMENTAL ForeignObject renderer initialized ("+t.width+"x"+t.height+" at "+t.x+","+t.y+") with scale "+t.scale),n}return A.prototype.render=function(e){return uA(this,void 0,void 0,function(){var t,n;return sA(this,function(s){switch(s.label){case 0:return t=Ns(this.options.width*this.options.scale,this.options.height*this.options.scale,this.options.scale,this.options.scale,e),[4,Ww(t)];case 1:return n=s.sent(),this.options.backgroundColor&&(this.ctx.fillStyle=j(this.options.backgroundColor),this.ctx.fillRect(0,0,this.options.width*this.options.scale,this.options.height*this.options.scale)),this.ctx.drawImage(n,-this.options.x*this.options.scale,-this.options.y*this.options.scale),[2,this.canvas]}})})},A}(rd),Ww=function(r){return new Promise(function(A,e){var t=new Image;t.onload=function(){A(t)},t.onerror=e,t.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(r))})},Xw=function(){function r(A){var e=A.id,t=A.enabled;this.id=e,this.enabled=t,this.start=Date.now()}return r.prototype.debug=function(){for(var A=[],e=0;e<arguments.length;e++)A[e]=arguments[e];this.enabled&&(typeof window<"u"&&window.console&&typeof console.debug=="function"?console.debug.apply(console,Ir([this.id,this.getTime()+"ms"],A)):this.info.apply(this,A))},r.prototype.getTime=function(){return Date.now()-this.start},r.prototype.info=function(){for(var A=[],e=0;e<arguments.length;e++)A[e]=arguments[e];this.enabled&&typeof window<"u"&&window.console&&typeof console.info=="function"&&console.info.apply(console,Ir([this.id,this.getTime()+"ms"],A))},r.prototype.warn=function(){for(var A=[],e=0;e<arguments.length;e++)A[e]=arguments[e];this.enabled&&(typeof window<"u"&&window.console&&typeof console.warn=="function"?console.warn.apply(console,Ir([this.id,this.getTime()+"ms"],A)):this.info.apply(this,A))},r.prototype.error=function(){for(var A=[],e=0;e<arguments.length;e++)A[e]=arguments[e];this.enabled&&(typeof window<"u"&&window.console&&typeof console.error=="function"?console.error.apply(console,Ir([this.id,this.getTime()+"ms"],A)):this.info.apply(this,A))},r.instances={},r}(),Jw=function(){function r(A,e){var t;this.windowBounds=e,this.instanceName="#"+r.instanceCount++,this.logger=new Xw({id:this.instanceName,enabled:A.logging}),this.cache=(t=A.cache)!==null&&t!==void 0?t:new hw(this,A)}return r.instanceCount=1,r}(),zw=function(r,A){return A===void 0&&(A={}),Yw(r,A)};typeof window<"u"&&zc.setContext(window);var Yw=function(r,A){return uA(void 0,void 0,void 0,function(){var e,t,n,s,i,o,a,l,d,h,u,f,B,w,v,m,F,E,I,y,D,U,D,R,M,O,oA,Y,G,q,SA,aA,gA,de,IA,zA,ue,he,xA,ge;return sA(this,function(PA){switch(PA.label){case 0:if(!r||typeof r!="object")return[2,Promise.reject("Invalid element provided as first argument")];if(e=r.ownerDocument,!e)throw new Error("Element is not attached to a Document");if(t=e.defaultView,!t)throw new Error("Document is not attached to a Window");return n={allowTaint:(R=A.allowTaint)!==null&&R!==void 0?R:!1,imageTimeout:(M=A.imageTimeout)!==null&&M!==void 0?M:15e3,proxy:A.proxy,useCORS:(O=A.useCORS)!==null&&O!==void 0?O:!1},s=is({logging:(oA=A.logging)!==null&&oA!==void 0?oA:!0,cache:A.cache},n),i={windowWidth:(Y=A.windowWidth)!==null&&Y!==void 0?Y:t.innerWidth,windowHeight:(G=A.windowHeight)!==null&&G!==void 0?G:t.innerHeight,scrollX:(q=A.scrollX)!==null&&q!==void 0?q:t.pageXOffset,scrollY:(SA=A.scrollY)!==null&&SA!==void 0?SA:t.pageYOffset},o=new bA(i.scrollX,i.scrollY,i.windowWidth,i.windowHeight),a=new Jw(s,o),l=(aA=A.foreignObjectRendering)!==null&&aA!==void 0?aA:!1,d={allowTaint:(gA=A.allowTaint)!==null&&gA!==void 0?gA:!1,onclone:A.onclone,ignoreElements:A.ignoreElements,inlineImages:l,copyStyles:l},a.logger.debug("Starting document clone with size "+o.width+"x"+o.height+" scrolled to "+-o.left+","+-o.top),h=new Xc(a,r,d),u=h.clonedReferenceElement,u?[4,h.toIFrame(e,o)]:[2,Promise.reject("Unable to find element in cloned iframe")];case 1:return f=PA.sent(),B=Xs(u)||$f(u)?Eu(u.ownerDocument):Tr(a,u),w=B.width,v=B.height,m=B.left,F=B.top,E=$w(a,u,A.backgroundColor),I={canvas:A.canvas,backgroundColor:E,scale:(IA=(de=A.scale)!==null&&de!==void 0?de:t.devicePixelRatio)!==null&&IA!==void 0?IA:1,x:((zA=A.x)!==null&&zA!==void 0?zA:0)+m,y:((ue=A.y)!==null&&ue!==void 0?ue:0)+F,width:(he=A.width)!==null&&he!==void 0?he:Math.ceil(w),height:(xA=A.height)!==null&&xA!==void 0?xA:Math.ceil(v)},l?(a.logger.debug("Document cloned, using foreign object rendering"),D=new Ow(a,I),[4,D.render(u)]):[3,3];case 2:return y=PA.sent(),[3,5];case 3:return a.logger.debug("Document cloned, element located at "+m+","+F+" with size "+w+"x"+v+" using computed rendering"),a.logger.debug("Starting DOM parsing"),U=Hc(a,u),E===U.styles.backgroundColor&&(U.styles.backgroundColor=DA.TRANSPARENT),a.logger.debug("Starting renderer for element at "+I.x+","+I.y+" with size "+I.width+"x"+I.height),D=new Kw(a,I),[4,D.render(U)];case 4:y=PA.sent(),PA.label=5;case 5:return(!((ge=A.removeContainer)!==null&&ge!==void 0)||ge)&&(Xc.destroy(f)||a.logger.error("Cannot detach cloned iframe as it is not in the DOM anymore")),a.logger.debug("Finished rendering"),[2,y]}})})},$w=function(r,A,e){var t=A.ownerDocument,n=t.documentElement?ot(r,getComputedStyle(t.documentElement).backgroundColor):DA.TRANSPARENT,s=t.body?ot(r,getComputedStyle(t.body).backgroundColor):DA.TRANSPARENT,i=typeof e=="string"?ot(r,e):e===null?DA.TRANSPARENT:4294967295;return A===t.documentElement?OA(n)?OA(s)?i:s:n:i};const Dt=class Dt extends c.EngineObject{constructor(A,e){super(A,e),this.ad(new c.ObjResettingWithEvent(A.renderInUEChanged,()=>A.renderInUE?new sd(A,e):new nd(A,e)))}};p(Dt,"type",Dt.register("ESUeViewer",c.ESGeoDiv.type,Dt));let ti=Dt;class nd extends c.Destroyable{constructor(e,t){super();p(this,"_screenPosition",this.disposeVar(c.reactArrayWithUndefined(void 0)));const n=t.viewer;if(!n){console.warn("viewer is undefined!");return}const s=this.disposeVar(new c.ESTextLabel);s.parentID=e.id,this.ad(e.components.disposableAdd(s,!0)),s.show=!1,this.dispose(c.bind([s,"position"],[e,"position"])),this.dispose(c.bind([s,"rotation"],[e,"rotation"])),this.dispose(c.bind([s,"flyToParam"],[e,"flyToParam"])),this.dispose(c.bind([s,"flyInParam"],[e,"flyInParam"])),this.dispose(e.calcFlyToParamEvent.disposableOn(()=>{YA(n,s.id)})),this.dispose(e.calcFlyInParamEvent.disposableOn(async()=>{if(!t.actived)return;const a=await t.getCurrentCameraInfo();if(!a)return;const{position:l,rotation:d}=a;e.flyInParam={position:l,rotation:d,flyDuration:1}})),this.dispose(e.smoothMoveEvent.disposableOn((a,l)=>{Ve(n,s.id,a,l)})),this.dispose(e.smoothMoveWithRotationEvent.disposableOn((a,l,d)=>{ke(n,s.id,a,l,d)})),this.dispose(e.smoothMoveOnGroundEvent.disposableOn((a,l,d,h)=>{Ne(n,s.id,a,l,h,d)})),this.dispose(e.smoothMoveWithRotationOnGroundEvent.disposableOn((a,l,d,h,u)=>{_e(n,s.id,a,l,d,h,u)})),this.dispose(e.flyToEvent.disposableOn((a,l)=>{s.flyTo(a)})),this.dispose(e.flyInEvent.don(a=>{s.flyIn(a)}));const i=this._screenPosition,o=this.disposeVar(new c.ESCustomDiv);o.parentID=e.id,t.add(o),this.dispose(()=>t.delete(o)),this.dispose(c.bind([o,"allowPicking"],[e,"allowPicking"]));{const a=this.disposeVar(c.createAnimateFrame()),l=()=>{e.show?a.restart(void 0,async()=>{if(!e.position)return;const d=await t.lonLatAltToScreenPosition(e.position);if(!this.isDestroyed())if(!d)this._screenPosition.value=void 0;else{const[h,u]=d;h===-1&&u===-1?this._screenPosition.value=void 0:this._screenPosition.value=[h,u]}}):a.cancel()};l(),this.dispose(e.showChanged.disposableOn(l))}{const a=()=>class extends c.Destroyable{constructor(u,f,B){if(super(),this._subContainer=u,!B)return;if(!e.instanceClass)throw new Error("!sceneObject.instanceClass");const w=new c.PosFloatDiv,v=w.element;this._subContainer.appendChild(v),this.dispose(()=>this._subContainer.removeChild(v)),v.onclick=m=>{(e.allowPicking??!1)&&e.pickedEvent.emit(new c.ESJPickedResult({div:v,pointerEvent:m},e,void 0,void 0,void 0,[m.x,m.y]))};{const m=()=>{e.editing?v.children[0].style.pointerEvents="none":v.children[0].style.pointerEvents="all"};m(),this.d(e.editingChanged.don(m))}{const m=()=>{let E=e.show;if(!E)w.show=E,w.winPos=[0,0];else if(i.value){const I=t.getCurrentCameraInfo(),y=c.getDistancesFromPositions([e.position,I.position],"NONE")[0];e.minVisibleDistance<e.maxVisibleDistance?E=e.minVisibleDistance<y&&y<e.maxVisibleDistance:e.maxVisibleDistance==0&&(E=y>e.minVisibleDistance),w.show=E,w.winPos=[...i.value]}};m();const F=this.disposeVar(c.createNextAnimateFrameEvent(e.showChanged,i.changed,t.cameraChanged,e.maxVisibleDistanceChanged,e.minVisibleDistanceChanged));this.dispose(F.disposableOn(m))}{const m=()=>{const[F,E]=e.anchor??c.ESGeoDiv.defaults.anchor;w.originRatioX=F,w.originRatioY=E};m(),this.dispose(e.anchorChanged.disposableOn(m))}{const m=()=>{w.opacity=e.opacity??c.ESGeoDiv.defaults.opacity};m(),this.dispose(e.opacityChanged.disposableOn(m))}this.disposeVar(new e.instanceClass(w.contentDiv,e,B))}},l=()=>{try{e.instanceClass?o.instanceClass=a():o.instanceClass=void 0}catch(h){console.error(h)}};l();const d=this.dv(c.createNextAnimateFrameEvent(e.instanceClassChanged,e.opacityChanged,e.anchorChanged,e.editingChanged,e.showChanged,e.allowPickingChanged));this.d(d.don(l))}}get screenPosition(){return this._screenPosition.value}get screenPositionChanged(){return this._screenPosition.changed}set screenPosition(e){this._screenPosition.value=e}}class sd extends c.Destroyable{constructor(e,t){super();p(this,"_imageLabel");p(this,"_hasClassDivAndPos",{});this._imageLabel=this.dv(new c.ESImageLabel),this._imageLabel.isHoverZoom=!1,this._imageLabel.parentID=e.id;const n=t.viewer;if(!n){console.warn("viewer is undefined!");return}const s=this._imageLabel;this.ad(e.components.disposableAdd(s,!0));{const i=()=>{if(!n)return;if(!e.instanceClass)throw new Error("!sceneObject.instanceClass");const l=document.createElement("div"),d=this.dv(new e.instanceClass(l,e,t))._container;if(d.style.opacity=e.opacity.toString()??c.ESGeoDiv.defaults.opacity,d.style.position="fixed",d.style.zIndex="-1",d.style.top="0px",!document.body.contains(d)){document.body.appendChild(d);let u=d?d.querySelectorAll("*[class]"):[];for(let f=0;f<u.length;f++){const B=u[f];var h=B.getBoundingClientRect();this._hasClassDivAndPos[B.className]=[B.offsetLeft,B.offsetTop,B.offsetLeft+h.width,B.offsetTop+h.height]}}zw(d,{backgroundColor:null,allowTaint:!0,useCORS:!0,width:d.offsetWidth,height:d.offsetHeight,scale:1}).then(u=>{document.body.contains(d)&&document.body.removeChild(d),s.url=u.toDataURL(),s.show=e.show}).catch(()=>{document.body.contains(d)&&document.body.removeChild(d)})},o=()=>{try{e.instanceClass?i():(s.url="",s.show=!1)}catch(l){console.error(l)}};o();const a=this.dv(c.createNextAnimateFrameEvent(e.instanceClassChanged,e.opacityChanged));this.d(a.don(o))}{const i=()=>{s.show=e.show};s.show=!1,this.ad(e.showChanged.don(i))}this.d(c.track([s,"anchor"],[e,"anchor"])),this.d(c.bind([s,"position"],[e,"position"])),this.d(c.bind([s,"rotation"],[e,"rotation"])),this.d(c.bind([s,"flyToParam"],[e,"flyToParam"])),this.d(c.bind([s,"flyInParam"],[e,"flyInParam"])),this.d(c.bind([s,"allowPicking"],[e,"allowPicking"])),this.d(c.bind([s,"scale"],[e,"scale"])),this.d(c.track([s,"minVisibleDistance"],[e,"minVisibleDistance"])),this.d(c.track([s,"maxVisibleDistance"],[e,"maxVisibleDistance"])),this.ad(e.automaticLandingEvent.don(()=>{s.automaticLanding()})),this.d(t.widgetEvent.don(i=>{if(i.objId!==this._imageLabel.id)return;const{type:o,add:a}=i;if(o==="leftClick"&&a){const l=(a==null?void 0:a.classNames)??[],d=Object.keys(this._hasClassDivAndPos);for(let h=0;h<d.length;h++){const u=d[h];let f=this._hasClassDivAndPos[u];a&&a.mouseRelativePos&&a.mouseRelativePos[0]>=f[0]&&a.mouseRelativePos[0]<=f[2]&&a.mouseRelativePos[1]>=f[1]&&a.mouseRelativePos[1]<=f[3]&&l.push(u)}a.classNames=l}e.widgetEvent.emit({type:o,add:a})})),this.d(e.calcFlyToParamEvent.don(()=>{YA(n,s.id)})),this.d(e.calcFlyInParamEvent.don(()=>{const i=t.getCurrentCameraInfo();if(!i)return;const{position:o,rotation:a}=i;e.flyInParam={position:o,rotation:a,flyDuration:1}})),this.d(e.smoothMoveEvent.don((i,o)=>{Ve(n,s.id,i,o)})),this.d(e.smoothMoveWithRotationEvent.don((i,o,a)=>{ke(n,s.id,i,o,a)})),this.d(e.smoothMoveOnGroundEvent.don((i,o,a,l)=>{Ne(n,s.id,i,o,l,a)})),this.d(e.smoothMoveWithRotationOnGroundEvent.don((i,o,a,l,d)=>{_e(n,s.id,i,o,a,l,d)})),this.d(e.flyToEvent.don((i,o)=>{s.flyTo(i)})),this.d(e.flyInEvent.don(i=>{s.flyIn(i)}))}}const ie=class ie extends eA{constructor(A,e){super(A,e);const t=e.viewer;if(!t){console.warn("viewer is undefined!");return}this.d(A.flyToFeatureIndexEvent.don((n,s)=>{t.callUeFunc({f:"flyToFeatureIndex",p:{id:A.id,index:n,duration:s}})})),this.d(A.flyToFeatureEvent.don((n,s,i)=>{t.callUeFunc({f:"flyToFeature",p:{id:A.id,key:n,value:s,duration:i}})}))}};p(ie,"type",ie.register("ESUeViewer",c.ESGeoJson.type,ie)),p(ie,"forceUeUpdateProps",[...eA.forceUeUpdateProps,"url"]),p(ie,"propValFuncs",{...eA.propValFuncs,url:A=>typeof A=="string"?c.ESSceneObject.context.getStrFromEnv(A):A});let ri=ie;const Rt=class Rt extends nA{constructor(A,e){if(super(A,e),!e.viewer){console.warn("viewer is undefined!");return}}};p(Rt,"type",Rt.register("ESUeViewer",c.ESGeoLineString.type,Rt));let Fn=Rt;const xt=class xt extends nA{constructor(A,e){if(super(A,e),!e.viewer){console.warn("viewer is undefined!");return}}};p(xt,"type",xt.register("ESUeViewer",c.ESGeoRectangle.type,xt));let ni=xt;const Pt=class Pt extends dA{constructor(A,e){if(super(A,e),!e.viewer){console.warn("viewer is undefined!");return}}};p(Pt,"type",Pt.register("ESUeViewer",c.ESGeoWater.type,Pt));let si=Pt;const oe=class oe extends P{constructor(A,e){super(A,e);const t=e.viewer;if(!t){console.warn("viewer is undefined!");return}this.d(A.setNodePositionEvent.don((n,s)=>{io(t,A.id,n,s)})),this.d(A.setNodeRotationEvent.don((n,s)=>{oo(t,A.id,n,s)})),this.d(A.setNodeScaleEvent.don((n,s)=>{ao(t,A.id,n,s)}))}};p(oe,"forceUeUpdateProps",[...P.forceUeUpdateProps,"url"]),p(oe,"propValFuncs",{...P.propValFuncs,url:A=>typeof A=="string"?c.ESSceneObject.context.getStrFromEnv(c.rpToap(A)):(A.url=c.ESSceneObject.context.getStrFromEnv(c.rpToap(A.url)),A),czmMaximumScale:null,czmMinimumPixelSize:null,czmNativeScale:null,czmColor:null}),p(oe,"type",oe.register("ESUeViewer",c.ESGltfModel.type,oe));let ii=oe;const Kt=class Kt extends nA{constructor(A,e){if(super(A,e),!e.viewer){console.warn("viewer is undefined!");return}}};p(Kt,"type",Kt.register("ESUeViewer",c.ESHeightMeasurement.type,Kt));let oi=Kt;const Gt=class Gt extends P{constructor(A,e){if(super(A,e),!e.viewer){console.warn("viewer is undefined!");return}const n=async(i,o,a,l)=>{const{viewer:d}=i;if(!d){console.error("AIMoveTo: ueViewer.viewer is undefined");return}const h=await d.callUeFunc({f:"AIMoveTo",p:{id:o,Destination:a,Time:l}});return h.error&&console.error("AIMoveTo:",h.error),h};this.d(A.aiMoveToEvent.don((i,o)=>{n(e,A.id,i,o)}));const s=async(i,o)=>{const{viewer:a}=i;if(!a){console.error("StopAIMove: ueViewer.viewer is undefined");return}const l=await a.callUeFunc({f:"StopAIMove",p:{id:o}});return l.error&&console.error("StopAIMove:",l.error),l};this.d(A.stopAIMoveEvent.don(()=>{s(e,A.id)}))}};p(Gt,"type",Gt.register("ESUeViewer",c.ESHuman.type,Gt));let ai=Gt;const ae=class ae extends QA{constructor(A,e){if(super(A,e),!e.viewer){console.warn("viewer is undefined!");return}A.anchor=[.5,1]}};p(ae,"type",ae.register("ESUeViewer",c.ESImageLabel.type,ae)),p(ae,"forceUeUpdateProps",[...QA.forceUeUpdateProps,"url"]),p(ae,"propValFuncs",{...QA.propValFuncs,url:A=>typeof A=="string"?c.ESSceneObject.context.getStrFromEnv(c.rpToap(A)):(A.url=c.ESSceneObject.context.getStrFromEnv(c.rpToap(A.url)),A)});let li=ae;const kt=class kt extends P{constructor(A,e){if(super(A,e),!e.viewer){console.warn("viewer is undefined!");return}}};p(kt,"type",kt.register("ESUeViewer",c.ESLevelRuntimeModel.type,kt));let ci=kt;const Nt=class Nt extends Er{constructor(A,e){if(super(A,e),!e.viewer){console.warn("viewer is undefined!");return}}};p(Nt,"type",Nt.register("ESUeViewer",c.ESLocalCircle.type,Nt));let di=Nt;const _t=class _t extends eA{constructor(A,e){if(super(A,e),!e.viewer){console.warn("viewer is undefined!");return}}};p(_t,"type",_t.register("ESUeViewer",c.ESLocalPolygonZ.type,_t));let ui=_t;const Vt=class Vt extends Er{constructor(A,e){if(super(A,e),!e.viewer){console.warn("viewer is undefined!");return}}};p(Vt,"type",Vt.register("ESUeViewer",c.ESLocalRectangle.type,Vt));let hi=Vt;const Ot=class Ot extends P{constructor(A,e){if(super(A,e),!e.viewer){console.warn("viewer is undefined!");return}}};p(Ot,"type",Ot.register("ESUeViewer",c.ESLocalSkyBox.type,Ot));let gi=Ot;const Wt=class Wt extends P{constructor(A,e){if(super(A,e),!e.viewer){console.warn("viewer is undefined!");return}}};p(Wt,"type",Wt.register("ESUeViewer",c.ESLocationMeasurement.type,Wt));let Bi=Wt;const Xt=class Xt extends nA{constructor(A,e){if(super(A,e),!e.viewer){console.warn("viewer is undefined!");return}}};p(Xt,"type",Xt.register("ESUeViewer",c.ESPipeFence.type,Xt));let fi=Xt;const Jt=class Jt extends Fn{constructor(A,e){if(super(A,e),!e.viewer){console.warn("viewer is undefined!");return}}};p(Jt,"type",Jt.register("ESUeViewer",c.ESPipeline.type,Jt));let wi=Jt;const zt=class zt extends yr{constructor(A,e){super(A,e);const t=e.viewer;if(!t){console.warn("viewer is undefined!");return}this.d(A.highlightFeatureEvent.don(n=>{const s=typeof n=="number"?n.toString():n;to(t,A.id,s)})),this.d(A.highlightFeatureAndFlyToEvent.don((n,s,i,o)=>{const a=typeof n=="number"?n.toString():n;ro(t,A.id,a,o??1)})),this.d(A.setLayerVisibleEvent.don((n,s)=>{let i="";typeof s!="string"?i=JSON.stringify(s):i=s,no(t,A.id,i)})),this.d(A.setLayerColorEvent.don((n,s)=>{let i="";typeof s!="string"?i=JSON.stringify(s):i=s,so(t,A.id,i)}))}};p(zt,"type",zt.register("ESUeViewer",c.ESPipeserTileset.type,zt));let pi=zt;const Yt=class Yt extends dA{constructor(A,e){if(super(A,e),!e.viewer){console.warn("viewer is undefined!");return}}};p(Yt,"type",Yt.register("ESUeViewer",c.ESPit.type,Yt));let Ci=Yt;const $t=class $t extends QA{constructor(A,e){super(A,e);const t=e.viewer;if(!t){console.warn("viewer is undefined!");return}this.ad(A.getInitialStyleEvent.don(async()=>{try{const n=await t.callUeFunc({f:"GetInitialStyle",p:{id:A.id}});n.error!=""&&console.error("getInitialStyleEvent:",n.error),A.initialStyle.value=structuredClone(n.re)}catch(n){console.error("getInitialStyleEvent:",n),A.initialStyle.value=void 0}}))}};p($t,"type",$t.register("ESUeViewer",c.ESPoi2D.type,$t));let vi=$t;const Zt=class Zt extends P{constructor(A,e){if(super(A,e),!e.viewer){console.warn("viewer is undefined!");return}}};p(Zt,"type",Zt.register("ESUeViewer",c.ESPoi3D.type,Zt));let mi=Zt;const le=class le extends eA{constructor(A,e){if(super(A,e),!e.viewer){console.warn("viewer is undefined!");return}}};p(le,"type",le.register("ESUeViewer",c.ESPoiTileset.type,le)),p(le,"forceUeUpdateProps",[...eA.forceUeUpdateProps,"url"]),p(le,"propValFuncs",{...eA.propValFuncs,url:A=>typeof A=="string"?c.ESSceneObject.context.getStrFromEnv(A):(A.url=c.ESSceneObject.context.getStrFromEnv(A.url),A)});let Fi=le;const qt=class qt extends nA{constructor(A,e){if(super(A,e),!e.viewer){console.warn("viewer is undefined!");return}}};p(qt,"type",qt.register("ESUeViewer",c.ESPolygonFence.type,qt));let Qi=qt;const Re=class Re extends dA{constructor(A,e){if(super(A,e),!e.viewer){console.warn("viewer is undefined!");return}}};p(Re,"type",Re.register("ESUeViewer",c.ESPolygonFlattenedPlane.type,Re)),p(Re,"propValFuncs",{...dA.propValFuncs,targetID:A=>{if(!A)return"";const e=c.ESSceneObject.getSceneObject(A);return e?(e.components.main??e).id:A}});let Ui=Re;const jt=class jt extends dA{constructor(A,e){if(super(A,e),!e.viewer){console.warn("viewer is undefined!");return}}};p(jt,"type",jt.register("ESUeViewer",c.ESPolygonWithHole.type,jt));let Ei=jt;const Ar=class Ar extends qA{constructor(A,e){if(super(A,e),!e.viewer){console.warn("viewer is undefined!");return}this.d(()=>{A.ids=[]}),this.d(A.highlightInner3DtilesetEvent.don(n=>{n.highlight=!0})),this.d(A.removeHighlightInner3DtilesetEvent.don(n=>{n.highlight=!1}));{const n=o=>{o=o.toLocaleLowerCase();let a=[255,255,255,1];if(o.startsWith("#")){if(o.length===4){let l=parseInt(o[1]+o[1],16),d=parseInt(o[2]+o[2],16),h=parseInt(o[3]+o[3],16);a=[l,d,h,1]}else if(o.length===7){let l=parseInt(o.substring(1,3),16),d=parseInt(o.substring(3,5),16),h=parseInt(o.substring(5,7),16);a=[l,d,h,1]}}else if(o.startsWith("rgba")){let l=o.match(/^rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d.]+)\s*\)$/);if(l){let d=parseInt(l[1]),h=parseInt(l[2]),u=parseInt(l[3]),f=parseFloat(l[4]);a=[d,h,u,f]}}else if(o.startsWith("rgb")){let l=o.match(/^rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/);if(l){let d=parseInt(l[1]),h=parseInt(l[2]),u=parseInt(l[3]);a=[d,h,u,1]}}else console.error("color类型只能为#rrggbb、#rgb、rgba(r,g,b,a)、rgb(r,g,b)");return[a[0]/255,a[1]/255,a[2]/255,a[3]]},s=()=>{const o=A.layerConfig;if(!o)return;const a=[];o.forEach(l=>{o.filter(h=>h.dataset==l.dataset).length==1?a.push({condition:[{field:"dataset",op:"==",value:l.dataset}],color:n(l.value.color??"rgb(255,255,255)"),show:l.value.visible}):a.push({condition:[{field:"layer",op:"==",value:l.layer},{field:"dataset",op:"==",value:l.dataset}],color:n(l.value.color??"rgb(255,255,255)"),show:l.value.visible})}),A.setFeatureStyle(a)};s();const i=this.dv(c.createNextAnimateFrameEvent(A.layerConfigChanged,A.colorBlendModeChanged));this.d(i.don(()=>{s()}))}}};p(Ar,"type",Ar.register("ESUeViewer",c.ESRtsTileset.type,Ar));let yi=Ar;const er=class er extends eA{constructor(A,e){if(super(A,e),!e.viewer){console.warn("viewer is undefined!");return}this.d(A.addTreesEvent.don(n=>{c.addTreesCallFunc(e,A.id,n)})),this.d(A.removeAllTreesEvent.don(()=>{c.removeAllTreesCallFunc(e,A.id)})),this.d(A.updateTreeParamsEvent.don(n=>{c.updateTreeParamsCallFunc(e,A.id,n)})),this.d(A.cutDownTreesEvent.don((n,s)=>{c.cutDownTreesCallFunc(e,A.id,n,s)})),this.d(A.growthSimulationEvent.don((n,s,i)=>{c.growthSimulationCallFunc(e,A.id,n,s,i)}))}};p(er,"type",er.register("ESUeViewer",c.ESSeparateFoliage.type,er));let Si=er;const tr=class tr extends P{constructor(A,e){if(super(A,e),!e.viewer){console.warn("viewer is undefined!");return}}};p(tr,"type",tr.register("ESUeViewer",c.ESSubmergingAnalysis.type,tr));let Ii=tr;const rr=class rr extends dA{constructor(A,e){super(A,e);const t=e.viewer;if(!t){console.warn("viewer is undefined!");return}this.d(A.startEvent.don(()=>{t.callUeFunc({f:"Start",p:{id:A.id}})})),this.d(A.stopEvent.don(()=>{t.callUeFunc({f:"Stop",p:{id:A.id}})}))}};p(rr,"type",rr.register("ESUeViewer",c.ESSunshineAnalysis.type,rr));let Ti=rr;const nr=class nr extends dA{constructor(A,e){super(A,e);const t=e.viewer;if(!t){console.warn("viewer is undefined!");return}this.d(A.startEvent.don(()=>{t.callUeFunc({f:"Start",p:{id:A.id}})}))}};p(nr,"type",nr.register("ESUeViewer",c.ESSurfaceAreaMeasurement.type,nr));let Hi=nr;const sr=class sr extends QA{constructor(A,e){if(super(A,e),!e.viewer){console.warn("viewer is undefined!");return}}};p(sr,"type",sr.register("ESUeViewer",c.ESTextLabel.type,sr));let Li=sr;const xe=class xe extends QA{constructor(A,e){super(A,e);const t=e.viewer;if(!t){console.warn("viewer is undefined!");return}this.d(A.callFunctionEvent.don(async(n,s)=>{const i=await yn(t,A.id,n,s);A.__callFunctionResultEvent.emit(i)}))}};p(xe,"type",xe.register("ESUeViewer",c.ESUEWidget.type,xe)),p(xe,"propValFuncs",{...QA.propValFuncs,info:A=>JSON.stringify(A??{})});let bi=xe;const id=r=>{switch(r){case 0:return"成功绑定";case 1:return"解绑之前的内容,成功绑定";case 2:return"未搜索到ActorTag,无法绑定";case 3:return"搜索到ActorTag但对应的Actor不是场景原有的,而是新建的,无法绑定";case 4:return"搜索到ActorTag对应的Actor是地形或3DTileset,无法绑定";default:return"未知错误"}},Zw=r=>{switch(r){case 0:return"创建成功";case 1:return"未找到对应的资源,无法创建";case 2:return"Id与场景中现有的ActorTag重复,创建后可能出现问题,创建失败";default:return"未知错误"}},ir=class ir extends c.EngineObject{constructor(A,e){super(A,e);const t=e.viewer;if(!t){console.warn(`${A.id} UeESUnrealActor viewer is undefined!`);return}this.d(()=>{Un(t,A.id)});const n=async()=>{l()||await t.callUeFunc({f:"update",p:{id:A.id,name:A.name,show:A.show,rotation:A.rotation,flyToParam:A.flyToParam??c.ESUnrealActor.defaultFlyToParam,flyInParam:A.flyInParam??c.ESUnrealActor.defaultFlyInParam,highlight:A.highlight,collision:A.collision,scale:A.scale,minVisibleDistance:A.minVisibleDistance,maxVisibleDistance:A.maxVisibleDistance}})},s=this.dv(c.createNextAnimateFrameEvent(A.showChanged,A.nameChanged,A.rotationChanged,A.flyToParamChanged,A.flyInParamChanged,A.highlightChanged,A.collisionChanged,A.scaleChanged,A.minVisibleDistanceChanged,A.maxVisibleDistanceChanged));this.d(s.don(n)),this.d(A.flushEvent.don(()=>s.flush()));let i,o;const a=async()=>{l()||(await t.callUeFunc({f:"update",p:{id:A.id,position:A.position}}),(e.debug??!1)&&console.log(`updatePostion:${A.position},actorTag:${A.actorTag},actorClass:${A.actorClass}`))},l=()=>!i&&!o?(console.warn(`${A.id} 未绑定ActorTag或未创建ActorClass!`),!0):!1,d=async()=>{const{id:u}=A,f=await e.unBindActorByID(u);f&&f.error!==""&&console.warn(`${A.id} UeESUnrealActor UnBindActorByID: ${f.error}`),i=void 0;const B=await t.callUeFunc({f:"destroy",p:{id:u}});if(B&&B.error!==""){console.warn(`${A.id} UeESUnrealActor DestroyActorByID: ${B.error}`);return}o=void 0},h=this.dv(c.react({type:"ActorClass",actorClass:"default"}));{const u=this.dv(c.createNextAnimateFrameEvent(A.actorClassChanged,A.actorTagChanged)),f=async()=>{A.actorTag!==""?h.value={type:"ActorTag",actorTag:A.actorTag}:h.value={type:"ActorClass",actorClass:A.actorClass===""?"default":A.actorClass}};f(),this.d(u.don(f)),this.d(A.flushEvent.don(()=>u.flush()))}{const u=this.dv(c.createProcessingFromAsyncFunc(async B=>{if(await B.promise(d()),A.lastActorStatus="null",h.value.type==="ActorTag"){const{actorTag:w}=h.value;try{const v=await B.promise(e.bindActorByTag(A.id,w));if(!v)return;if(v.error!==""){console.warn(`${A.id} UeESUnrealActor BindActorByTag:${w},${v.error}`);return}if(v.re.type===0)A.lastActorStatus="bound",i=w;else if(v.re.type===1)A.lastActorStatus="bound",i=w,console.warn(`${A.id} UeESUnrealActor BindActorByTag:${w},${id(v.re.type)}`);else{i=void 0,console.warn(`${A.id} UeESUnrealActor BindActorByTag error:${w}, ${id(v.re.type)}`);return}}catch(v){console.warn(`${A.id} UeESUnrealActor BindActorByTag catch error:${w}, ${v}`);return}}else if(h.value.type==="ActorClass"){const{actorClass:w}=h.value;try{const v=await B.promise(e.createActorByClass(A.id,w));if(!v)return;if(v.error!==""){console.warn(`${A.id} UeESUnrealActor CreateActorByClass error :${w}, ${v.error}`);return}if(v.re.type===0)w!=="default"&&(A.lastActorStatus="created"),o=w;else{console.warn(`${A.id} UeESUnrealActor CreateActorByClass error type :${w},${Zw(v.re.type)}`);return}}catch(v){console.warn(`${A.id} UeESUnrealActor CreateActorByClass error catch :${w}, ${JSON.stringify(v)}`);return}}await B.promise(n()),await B.promise(a())})),f=async()=>{u.restart()};f(),this.d(h.changed.don(f))}this.d(A.positionChanged.don(a)),this.d(A.callFunctionEvent.don(async(u,f)=>{if(l()){A.__callFunctionResultEvent.emit(void 0);return}const B=await yn(t,A.id,u,f);A.__callFunctionResultEvent.emit(B)})),this.d(A.smoothMoveEvent.don((u,f)=>{l()||Ve(t,A.id,u,f)})),this.d(A.smoothMoveWithRotationEvent.don((u,f,B)=>{l()||ke(t,A.id,u,f,B)})),this.d(A.smoothMoveOnGroundEvent.don((u,f,B,w)=>{l()||Ne(t,A.id,u,f,w,B)})),this.d(A.smoothMoveWithRotationOnGroundEvent.don((u,f,B,w,v)=>{l()||_e(t,A.id,u,f,B,w,v)})),this.d(A.automaticLandingEvent.don(u=>{if(l())return;const f=[A.position[0],A.position[1]];e.getHeightByLonLat(A.position[0],A.position[1],"Visibility").then(B=>{B!==null&&(A.position=[...f,B],A.collision=u)})})),this.d(A.flyToEvent.don(async(u,f)=>{if(l())return;const B=await fe(t,A.id,u);let w="over";B===void 0?w="error":B.endType===0?w="over":B.endType===1&&(w="cancelled"),A.flyOverEvent.emit(f,w,e)})),this.d(A.calcFlyToParamEvent.don(()=>{l()||YA(t,A.id)})),this.d(A.calcFlyInParamEvent.don(async()=>{if(!e.actived)return;const u=await e.getCurrentCameraInfo();if(!u)return;const{position:f,rotation:B}=u;A.flyInParam={position:f,rotation:B,flyDuration:1}})),this.d(e.propChanged.don(u=>{l()||u.objId===A.id&&Object.keys(u.props).forEach(f=>{const B=u.props[f]===null?void 0:u.props[f];A[f]=B})}))}};p(ir,"type",ir.register("ESUeViewer",c.ESUnrealActor.type,ir));let Mi=ir;const or=class or extends P{constructor(A,e){if(super(A,e),!e.viewer){console.warn("viewer is undefined!");return}}};p(or,"type",or.register("ESUeViewer",c.ESVideoFusion.type,or));let Di=or;const ar=class ar extends P{constructor(A,e){if(super(A,e),!e.viewer){console.warn("viewer is undefined!");return}}};p(ar,"type",ar.register("ESUeViewer",c.ESViewShed.type,ar));let Ri=ar;const lr=class lr extends nA{constructor(A,e){if(super(A,e),!e.viewer){console.warn("viewer is underfined!");return}}};p(lr,"type",lr.register("ESUeViewer",c.ESVisibilityAnalysis.type,lr));let xi=lr;const cr=class cr extends dA{constructor(A,e){super(A,e);const t=e.viewer;if(!t){console.warn("viewer is undefined!");return}this.ad(c.track([A,"volume"],[A,"cutAndFillVolume"])),this.d(A.startEvent.don(()=>{t.callUeFunc({f:"Start",p:{id:A.id}})})),this.d(A.clearEvent.don(()=>{t.callUeFunc({f:"Clear",p:{id:A.id}})}))}};p(cr,"type",cr.register("ESUeViewer",c.ESVolumeMeasurement.type,cr));let Pi=cr;const Pe=class Pe extends QA{constructor(A,e){if(super(A,e),!e.viewer){console.warn("viewer is undefined!");return}}};p(Pe,"type",Pe.register("ESUeViewer",c.ESWidget.type,Pe)),p(Pe,"propValFuncs",{...QA.propValFuncs,info:A=>JSON.stringify(A??{})});let Ki=Pe;const dr=class dr extends c.EngineObject{constructor(A,e){if(super(A,e),!e.viewer){console.warn("viewer is undefined!");return}A.poi.actorTag=A.human.id,A.poi.positionOffset=[0,0,A.poiOffsetHeight-.8],this.d(A.poiOffsetHeightChanged.don(()=>{A.poi.positionOffset=[0,0,A.poiOffsetHeight-.8]})),this.d(()=>{A.poi.actorTag=""})}};p(dr,"type",dr.register("ESUeViewer",c.ESHumanPoi.type,dr));let Gi=dr;c.ESSceneObject.context.getStrFromEnv(c.ESNavigator.defaults.imgUrl);const ur=class ur extends c.EngineObject{constructor(A,e){if(super(A,e),!e.viewer){console.warn("viewer is undefined!");return}const n=this.disposeVar(new c.ESCustomDiv);e.add(n),this.dispose(()=>e.delete(n)),this.dispose(c.track([n,"show"],[A,"show"])),n.instanceClass=class extends c.Destroyable{constructor(i,o,a){super(),this._subContainer=i;const l=document.createElement("div");this._subContainer.appendChild(l),this.dispose(()=>this._subContainer.removeChild(l));{const u=async()=>{const f=await e.getCurrentCameraInfo(),B=f==null?void 0:f.position,v=[...f==null?void 0:f.rotation];v[0]=360,e.flyIn(B,v)};l.addEventListener("click",u),l.style.cursor="pointer",this.dispose(()=>l.removeEventListener("click",u))}{const u=()=>{l.style.width=`${A.cssSize?A.cssSize:c.ESNavigator.defaults.cssSize}px`,l.style.height=`${A.cssSize?A.cssSize:c.ESNavigator.defaults.cssSize}px`};u(),A.dispose(A.cssSizeChanged.disposableOn(u))}l.style.position="fixed";{const u=()=>{l.style.top=`${A.cssPosition?A.cssPosition[0]:c.ESNavigator.defaults.cssPosition[0]}px`,l.style.right=`${A.cssPosition?A.cssPosition[1]:c.ESNavigator.defaults.cssPosition[1]}px`};u(),A.dispose(A.cssPositionChanged.disposableOn(u))}l.style.transition=" right 0.4s linear",l.style.cursor="pointer";const d=document.createElement("div");l.appendChild(d),this.dispose(()=>l.removeChild(d)),d.style.width="100%",d.style.height="100%",d.style.position="relative";const h=document.createElement("img");d.appendChild(h),this.dispose(()=>d.removeChild(h)),h.style.width="100%",h.style.height="100%",h.style.border="none";{const u=()=>h.src=A.imgUrl;u(),A.dispose(A.imgUrlChanged.disposableOn(u))}{const u=()=>{const v=-e.getCurrentCameraInfo().rotation[0];h.style.transform=`rotate(${v}deg)`};let f;const B=async()=>{u(),A.show?(l.style.display="block",f=setInterval(()=>{u()},1e3)):(l.style.display="none",clearInterval(f))};this.dispose(A.showChanged.disposableOn(B)),B(),this.dispose(()=>clearInterval(f))}h.style.transformOrigin="50% 50%"}}}};p(ur,"type",ur.register("ESUeViewer",c.ESNavigator.type,ur));let ki=ur;const ce=class ce extends nA{constructor(A,e){super(A,e);const t=e.viewer;if(!t){console.warn("viewer is undefined!");return}{const n=()=>{t.callUeFunc({f:"update",p:{id:A.id,materialMode:A.materialMode}})};this.dispose(A.materialModeChanged.disposableOn(n))}}};p(ce,"type",ce.register("ESUeViewer",c.ESPath.type,ce)),p(ce,"forceUeUpdateProps",[...nA.forceUeUpdateProps]),p(ce,"propValFuncs",{...nA.propValFuncs});let Ni=ce;async function qw(r){navigator.clipboard.writeText(r).then(function(){console.log("复制成功")},function(A){console.log("复制失败")})}const hr=class hr extends c.EngineObject{constructor(A,e){if(super(A,e),!e.viewer){console.warn("viewer is undefined!");return}const n=this.disposeVar(new c.ESCustomDiv);e.add(n),this.dispose(()=>e.delete(n)),n.instanceClass=class extends c.Destroyable{constructor(i,o,a){if(super(),this._subContainer=i,!a||!(a instanceof LA))return;const l=document.createElement("div");this._subContainer.appendChild(l),this.dispose(()=>this._subContainer.removeChild(l)),l.style.width="100%",l.style.position="absolute",l.style.height=`${c.ESViewerStatusBar.defaults.height}px`,l.style.left="0",l.style.bottom="0",l.style.color="#fff",l.style.padding="0 20px 0 0",l.style.boxSizing="border-box",l.style.lineHeight=`${c.ESViewerStatusBar.defaults.height}px`,l.style.zIndex="100",l.style.alignContent="center",l.style.justifyContent="space-between";const d=document.createElement("span");l.appendChild(d),this.dispose(()=>l.removeChild(d));const h=document.createElement("span");d.appendChild(h),this.dispose(()=>d.removeChild(h));const u=document.createElement("span");d.appendChild(u),u.addEventListener("dblclick",function(){let B=u.innerHTML;B.startsWith("鼠标位置")&&(B=B.slice(5)),qw(B)}),u.style.cursor="pointer",this.dispose(()=>d.removeChild(u));const f=document.createElement("span");l.appendChild(f),this.dispose(()=>l.removeChild(f));{const B=()=>{l.style.height=(A.height??c.ESViewerStatusBar.defaults.height)+"px",l.style.lineHeight=(A.height??c.ESViewerStatusBar.defaults.height)+"px"};this.dispose(A.heightChanged.disposableOn(B)),B()}{const B=()=>{l.style.fontSize=(A.fontSize??c.ESViewerStatusBar.defaults.fontSize)+"px"};this.dispose(A.fontSizeChanged.disposableOn(B)),B()}{const B=()=>{A.bgColor?l.style.background=`rgba(${A.bgColor[0]*255},${A.bgColor[1]*255},${A.bgColor[2]*255},${A.bgColor[3]})`:l.style.background=`rgba(${c.ESViewerStatusBar.defaults.bgColor[0]},${c.ESViewerStatusBar.defaults.bgColor[1]},${c.ESViewerStatusBar.defaults.bgColor[2]},${c.ESViewerStatusBar.defaults.bgColor[3]})`};this.dispose(A.bgColorChanged.disposableOn(B)),B()}a.getVersion().then(B=>{B&&(f.innerText=`Ue 版本 : ${B[0]} `)}).catch(B=>{console.log(B)});{const B=()=>{let m="",F="";m+=`帧率:${a.getFPS().toFixed(0)}FPS`,h.innerText=m;const E=e.getCurrentCameraInfo();m+=` 经度: ${E.position[0].toFixed(5)}° 纬度: ${E.position[1].toFixed(5)}° 高度: ${E.position[2].toFixed(2)}米 偏航角: ${E.rotation[0].toFixed(2)}° 俯仰角: ${E.rotation[1].toFixed(2)}° 翻滚角:${E.rotation[2].toFixed(2)}° `,h.innerText=m,e.pick().then(I=>{if(I){const{pickResult:y}=I;if(y&&y.position){const{position:U}=y;F+=`鼠标位置:${U[0].toFixed(5)}° ${U[1].toFixed(5)}° ${U[2].toFixed(2)}m`}else F+="暂时无法获取鼠标位置...";u.innerText=F}}).catch(I=>{console.log(I)})};let w;const v=async()=>{B(),A.show?(l.style.display="flex",w=setInterval(()=>{B()},1e3)):(l.style.display="none",clearInterval(w))};this.dispose(A.showChanged.disposableOn(v)),v(),this.dispose(()=>clearInterval(w))}}}}};p(hr,"type",hr.register("ESUeViewer",c.ESViewerStatusBar.type,hr));let _i=hr;const gr=class gr extends P{constructor(A,e){if(super(A,e),!e.viewer){console.warn("viewer is undefined!");return}}};p(gr,"type",gr.register("ESUeViewer",c.ESGaussianSplatting.type,gr));let Vi=gr;const Br=class Br extends qA{constructor(e,t){super(e,t);p(this,"_es3DTileset",this.dv(new c.ES3DTileset));if(!t.viewer){console.warn("viewer is undefined!");return}this.es3DTileset.parentID=e.id;{const s=this._es3DTileset;e.components.disposableAdd(s,!0),this.d(c.track([s,"allowPicking"],[e,"allowPicking"])),this.d(c.track([s,"collision"],[e,"collision"])),this.d(c.bind([s,"flyToParam"],[e,"flyToParam"])),this.d(c.bind([s,"flyToParam"],[e,"flyToParam"])),this.d(c.track([s,"url"],[e,"url"])),this.d(c.track([s,"actorTag"],[e,"actorTag"])),this.d(c.track([s,"materialMode"],[e,"materialMode"])),this.d(c.track([s,"highlight"],[e,"highlight"])),this.d(c.track([s,"maximumScreenSpaceError"],[e,"maximumScreenSpaceError"])),this.d(c.track([s,"highlightID"],[e,"highlightID"])),this.d(c.track([s,"highlightColor"],[e,"highlightColor"])),this.d(c.bind([s,"offset"],[e,"offset"])),this.d(c.bind([s,"rotation"],[e,"rotation"])),this.d(c.track([s,"czmImageBasedLightingFactor"],[e,"czmImageBasedLightingFactor"])),this.d(c.track([s,"czmLuminanceAtZenith"],[e,"czmLuminanceAtZenith"])),this.d(c.track([s,"czmMaximumMemoryUsage"],[e,"czmMaximumMemoryUsage"])),this.d(c.track([s,"czmClassificationType"],[e,"czmClassificationType"])),this.d(c.track([s,"czmStyleJson"],[e,"czmStyleJson"])),this.d(c.track([s,"czmBackFaceCulling"],[e,"czmBackFaceCulling"])),this.d(c.track([s,"czmDebugShowBoundingVolume"],[e,"czmDebugShowBoundingVolume"])),this.d(c.track([s,"czmDebugShowContentBoundingVolume"],[e,"czmDebugShowContentBoundingVolume"])),this.d(c.track([s,"colorBlendMode"],[e,"colorBlendMode"])),this.d(c.track([s,"cacheBytes"],[e,"cacheBytes"])),this.d(c.track([s,"clippingPlaneEnabled"],[e,"clippingPlaneEnabled"])),this.d(c.track([s,"unionClippingRegions"],[e,"unionClippingRegions"])),this.d(c.track([s,"clippingPlaneEdgeColor"],[e,"clippingPlaneEdgeColor"])),this.d(c.track([s,"clippingPlaneEdgeWidth"],[e,"clippingPlaneEdgeWidth"])),this.d(c.track([s,"materialParams"],[e,"materialParams"])),this.d(c.bind([s,"supportEdit"],[e,"supportEdit"])),this.d(c.bind([s,"clippingPlanesId"],[e,"clippingPlanesId"])),this.d(c.bind([s,"clippingPlaneIds"],[e,"clippingPlaneIds"])),this.d(c.bind([s,"flattenedPlaneId"],[e,"flattenedPlaneId"])),this.d(c.bind([s,"flattenedPlaneEnabled"],[e,"flattenedPlaneEnabled"])),this.d(c.bind([s,"clippingPlaneId"],[e,"clippingPlaneId"])),this.d(c.bind([s,"excavateId"],[e,"excavateId"]))}{const s=this._es3DTileset;this.d(e.refreshTilesetEvent.don(()=>{s.refreshTileset()})),this.d(e.highlightFeatureEvent.don((...i)=>{s.highlightFeature(...i)})),this.d(e.highlightFeatureAndFlyToEvent.don((...i)=>{s.highlightFeatureAndFlyTo(...i)})),this.d(e.setFeatureColorEvent.don((...i)=>{s.setFeatureColor(...i)})),this.d(e.setFeatureVisableEvent.don((...i)=>{s.setFeatureVisable(...i)})),this.d(e.resetFeatureStyleEvent.don((...i)=>{s.resetFeatureStyle(...i)})),this.d(e.flyInEvent.don((...i)=>{s.flyIn(i[0])})),this.d(e.flyToEvent.don((...i)=>{s.flyTo(i[0])})),this.d(e.calcFlyToParamEvent.don((...i)=>{s.calcFlyToParam(...i)})),this.d(e.calcFlyInParamEvent.don((...i)=>{s.calcFlyInParam(...i)}))}{const s=this._es3DTileset;this.d(s.tilesetReady.don(i=>{e.tilesetReady.emit(i)})),this.d(s.pickedEvent.don(i=>{i.assign({sceneObject:e}),e.pickedEvent.emit(i)}))}{const s=()=>{this.es3DTileset.show=e.show};s(),this.d(e.showChanged.don(()=>{s()}))}}get es3DTileset(){return this._es3DTileset}};p(Br,"type",Br.register("ESUeViewer",c.ESRtsFeatureEditing.type,Br));let Oi=Br;const fr=class fr extends qA{constructor(A,e){if(super(A,e),!e.viewer){console.warn("viewer is undefined!");return}}};p(fr,"type",fr.register("ESUeViewer",c.ESMsTileset.type,fr));let Wi=fr;const wr=class wr extends dA{constructor(A,e){super(A,e);const t=e.viewer;if(!t){console.warn("viewer is undefined!");return}const n=()=>{t.callUeFunc({f:"update",p:{id:A.id,height:A.height??c.ESGeoExtrudedPolygon.defaults.height,extrudedHeight:A.extrudedHeight??c.ESGeoExtrudedPolygon.defaults.extrudedHeight,perPositionHeight:A.perPositionHeight??c.ESGeoExtrudedPolygon.defaults.perPositionHeight}})},s=this.disposeVar(c.createNextAnimateFrameEvent(A.heightChanged,A.extrudedHeightChanged,A.perPositionHeightChanged));this.dispose(s.disposableOn(n)),this.dispose(A.createdEvent.disposableOn(n))}};p(wr,"type",wr.register("ESUeViewer",c.ESGeoExtrudedPolygon.type,wr));let Xi=wr;const pr=class pr extends P{constructor(A,e){if(super(A,e),!e.viewer){console.warn("viewer is undefined!");return}}};p(pr,"type",pr.register("ESUeViewer",c.ESStaticMesh.type,pr));let Ji=pr;const Cr=class Cr extends nA{constructor(A,e){super(A,e);const t=e.viewer;if(!t){console.warn("viewer is undefined!");return}this.d(A.startEvent.don(()=>{t.callUeFunc({f:"Start",p:{id:A.id}})})),this.d(A.clearEvent.don(()=>{t.callUeFunc({f:"Clear",p:{id:A.id}})}))}};p(Cr,"type",Cr.register("ESUeViewer",c.ESSkylineAnalysis.type,Cr));let zi=Cr;C.copyright=void 0;try{const r="earthsdk3-ue",A="3.6.0-beta.7",e="2025-12-01T07:11:56.000Z",t="北京西部世界科技有限公司",n="地球可视化实验室 (EarthSDK&CesiumLab) https://www.bjxbsj.cn",s="abda1a41a68af1f50f3d12644764fc7dd947f5f3",o=((Date.now()-1764573116e3)/36e5).toFixed(1),a=`%c🌏 ${r}%c ${A}.${s.slice(0,8)}.${e} (距今${o}个小时)
112
+ .`+Zs+cw+Jc)},uw=function(r,A){var e=r.ownerDocument;if(e){var t=e.createElement("style");t.textContent=A,r.appendChild(t)}},zc=function(){function r(){}return r.getOrigin=function(A){var e=r._link;return e?(e.href=A,e.href=e.href,e.protocol+e.hostname+e.port):"about:blank"},r.isSameOrigin=function(A){return r.getOrigin(A)===r._origin},r.setContext=function(A){r._link=A.document.createElement("a"),r._origin=r.getOrigin(A.location.href)},r._origin="about:blank",r}(),hw=function(){function r(A,e){this.context=A,this._options=e,this._cache={}}return r.prototype.addImage=function(A){var e=Promise.resolve();return this.has(A)||(js(A)||ww(A))&&(this._cache[A]=this.loadImage(A)).catch(function(){}),e},r.prototype.match=function(A){return this._cache[A]},r.prototype.loadImage=function(A){return uA(this,void 0,void 0,function(){var e,t,n,s,i=this;return sA(this,function(o){switch(o.label){case 0:return e=zc.isSameOrigin(A),t=!qs(A)&&this._options.useCORS===!0&&rA.SUPPORT_CORS_IMAGES&&!e,n=!qs(A)&&!e&&!js(A)&&typeof this._options.proxy=="string"&&rA.SUPPORT_CORS_XHR&&!t,!e&&this._options.allowTaint===!1&&!qs(A)&&!js(A)&&!n&&!t?[2]:(s=A,n?[4,this.proxy(s)]:[3,2]);case 1:s=o.sent(),o.label=2;case 2:return this.context.logger.debug("Added image "+A.substring(0,256)),[4,new Promise(function(a,l){var d=new Image;d.onload=function(){return a(d)},d.onerror=l,(pw(s)||t)&&(d.crossOrigin="anonymous"),d.src=s,d.complete===!0&&setTimeout(function(){return a(d)},500),i._options.imageTimeout>0&&setTimeout(function(){return l("Timed out ("+i._options.imageTimeout+"ms) loading image")},i._options.imageTimeout)})];case 3:return[2,o.sent()]}})})},r.prototype.has=function(A){return typeof this._cache[A]<"u"},r.prototype.keys=function(){return Promise.resolve(Object.keys(this._cache))},r.prototype.proxy=function(A){var e=this,t=this._options.proxy;if(!t)throw new Error("No proxy defined");var n=A.substring(0,256);return new Promise(function(s,i){var o=rA.SUPPORT_RESPONSE_TYPE?"blob":"text",a=new XMLHttpRequest;a.onload=function(){if(a.status===200)if(o==="text")s(a.response);else{var h=new FileReader;h.addEventListener("load",function(){return s(h.result)},!1),h.addEventListener("error",function(u){return i(u)},!1),h.readAsDataURL(a.response)}else i("Failed to proxy resource "+n+" with status code "+a.status)},a.onerror=i;var l=t.indexOf("?")>-1?"&":"?";if(a.open("GET",""+t+l+"url="+encodeURIComponent(A)+"&responseType="+o),o!=="text"&&a instanceof XMLHttpRequest&&(a.responseType=o),e._options.imageTimeout){var d=e._options.imageTimeout;a.timeout=d,a.ontimeout=function(){return i("Timed out ("+d+"ms) proxying "+n)}}a.send()})},r}(),gw=/^data:image\/svg\+xml/i,Bw=/^data:image\/.*;base64,/i,fw=/^data:image\/.*/i,ww=function(r){return rA.SUPPORT_SVG_DRAWING||!Cw(r)},qs=function(r){return fw.test(r)},pw=function(r){return Bw.test(r)},js=function(r){return r.substr(0,4)==="blob"},Cw=function(r){return r.substr(-3).toLowerCase()==="svg"||gw.test(r)},S=function(){function r(A,e){this.type=0,this.x=A,this.y=e}return r.prototype.add=function(A,e){return new r(this.x+A,this.y+e)},r}(),Te=function(r,A,e){return new S(r.x+(A.x-r.x)*e,r.y+(A.y-r.y)*e)},Bn=function(){function r(A,e,t,n){this.type=1,this.start=A,this.startControl=e,this.endControl=t,this.end=n}return r.prototype.subdivide=function(A,e){var t=Te(this.start,this.startControl,A),n=Te(this.startControl,this.endControl,A),s=Te(this.endControl,this.end,A),i=Te(t,n,A),o=Te(n,s,A),a=Te(i,o,A);return e?new r(this.start,t,i,a):new r(a,o,s,this.end)},r.prototype.add=function(A,e){return new r(this.start.add(A,e),this.startControl.add(A,e),this.endControl.add(A,e),this.end.add(A,e))},r.prototype.reverse=function(){return new r(this.end,this.endControl,this.startControl,this.start)},r}(),pA=function(r){return r.type===1},vw=function(){function r(A){var e=A.styles,t=A.bounds,n=it(e.borderTopLeftRadius,t.width,t.height),s=n[0],i=n[1],o=it(e.borderTopRightRadius,t.width,t.height),a=o[0],l=o[1],d=it(e.borderBottomRightRadius,t.width,t.height),h=d[0],u=d[1],f=it(e.borderBottomLeftRadius,t.width,t.height),B=f[0],w=f[1],v=[];v.push((s+a)/t.width),v.push((B+h)/t.width),v.push((i+w)/t.height),v.push((l+u)/t.height);var m=Math.max.apply(Math,v);m>1&&(s/=m,i/=m,a/=m,l/=m,h/=m,u/=m,B/=m,w/=m);var F=t.width-a,E=t.height-u,I=t.width-h,y=t.height-w,U=e.borderTopWidth,D=e.borderRightWidth,R=e.borderBottomWidth,M=e.borderLeftWidth,O=N(e.paddingTop,A.bounds.width),oA=N(e.paddingRight,A.bounds.width),Y=N(e.paddingBottom,A.bounds.width),G=N(e.paddingLeft,A.bounds.width);this.topLeftBorderDoubleOuterBox=s>0||i>0?V(t.left+M/3,t.top+U/3,s-M/3,i-U/3,K.TOP_LEFT):new S(t.left+M/3,t.top+U/3),this.topRightBorderDoubleOuterBox=s>0||i>0?V(t.left+F,t.top+U/3,a-D/3,l-U/3,K.TOP_RIGHT):new S(t.left+t.width-D/3,t.top+U/3),this.bottomRightBorderDoubleOuterBox=h>0||u>0?V(t.left+I,t.top+E,h-D/3,u-R/3,K.BOTTOM_RIGHT):new S(t.left+t.width-D/3,t.top+t.height-R/3),this.bottomLeftBorderDoubleOuterBox=B>0||w>0?V(t.left+M/3,t.top+y,B-M/3,w-R/3,K.BOTTOM_LEFT):new S(t.left+M/3,t.top+t.height-R/3),this.topLeftBorderDoubleInnerBox=s>0||i>0?V(t.left+M*2/3,t.top+U*2/3,s-M*2/3,i-U*2/3,K.TOP_LEFT):new S(t.left+M*2/3,t.top+U*2/3),this.topRightBorderDoubleInnerBox=s>0||i>0?V(t.left+F,t.top+U*2/3,a-D*2/3,l-U*2/3,K.TOP_RIGHT):new S(t.left+t.width-D*2/3,t.top+U*2/3),this.bottomRightBorderDoubleInnerBox=h>0||u>0?V(t.left+I,t.top+E,h-D*2/3,u-R*2/3,K.BOTTOM_RIGHT):new S(t.left+t.width-D*2/3,t.top+t.height-R*2/3),this.bottomLeftBorderDoubleInnerBox=B>0||w>0?V(t.left+M*2/3,t.top+y,B-M*2/3,w-R*2/3,K.BOTTOM_LEFT):new S(t.left+M*2/3,t.top+t.height-R*2/3),this.topLeftBorderStroke=s>0||i>0?V(t.left+M/2,t.top+U/2,s-M/2,i-U/2,K.TOP_LEFT):new S(t.left+M/2,t.top+U/2),this.topRightBorderStroke=s>0||i>0?V(t.left+F,t.top+U/2,a-D/2,l-U/2,K.TOP_RIGHT):new S(t.left+t.width-D/2,t.top+U/2),this.bottomRightBorderStroke=h>0||u>0?V(t.left+I,t.top+E,h-D/2,u-R/2,K.BOTTOM_RIGHT):new S(t.left+t.width-D/2,t.top+t.height-R/2),this.bottomLeftBorderStroke=B>0||w>0?V(t.left+M/2,t.top+y,B-M/2,w-R/2,K.BOTTOM_LEFT):new S(t.left+M/2,t.top+t.height-R/2),this.topLeftBorderBox=s>0||i>0?V(t.left,t.top,s,i,K.TOP_LEFT):new S(t.left,t.top),this.topRightBorderBox=a>0||l>0?V(t.left+F,t.top,a,l,K.TOP_RIGHT):new S(t.left+t.width,t.top),this.bottomRightBorderBox=h>0||u>0?V(t.left+I,t.top+E,h,u,K.BOTTOM_RIGHT):new S(t.left+t.width,t.top+t.height),this.bottomLeftBorderBox=B>0||w>0?V(t.left,t.top+y,B,w,K.BOTTOM_LEFT):new S(t.left,t.top+t.height),this.topLeftPaddingBox=s>0||i>0?V(t.left+M,t.top+U,Math.max(0,s-M),Math.max(0,i-U),K.TOP_LEFT):new S(t.left+M,t.top+U),this.topRightPaddingBox=a>0||l>0?V(t.left+Math.min(F,t.width-D),t.top+U,F>t.width+D?0:Math.max(0,a-D),Math.max(0,l-U),K.TOP_RIGHT):new S(t.left+t.width-D,t.top+U),this.bottomRightPaddingBox=h>0||u>0?V(t.left+Math.min(I,t.width-M),t.top+Math.min(E,t.height-R),Math.max(0,h-D),Math.max(0,u-R),K.BOTTOM_RIGHT):new S(t.left+t.width-D,t.top+t.height-R),this.bottomLeftPaddingBox=B>0||w>0?V(t.left+M,t.top+Math.min(y,t.height-R),Math.max(0,B-M),Math.max(0,w-R),K.BOTTOM_LEFT):new S(t.left+M,t.top+t.height-R),this.topLeftContentBox=s>0||i>0?V(t.left+M+G,t.top+U+O,Math.max(0,s-(M+G)),Math.max(0,i-(U+O)),K.TOP_LEFT):new S(t.left+M+G,t.top+U+O),this.topRightContentBox=a>0||l>0?V(t.left+Math.min(F,t.width+M+G),t.top+U+O,F>t.width+M+G?0:a-M+G,l-(U+O),K.TOP_RIGHT):new S(t.left+t.width-(D+oA),t.top+U+O),this.bottomRightContentBox=h>0||u>0?V(t.left+Math.min(I,t.width-(M+G)),t.top+Math.min(E,t.height+U+O),Math.max(0,h-(D+oA)),u-(R+Y),K.BOTTOM_RIGHT):new S(t.left+t.width-(D+oA),t.top+t.height-(R+Y)),this.bottomLeftContentBox=B>0||w>0?V(t.left+M+G,t.top+y,Math.max(0,B-(M+G)),w-(R+Y),K.BOTTOM_LEFT):new S(t.left+M+G,t.top+t.height-(R+Y))}return r}(),K;(function(r){r[r.TOP_LEFT=0]="TOP_LEFT",r[r.TOP_RIGHT=1]="TOP_RIGHT",r[r.BOTTOM_RIGHT=2]="BOTTOM_RIGHT",r[r.BOTTOM_LEFT=3]="BOTTOM_LEFT"})(K||(K={}));var V=function(r,A,e,t,n){var s=4*((Math.sqrt(2)-1)/3),i=e*s,o=t*s,a=r+e,l=A+t;switch(n){case K.TOP_LEFT:return new Bn(new S(r,l),new S(r,l-o),new S(a-i,A),new S(a,A));case K.TOP_RIGHT:return new Bn(new S(r,A),new S(r+i,A),new S(a,l-o),new S(a,l));case K.BOTTOM_RIGHT:return new Bn(new S(a,A),new S(a,A+o),new S(r+i,l),new S(r,l));case K.BOTTOM_LEFT:default:return new Bn(new S(a,l),new S(a-i,l),new S(r,A+o),new S(r,A))}},fn=function(r){return[r.topLeftBorderBox,r.topRightBorderBox,r.bottomRightBorderBox,r.bottomLeftBorderBox]},mw=function(r){return[r.topLeftContentBox,r.topRightContentBox,r.bottomRightContentBox,r.bottomLeftContentBox]},wn=function(r){return[r.topLeftPaddingBox,r.topRightPaddingBox,r.bottomRightPaddingBox,r.bottomLeftPaddingBox]},Fw=function(){function r(A,e,t){this.offsetX=A,this.offsetY=e,this.matrix=t,this.type=0,this.target=6}return r}(),pn=function(){function r(A,e){this.path=A,this.target=e,this.type=1}return r}(),Qw=function(){function r(A){this.opacity=A,this.type=2,this.target=6}return r}(),Uw=function(r){return r.type===0},Yc=function(r){return r.type===1},Ew=function(r){return r.type===2},$c=function(r,A){return r.length===A.length?r.some(function(e,t){return e===A[t]}):!1},yw=function(r,A,e,t,n){return r.map(function(s,i){switch(i){case 0:return s.add(A,e);case 1:return s.add(A+t,e);case 2:return s.add(A+t,e+n);case 3:return s.add(A,e+n)}return s})},Zc=function(){function r(A){this.element=A,this.inlineLevel=[],this.nonInlineLevel=[],this.negativeZIndex=[],this.zeroOrAutoZIndexOrTransformedOrOpacity=[],this.positiveZIndex=[],this.nonPositionedFloats=[],this.nonPositionedInlineLevel=[]}return r}(),qc=function(){function r(A,e){if(this.container=A,this.parent=e,this.effects=[],this.curves=new vw(this.container),this.container.styles.opacity<1&&this.effects.push(new Qw(this.container.styles.opacity)),this.container.styles.transform!==null){var t=this.container.bounds.left+this.container.styles.transformOrigin[0].number,n=this.container.bounds.top+this.container.styles.transformOrigin[1].number,s=this.container.styles.transform;this.effects.push(new Fw(t,n,s))}if(this.container.styles.overflowX!==0){var i=fn(this.curves),o=wn(this.curves);$c(i,o)?this.effects.push(new pn(i,6)):(this.effects.push(new pn(i,2)),this.effects.push(new pn(o,4)))}}return r.prototype.getEffects=function(A){for(var e=[2,3].indexOf(this.container.styles.position)===-1,t=this.parent,n=this.effects.slice(0);t;){var s=t.effects.filter(function(a){return!Yc(a)});if(e||t.container.styles.position!==0||!t.parent){if(n.unshift.apply(n,s),e=[2,3].indexOf(t.container.styles.position)===-1,t.container.styles.overflowX!==0){var i=fn(t.curves),o=wn(t.curves);$c(i,o)||n.unshift(new pn(o,6))}}else n.unshift.apply(n,s);t=t.parent}return n.filter(function(a){return Z(a.target,A)})},r}(),Ai=function(r,A,e,t){r.container.elements.forEach(function(n){var s=Z(n.flags,4),i=Z(n.flags,2),o=new qc(n,r);Z(n.styles.display,2048)&&t.push(o);var a=Z(n.flags,8)?[]:t;if(s||i){var l=s||n.styles.isPositioned()?e:A,d=new Zc(o);if(n.styles.isPositioned()||n.styles.opacity<1||n.styles.isTransformed()){var h=n.styles.zIndex.order;if(h<0){var u=0;l.negativeZIndex.some(function(B,w){return h>B.element.container.styles.zIndex.order?(u=w,!1):u>0}),l.negativeZIndex.splice(u,0,d)}else if(h>0){var f=0;l.positiveZIndex.some(function(B,w){return h>=B.element.container.styles.zIndex.order?(f=w+1,!1):f>0}),l.positiveZIndex.splice(f,0,d)}else l.zeroOrAutoZIndexOrTransformedOrOpacity.push(d)}else n.styles.isFloating()?l.nonPositionedFloats.push(d):l.nonPositionedInlineLevel.push(d);Ai(o,d,s?d:e,a)}else n.styles.isInlineLevel()?A.inlineLevel.push(o):A.nonInlineLevel.push(o),Ai(o,A,e,a);Z(n.flags,8)&&jc(n,a)})},jc=function(r,A){for(var e=r instanceof Vs?r.start:1,t=r instanceof Vs?r.reversed:!1,n=0;n<A.length;n++){var s=A[n];s.container instanceof Uc&&typeof s.container.value=="number"&&s.container.value!==0&&(e=s.container.value),s.listValue=ut(e,s.container.styles.listStyleType,!0),e+=t?-1:1}},Sw=function(r){var A=new qc(r,null),e=new Zc(A),t=[];return Ai(A,e,e,t),jc(A.container,t),e},Ad=function(r,A){switch(A){case 0:return CA(r.topLeftBorderBox,r.topLeftPaddingBox,r.topRightBorderBox,r.topRightPaddingBox);case 1:return CA(r.topRightBorderBox,r.topRightPaddingBox,r.bottomRightBorderBox,r.bottomRightPaddingBox);case 2:return CA(r.bottomRightBorderBox,r.bottomRightPaddingBox,r.bottomLeftBorderBox,r.bottomLeftPaddingBox);case 3:default:return CA(r.bottomLeftBorderBox,r.bottomLeftPaddingBox,r.topLeftBorderBox,r.topLeftPaddingBox)}},Iw=function(r,A){switch(A){case 0:return CA(r.topLeftBorderBox,r.topLeftBorderDoubleOuterBox,r.topRightBorderBox,r.topRightBorderDoubleOuterBox);case 1:return CA(r.topRightBorderBox,r.topRightBorderDoubleOuterBox,r.bottomRightBorderBox,r.bottomRightBorderDoubleOuterBox);case 2:return CA(r.bottomRightBorderBox,r.bottomRightBorderDoubleOuterBox,r.bottomLeftBorderBox,r.bottomLeftBorderDoubleOuterBox);case 3:default:return CA(r.bottomLeftBorderBox,r.bottomLeftBorderDoubleOuterBox,r.topLeftBorderBox,r.topLeftBorderDoubleOuterBox)}},Tw=function(r,A){switch(A){case 0:return CA(r.topLeftBorderDoubleInnerBox,r.topLeftPaddingBox,r.topRightBorderDoubleInnerBox,r.topRightPaddingBox);case 1:return CA(r.topRightBorderDoubleInnerBox,r.topRightPaddingBox,r.bottomRightBorderDoubleInnerBox,r.bottomRightPaddingBox);case 2:return CA(r.bottomRightBorderDoubleInnerBox,r.bottomRightPaddingBox,r.bottomLeftBorderDoubleInnerBox,r.bottomLeftPaddingBox);case 3:default:return CA(r.bottomLeftBorderDoubleInnerBox,r.bottomLeftPaddingBox,r.topLeftBorderDoubleInnerBox,r.topLeftPaddingBox)}},Hw=function(r,A){switch(A){case 0:return Cn(r.topLeftBorderStroke,r.topRightBorderStroke);case 1:return Cn(r.topRightBorderStroke,r.bottomRightBorderStroke);case 2:return Cn(r.bottomRightBorderStroke,r.bottomLeftBorderStroke);case 3:default:return Cn(r.bottomLeftBorderStroke,r.topLeftBorderStroke)}},Cn=function(r,A){var e=[];return pA(r)?e.push(r.subdivide(.5,!1)):e.push(r),pA(A)?e.push(A.subdivide(.5,!0)):e.push(A),e},CA=function(r,A,e,t){var n=[];return pA(r)?n.push(r.subdivide(.5,!1)):n.push(r),pA(e)?n.push(e.subdivide(.5,!0)):n.push(e),pA(t)?n.push(t.subdivide(.5,!0).reverse()):n.push(t),pA(A)?n.push(A.subdivide(.5,!1).reverse()):n.push(A),n},ed=function(r){var A=r.bounds,e=r.styles;return A.add(e.borderLeftWidth,e.borderTopWidth,-(e.borderRightWidth+e.borderLeftWidth),-(e.borderTopWidth+e.borderBottomWidth))},vn=function(r){var A=r.styles,e=r.bounds,t=N(A.paddingLeft,e.width),n=N(A.paddingRight,e.width),s=N(A.paddingTop,e.width),i=N(A.paddingBottom,e.width);return e.add(t+A.borderLeftWidth,s+A.borderTopWidth,-(A.borderRightWidth+A.borderLeftWidth+t+n),-(A.borderTopWidth+A.borderBottomWidth+s+i))},Lw=function(r,A){return r===0?A.bounds:r===2?vn(A):ed(A)},bw=function(r,A){return r===0?A.bounds:r===2?vn(A):ed(A)},ei=function(r,A,e){var t=Lw(Le(r.styles.backgroundOrigin,A),r),n=bw(Le(r.styles.backgroundClip,A),r),s=Mw(Le(r.styles.backgroundSize,A),e,t),i=s[0],o=s[1],a=it(Le(r.styles.backgroundPosition,A),t.width-i,t.height-o),l=Dw(Le(r.styles.backgroundRepeat,A),a,s,t,n),d=Math.round(t.left+a[0]),h=Math.round(t.top+a[1]);return[l,d,h,i,o]},He=function(r){return k(r)&&r.value===Ee.AUTO},mn=function(r){return typeof r=="number"},Mw=function(r,A,e){var t=A[0],n=A[1],s=A[2],i=r[0],o=r[1];if(!i)return[0,0];if(z(i)&&o&&z(o))return[N(i,e.width),N(o,e.height)];var a=mn(s);if(k(i)&&(i.value===Ee.CONTAIN||i.value===Ee.COVER)){if(mn(s)){var l=e.width/e.height;return l<s!=(i.value===Ee.COVER)?[e.width,e.width/s]:[e.height*s,e.height]}return[e.width,e.height]}var d=mn(t),h=mn(n),u=d||h;if(He(i)&&(!o||He(o))){if(d&&h)return[t,n];if(!a&&!u)return[e.width,e.height];if(u&&a){var f=d?t:n*s,B=h?n:t/s;return[f,B]}var w=d?t:e.width,v=h?n:e.height;return[w,v]}if(a){var m=0,F=0;return z(i)?m=N(i,e.width):z(o)&&(F=N(o,e.height)),He(i)?m=F*s:(!o||He(o))&&(F=m/s),[m,F]}var E=null,I=null;if(z(i)?E=N(i,e.width):o&&z(o)&&(I=N(o,e.height)),E!==null&&(!o||He(o))&&(I=d&&h?E/t*n:e.height),I!==null&&He(i)&&(E=d&&h?I/n*t:e.width),E!==null&&I!==null)return[E,I];throw new Error("Unable to calculate background-size for element")},Le=function(r,A){var e=r[A];return typeof e>"u"?r[0]:e},Dw=function(r,A,e,t,n){var s=A[0],i=A[1],o=e[0],a=e[1];switch(r){case 2:return[new S(Math.round(t.left),Math.round(t.top+i)),new S(Math.round(t.left+t.width),Math.round(t.top+i)),new S(Math.round(t.left+t.width),Math.round(a+t.top+i)),new S(Math.round(t.left),Math.round(a+t.top+i))];case 3:return[new S(Math.round(t.left+s),Math.round(t.top)),new S(Math.round(t.left+s+o),Math.round(t.top)),new S(Math.round(t.left+s+o),Math.round(t.height+t.top)),new S(Math.round(t.left+s),Math.round(t.height+t.top))];case 1:return[new S(Math.round(t.left+s),Math.round(t.top+i)),new S(Math.round(t.left+s+o),Math.round(t.top+i)),new S(Math.round(t.left+s+o),Math.round(t.top+i+a)),new S(Math.round(t.left+s),Math.round(t.top+i+a))];default:return[new S(Math.round(n.left),Math.round(n.top)),new S(Math.round(n.left+n.width),Math.round(n.top)),new S(Math.round(n.left+n.width),Math.round(n.height+n.top)),new S(Math.round(n.left),Math.round(n.height+n.top))]}},Rw="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",td="Hidden Text",xw=function(){function r(A){this._data={},this._document=A}return r.prototype.parseMetrics=function(A,e){var t=this._document.createElement("div"),n=this._document.createElement("img"),s=this._document.createElement("span"),i=this._document.body;t.style.visibility="hidden",t.style.fontFamily=A,t.style.fontSize=e,t.style.margin="0",t.style.padding="0",t.style.whiteSpace="nowrap",i.appendChild(t),n.src=Rw,n.width=1,n.height=1,n.style.margin="0",n.style.padding="0",n.style.verticalAlign="baseline",s.style.fontFamily=A,s.style.fontSize=e,s.style.margin="0",s.style.padding="0",s.appendChild(this._document.createTextNode(td)),t.appendChild(s),t.appendChild(n);var o=n.offsetTop-s.offsetTop+2;t.removeChild(s),t.appendChild(this._document.createTextNode(td)),t.style.lineHeight="normal",n.style.verticalAlign="super";var a=n.offsetTop-t.offsetTop+2;return i.removeChild(t),{baseline:o,middle:a}},r.prototype.getMetrics=function(A,e){var t=A+" "+e;return typeof this._data[t]>"u"&&(this._data[t]=this.parseMetrics(A,e)),this._data[t]},r}(),rd=function(){function r(A,e){this.context=A,this.options=e}return r}(),Pw=1e4,Kw=function(r){mA(A,r);function A(e,t){var n=r.call(this,e,t)||this;return n._activeEffects=[],n.canvas=t.canvas?t.canvas:document.createElement("canvas"),n.ctx=n.canvas.getContext("2d"),t.canvas||(n.canvas.width=Math.floor(t.width*t.scale),n.canvas.height=Math.floor(t.height*t.scale),n.canvas.style.width=t.width+"px",n.canvas.style.height=t.height+"px"),n.fontMetrics=new xw(document),n.ctx.scale(n.options.scale,n.options.scale),n.ctx.translate(-t.x,-t.y),n.ctx.textBaseline="bottom",n._activeEffects=[],n.context.logger.debug("Canvas renderer initialized ("+t.width+"x"+t.height+") with scale "+t.scale),n}return A.prototype.applyEffects=function(e){for(var t=this;this._activeEffects.length;)this.popEffect();e.forEach(function(n){return t.applyEffect(n)})},A.prototype.applyEffect=function(e){this.ctx.save(),Ew(e)&&(this.ctx.globalAlpha=e.opacity),Uw(e)&&(this.ctx.translate(e.offsetX,e.offsetY),this.ctx.transform(e.matrix[0],e.matrix[1],e.matrix[2],e.matrix[3],e.matrix[4],e.matrix[5]),this.ctx.translate(-e.offsetX,-e.offsetY)),Yc(e)&&(this.path(e.path),this.ctx.clip()),this._activeEffects.push(e)},A.prototype.popEffect=function(){this._activeEffects.pop(),this.ctx.restore()},A.prototype.renderStack=function(e){return uA(this,void 0,void 0,function(){var t;return sA(this,function(n){switch(n.label){case 0:return t=e.element.container.styles,t.isVisible()?[4,this.renderStackContent(e)]:[3,2];case 1:n.sent(),n.label=2;case 2:return[2]}})})},A.prototype.renderNode=function(e){return uA(this,void 0,void 0,function(){return sA(this,function(t){switch(t.label){case 0:if(Z(e.container.flags,16))debugger;return e.container.styles.isVisible()?[4,this.renderNodeBackgroundAndBorders(e)]:[3,3];case 1:return t.sent(),[4,this.renderNodeContent(e)];case 2:t.sent(),t.label=3;case 3:return[2]}})})},A.prototype.renderTextWithLetterSpacing=function(e,t,n){var s=this;if(t===0)this.ctx.fillText(e.text,e.bounds.left,e.bounds.top+n);else{var i=_s(e.text);i.reduce(function(o,a){return s.ctx.fillText(a,o,e.bounds.top+n),o+s.ctx.measureText(a).width},e.bounds.left)}},A.prototype.createFontStyle=function(e){var t=e.fontVariant.filter(function(i){return i==="normal"||i==="small-caps"}).join(""),n=Vw(e.fontFamily).join(", "),s=st(e.fontSize)?""+e.fontSize.number+e.fontSize.unit:e.fontSize.number+"px";return[[e.fontStyle,t,e.fontWeight,s,n].join(" "),n,s]},A.prototype.renderTextNode=function(e,t){return uA(this,void 0,void 0,function(){var n,s,i,o,a,l,d,h,u=this;return sA(this,function(f){return n=this.createFontStyle(t),s=n[0],i=n[1],o=n[2],this.ctx.font=s,this.ctx.direction=t.direction===1?"rtl":"ltr",this.ctx.textAlign="left",this.ctx.textBaseline="alphabetic",a=this.fontMetrics.getMetrics(i,o),l=a.baseline,d=a.middle,h=t.paintOrder,e.textBounds.forEach(function(B){h.forEach(function(w){switch(w){case 0:u.ctx.fillStyle=j(t.color),u.renderTextWithLetterSpacing(B,t.letterSpacing,l);var v=t.textShadow;v.length&&B.text.trim().length&&(v.slice(0).reverse().forEach(function(m){u.ctx.shadowColor=j(m.color),u.ctx.shadowOffsetX=m.offsetX.number*u.options.scale,u.ctx.shadowOffsetY=m.offsetY.number*u.options.scale,u.ctx.shadowBlur=m.blur.number,u.renderTextWithLetterSpacing(B,t.letterSpacing,l)}),u.ctx.shadowColor="",u.ctx.shadowOffsetX=0,u.ctx.shadowOffsetY=0,u.ctx.shadowBlur=0),t.textDecorationLine.length&&(u.ctx.fillStyle=j(t.textDecorationColor||t.color),t.textDecorationLine.forEach(function(m){switch(m){case 1:u.ctx.fillRect(B.bounds.left,Math.round(B.bounds.top+l),B.bounds.width,1);break;case 2:u.ctx.fillRect(B.bounds.left,Math.round(B.bounds.top),B.bounds.width,1);break;case 3:u.ctx.fillRect(B.bounds.left,Math.ceil(B.bounds.top+d),B.bounds.width,1);break}}));break;case 1:t.webkitTextStrokeWidth&&B.text.trim().length&&(u.ctx.strokeStyle=j(t.webkitTextStrokeColor),u.ctx.lineWidth=t.webkitTextStrokeWidth,u.ctx.lineJoin=window.chrome?"miter":"round",u.ctx.strokeText(B.text,B.bounds.left,B.bounds.top+l)),u.ctx.strokeStyle="",u.ctx.lineWidth=0,u.ctx.lineJoin="miter";break}})}),[2]})})},A.prototype.renderReplacedElement=function(e,t,n){if(n&&e.intrinsicWidth>0&&e.intrinsicHeight>0){var s=vn(e),i=wn(t);this.path(i),this.ctx.save(),this.ctx.clip(),this.ctx.drawImage(n,0,0,e.intrinsicWidth,e.intrinsicHeight,s.left,s.top,s.width,s.height),this.ctx.restore()}},A.prototype.renderNodeContent=function(e){return uA(this,void 0,void 0,function(){var t,n,s,i,o,a,F,F,l,d,h,u,I,f,B,y,w,v,m,F,E,I,y;return sA(this,function(U){switch(U.label){case 0:this.applyEffects(e.getEffects(4)),t=e.container,n=e.curves,s=t.styles,i=0,o=t.textNodes,U.label=1;case 1:return i<o.length?(a=o[i],[4,this.renderTextNode(a,s)]):[3,4];case 2:U.sent(),U.label=3;case 3:return i++,[3,1];case 4:if(!(t instanceof mc))return[3,8];U.label=5;case 5:return U.trys.push([5,7,,8]),[4,this.context.cache.match(t.src)];case 6:return F=U.sent(),this.renderReplacedElement(t,n,F),[3,8];case 7:return U.sent(),this.context.logger.error("Error loading image "+t.src),[3,8];case 8:if(t instanceof Fc&&this.renderReplacedElement(t,n,t.canvas),!(t instanceof Qc))return[3,12];U.label=9;case 9:return U.trys.push([9,11,,12]),[4,this.context.cache.match(t.svg)];case 10:return F=U.sent(),this.renderReplacedElement(t,n,F),[3,12];case 11:return U.sent(),this.context.logger.error("Error loading svg "+t.svg.substring(0,255)),[3,12];case 12:return t instanceof Ic&&t.tree?(l=new A(this.context,{scale:this.options.scale,backgroundColor:t.backgroundColor,x:0,y:0,width:t.width,height:t.height}),[4,l.render(t.tree)]):[3,14];case 13:d=U.sent(),t.width&&t.height&&this.ctx.drawImage(d,0,0,t.width,t.height,t.bounds.left,t.bounds.top,t.bounds.width,t.bounds.height),U.label=14;case 14:if(t instanceof Os&&(h=Math.min(t.bounds.width,t.bounds.height),t.type===ln?t.checked&&(this.ctx.save(),this.path([new S(t.bounds.left+h*.39363,t.bounds.top+h*.79),new S(t.bounds.left+h*.16,t.bounds.top+h*.5549),new S(t.bounds.left+h*.27347,t.bounds.top+h*.44071),new S(t.bounds.left+h*.39694,t.bounds.top+h*.5649),new S(t.bounds.left+h*.72983,t.bounds.top+h*.23),new S(t.bounds.left+h*.84,t.bounds.top+h*.34085),new S(t.bounds.left+h*.39363,t.bounds.top+h*.79)]),this.ctx.fillStyle=j(Ec),this.ctx.fill(),this.ctx.restore()):t.type===cn&&t.checked&&(this.ctx.save(),this.ctx.beginPath(),this.ctx.arc(t.bounds.left+h/2,t.bounds.top+h/2,h/4,0,Math.PI*2,!0),this.ctx.fillStyle=j(Ec),this.ctx.fill(),this.ctx.restore())),Gw(t)&&t.value.length){switch(u=this.createFontStyle(s),I=u[0],f=u[1],B=this.fontMetrics.getMetrics(I,f).baseline,this.ctx.font=I,this.ctx.fillStyle=j(s.color),this.ctx.textBaseline="alphabetic",this.ctx.textAlign=Nw(t.styles.textAlign),y=vn(t),w=0,t.styles.textAlign){case 1:w+=y.width/2;break;case 2:w+=y.width;break}v=y.add(w,0,0,-y.height/2+1),this.ctx.save(),this.path([new S(y.left,y.top),new S(y.left+y.width,y.top),new S(y.left+y.width,y.top+y.height),new S(y.left,y.top+y.height)]),this.ctx.clip(),this.renderTextWithLetterSpacing(new ct(t.value,v),s.letterSpacing,B),this.ctx.restore(),this.ctx.textBaseline="alphabetic",this.ctx.textAlign="left"}if(!Z(t.styles.display,2048))return[3,20];if(t.styles.listStyleImage===null)return[3,19];if(m=t.styles.listStyleImage,m.type!==0)return[3,18];F=void 0,E=m.url,U.label=15;case 15:return U.trys.push([15,17,,18]),[4,this.context.cache.match(E)];case 16:return F=U.sent(),this.ctx.drawImage(F,t.bounds.left-(F.width+10),t.bounds.top),[3,18];case 17:return U.sent(),this.context.logger.error("Error loading list-style-image "+E),[3,18];case 18:return[3,20];case 19:e.listValue&&t.styles.listStyleType!==-1&&(I=this.createFontStyle(s)[0],this.ctx.font=I,this.ctx.fillStyle=j(s.color),this.ctx.textBaseline="middle",this.ctx.textAlign="right",y=new bA(t.bounds.left,t.bounds.top+N(t.styles.paddingTop,t.bounds.width),t.bounds.width,tc(s.lineHeight,s.fontSize.number)/2+1),this.renderTextWithLetterSpacing(new ct(e.listValue,y),s.letterSpacing,tc(s.lineHeight,s.fontSize.number)/2+2),this.ctx.textBaseline="bottom",this.ctx.textAlign="left"),U.label=20;case 20:return[2]}})})},A.prototype.renderStackContent=function(e){return uA(this,void 0,void 0,function(){var t,n,m,s,i,m,o,a,m,l,d,m,h,u,m,f,B,m,w,v,m;return sA(this,function(F){switch(F.label){case 0:if(Z(e.element.container.flags,16))debugger;return[4,this.renderNodeBackgroundAndBorders(e.element)];case 1:F.sent(),t=0,n=e.negativeZIndex,F.label=2;case 2:return t<n.length?(m=n[t],[4,this.renderStack(m)]):[3,5];case 3:F.sent(),F.label=4;case 4:return t++,[3,2];case 5:return[4,this.renderNodeContent(e.element)];case 6:F.sent(),s=0,i=e.nonInlineLevel,F.label=7;case 7:return s<i.length?(m=i[s],[4,this.renderNode(m)]):[3,10];case 8:F.sent(),F.label=9;case 9:return s++,[3,7];case 10:o=0,a=e.nonPositionedFloats,F.label=11;case 11:return o<a.length?(m=a[o],[4,this.renderStack(m)]):[3,14];case 12:F.sent(),F.label=13;case 13:return o++,[3,11];case 14:l=0,d=e.nonPositionedInlineLevel,F.label=15;case 15:return l<d.length?(m=d[l],[4,this.renderStack(m)]):[3,18];case 16:F.sent(),F.label=17;case 17:return l++,[3,15];case 18:h=0,u=e.inlineLevel,F.label=19;case 19:return h<u.length?(m=u[h],[4,this.renderNode(m)]):[3,22];case 20:F.sent(),F.label=21;case 21:return h++,[3,19];case 22:f=0,B=e.zeroOrAutoZIndexOrTransformedOrOpacity,F.label=23;case 23:return f<B.length?(m=B[f],[4,this.renderStack(m)]):[3,26];case 24:F.sent(),F.label=25;case 25:return f++,[3,23];case 26:w=0,v=e.positiveZIndex,F.label=27;case 27:return w<v.length?(m=v[w],[4,this.renderStack(m)]):[3,30];case 28:F.sent(),F.label=29;case 29:return w++,[3,27];case 30:return[2]}})})},A.prototype.mask=function(e){this.ctx.beginPath(),this.ctx.moveTo(0,0),this.ctx.lineTo(this.canvas.width,0),this.ctx.lineTo(this.canvas.width,this.canvas.height),this.ctx.lineTo(0,this.canvas.height),this.ctx.lineTo(0,0),this.formatPath(e.slice(0).reverse()),this.ctx.closePath()},A.prototype.path=function(e){this.ctx.beginPath(),this.formatPath(e),this.ctx.closePath()},A.prototype.formatPath=function(e){var t=this;e.forEach(function(n,s){var i=pA(n)?n.start:n;s===0?t.ctx.moveTo(i.x,i.y):t.ctx.lineTo(i.x,i.y),pA(n)&&t.ctx.bezierCurveTo(n.startControl.x,n.startControl.y,n.endControl.x,n.endControl.y,n.end.x,n.end.y)})},A.prototype.renderRepeat=function(e,t,n,s){this.path(e),this.ctx.fillStyle=t,this.ctx.translate(n,s),this.ctx.fill(),this.ctx.translate(-n,-s)},A.prototype.resizeImage=function(e,t,n){var s;if(e.width===t&&e.height===n)return e;var i=(s=this.canvas.ownerDocument)!==null&&s!==void 0?s:document,o=i.createElement("canvas");o.width=Math.max(1,t),o.height=Math.max(1,n);var a=o.getContext("2d");return a.drawImage(e,0,0,e.width,e.height,0,0,t,n),o},A.prototype.renderBackgroundImage=function(e){return uA(this,void 0,void 0,function(){var t,n,s,i,o,a;return sA(this,function(l){switch(l.label){case 0:t=e.styles.backgroundImage.length-1,n=function(d){var h,u,f,O,aA,gA,G,q,R,B,O,aA,gA,G,q,w,v,m,F,E,I,y,U,D,R,M,O,oA,Y,G,q,SA,aA,gA,de,IA,zA,ue,he,xA,ge,PA;return sA(this,function(Ke){switch(Ke.label){case 0:if(d.type!==0)return[3,5];h=void 0,u=d.url,Ke.label=1;case 1:return Ke.trys.push([1,3,,4]),[4,s.context.cache.match(u)];case 2:return h=Ke.sent(),[3,4];case 3:return Ke.sent(),s.context.logger.error("Error loading background-image "+u),[3,4];case 4:return h&&(f=ei(e,t,[h.width,h.height,h.width/h.height]),O=f[0],aA=f[1],gA=f[2],G=f[3],q=f[4],R=s.ctx.createPattern(s.resizeImage(h,G,q),"repeat"),s.renderRepeat(O,R,aA,gA)),[3,6];case 5:Qg(d)?(B=ei(e,t,[null,null,null]),O=B[0],aA=B[1],gA=B[2],G=B[3],q=B[4],w=pg(d.angle,G,q),v=w[0],m=w[1],F=w[2],E=w[3],I=w[4],y=document.createElement("canvas"),y.width=G,y.height=q,U=y.getContext("2d"),D=U.createLinearGradient(m,E,F,I),Wl(d.stops,v).forEach(function(vr){return D.addColorStop(vr.stop,j(vr.color))}),U.fillStyle=D,U.fillRect(0,0,G,q),G>0&&q>0&&(R=s.ctx.createPattern(y,"repeat"),s.renderRepeat(O,R,aA,gA))):Ug(d)&&(M=ei(e,t,[null,null,null]),O=M[0],oA=M[1],Y=M[2],G=M[3],q=M[4],SA=d.position.length===0?[Ss]:d.position,aA=N(SA[0],G),gA=N(SA[SA.length-1],q),de=Cg(d,aA,gA,G,q),IA=de[0],zA=de[1],IA>0&&zA>0&&(ue=s.ctx.createRadialGradient(oA+aA,Y+gA,0,oA+aA,Y+gA,IA),Wl(d.stops,IA*2).forEach(function(vr){return ue.addColorStop(vr.stop,j(vr.color))}),s.path(O),s.ctx.fillStyle=ue,IA!==zA?(he=e.bounds.left+.5*e.bounds.width,xA=e.bounds.top+.5*e.bounds.height,ge=zA/IA,PA=1/ge,s.ctx.save(),s.ctx.translate(he,xA),s.ctx.transform(1,0,0,ge,0,0),s.ctx.translate(-he,-xA),s.ctx.fillRect(oA,PA*(Y-xA)+xA,G,q*PA),s.ctx.restore()):s.ctx.fill())),Ke.label=6;case 6:return t--,[2]}})},s=this,i=0,o=e.styles.backgroundImage.slice(0).reverse(),l.label=1;case 1:return i<o.length?(a=o[i],[5,n(a)]):[3,4];case 2:l.sent(),l.label=3;case 3:return i++,[3,1];case 4:return[2]}})})},A.prototype.renderSolidBorder=function(e,t,n){return uA(this,void 0,void 0,function(){return sA(this,function(s){return this.path(Ad(n,t)),this.ctx.fillStyle=j(e),this.ctx.fill(),[2]})})},A.prototype.renderDoubleBorder=function(e,t,n,s){return uA(this,void 0,void 0,function(){var i,o;return sA(this,function(a){switch(a.label){case 0:return t<3?[4,this.renderSolidBorder(e,n,s)]:[3,2];case 1:return a.sent(),[2];case 2:return i=Iw(s,n),this.path(i),this.ctx.fillStyle=j(e),this.ctx.fill(),o=Tw(s,n),this.path(o),this.ctx.fill(),[2]}})})},A.prototype.renderNodeBackgroundAndBorders=function(e){return uA(this,void 0,void 0,function(){var t,n,s,i,o,a,l,d,h=this;return sA(this,function(u){switch(u.label){case 0:return this.applyEffects(e.getEffects(2)),t=e.container.styles,n=!OA(t.backgroundColor)||t.backgroundImage.length,s=[{style:t.borderTopStyle,color:t.borderTopColor,width:t.borderTopWidth},{style:t.borderRightStyle,color:t.borderRightColor,width:t.borderRightWidth},{style:t.borderBottomStyle,color:t.borderBottomColor,width:t.borderBottomWidth},{style:t.borderLeftStyle,color:t.borderLeftColor,width:t.borderLeftWidth}],i=kw(Le(t.backgroundClip,0),e.curves),n||t.boxShadow.length?(this.ctx.save(),this.path(i),this.ctx.clip(),OA(t.backgroundColor)||(this.ctx.fillStyle=j(t.backgroundColor),this.ctx.fill()),[4,this.renderBackgroundImage(e.container)]):[3,2];case 1:u.sent(),this.ctx.restore(),t.boxShadow.slice(0).reverse().forEach(function(f){h.ctx.save();var B=fn(e.curves),w=f.inset?0:Pw,v=yw(B,-w+(f.inset?1:-1)*f.spread.number,(f.inset?1:-1)*f.spread.number,f.spread.number*(f.inset?-2:2),f.spread.number*(f.inset?-2:2));f.inset?(h.path(B),h.ctx.clip(),h.mask(v)):(h.mask(B),h.ctx.clip(),h.path(v)),h.ctx.shadowOffsetX=f.offsetX.number+w,h.ctx.shadowOffsetY=f.offsetY.number,h.ctx.shadowColor=j(f.color),h.ctx.shadowBlur=f.blur.number,h.ctx.fillStyle=f.inset?j(f.color):"rgba(0,0,0,1)",h.ctx.fill(),h.ctx.restore()}),u.label=2;case 2:o=0,a=0,l=s,u.label=3;case 3:return a<l.length?(d=l[a],d.style!==0&&!OA(d.color)&&d.width>0?d.style!==2?[3,5]:[4,this.renderDashedDottedBorder(d.color,d.width,o,e.curves,2)]:[3,11]):[3,13];case 4:return u.sent(),[3,11];case 5:return d.style!==3?[3,7]:[4,this.renderDashedDottedBorder(d.color,d.width,o,e.curves,3)];case 6:return u.sent(),[3,11];case 7:return d.style!==4?[3,9]:[4,this.renderDoubleBorder(d.color,d.width,o,e.curves)];case 8:return u.sent(),[3,11];case 9:return[4,this.renderSolidBorder(d.color,o,e.curves)];case 10:u.sent(),u.label=11;case 11:o++,u.label=12;case 12:return a++,[3,3];case 13:return[2]}})})},A.prototype.renderDashedDottedBorder=function(e,t,n,s,i){return uA(this,void 0,void 0,function(){var o,a,l,d,h,u,f,B,w,v,m,F,E,I,y,U,y,U;return sA(this,function(D){return this.ctx.save(),o=Hw(s,n),a=Ad(s,n),i===2&&(this.path(a),this.ctx.clip()),pA(a[0])?(l=a[0].start.x,d=a[0].start.y):(l=a[0].x,d=a[0].y),pA(a[1])?(h=a[1].end.x,u=a[1].end.y):(h=a[1].x,u=a[1].y),n===0||n===2?f=Math.abs(l-h):f=Math.abs(d-u),this.ctx.beginPath(),i===3?this.formatPath(o):this.formatPath(a.slice(0,2)),B=t<3?t*3:t*2,w=t<3?t*2:t,i===3&&(B=t,w=t),v=!0,f<=B*2?v=!1:f<=B*2+w?(m=f/(2*B+w),B*=m,w*=m):(F=Math.floor((f+w)/(B+w)),E=(f-F*B)/(F-1),I=(f-(F+1)*B)/F,w=I<=0||Math.abs(w-E)<Math.abs(w-I)?E:I),v&&(i===3?this.ctx.setLineDash([0,B+w]):this.ctx.setLineDash([B,w])),i===3?(this.ctx.lineCap="round",this.ctx.lineWidth=t):this.ctx.lineWidth=t*2+1.1,this.ctx.strokeStyle=j(e),this.ctx.stroke(),this.ctx.setLineDash([]),i===2&&(pA(a[0])&&(y=a[3],U=a[0],this.ctx.beginPath(),this.formatPath([new S(y.end.x,y.end.y),new S(U.start.x,U.start.y)]),this.ctx.stroke()),pA(a[1])&&(y=a[1],U=a[2],this.ctx.beginPath(),this.formatPath([new S(y.end.x,y.end.y),new S(U.start.x,U.start.y)]),this.ctx.stroke())),this.ctx.restore(),[2]})})},A.prototype.render=function(e){return uA(this,void 0,void 0,function(){var t;return sA(this,function(n){switch(n.label){case 0:return this.options.backgroundColor&&(this.ctx.fillStyle=j(this.options.backgroundColor),this.ctx.fillRect(this.options.x,this.options.y,this.options.width,this.options.height)),t=Sw(e),[4,this.renderStack(t)];case 1:return n.sent(),this.applyEffects([]),[2,this.canvas]}})})},A}(rd),Gw=function(r){return r instanceof Sc||r instanceof yc?!0:r instanceof Os&&r.type!==cn&&r.type!==ln},kw=function(r,A){switch(r){case 0:return fn(A);case 2:return mw(A);case 1:default:return wn(A)}},Nw=function(r){switch(r){case 1:return"center";case 2:return"right";case 0:default:return"left"}},_w=["-apple-system","system-ui"],Vw=function(r){return/iPhone OS 15_(0|1)/.test(window.navigator.userAgent)?r.filter(function(A){return _w.indexOf(A)===-1}):r},Ow=function(r){mA(A,r);function A(e,t){var n=r.call(this,e,t)||this;return n.canvas=t.canvas?t.canvas:document.createElement("canvas"),n.ctx=n.canvas.getContext("2d"),n.options=t,n.canvas.width=Math.floor(t.width*t.scale),n.canvas.height=Math.floor(t.height*t.scale),n.canvas.style.width=t.width+"px",n.canvas.style.height=t.height+"px",n.ctx.scale(n.options.scale,n.options.scale),n.ctx.translate(-t.x,-t.y),n.context.logger.debug("EXPERIMENTAL ForeignObject renderer initialized ("+t.width+"x"+t.height+" at "+t.x+","+t.y+") with scale "+t.scale),n}return A.prototype.render=function(e){return uA(this,void 0,void 0,function(){var t,n;return sA(this,function(s){switch(s.label){case 0:return t=Ns(this.options.width*this.options.scale,this.options.height*this.options.scale,this.options.scale,this.options.scale,e),[4,Ww(t)];case 1:return n=s.sent(),this.options.backgroundColor&&(this.ctx.fillStyle=j(this.options.backgroundColor),this.ctx.fillRect(0,0,this.options.width*this.options.scale,this.options.height*this.options.scale)),this.ctx.drawImage(n,-this.options.x*this.options.scale,-this.options.y*this.options.scale),[2,this.canvas]}})})},A}(rd),Ww=function(r){return new Promise(function(A,e){var t=new Image;t.onload=function(){A(t)},t.onerror=e,t.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(r))})},Xw=function(){function r(A){var e=A.id,t=A.enabled;this.id=e,this.enabled=t,this.start=Date.now()}return r.prototype.debug=function(){for(var A=[],e=0;e<arguments.length;e++)A[e]=arguments[e];this.enabled&&(typeof window<"u"&&window.console&&typeof console.debug=="function"?console.debug.apply(console,Ir([this.id,this.getTime()+"ms"],A)):this.info.apply(this,A))},r.prototype.getTime=function(){return Date.now()-this.start},r.prototype.info=function(){for(var A=[],e=0;e<arguments.length;e++)A[e]=arguments[e];this.enabled&&typeof window<"u"&&window.console&&typeof console.info=="function"&&console.info.apply(console,Ir([this.id,this.getTime()+"ms"],A))},r.prototype.warn=function(){for(var A=[],e=0;e<arguments.length;e++)A[e]=arguments[e];this.enabled&&(typeof window<"u"&&window.console&&typeof console.warn=="function"?console.warn.apply(console,Ir([this.id,this.getTime()+"ms"],A)):this.info.apply(this,A))},r.prototype.error=function(){for(var A=[],e=0;e<arguments.length;e++)A[e]=arguments[e];this.enabled&&(typeof window<"u"&&window.console&&typeof console.error=="function"?console.error.apply(console,Ir([this.id,this.getTime()+"ms"],A)):this.info.apply(this,A))},r.instances={},r}(),Jw=function(){function r(A,e){var t;this.windowBounds=e,this.instanceName="#"+r.instanceCount++,this.logger=new Xw({id:this.instanceName,enabled:A.logging}),this.cache=(t=A.cache)!==null&&t!==void 0?t:new hw(this,A)}return r.instanceCount=1,r}(),zw=function(r,A){return A===void 0&&(A={}),Yw(r,A)};typeof window<"u"&&zc.setContext(window);var Yw=function(r,A){return uA(void 0,void 0,void 0,function(){var e,t,n,s,i,o,a,l,d,h,u,f,B,w,v,m,F,E,I,y,D,U,D,R,M,O,oA,Y,G,q,SA,aA,gA,de,IA,zA,ue,he,xA,ge;return sA(this,function(PA){switch(PA.label){case 0:if(!r||typeof r!="object")return[2,Promise.reject("Invalid element provided as first argument")];if(e=r.ownerDocument,!e)throw new Error("Element is not attached to a Document");if(t=e.defaultView,!t)throw new Error("Document is not attached to a Window");return n={allowTaint:(R=A.allowTaint)!==null&&R!==void 0?R:!1,imageTimeout:(M=A.imageTimeout)!==null&&M!==void 0?M:15e3,proxy:A.proxy,useCORS:(O=A.useCORS)!==null&&O!==void 0?O:!1},s=is({logging:(oA=A.logging)!==null&&oA!==void 0?oA:!0,cache:A.cache},n),i={windowWidth:(Y=A.windowWidth)!==null&&Y!==void 0?Y:t.innerWidth,windowHeight:(G=A.windowHeight)!==null&&G!==void 0?G:t.innerHeight,scrollX:(q=A.scrollX)!==null&&q!==void 0?q:t.pageXOffset,scrollY:(SA=A.scrollY)!==null&&SA!==void 0?SA:t.pageYOffset},o=new bA(i.scrollX,i.scrollY,i.windowWidth,i.windowHeight),a=new Jw(s,o),l=(aA=A.foreignObjectRendering)!==null&&aA!==void 0?aA:!1,d={allowTaint:(gA=A.allowTaint)!==null&&gA!==void 0?gA:!1,onclone:A.onclone,ignoreElements:A.ignoreElements,inlineImages:l,copyStyles:l},a.logger.debug("Starting document clone with size "+o.width+"x"+o.height+" scrolled to "+-o.left+","+-o.top),h=new Xc(a,r,d),u=h.clonedReferenceElement,u?[4,h.toIFrame(e,o)]:[2,Promise.reject("Unable to find element in cloned iframe")];case 1:return f=PA.sent(),B=Xs(u)||$f(u)?Eu(u.ownerDocument):Tr(a,u),w=B.width,v=B.height,m=B.left,F=B.top,E=$w(a,u,A.backgroundColor),I={canvas:A.canvas,backgroundColor:E,scale:(IA=(de=A.scale)!==null&&de!==void 0?de:t.devicePixelRatio)!==null&&IA!==void 0?IA:1,x:((zA=A.x)!==null&&zA!==void 0?zA:0)+m,y:((ue=A.y)!==null&&ue!==void 0?ue:0)+F,width:(he=A.width)!==null&&he!==void 0?he:Math.ceil(w),height:(xA=A.height)!==null&&xA!==void 0?xA:Math.ceil(v)},l?(a.logger.debug("Document cloned, using foreign object rendering"),D=new Ow(a,I),[4,D.render(u)]):[3,3];case 2:return y=PA.sent(),[3,5];case 3:return a.logger.debug("Document cloned, element located at "+m+","+F+" with size "+w+"x"+v+" using computed rendering"),a.logger.debug("Starting DOM parsing"),U=Hc(a,u),E===U.styles.backgroundColor&&(U.styles.backgroundColor=DA.TRANSPARENT),a.logger.debug("Starting renderer for element at "+I.x+","+I.y+" with size "+I.width+"x"+I.height),D=new Kw(a,I),[4,D.render(U)];case 4:y=PA.sent(),PA.label=5;case 5:return(!((ge=A.removeContainer)!==null&&ge!==void 0)||ge)&&(Xc.destroy(f)||a.logger.error("Cannot detach cloned iframe as it is not in the DOM anymore")),a.logger.debug("Finished rendering"),[2,y]}})})},$w=function(r,A,e){var t=A.ownerDocument,n=t.documentElement?ot(r,getComputedStyle(t.documentElement).backgroundColor):DA.TRANSPARENT,s=t.body?ot(r,getComputedStyle(t.body).backgroundColor):DA.TRANSPARENT,i=typeof e=="string"?ot(r,e):e===null?DA.TRANSPARENT:4294967295;return A===t.documentElement?OA(n)?OA(s)?i:s:n:i};const Dt=class Dt extends c.EngineObject{constructor(A,e){super(A,e),this.ad(new c.ObjResettingWithEvent(A.renderInUEChanged,()=>A.renderInUE?new sd(A,e):new nd(A,e)))}};p(Dt,"type",Dt.register("ESUeViewer",c.ESGeoDiv.type,Dt));let ti=Dt;class nd extends c.Destroyable{constructor(e,t){super();p(this,"_screenPosition",this.disposeVar(c.reactArrayWithUndefined(void 0)));const n=t.viewer;if(!n){console.warn("viewer is undefined!");return}const s=this.disposeVar(new c.ESTextLabel);s.parentID=e.id,this.ad(e.components.disposableAdd(s,!0)),s.show=!1,this.dispose(c.bind([s,"position"],[e,"position"])),this.dispose(c.bind([s,"rotation"],[e,"rotation"])),this.dispose(c.bind([s,"flyToParam"],[e,"flyToParam"])),this.dispose(c.bind([s,"flyInParam"],[e,"flyInParam"])),this.dispose(e.calcFlyToParamEvent.disposableOn(()=>{YA(n,s.id)})),this.dispose(e.calcFlyInParamEvent.disposableOn(async()=>{if(!t.actived)return;const a=await t.getCurrentCameraInfo();if(!a)return;const{position:l,rotation:d}=a;e.flyInParam={position:l,rotation:d,flyDuration:1}})),this.dispose(e.smoothMoveEvent.disposableOn((a,l)=>{Ve(n,s.id,a,l)})),this.dispose(e.smoothMoveWithRotationEvent.disposableOn((a,l,d)=>{ke(n,s.id,a,l,d)})),this.dispose(e.smoothMoveOnGroundEvent.disposableOn((a,l,d,h)=>{Ne(n,s.id,a,l,h,d)})),this.dispose(e.smoothMoveWithRotationOnGroundEvent.disposableOn((a,l,d,h,u)=>{_e(n,s.id,a,l,d,h,u)})),this.dispose(e.flyToEvent.disposableOn((a,l)=>{s.flyTo(a)})),this.dispose(e.flyInEvent.don(a=>{s.flyIn(a)}));const i=this._screenPosition,o=this.disposeVar(new c.ESCustomDiv);o.parentID=e.id,t.add(o),this.dispose(()=>t.delete(o)),this.dispose(c.bind([o,"allowPicking"],[e,"allowPicking"]));{const a=this.disposeVar(c.createAnimateFrame()),l=()=>{e.show?a.restart(void 0,async()=>{if(!e.position)return;const d=await t.lonLatAltToScreenPosition(e.position);if(!this.isDestroyed())if(!d)this._screenPosition.value=void 0;else{const[h,u]=d;h===-1&&u===-1?this._screenPosition.value=void 0:this._screenPosition.value=[h,u]}}):a.cancel()};l(),this.dispose(e.showChanged.disposableOn(l))}{const a=()=>class extends c.Destroyable{constructor(u,f,B){if(super(),this._subContainer=u,!B)return;if(!e.instanceClass)throw new Error("!sceneObject.instanceClass");const w=new c.PosFloatDiv,v=w.element;this._subContainer.appendChild(v),this.dispose(()=>this._subContainer.removeChild(v)),v.onclick=m=>{(e.allowPicking??!1)&&e.pickedEvent.emit(new c.ESJPickedResult({div:v,pointerEvent:m},e,void 0,void 0,void 0,[m.x,m.y]))};{const m=()=>{e.editing?v.children[0].style.pointerEvents="none":v.children[0].style.pointerEvents="all"};m(),this.d(e.editingChanged.don(m))}{const m=()=>{let E=e.show;if(!E)w.show=E,w.winPos=[0,0];else if(i.value){const I=t.getCurrentCameraInfo(),y=c.getDistancesFromPositions([e.position,I.position],"NONE")[0];e.minVisibleDistance<e.maxVisibleDistance?E=e.minVisibleDistance<y&&y<e.maxVisibleDistance:e.maxVisibleDistance==0&&(E=y>e.minVisibleDistance),w.show=E,w.winPos=[...i.value]}};m();const F=this.disposeVar(c.createNextAnimateFrameEvent(e.showChanged,i.changed,t.cameraChanged,e.maxVisibleDistanceChanged,e.minVisibleDistanceChanged));this.dispose(F.disposableOn(m))}{const m=()=>{const[F,E]=e.anchor??c.ESGeoDiv.defaults.anchor;w.originRatioX=F,w.originRatioY=E};m(),this.dispose(e.anchorChanged.disposableOn(m))}{const m=()=>{w.opacity=e.opacity??c.ESGeoDiv.defaults.opacity};m(),this.dispose(e.opacityChanged.disposableOn(m))}this.disposeVar(new e.instanceClass(w.contentDiv,e,B))}},l=()=>{try{e.instanceClass?o.instanceClass=a():o.instanceClass=void 0}catch(h){console.error(h)}};l();const d=this.dv(c.createNextAnimateFrameEvent(e.instanceClassChanged,e.opacityChanged,e.anchorChanged,e.editingChanged,e.showChanged,e.allowPickingChanged));this.d(d.don(l))}}get screenPosition(){return this._screenPosition.value}get screenPositionChanged(){return this._screenPosition.changed}set screenPosition(e){this._screenPosition.value=e}}class sd extends c.Destroyable{constructor(e,t){super();p(this,"_imageLabel");p(this,"_hasClassDivAndPos",{});this._imageLabel=this.dv(new c.ESImageLabel),this._imageLabel.isHoverZoom=!1,this._imageLabel.parentID=e.id;const n=t.viewer;if(!n){console.warn("viewer is undefined!");return}const s=this._imageLabel;this.ad(e.components.disposableAdd(s,!0));{const i=()=>{if(!n)return;if(!e.instanceClass)throw new Error("!sceneObject.instanceClass");const l=document.createElement("div"),d=this.dv(new e.instanceClass(l,e,t))._container;if(d.style.opacity=e.opacity.toString()??c.ESGeoDiv.defaults.opacity,d.style.position="fixed",d.style.zIndex="-1",d.style.top="0px",!document.body.contains(d)){document.body.appendChild(d);let u=d?d.querySelectorAll("*[class]"):[];for(let f=0;f<u.length;f++){const B=u[f];var h=B.getBoundingClientRect();this._hasClassDivAndPos[B.className]=[B.offsetLeft,B.offsetTop,B.offsetLeft+h.width,B.offsetTop+h.height]}}zw(d,{backgroundColor:null,allowTaint:!0,useCORS:!0,width:d.offsetWidth,height:d.offsetHeight,scale:1}).then(u=>{document.body.contains(d)&&document.body.removeChild(d),s.url=u.toDataURL(),s.show=e.show}).catch(()=>{document.body.contains(d)&&document.body.removeChild(d)})},o=()=>{try{e.instanceClass?i():(s.url="",s.show=!1)}catch(l){console.error(l)}};o();const a=this.dv(c.createNextAnimateFrameEvent(e.instanceClassChanged,e.opacityChanged));this.d(a.don(o))}{const i=()=>{s.show=e.show};s.show=!1,this.ad(e.showChanged.don(i))}this.d(c.track([s,"anchor"],[e,"anchor"])),this.d(c.bind([s,"position"],[e,"position"])),this.d(c.bind([s,"rotation"],[e,"rotation"])),this.d(c.bind([s,"flyToParam"],[e,"flyToParam"])),this.d(c.bind([s,"flyInParam"],[e,"flyInParam"])),this.d(c.bind([s,"allowPicking"],[e,"allowPicking"])),this.d(c.bind([s,"scale"],[e,"scale"])),this.d(c.track([s,"minVisibleDistance"],[e,"minVisibleDistance"])),this.d(c.track([s,"maxVisibleDistance"],[e,"maxVisibleDistance"])),this.ad(e.automaticLandingEvent.don(()=>{s.automaticLanding()})),this.d(t.widgetEvent.don(i=>{if(i.objId!==this._imageLabel.id)return;const{type:o,add:a}=i;if(o==="leftClick"&&a){const l=(a==null?void 0:a.classNames)??[],d=Object.keys(this._hasClassDivAndPos);for(let h=0;h<d.length;h++){const u=d[h];let f=this._hasClassDivAndPos[u];a&&a.mouseRelativePos&&a.mouseRelativePos[0]>=f[0]&&a.mouseRelativePos[0]<=f[2]&&a.mouseRelativePos[1]>=f[1]&&a.mouseRelativePos[1]<=f[3]&&l.push(u)}a.classNames=l}e.widgetEvent.emit({type:o,add:a})})),this.d(e.calcFlyToParamEvent.don(()=>{YA(n,s.id)})),this.d(e.calcFlyInParamEvent.don(()=>{const i=t.getCurrentCameraInfo();if(!i)return;const{position:o,rotation:a}=i;e.flyInParam={position:o,rotation:a,flyDuration:1}})),this.d(e.smoothMoveEvent.don((i,o)=>{Ve(n,s.id,i,o)})),this.d(e.smoothMoveWithRotationEvent.don((i,o,a)=>{ke(n,s.id,i,o,a)})),this.d(e.smoothMoveOnGroundEvent.don((i,o,a,l)=>{Ne(n,s.id,i,o,l,a)})),this.d(e.smoothMoveWithRotationOnGroundEvent.don((i,o,a,l,d)=>{_e(n,s.id,i,o,a,l,d)})),this.d(e.flyToEvent.don((i,o)=>{s.flyTo(i)})),this.d(e.flyInEvent.don(i=>{s.flyIn(i)}))}}const ie=class ie extends eA{constructor(A,e){super(A,e);const t=e.viewer;if(!t){console.warn("viewer is undefined!");return}this.d(A.flyToFeatureIndexEvent.don((n,s)=>{t.callUeFunc({f:"flyToFeatureIndex",p:{id:A.id,index:n,duration:s}})})),this.d(A.flyToFeatureEvent.don((n,s,i)=>{t.callUeFunc({f:"flyToFeature",p:{id:A.id,key:n,value:s,duration:i}})}))}};p(ie,"type",ie.register("ESUeViewer",c.ESGeoJson.type,ie)),p(ie,"forceUeUpdateProps",[...eA.forceUeUpdateProps,"url"]),p(ie,"propValFuncs",{...eA.propValFuncs,url:A=>typeof A=="string"?c.ESSceneObject.context.getStrFromEnv(A):A});let ri=ie;const Rt=class Rt extends nA{constructor(A,e){if(super(A,e),!e.viewer){console.warn("viewer is undefined!");return}}};p(Rt,"type",Rt.register("ESUeViewer",c.ESGeoLineString.type,Rt));let Fn=Rt;const xt=class xt extends nA{constructor(A,e){if(super(A,e),!e.viewer){console.warn("viewer is undefined!");return}}};p(xt,"type",xt.register("ESUeViewer",c.ESGeoRectangle.type,xt));let ni=xt;const Pt=class Pt extends dA{constructor(A,e){if(super(A,e),!e.viewer){console.warn("viewer is undefined!");return}}};p(Pt,"type",Pt.register("ESUeViewer",c.ESGeoWater.type,Pt));let si=Pt;const oe=class oe extends P{constructor(A,e){super(A,e);const t=e.viewer;if(!t){console.warn("viewer is undefined!");return}this.d(A.setNodePositionEvent.don((n,s)=>{io(t,A.id,n,s)})),this.d(A.setNodeRotationEvent.don((n,s)=>{oo(t,A.id,n,s)})),this.d(A.setNodeScaleEvent.don((n,s)=>{ao(t,A.id,n,s)}))}};p(oe,"forceUeUpdateProps",[...P.forceUeUpdateProps,"url"]),p(oe,"propValFuncs",{...P.propValFuncs,url:A=>typeof A=="string"?c.ESSceneObject.context.getStrFromEnv(c.rpToap(A)):(A.url=c.ESSceneObject.context.getStrFromEnv(c.rpToap(A.url)),A),czmMaximumScale:null,czmMinimumPixelSize:null,czmNativeScale:null,czmColor:null}),p(oe,"type",oe.register("ESUeViewer",c.ESGltfModel.type,oe));let ii=oe;const Kt=class Kt extends nA{constructor(A,e){if(super(A,e),!e.viewer){console.warn("viewer is undefined!");return}}};p(Kt,"type",Kt.register("ESUeViewer",c.ESHeightMeasurement.type,Kt));let oi=Kt;const Gt=class Gt extends P{constructor(A,e){if(super(A,e),!e.viewer){console.warn("viewer is undefined!");return}const n=async(i,o,a,l)=>{const{viewer:d}=i;if(!d){console.error("AIMoveTo: ueViewer.viewer is undefined");return}const h=await d.callUeFunc({f:"AIMoveTo",p:{id:o,Destination:a,Time:l}});return h.error&&console.error("AIMoveTo:",h.error),h};this.d(A.aiMoveToEvent.don((i,o)=>{n(e,A.id,i,o)}));const s=async(i,o)=>{const{viewer:a}=i;if(!a){console.error("StopAIMove: ueViewer.viewer is undefined");return}const l=await a.callUeFunc({f:"StopAIMove",p:{id:o}});return l.error&&console.error("StopAIMove:",l.error),l};this.d(A.stopAIMoveEvent.don(()=>{s(e,A.id)}))}};p(Gt,"type",Gt.register("ESUeViewer",c.ESHuman.type,Gt));let ai=Gt;const ae=class ae extends QA{constructor(A,e){if(super(A,e),!e.viewer){console.warn("viewer is undefined!");return}A.anchor=[.5,1]}};p(ae,"type",ae.register("ESUeViewer",c.ESImageLabel.type,ae)),p(ae,"forceUeUpdateProps",[...QA.forceUeUpdateProps,"url"]),p(ae,"propValFuncs",{...QA.propValFuncs,url:A=>typeof A=="string"?c.ESSceneObject.context.getStrFromEnv(c.rpToap(A)):(A.url=c.ESSceneObject.context.getStrFromEnv(c.rpToap(A.url)),A)});let li=ae;const kt=class kt extends P{constructor(A,e){if(super(A,e),!e.viewer){console.warn("viewer is undefined!");return}}};p(kt,"type",kt.register("ESUeViewer",c.ESLevelRuntimeModel.type,kt));let ci=kt;const Nt=class Nt extends Er{constructor(A,e){if(super(A,e),!e.viewer){console.warn("viewer is undefined!");return}}};p(Nt,"type",Nt.register("ESUeViewer",c.ESLocalCircle.type,Nt));let di=Nt;const _t=class _t extends eA{constructor(A,e){if(super(A,e),!e.viewer){console.warn("viewer is undefined!");return}}};p(_t,"type",_t.register("ESUeViewer",c.ESLocalPolygonZ.type,_t));let ui=_t;const Vt=class Vt extends Er{constructor(A,e){if(super(A,e),!e.viewer){console.warn("viewer is undefined!");return}}};p(Vt,"type",Vt.register("ESUeViewer",c.ESLocalRectangle.type,Vt));let hi=Vt;const Ot=class Ot extends P{constructor(A,e){if(super(A,e),!e.viewer){console.warn("viewer is undefined!");return}}};p(Ot,"type",Ot.register("ESUeViewer",c.ESLocalSkyBox.type,Ot));let gi=Ot;const Wt=class Wt extends P{constructor(A,e){if(super(A,e),!e.viewer){console.warn("viewer is undefined!");return}}};p(Wt,"type",Wt.register("ESUeViewer",c.ESLocationMeasurement.type,Wt));let Bi=Wt;const Xt=class Xt extends nA{constructor(A,e){if(super(A,e),!e.viewer){console.warn("viewer is undefined!");return}}};p(Xt,"type",Xt.register("ESUeViewer",c.ESPipeFence.type,Xt));let fi=Xt;const Jt=class Jt extends Fn{constructor(A,e){if(super(A,e),!e.viewer){console.warn("viewer is undefined!");return}}};p(Jt,"type",Jt.register("ESUeViewer",c.ESPipeline.type,Jt));let wi=Jt;const zt=class zt extends yr{constructor(A,e){super(A,e);const t=e.viewer;if(!t){console.warn("viewer is undefined!");return}this.d(A.highlightFeatureEvent.don(n=>{const s=typeof n=="number"?n.toString():n;to(t,A.id,s)})),this.d(A.highlightFeatureAndFlyToEvent.don((n,s,i,o)=>{const a=typeof n=="number"?n.toString():n;ro(t,A.id,a,o??1)})),this.d(A.setLayerVisibleEvent.don((n,s)=>{let i="";typeof s!="string"?i=JSON.stringify(s):i=s,no(t,A.id,i)})),this.d(A.setLayerColorEvent.don((n,s)=>{let i="";typeof s!="string"?i=JSON.stringify(s):i=s,so(t,A.id,i)}))}};p(zt,"type",zt.register("ESUeViewer",c.ESPipeserTileset.type,zt));let pi=zt;const Yt=class Yt extends dA{constructor(A,e){if(super(A,e),!e.viewer){console.warn("viewer is undefined!");return}}};p(Yt,"type",Yt.register("ESUeViewer",c.ESPit.type,Yt));let Ci=Yt;const $t=class $t extends QA{constructor(A,e){super(A,e);const t=e.viewer;if(!t){console.warn("viewer is undefined!");return}this.ad(A.getInitialStyleEvent.don(async()=>{try{const n=await t.callUeFunc({f:"GetInitialStyle",p:{id:A.id}});n.error!=""&&console.error("getInitialStyleEvent:",n.error),A.initialStyle.value=structuredClone(n.re)}catch(n){console.error("getInitialStyleEvent:",n),A.initialStyle.value=void 0}}))}};p($t,"type",$t.register("ESUeViewer",c.ESPoi2D.type,$t));let vi=$t;const Zt=class Zt extends P{constructor(A,e){if(super(A,e),!e.viewer){console.warn("viewer is undefined!");return}}};p(Zt,"type",Zt.register("ESUeViewer",c.ESPoi3D.type,Zt));let mi=Zt;const le=class le extends eA{constructor(A,e){if(super(A,e),!e.viewer){console.warn("viewer is undefined!");return}}};p(le,"type",le.register("ESUeViewer",c.ESPoiTileset.type,le)),p(le,"forceUeUpdateProps",[...eA.forceUeUpdateProps,"url"]),p(le,"propValFuncs",{...eA.propValFuncs,url:A=>typeof A=="string"?c.ESSceneObject.context.getStrFromEnv(A):(A.url=c.ESSceneObject.context.getStrFromEnv(A.url),A)});let Fi=le;const qt=class qt extends nA{constructor(A,e){if(super(A,e),!e.viewer){console.warn("viewer is undefined!");return}}};p(qt,"type",qt.register("ESUeViewer",c.ESPolygonFence.type,qt));let Qi=qt;const Re=class Re extends dA{constructor(A,e){if(super(A,e),!e.viewer){console.warn("viewer is undefined!");return}}};p(Re,"type",Re.register("ESUeViewer",c.ESPolygonFlattenedPlane.type,Re)),p(Re,"propValFuncs",{...dA.propValFuncs,targetID:A=>{if(!A)return"";const e=c.ESSceneObject.getSceneObject(A);return e?(e.components.main??e).id:A}});let Ui=Re;const jt=class jt extends dA{constructor(A,e){if(super(A,e),!e.viewer){console.warn("viewer is undefined!");return}}};p(jt,"type",jt.register("ESUeViewer",c.ESPolygonWithHole.type,jt));let Ei=jt;const Ar=class Ar extends qA{constructor(A,e){if(super(A,e),!e.viewer){console.warn("viewer is undefined!");return}this.d(()=>{A.ids=[]}),this.d(A.highlightInner3DtilesetEvent.don(n=>{n.highlight=!0})),this.d(A.removeHighlightInner3DtilesetEvent.don(n=>{n.highlight=!1}));{const n=o=>{o=o.toLocaleLowerCase();let a=[255,255,255,1];if(o.startsWith("#")){if(o.length===4){let l=parseInt(o[1]+o[1],16),d=parseInt(o[2]+o[2],16),h=parseInt(o[3]+o[3],16);a=[l,d,h,1]}else if(o.length===7){let l=parseInt(o.substring(1,3),16),d=parseInt(o.substring(3,5),16),h=parseInt(o.substring(5,7),16);a=[l,d,h,1]}}else if(o.startsWith("rgba")){let l=o.match(/^rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d.]+)\s*\)$/);if(l){let d=parseInt(l[1]),h=parseInt(l[2]),u=parseInt(l[3]),f=parseFloat(l[4]);a=[d,h,u,f]}}else if(o.startsWith("rgb")){let l=o.match(/^rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/);if(l){let d=parseInt(l[1]),h=parseInt(l[2]),u=parseInt(l[3]);a=[d,h,u,1]}}else console.error("color类型只能为#rrggbb、#rgb、rgba(r,g,b,a)、rgb(r,g,b)");return[a[0]/255,a[1]/255,a[2]/255,a[3]]},s=()=>{const o=A.layerConfig;if(!o)return;const a=[];o.forEach(l=>{o.filter(h=>h.dataset==l.dataset).length==1?a.push({condition:[{field:"dataset",op:"==",value:l.dataset}],color:n(l.value.color??"rgb(255,255,255)"),show:l.value.visible}):a.push({condition:[{field:"layer",op:"==",value:l.layer},{field:"dataset",op:"==",value:l.dataset}],color:n(l.value.color??"rgb(255,255,255)"),show:l.value.visible})}),A.setFeatureStyle(a)};s();const i=this.dv(c.createNextAnimateFrameEvent(A.layerConfigChanged,A.colorBlendModeChanged));this.d(i.don(()=>{s()}))}}};p(Ar,"type",Ar.register("ESUeViewer",c.ESRtsTileset.type,Ar));let yi=Ar;const er=class er extends eA{constructor(A,e){if(super(A,e),!e.viewer){console.warn("viewer is undefined!");return}this.d(A.addTreesEvent.don(n=>{c.addTreesCallFunc(e,A.id,n)})),this.d(A.removeAllTreesEvent.don(()=>{c.removeAllTreesCallFunc(e,A.id)})),this.d(A.updateTreeParamsEvent.don(n=>{c.updateTreeParamsCallFunc(e,A.id,n)})),this.d(A.cutDownTreesEvent.don((n,s)=>{c.cutDownTreesCallFunc(e,A.id,n,s)})),this.d(A.growthSimulationEvent.don((n,s,i)=>{c.growthSimulationCallFunc(e,A.id,n,s,i)}))}};p(er,"type",er.register("ESUeViewer",c.ESSeparateFoliage.type,er));let Si=er;const tr=class tr extends P{constructor(A,e){if(super(A,e),!e.viewer){console.warn("viewer is undefined!");return}}};p(tr,"type",tr.register("ESUeViewer",c.ESSubmergingAnalysis.type,tr));let Ii=tr;const rr=class rr extends dA{constructor(A,e){super(A,e);const t=e.viewer;if(!t){console.warn("viewer is undefined!");return}this.d(A.startEvent.don(()=>{t.callUeFunc({f:"Start",p:{id:A.id}})})),this.d(A.stopEvent.don(()=>{t.callUeFunc({f:"Stop",p:{id:A.id}})}))}};p(rr,"type",rr.register("ESUeViewer",c.ESSunshineAnalysis.type,rr));let Ti=rr;const nr=class nr extends dA{constructor(A,e){super(A,e);const t=e.viewer;if(!t){console.warn("viewer is undefined!");return}this.d(A.startEvent.don(()=>{t.callUeFunc({f:"Start",p:{id:A.id}})}))}};p(nr,"type",nr.register("ESUeViewer",c.ESSurfaceAreaMeasurement.type,nr));let Hi=nr;const sr=class sr extends QA{constructor(A,e){if(super(A,e),!e.viewer){console.warn("viewer is undefined!");return}}};p(sr,"type",sr.register("ESUeViewer",c.ESTextLabel.type,sr));let Li=sr;const xe=class xe extends QA{constructor(A,e){super(A,e);const t=e.viewer;if(!t){console.warn("viewer is undefined!");return}this.d(A.callFunctionEvent.don(async(n,s)=>{const i=await yn(t,A.id,n,s);A.__callFunctionResultEvent.emit(i)}))}};p(xe,"type",xe.register("ESUeViewer",c.ESUEWidget.type,xe)),p(xe,"propValFuncs",{...QA.propValFuncs,info:A=>JSON.stringify(A??{})});let bi=xe;const id=r=>{switch(r){case 0:return"成功绑定";case 1:return"解绑之前的内容,成功绑定";case 2:return"未搜索到ActorTag,无法绑定";case 3:return"搜索到ActorTag但对应的Actor不是场景原有的,而是新建的,无法绑定";case 4:return"搜索到ActorTag对应的Actor是地形或3DTileset,无法绑定";default:return"未知错误"}},Zw=r=>{switch(r){case 0:return"创建成功";case 1:return"未找到对应的资源,无法创建";case 2:return"Id与场景中现有的ActorTag重复,创建后可能出现问题,创建失败";default:return"未知错误"}},ir=class ir extends c.EngineObject{constructor(A,e){super(A,e);const t=e.viewer;if(!t){console.warn(`${A.id} UeESUnrealActor viewer is undefined!`);return}this.d(()=>{Un(t,A.id)});const n=async()=>{l()||await t.callUeFunc({f:"update",p:{id:A.id,name:A.name,show:A.show,rotation:A.rotation,flyToParam:A.flyToParam??c.ESUnrealActor.defaultFlyToParam,flyInParam:A.flyInParam??c.ESUnrealActor.defaultFlyInParam,highlight:A.highlight,collision:A.collision,scale:A.scale,minVisibleDistance:A.minVisibleDistance,maxVisibleDistance:A.maxVisibleDistance}})},s=this.dv(c.createNextAnimateFrameEvent(A.showChanged,A.nameChanged,A.rotationChanged,A.flyToParamChanged,A.flyInParamChanged,A.highlightChanged,A.collisionChanged,A.scaleChanged,A.minVisibleDistanceChanged,A.maxVisibleDistanceChanged));this.d(s.don(n)),this.d(A.flushEvent.don(()=>s.flush()));let i,o;const a=async()=>{l()||(await t.callUeFunc({f:"update",p:{id:A.id,position:A.position}}),(e.debug??!1)&&console.log(`updatePostion:${A.position},actorTag:${A.actorTag},actorClass:${A.actorClass}`))},l=()=>!i&&!o?(console.warn(`${A.id} 未绑定ActorTag或未创建ActorClass!`),!0):!1,d=async()=>{const{id:u}=A,f=await e.unBindActorByID(u);f&&f.error!==""&&console.warn(`${A.id} UeESUnrealActor UnBindActorByID: ${f.error}`),i=void 0;const B=await t.callUeFunc({f:"destroy",p:{id:u}});if(B&&B.error!==""){console.warn(`${A.id} UeESUnrealActor DestroyActorByID: ${B.error}`);return}o=void 0},h=this.dv(c.react({type:"ActorClass",actorClass:"default"}));{const u=this.dv(c.createNextAnimateFrameEvent(A.actorClassChanged,A.actorTagChanged)),f=async()=>{A.actorTag!==""?h.value={type:"ActorTag",actorTag:A.actorTag}:h.value={type:"ActorClass",actorClass:A.actorClass===""?"default":A.actorClass}};f(),this.d(u.don(f)),this.d(A.flushEvent.don(()=>u.flush()))}{const u=this.dv(c.createProcessingFromAsyncFunc(async B=>{if(await B.promise(d()),A.lastActorStatus="null",h.value.type==="ActorTag"){const{actorTag:w}=h.value;try{const v=await B.promise(e.bindActorByTag(A.id,w));if(!v)return;if(v.error!==""){console.warn(`${A.id} UeESUnrealActor BindActorByTag:${w},${v.error}`);return}if(v.re.type===0)A.lastActorStatus="bound",i=w;else if(v.re.type===1)A.lastActorStatus="bound",i=w,console.warn(`${A.id} UeESUnrealActor BindActorByTag:${w},${id(v.re.type)}`);else{i=void 0,console.warn(`${A.id} UeESUnrealActor BindActorByTag error:${w}, ${id(v.re.type)}`);return}}catch(v){console.warn(`${A.id} UeESUnrealActor BindActorByTag catch error:${w}, ${v}`);return}}else if(h.value.type==="ActorClass"){const{actorClass:w}=h.value;try{const v=await B.promise(e.createActorByClass(A.id,w));if(!v)return;if(v.error!==""){console.warn(`${A.id} UeESUnrealActor CreateActorByClass error :${w}, ${v.error}`);return}if(v.re.type===0)w!=="default"&&(A.lastActorStatus="created"),o=w;else{console.warn(`${A.id} UeESUnrealActor CreateActorByClass error type :${w},${Zw(v.re.type)}`);return}}catch(v){console.warn(`${A.id} UeESUnrealActor CreateActorByClass error catch :${w}, ${JSON.stringify(v)}`);return}}await B.promise(n()),await B.promise(a())})),f=async()=>{u.restart()};f(),this.d(h.changed.don(f))}this.d(A.positionChanged.don(a)),this.d(A.callFunctionEvent.don(async(u,f)=>{if(l()){A.__callFunctionResultEvent.emit(void 0);return}const B=await yn(t,A.id,u,f);A.__callFunctionResultEvent.emit(B)})),this.d(A.smoothMoveEvent.don((u,f)=>{l()||Ve(t,A.id,u,f)})),this.d(A.smoothMoveWithRotationEvent.don((u,f,B)=>{l()||ke(t,A.id,u,f,B)})),this.d(A.smoothMoveOnGroundEvent.don((u,f,B,w)=>{l()||Ne(t,A.id,u,f,w,B)})),this.d(A.smoothMoveWithRotationOnGroundEvent.don((u,f,B,w,v)=>{l()||_e(t,A.id,u,f,B,w,v)})),this.d(A.automaticLandingEvent.don(u=>{if(l())return;const f=[A.position[0],A.position[1]];e.getHeightByLonLat(A.position[0],A.position[1],"Visibility").then(B=>{B!==null&&(A.position=[...f,B],A.collision=u)})})),this.d(A.flyToEvent.don(async(u,f)=>{if(l())return;const B=await fe(t,A.id,u);let w="over";B===void 0?w="error":B.endType===0?w="over":B.endType===1&&(w="cancelled"),A.flyOverEvent.emit(f,w,e)})),this.d(A.calcFlyToParamEvent.don(()=>{l()||YA(t,A.id)})),this.d(A.calcFlyInParamEvent.don(async()=>{if(!e.actived)return;const u=await e.getCurrentCameraInfo();if(!u)return;const{position:f,rotation:B}=u;A.flyInParam={position:f,rotation:B,flyDuration:1}})),this.d(e.propChanged.don(u=>{l()||u.objId===A.id&&Object.keys(u.props).forEach(f=>{const B=u.props[f]===null?void 0:u.props[f];A[f]=B})}))}};p(ir,"type",ir.register("ESUeViewer",c.ESUnrealActor.type,ir));let Mi=ir;const or=class or extends P{constructor(A,e){if(super(A,e),!e.viewer){console.warn("viewer is undefined!");return}}};p(or,"type",or.register("ESUeViewer",c.ESVideoFusion.type,or));let Di=or;const ar=class ar extends P{constructor(A,e){if(super(A,e),!e.viewer){console.warn("viewer is undefined!");return}}};p(ar,"type",ar.register("ESUeViewer",c.ESViewShed.type,ar));let Ri=ar;const lr=class lr extends nA{constructor(A,e){if(super(A,e),!e.viewer){console.warn("viewer is underfined!");return}}};p(lr,"type",lr.register("ESUeViewer",c.ESVisibilityAnalysis.type,lr));let xi=lr;const cr=class cr extends dA{constructor(A,e){super(A,e);const t=e.viewer;if(!t){console.warn("viewer is undefined!");return}this.ad(c.track([A,"volume"],[A,"cutAndFillVolume"])),this.d(A.startEvent.don(()=>{t.callUeFunc({f:"Start",p:{id:A.id}})})),this.d(A.clearEvent.don(()=>{t.callUeFunc({f:"Clear",p:{id:A.id}})}))}};p(cr,"type",cr.register("ESUeViewer",c.ESVolumeMeasurement.type,cr));let Pi=cr;const Pe=class Pe extends QA{constructor(A,e){if(super(A,e),!e.viewer){console.warn("viewer is undefined!");return}}};p(Pe,"type",Pe.register("ESUeViewer",c.ESWidget.type,Pe)),p(Pe,"propValFuncs",{...QA.propValFuncs,info:A=>JSON.stringify(A??{})});let Ki=Pe;const dr=class dr extends c.EngineObject{constructor(A,e){if(super(A,e),!e.viewer){console.warn("viewer is undefined!");return}A.poi.actorTag=A.human.id,A.poi.positionOffset=[0,0,A.poiOffsetHeight-.8],this.d(A.poiOffsetHeightChanged.don(()=>{A.poi.positionOffset=[0,0,A.poiOffsetHeight-.8]})),this.d(()=>{A.poi.actorTag=""})}};p(dr,"type",dr.register("ESUeViewer",c.ESHumanPoi.type,dr));let Gi=dr;c.ESSceneObject.context.getStrFromEnv(c.ESNavigator.defaults.imgUrl);const ur=class ur extends c.EngineObject{constructor(A,e){if(super(A,e),!e.viewer){console.warn("viewer is undefined!");return}const n=this.disposeVar(new c.ESCustomDiv);e.add(n),this.dispose(()=>e.delete(n)),this.dispose(c.track([n,"show"],[A,"show"])),n.instanceClass=class extends c.Destroyable{constructor(i,o,a){super(),this._subContainer=i;const l=document.createElement("div");this._subContainer.appendChild(l),this.dispose(()=>this._subContainer.removeChild(l));{const u=async()=>{const f=await e.getCurrentCameraInfo(),B=f==null?void 0:f.position,v=[...f==null?void 0:f.rotation];v[0]=360,e.flyIn(B,v)};l.addEventListener("click",u),l.style.cursor="pointer",this.dispose(()=>l.removeEventListener("click",u))}{const u=()=>{l.style.width=`${A.cssSize?A.cssSize:c.ESNavigator.defaults.cssSize}px`,l.style.height=`${A.cssSize?A.cssSize:c.ESNavigator.defaults.cssSize}px`};u(),A.dispose(A.cssSizeChanged.disposableOn(u))}l.style.position="fixed";{const u=()=>{l.style.top=`${A.cssPosition?A.cssPosition[0]:c.ESNavigator.defaults.cssPosition[0]}px`,l.style.right=`${A.cssPosition?A.cssPosition[1]:c.ESNavigator.defaults.cssPosition[1]}px`};u(),A.dispose(A.cssPositionChanged.disposableOn(u))}l.style.transition=" right 0.4s linear",l.style.cursor="pointer";const d=document.createElement("div");l.appendChild(d),this.dispose(()=>l.removeChild(d)),d.style.width="100%",d.style.height="100%",d.style.position="relative";const h=document.createElement("img");d.appendChild(h),this.dispose(()=>d.removeChild(h)),h.style.width="100%",h.style.height="100%",h.style.border="none";{const u=()=>h.src=A.imgUrl;u(),A.dispose(A.imgUrlChanged.disposableOn(u))}{const u=()=>{const v=-e.getCurrentCameraInfo().rotation[0];h.style.transform=`rotate(${v}deg)`};let f;const B=async()=>{u(),A.show?(l.style.display="block",f=setInterval(()=>{u()},1e3)):(l.style.display="none",clearInterval(f))};this.dispose(A.showChanged.disposableOn(B)),B(),this.dispose(()=>clearInterval(f))}h.style.transformOrigin="50% 50%"}}}};p(ur,"type",ur.register("ESUeViewer",c.ESNavigator.type,ur));let ki=ur;const ce=class ce extends nA{constructor(A,e){super(A,e);const t=e.viewer;if(!t){console.warn("viewer is undefined!");return}{const n=()=>{t.callUeFunc({f:"update",p:{id:A.id,materialMode:A.materialMode}})};this.dispose(A.materialModeChanged.disposableOn(n))}}};p(ce,"type",ce.register("ESUeViewer",c.ESPath.type,ce)),p(ce,"forceUeUpdateProps",[...nA.forceUeUpdateProps]),p(ce,"propValFuncs",{...nA.propValFuncs});let Ni=ce;async function qw(r){navigator.clipboard.writeText(r).then(function(){console.log("复制成功")},function(A){console.log("复制失败")})}const hr=class hr extends c.EngineObject{constructor(A,e){if(super(A,e),!e.viewer){console.warn("viewer is undefined!");return}const n=this.disposeVar(new c.ESCustomDiv);e.add(n),this.dispose(()=>e.delete(n)),n.instanceClass=class extends c.Destroyable{constructor(i,o,a){if(super(),this._subContainer=i,!a||!(a instanceof LA))return;const l=document.createElement("div");this._subContainer.appendChild(l),this.dispose(()=>this._subContainer.removeChild(l)),l.style.width="100%",l.style.position="absolute",l.style.height=`${c.ESViewerStatusBar.defaults.height}px`,l.style.left="0",l.style.bottom="0",l.style.color="#fff",l.style.padding="0 20px 0 0",l.style.boxSizing="border-box",l.style.lineHeight=`${c.ESViewerStatusBar.defaults.height}px`,l.style.zIndex="100",l.style.alignContent="center",l.style.justifyContent="space-between";const d=document.createElement("span");l.appendChild(d),this.dispose(()=>l.removeChild(d));const h=document.createElement("span");d.appendChild(h),this.dispose(()=>d.removeChild(h));const u=document.createElement("span");d.appendChild(u),u.addEventListener("dblclick",function(){let B=u.innerHTML;B.startsWith("鼠标位置")&&(B=B.slice(5)),qw(B)}),u.style.cursor="pointer",this.dispose(()=>d.removeChild(u));const f=document.createElement("span");l.appendChild(f),this.dispose(()=>l.removeChild(f));{const B=()=>{l.style.height=(A.height??c.ESViewerStatusBar.defaults.height)+"px",l.style.lineHeight=(A.height??c.ESViewerStatusBar.defaults.height)+"px"};this.dispose(A.heightChanged.disposableOn(B)),B()}{const B=()=>{l.style.fontSize=(A.fontSize??c.ESViewerStatusBar.defaults.fontSize)+"px"};this.dispose(A.fontSizeChanged.disposableOn(B)),B()}{const B=()=>{A.bgColor?l.style.background=`rgba(${A.bgColor[0]*255},${A.bgColor[1]*255},${A.bgColor[2]*255},${A.bgColor[3]})`:l.style.background=`rgba(${c.ESViewerStatusBar.defaults.bgColor[0]},${c.ESViewerStatusBar.defaults.bgColor[1]},${c.ESViewerStatusBar.defaults.bgColor[2]},${c.ESViewerStatusBar.defaults.bgColor[3]})`};this.dispose(A.bgColorChanged.disposableOn(B)),B()}a.getVersion().then(B=>{B&&(f.innerText=`Ue 版本 : ${B[0]} `)}).catch(B=>{console.log(B)});{const B=()=>{let m="",F="";m+=`帧率:${a.getFPS().toFixed(0)}FPS`,h.innerText=m;const E=e.getCurrentCameraInfo();m+=` 经度: ${E.position[0].toFixed(5)}° 纬度: ${E.position[1].toFixed(5)}° 高度: ${E.position[2].toFixed(2)}米 偏航角: ${E.rotation[0].toFixed(2)}° 俯仰角: ${E.rotation[1].toFixed(2)}° 翻滚角:${E.rotation[2].toFixed(2)}° `,h.innerText=m,e.pick().then(I=>{if(I){const{pickResult:y}=I;if(y&&y.position){const{position:U}=y;F+=`鼠标位置:${U[0].toFixed(5)}° ${U[1].toFixed(5)}° ${U[2].toFixed(2)}m`}else F+="暂时无法获取鼠标位置...";u.innerText=F}}).catch(I=>{console.log(I)})};let w;const v=async()=>{B(),A.show?(l.style.display="flex",w=setInterval(()=>{B()},1e3)):(l.style.display="none",clearInterval(w))};this.dispose(A.showChanged.disposableOn(v)),v(),this.dispose(()=>clearInterval(w))}}}}};p(hr,"type",hr.register("ESUeViewer",c.ESViewerStatusBar.type,hr));let _i=hr;const gr=class gr extends P{constructor(A,e){if(super(A,e),!e.viewer){console.warn("viewer is undefined!");return}}};p(gr,"type",gr.register("ESUeViewer",c.ESGaussianSplatting.type,gr));let Vi=gr;const Br=class Br extends qA{constructor(e,t){super(e,t);p(this,"_es3DTileset",this.dv(new c.ES3DTileset));if(!t.viewer){console.warn("viewer is undefined!");return}this.es3DTileset.parentID=e.id;{const s=this._es3DTileset;e.components.disposableAdd(s,!0),this.d(c.track([s,"allowPicking"],[e,"allowPicking"])),this.d(c.track([s,"collision"],[e,"collision"])),this.d(c.bind([s,"flyToParam"],[e,"flyToParam"])),this.d(c.bind([s,"flyToParam"],[e,"flyToParam"])),this.d(c.track([s,"url"],[e,"url"])),this.d(c.track([s,"actorTag"],[e,"actorTag"])),this.d(c.track([s,"materialMode"],[e,"materialMode"])),this.d(c.track([s,"highlight"],[e,"highlight"])),this.d(c.track([s,"maximumScreenSpaceError"],[e,"maximumScreenSpaceError"])),this.d(c.track([s,"highlightID"],[e,"highlightID"])),this.d(c.track([s,"highlightColor"],[e,"highlightColor"])),this.d(c.bind([s,"offset"],[e,"offset"])),this.d(c.bind([s,"rotation"],[e,"rotation"])),this.d(c.track([s,"czmImageBasedLightingFactor"],[e,"czmImageBasedLightingFactor"])),this.d(c.track([s,"czmLuminanceAtZenith"],[e,"czmLuminanceAtZenith"])),this.d(c.track([s,"czmMaximumMemoryUsage"],[e,"czmMaximumMemoryUsage"])),this.d(c.track([s,"czmClassificationType"],[e,"czmClassificationType"])),this.d(c.track([s,"czmStyleJson"],[e,"czmStyleJson"])),this.d(c.track([s,"czmBackFaceCulling"],[e,"czmBackFaceCulling"])),this.d(c.track([s,"czmDebugShowBoundingVolume"],[e,"czmDebugShowBoundingVolume"])),this.d(c.track([s,"czmDebugShowContentBoundingVolume"],[e,"czmDebugShowContentBoundingVolume"])),this.d(c.track([s,"colorBlendMode"],[e,"colorBlendMode"])),this.d(c.track([s,"cacheBytes"],[e,"cacheBytes"])),this.d(c.track([s,"clippingPlaneEnabled"],[e,"clippingPlaneEnabled"])),this.d(c.track([s,"unionClippingRegions"],[e,"unionClippingRegions"])),this.d(c.track([s,"clippingPlaneEdgeColor"],[e,"clippingPlaneEdgeColor"])),this.d(c.track([s,"clippingPlaneEdgeWidth"],[e,"clippingPlaneEdgeWidth"])),this.d(c.track([s,"materialParams"],[e,"materialParams"])),this.d(c.bind([s,"supportEdit"],[e,"supportEdit"])),this.d(c.bind([s,"clippingPlanesId"],[e,"clippingPlanesId"])),this.d(c.bind([s,"clippingPlaneIds"],[e,"clippingPlaneIds"])),this.d(c.bind([s,"flattenedPlaneId"],[e,"flattenedPlaneId"])),this.d(c.bind([s,"flattenedPlaneEnabled"],[e,"flattenedPlaneEnabled"])),this.d(c.bind([s,"clippingPlaneId"],[e,"clippingPlaneId"])),this.d(c.bind([s,"excavateId"],[e,"excavateId"]))}{const s=this._es3DTileset;this.d(e.refreshTilesetEvent.don(()=>{s.refreshTileset()})),this.d(e.highlightFeatureEvent.don((...i)=>{s.highlightFeature(...i)})),this.d(e.highlightFeatureAndFlyToEvent.don((...i)=>{s.highlightFeatureAndFlyTo(...i)})),this.d(e.setFeatureColorEvent.don((...i)=>{s.setFeatureColor(...i)})),this.d(e.setFeatureVisableEvent.don((...i)=>{s.setFeatureVisable(...i)})),this.d(e.resetFeatureStyleEvent.don((...i)=>{s.resetFeatureStyle(...i)})),this.d(e.flyInEvent.don((...i)=>{s.flyIn(i[0])})),this.d(e.flyToEvent.don((...i)=>{s.flyTo(i[0])})),this.d(e.calcFlyToParamEvent.don((...i)=>{s.calcFlyToParam(...i)})),this.d(e.calcFlyInParamEvent.don((...i)=>{s.calcFlyInParam(...i)}))}{const s=this._es3DTileset;this.d(s.tilesetReady.don(i=>{e.tilesetReady.emit(i)})),this.d(s.pickedEvent.don(i=>{i.assign({sceneObject:e}),e.pickedEvent.emit(i)}))}{const s=()=>{this.es3DTileset.show=e.show};s(),this.d(e.showChanged.don(()=>{s()}))}}get es3DTileset(){return this._es3DTileset}};p(Br,"type",Br.register("ESUeViewer",c.ESRtsFeatureEditing.type,Br));let Oi=Br;const fr=class fr extends qA{constructor(A,e){if(super(A,e),!e.viewer){console.warn("viewer is undefined!");return}}};p(fr,"type",fr.register("ESUeViewer",c.ESMsTileset.type,fr));let Wi=fr;const wr=class wr extends dA{constructor(A,e){super(A,e);const t=e.viewer;if(!t){console.warn("viewer is undefined!");return}const n=()=>{t.callUeFunc({f:"update",p:{id:A.id,height:A.height??c.ESGeoExtrudedPolygon.defaults.height,extrudedHeight:A.extrudedHeight??c.ESGeoExtrudedPolygon.defaults.extrudedHeight,perPositionHeight:A.perPositionHeight??c.ESGeoExtrudedPolygon.defaults.perPositionHeight}})},s=this.disposeVar(c.createNextAnimateFrameEvent(A.heightChanged,A.extrudedHeightChanged,A.perPositionHeightChanged));this.dispose(s.disposableOn(n)),this.dispose(A.createdEvent.disposableOn(n))}};p(wr,"type",wr.register("ESUeViewer",c.ESGeoExtrudedPolygon.type,wr));let Xi=wr;const pr=class pr extends P{constructor(A,e){if(super(A,e),!e.viewer){console.warn("viewer is undefined!");return}}};p(pr,"type",pr.register("ESUeViewer",c.ESStaticMesh.type,pr));let Ji=pr;const Cr=class Cr extends nA{constructor(A,e){super(A,e);const t=e.viewer;if(!t){console.warn("viewer is undefined!");return}this.d(A.startEvent.don(()=>{t.callUeFunc({f:"Start",p:{id:A.id}})})),this.d(A.clearEvent.don(()=>{t.callUeFunc({f:"Clear",p:{id:A.id}})}))}};p(Cr,"type",Cr.register("ESUeViewer",c.ESSkylineAnalysis.type,Cr));let zi=Cr;C.copyright=void 0;try{const r="earthsdk3-ue",A="3.6.2",e="2025-12-04T02:08:23.000Z",t="北京西部世界科技有限公司",n="地球可视化实验室 (EarthSDK&CesiumLab) https://www.bjxbsj.cn",s="b951704c9cc2a53b6d53468e08f41aec0794d4c0",o=((Date.now()-1764814103e3)/36e5).toFixed(1),a=`%c🌏 ${r}%c ${A}.${s.slice(0,8)}.${e} (距今${o}个小时)
113
113
  %c${n?n+`
114
114
  `:""}当前网站正在使用${r},此软件版权归${t}所有
115
- `;C.copyright=Object.freeze({get owner(){return"北京西部世界科技有限公司"},get ownerlink(){return OWNERLINK_},get gituri(){return GITURI_&&GITURI_.replace("${commitId}","abda1a41a68af1f50f3d12644764fc7dd947f5f3")},get info(){return a},get date(){return"2025-12-01T07:11:56.000Z"},get author(){return"suplyang"},get version(){return"3.6.0-beta.7"},get name(){return"earthsdk3-ue"},get commitId(){return"abda1a41a68af1f50f3d12644764fc7dd947f5f3"},print(l=!1){!l&&window._xe2_no_copy_print||console.info(this.info,`
115
+ `;C.copyright=Object.freeze({get owner(){return"北京西部世界科技有限公司"},get ownerlink(){return OWNERLINK_},get gituri(){return GITURI_&&GITURI_.replace("${commitId}","b951704c9cc2a53b6d53468e08f41aec0794d4c0")},get info(){return a},get date(){return"2025-12-04T02:08:23.000Z"},get author(){return"suplyang"},get version(){return"3.6.2"},get name(){return"earthsdk3-ue"},get commitId(){return"b951704c9cc2a53b6d53468e08f41aec0794d4c0"},print(l=!1){!l&&window._xe2_no_copy_print||console.info(this.info,`
116
116
  font-size: 18px;
117
117
  font-weight: 1000;
118
118
  line-height: 1;