@u-gis/ue 3.0.7-beta.1 → 3.0.7

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.
@@ -325,24 +325,4 @@ Msg: ${t}`;console.warn(n)}};x.verboseLogLevel=5,function(v){v.LIST_STREAMERS="l
325
325
  content: "" !important;
326
326
  display: none !important;
327
327
  }`,Jv=function(v){Xv(v,"."+Fo+Wv+Eu+`
328
- .`+So+zv+Eu)},Xv=function(v,e){var t=v.ownerDocument;if(t){var n=t.createElement("style");n.textContent=e,v.appendChild(n)}},Fu=function(){function v(){}return v.getOrigin=function(e){var t=v._link;return t?(t.href=e,t.href=t.href,t.protocol+t.hostname+t.port):"about:blank"},v.isSameOrigin=function(e){return v.getOrigin(e)===v._origin},v.setContext=function(e){v._link=e.document.createElement("a"),v._origin=v.getOrigin(e.location.href)},v._origin="about:blank",v}(),Yv=function(){function v(e,t){this.context=e,this._options=t,this._cache={}}return v.prototype.addImage=function(e){var t=Promise.resolve();return this.has(e)||(Uo(e)||ey(e))&&(this._cache[e]=this.loadImage(e)).catch(function(){}),t},v.prototype.match=function(e){return this._cache[e]},v.prototype.loadImage=function(e){return De(this,void 0,void 0,function(){var t,n,y,C,A=this;return Pe(this,function(h){switch(h.label){case 0:return t=Fu.isSameOrigin(e),n=!Qo(e)&&this._options.useCORS===!0&&Ie.SUPPORT_CORS_IMAGES&&!t,y=!Qo(e)&&!t&&!Uo(e)&&typeof this._options.proxy=="string"&&Ie.SUPPORT_CORS_XHR&&!n,!t&&this._options.allowTaint===!1&&!Qo(e)&&!Uo(e)&&!y&&!n?[2]:(C=e,y?[4,this.proxy(C)]:[3,2]);case 1:C=h.sent(),h.label=2;case 2:return this.context.logger.debug("Added image "+e.substring(0,256)),[4,new Promise(function(m,g){var w=new Image;w.onload=function(){return m(w)},w.onerror=g,(ty(C)||n)&&(w.crossOrigin="anonymous"),w.src=C,w.complete===!0&&setTimeout(function(){return m(w)},500),A._options.imageTimeout>0&&setTimeout(function(){return g("Timed out ("+A._options.imageTimeout+"ms) loading image")},A._options.imageTimeout)})];case 3:return[2,h.sent()]}})})},v.prototype.has=function(e){return typeof this._cache[e]<"u"},v.prototype.keys=function(){return Promise.resolve(Object.keys(this._cache))},v.prototype.proxy=function(e){var t=this,n=this._options.proxy;if(!n)throw new Error("No proxy defined");var y=e.substring(0,256);return new Promise(function(C,A){var h=Ie.SUPPORT_RESPONSE_TYPE?"blob":"text",m=new XMLHttpRequest;m.onload=function(){if(m.status===200)if(h==="text")C(m.response);else{var p=new FileReader;p.addEventListener("load",function(){return C(p.result)},!1),p.addEventListener("error",function(u){return A(u)},!1),p.readAsDataURL(m.response)}else A("Failed to proxy resource "+y+" with status code "+m.status)},m.onerror=A;var g=n.indexOf("?")>-1?"&":"?";if(m.open("GET",""+n+g+"url="+encodeURIComponent(e)+"&responseType="+h),h!=="text"&&m instanceof XMLHttpRequest&&(m.responseType=h),t._options.imageTimeout){var w=t._options.imageTimeout;m.timeout=w,m.ontimeout=function(){return A("Timed out ("+w+"ms) proxying "+y)}}m.send()})},v}(),$v=/^data:image\/svg\+xml/i,Zv=/^data:image\/.*;base64,/i,qv=/^data:image\/.*/i,ey=function(v){return Ie.SUPPORT_SVG_DRAWING||!ry(v)},Qo=function(v){return qv.test(v)},ty=function(v){return Zv.test(v)},Uo=function(v){return v.substr(0,4)==="blob"},ry=function(v){return v.substr(-3).toLowerCase()==="svg"||$v.test(v)},te=function(){function v(e,t){this.type=0,this.x=e,this.y=t}return v.prototype.add=function(e,t){return new v(this.x+e,this.y+t)},v}(),Yt=function(v,e,t){return new te(v.x+(e.x-v.x)*t,v.y+(e.y-v.y)*t)},Kn=function(){function v(e,t,n,y){this.type=1,this.start=e,this.startControl=t,this.endControl=n,this.end=y}return v.prototype.subdivide=function(e,t){var n=Yt(this.start,this.startControl,e),y=Yt(this.startControl,this.endControl,e),C=Yt(this.endControl,this.end,e),A=Yt(n,y,e),h=Yt(y,C,e),m=Yt(A,h,e);return t?new v(this.start,n,A,m):new v(m,h,C,this.end)},v.prototype.add=function(e,t){return new v(this.start.add(e,t),this.startControl.add(e,t),this.endControl.add(e,t),this.end.add(e,t))},v.prototype.reverse=function(){return new v(this.end,this.endControl,this.startControl,this.start)},v}(),We=function(v){return v.type===1},Ay=function(){function v(e){var t=e.styles,n=e.bounds,y=yr(t.borderTopLeftRadius,n.width,n.height),C=y[0],A=y[1],h=yr(t.borderTopRightRadius,n.width,n.height),m=h[0],g=h[1],w=yr(t.borderBottomRightRadius,n.width,n.height),p=w[0],u=w[1],f=yr(t.borderBottomLeftRadius,n.width,n.height),c=f[0],a=f[1],i=[];i.push((C+m)/n.width),i.push((c+p)/n.width),i.push((A+a)/n.height),i.push((g+u)/n.height);var s=Math.max.apply(Math,i);s>1&&(C/=s,A/=s,m/=s,g/=s,p/=s,u/=s,c/=s,a/=s);var r=n.width-m,o=n.height-u,l=n.width-p,d=n.height-a,B=t.borderTopWidth,_=t.borderRightWidth,b=t.borderBottomWidth,E=t.borderLeftWidth,F=ge(t.paddingTop,e.bounds.width),S=ge(t.paddingRight,e.bounds.width),U=ge(t.paddingBottom,e.bounds.width),T=ge(t.paddingLeft,e.bounds.width);this.topLeftBorderDoubleOuterBox=C>0||A>0?ve(n.left+E/3,n.top+B/3,C-E/3,A-B/3,le.TOP_LEFT):new te(n.left+E/3,n.top+B/3),this.topRightBorderDoubleOuterBox=C>0||A>0?ve(n.left+r,n.top+B/3,m-_/3,g-B/3,le.TOP_RIGHT):new te(n.left+n.width-_/3,n.top+B/3),this.bottomRightBorderDoubleOuterBox=p>0||u>0?ve(n.left+l,n.top+o,p-_/3,u-b/3,le.BOTTOM_RIGHT):new te(n.left+n.width-_/3,n.top+n.height-b/3),this.bottomLeftBorderDoubleOuterBox=c>0||a>0?ve(n.left+E/3,n.top+d,c-E/3,a-b/3,le.BOTTOM_LEFT):new te(n.left+E/3,n.top+n.height-b/3),this.topLeftBorderDoubleInnerBox=C>0||A>0?ve(n.left+E*2/3,n.top+B*2/3,C-E*2/3,A-B*2/3,le.TOP_LEFT):new te(n.left+E*2/3,n.top+B*2/3),this.topRightBorderDoubleInnerBox=C>0||A>0?ve(n.left+r,n.top+B*2/3,m-_*2/3,g-B*2/3,le.TOP_RIGHT):new te(n.left+n.width-_*2/3,n.top+B*2/3),this.bottomRightBorderDoubleInnerBox=p>0||u>0?ve(n.left+l,n.top+o,p-_*2/3,u-b*2/3,le.BOTTOM_RIGHT):new te(n.left+n.width-_*2/3,n.top+n.height-b*2/3),this.bottomLeftBorderDoubleInnerBox=c>0||a>0?ve(n.left+E*2/3,n.top+d,c-E*2/3,a-b*2/3,le.BOTTOM_LEFT):new te(n.left+E*2/3,n.top+n.height-b*2/3),this.topLeftBorderStroke=C>0||A>0?ve(n.left+E/2,n.top+B/2,C-E/2,A-B/2,le.TOP_LEFT):new te(n.left+E/2,n.top+B/2),this.topRightBorderStroke=C>0||A>0?ve(n.left+r,n.top+B/2,m-_/2,g-B/2,le.TOP_RIGHT):new te(n.left+n.width-_/2,n.top+B/2),this.bottomRightBorderStroke=p>0||u>0?ve(n.left+l,n.top+o,p-_/2,u-b/2,le.BOTTOM_RIGHT):new te(n.left+n.width-_/2,n.top+n.height-b/2),this.bottomLeftBorderStroke=c>0||a>0?ve(n.left+E/2,n.top+d,c-E/2,a-b/2,le.BOTTOM_LEFT):new te(n.left+E/2,n.top+n.height-b/2),this.topLeftBorderBox=C>0||A>0?ve(n.left,n.top,C,A,le.TOP_LEFT):new te(n.left,n.top),this.topRightBorderBox=m>0||g>0?ve(n.left+r,n.top,m,g,le.TOP_RIGHT):new te(n.left+n.width,n.top),this.bottomRightBorderBox=p>0||u>0?ve(n.left+l,n.top+o,p,u,le.BOTTOM_RIGHT):new te(n.left+n.width,n.top+n.height),this.bottomLeftBorderBox=c>0||a>0?ve(n.left,n.top+d,c,a,le.BOTTOM_LEFT):new te(n.left,n.top+n.height),this.topLeftPaddingBox=C>0||A>0?ve(n.left+E,n.top+B,Math.max(0,C-E),Math.max(0,A-B),le.TOP_LEFT):new te(n.left+E,n.top+B),this.topRightPaddingBox=m>0||g>0?ve(n.left+Math.min(r,n.width-_),n.top+B,r>n.width+_?0:Math.max(0,m-_),Math.max(0,g-B),le.TOP_RIGHT):new te(n.left+n.width-_,n.top+B),this.bottomRightPaddingBox=p>0||u>0?ve(n.left+Math.min(l,n.width-E),n.top+Math.min(o,n.height-b),Math.max(0,p-_),Math.max(0,u-b),le.BOTTOM_RIGHT):new te(n.left+n.width-_,n.top+n.height-b),this.bottomLeftPaddingBox=c>0||a>0?ve(n.left+E,n.top+Math.min(d,n.height-b),Math.max(0,c-E),Math.max(0,a-b),le.BOTTOM_LEFT):new te(n.left+E,n.top+n.height-b),this.topLeftContentBox=C>0||A>0?ve(n.left+E+T,n.top+B+F,Math.max(0,C-(E+T)),Math.max(0,A-(B+F)),le.TOP_LEFT):new te(n.left+E+T,n.top+B+F),this.topRightContentBox=m>0||g>0?ve(n.left+Math.min(r,n.width+E+T),n.top+B+F,r>n.width+E+T?0:m-E+T,g-(B+F),le.TOP_RIGHT):new te(n.left+n.width-(_+S),n.top+B+F),this.bottomRightContentBox=p>0||u>0?ve(n.left+Math.min(l,n.width-(E+T)),n.top+Math.min(o,n.height+B+F),Math.max(0,p-(_+S)),u-(b+U),le.BOTTOM_RIGHT):new te(n.left+n.width-(_+S),n.top+n.height-(b+U)),this.bottomLeftContentBox=c>0||a>0?ve(n.left+E+T,n.top+d,Math.max(0,c-(E+T)),a-(b+U),le.BOTTOM_LEFT):new te(n.left+E+T,n.top+n.height-(b+U))}return v}(),le;(function(v){v[v.TOP_LEFT=0]="TOP_LEFT",v[v.TOP_RIGHT=1]="TOP_RIGHT",v[v.BOTTOM_RIGHT=2]="BOTTOM_RIGHT",v[v.BOTTOM_LEFT=3]="BOTTOM_LEFT"})(le||(le={}));var ve=function(v,e,t,n,y){var C=4*((Math.sqrt(2)-1)/3),A=t*C,h=n*C,m=v+t,g=e+n;switch(y){case le.TOP_LEFT:return new Kn(new te(v,g),new te(v,g-h),new te(m-A,e),new te(m,e));case le.TOP_RIGHT:return new Kn(new te(v,e),new te(v+A,e),new te(m,g-h),new te(m,g));case le.BOTTOM_RIGHT:return new Kn(new te(m,e),new te(m,e+h),new te(v+A,g),new te(v,g));case le.BOTTOM_LEFT:default:return new Kn(new te(m,g),new te(m-A,g),new te(v,e+h),new te(v,e))}},Nn=function(v){return[v.topLeftBorderBox,v.topRightBorderBox,v.bottomRightBorderBox,v.bottomLeftBorderBox]},ny=function(v){return[v.topLeftContentBox,v.topRightContentBox,v.bottomRightContentBox,v.bottomLeftContentBox]},Vn=function(v){return[v.topLeftPaddingBox,v.topRightPaddingBox,v.bottomRightPaddingBox,v.bottomLeftPaddingBox]},iy=function(){function v(e,t,n){this.offsetX=e,this.offsetY=t,this.matrix=n,this.type=0,this.target=6}return v}(),Gn=function(){function v(e,t){this.path=e,this.target=t,this.type=1}return v}(),oy=function(){function v(e){this.opacity=e,this.type=2,this.target=6}return v}(),sy=function(v){return v.type===0},Su=function(v){return v.type===1},ay=function(v){return v.type===2},Qu=function(v,e){return v.length===e.length?v.some(function(t,n){return t===e[n]}):!1},cy=function(v,e,t,n,y){return v.map(function(C,A){switch(A){case 0:return C.add(e,t);case 1:return C.add(e+n,t);case 2:return C.add(e+n,t+y);case 3:return C.add(e,t+y)}return C})},Uu=function(){function v(e){this.element=e,this.inlineLevel=[],this.nonInlineLevel=[],this.negativeZIndex=[],this.zeroOrAutoZIndexOrTransformedOrOpacity=[],this.positiveZIndex=[],this.nonPositionedFloats=[],this.nonPositionedInlineLevel=[]}return v}(),Tu=function(){function v(e,t){if(this.container=e,this.parent=t,this.effects=[],this.curves=new Ay(this.container),this.container.styles.opacity<1&&this.effects.push(new oy(this.container.styles.opacity)),this.container.styles.transform!==null){var n=this.container.bounds.left+this.container.styles.transformOrigin[0].number,y=this.container.bounds.top+this.container.styles.transformOrigin[1].number,C=this.container.styles.transform;this.effects.push(new iy(n,y,C))}if(this.container.styles.overflowX!==0){var A=Nn(this.curves),h=Vn(this.curves);Qu(A,h)?this.effects.push(new Gn(A,6)):(this.effects.push(new Gn(A,2)),this.effects.push(new Gn(h,4)))}}return v.prototype.getEffects=function(e){for(var t=[2,3].indexOf(this.container.styles.position)===-1,n=this.parent,y=this.effects.slice(0);n;){var C=n.effects.filter(function(m){return!Su(m)});if(t||n.container.styles.position!==0||!n.parent){if(y.unshift.apply(y,C),t=[2,3].indexOf(n.container.styles.position)===-1,n.container.styles.overflowX!==0){var A=Nn(n.curves),h=Vn(n.curves);Qu(A,h)||y.unshift(new Gn(h,6))}}else y.unshift.apply(y,C);n=n.parent}return y.filter(function(m){return Se(m.target,e)})},v}(),To=function(v,e,t,n){v.container.elements.forEach(function(y){var C=Se(y.flags,4),A=Se(y.flags,2),h=new Tu(y,v);Se(y.styles.display,2048)&&n.push(h);var m=Se(y.flags,8)?[]:n;if(C||A){var g=C||y.styles.isPositioned()?t:e,w=new Uu(h);if(y.styles.isPositioned()||y.styles.opacity<1||y.styles.isTransformed()){var p=y.styles.zIndex.order;if(p<0){var u=0;g.negativeZIndex.some(function(c,a){return p>c.element.container.styles.zIndex.order?(u=a,!1):u>0}),g.negativeZIndex.splice(u,0,w)}else if(p>0){var f=0;g.positiveZIndex.some(function(c,a){return p>=c.element.container.styles.zIndex.order?(f=a+1,!1):f>0}),g.positiveZIndex.splice(f,0,w)}else g.zeroOrAutoZIndexOrTransformedOrOpacity.push(w)}else y.styles.isFloating()?g.nonPositionedFloats.push(w):g.nonPositionedInlineLevel.push(w);To(h,w,C?w:t,m)}else y.styles.isInlineLevel()?e.inlineLevel.push(h):e.nonInlineLevel.push(h),To(h,e,t,m);Se(y.flags,8)&&Iu(y,m)})},Iu=function(v,e){for(var t=v instanceof mo?v.start:1,n=v instanceof mo?v.reversed:!1,y=0;y<e.length;y++){var C=e[y];C.container instanceof ru&&typeof C.container.value=="number"&&C.container.value!==0&&(t=C.container.value),C.listValue=_r(t,C.container.styles.listStyleType,!0),t+=n?-1:1}},ly=function(v){var e=new Tu(v,null),t=new Uu(e),n=[];return To(e,t,t,n),Iu(e.container,n),t},Pu=function(v,e){switch(e){case 0:return ze(v.topLeftBorderBox,v.topLeftPaddingBox,v.topRightBorderBox,v.topRightPaddingBox);case 1:return ze(v.topRightBorderBox,v.topRightPaddingBox,v.bottomRightBorderBox,v.bottomRightPaddingBox);case 2:return ze(v.bottomRightBorderBox,v.bottomRightPaddingBox,v.bottomLeftBorderBox,v.bottomLeftPaddingBox);case 3:default:return ze(v.bottomLeftBorderBox,v.bottomLeftPaddingBox,v.topLeftBorderBox,v.topLeftPaddingBox)}},uy=function(v,e){switch(e){case 0:return ze(v.topLeftBorderBox,v.topLeftBorderDoubleOuterBox,v.topRightBorderBox,v.topRightBorderDoubleOuterBox);case 1:return ze(v.topRightBorderBox,v.topRightBorderDoubleOuterBox,v.bottomRightBorderBox,v.bottomRightBorderDoubleOuterBox);case 2:return ze(v.bottomRightBorderBox,v.bottomRightBorderDoubleOuterBox,v.bottomLeftBorderBox,v.bottomLeftBorderDoubleOuterBox);case 3:default:return ze(v.bottomLeftBorderBox,v.bottomLeftBorderDoubleOuterBox,v.topLeftBorderBox,v.topLeftBorderDoubleOuterBox)}},dy=function(v,e){switch(e){case 0:return ze(v.topLeftBorderDoubleInnerBox,v.topLeftPaddingBox,v.topRightBorderDoubleInnerBox,v.topRightPaddingBox);case 1:return ze(v.topRightBorderDoubleInnerBox,v.topRightPaddingBox,v.bottomRightBorderDoubleInnerBox,v.bottomRightPaddingBox);case 2:return ze(v.bottomRightBorderDoubleInnerBox,v.bottomRightPaddingBox,v.bottomLeftBorderDoubleInnerBox,v.bottomLeftPaddingBox);case 3:default:return ze(v.bottomLeftBorderDoubleInnerBox,v.bottomLeftPaddingBox,v.topLeftBorderDoubleInnerBox,v.topLeftPaddingBox)}},fy=function(v,e){switch(e){case 0:return jn(v.topLeftBorderStroke,v.topRightBorderStroke);case 1:return jn(v.topRightBorderStroke,v.bottomRightBorderStroke);case 2:return jn(v.bottomRightBorderStroke,v.bottomLeftBorderStroke);case 3:default:return jn(v.bottomLeftBorderStroke,v.topLeftBorderStroke)}},jn=function(v,e){var t=[];return We(v)?t.push(v.subdivide(.5,!1)):t.push(v),We(e)?t.push(e.subdivide(.5,!0)):t.push(e),t},ze=function(v,e,t,n){var y=[];return We(v)?y.push(v.subdivide(.5,!1)):y.push(v),We(t)?y.push(t.subdivide(.5,!0)):y.push(t),We(n)?y.push(n.subdivide(.5,!0).reverse()):y.push(n),We(e)?y.push(e.subdivide(.5,!1).reverse()):y.push(e),y},xu=function(v){var e=v.bounds,t=v.styles;return e.add(t.borderLeftWidth,t.borderTopWidth,-(t.borderRightWidth+t.borderLeftWidth),-(t.borderTopWidth+t.borderBottomWidth))},Wn=function(v){var e=v.styles,t=v.bounds,n=ge(e.paddingLeft,t.width),y=ge(e.paddingRight,t.width),C=ge(e.paddingTop,t.width),A=ge(e.paddingBottom,t.width);return t.add(n+e.borderLeftWidth,C+e.borderTopWidth,-(e.borderRightWidth+e.borderLeftWidth+n+y),-(e.borderTopWidth+e.borderBottomWidth+C+A))},hy=function(v,e){return v===0?e.bounds:v===2?Wn(e):xu(e)},py=function(v,e){return v===0?e.bounds:v===2?Wn(e):xu(e)},Io=function(v,e,t){var n=hy(Zt(v.styles.backgroundOrigin,e),v),y=py(Zt(v.styles.backgroundClip,e),v),C=gy(Zt(v.styles.backgroundSize,e),t,n),A=C[0],h=C[1],m=yr(Zt(v.styles.backgroundPosition,e),n.width-A,n.height-h),g=vy(Zt(v.styles.backgroundRepeat,e),m,C,n,y),w=Math.round(n.left+m[0]),p=Math.round(n.top+m[1]);return[g,w,p,A,h]},$t=function(v){return fe(v)&&v.value===Wt.AUTO},zn=function(v){return typeof v=="number"},gy=function(v,e,t){var n=e[0],y=e[1],C=e[2],A=v[0],h=v[1];if(!A)return[0,0];if(Fe(A)&&h&&Fe(h))return[ge(A,t.width),ge(h,t.height)];var m=zn(C);if(fe(A)&&(A.value===Wt.CONTAIN||A.value===Wt.COVER)){if(zn(C)){var g=t.width/t.height;return g<C!=(A.value===Wt.COVER)?[t.width,t.width/C]:[t.height*C,t.height]}return[t.width,t.height]}var w=zn(n),p=zn(y),u=w||p;if($t(A)&&(!h||$t(h))){if(w&&p)return[n,y];if(!m&&!u)return[t.width,t.height];if(u&&m){var f=w?n:y*C,c=p?y:n/C;return[f,c]}var a=w?n:t.width,i=p?y:t.height;return[a,i]}if(m){var s=0,r=0;return Fe(A)?s=ge(A,t.width):Fe(h)&&(r=ge(h,t.height)),$t(A)?s=r*C:(!h||$t(h))&&(r=s/C),[s,r]}var o=null,l=null;if(Fe(A)?o=ge(A,t.width):h&&Fe(h)&&(l=ge(h,t.height)),o!==null&&(!h||$t(h))&&(l=w&&p?o/n*y:t.height),l!==null&&$t(A)&&(o=w&&p?l/y*n:t.width),o!==null&&l!==null)return[o,l];throw new Error("Unable to calculate background-size for element")},Zt=function(v,e){var t=v[e];return typeof t>"u"?v[0]:t},vy=function(v,e,t,n,y){var C=e[0],A=e[1],h=t[0],m=t[1];switch(v){case 2:return[new te(Math.round(n.left),Math.round(n.top+A)),new te(Math.round(n.left+n.width),Math.round(n.top+A)),new te(Math.round(n.left+n.width),Math.round(m+n.top+A)),new te(Math.round(n.left),Math.round(m+n.top+A))];case 3:return[new te(Math.round(n.left+C),Math.round(n.top)),new te(Math.round(n.left+C+h),Math.round(n.top)),new te(Math.round(n.left+C+h),Math.round(n.height+n.top)),new te(Math.round(n.left+C),Math.round(n.height+n.top))];case 1:return[new te(Math.round(n.left+C),Math.round(n.top+A)),new te(Math.round(n.left+C+h),Math.round(n.top+A)),new te(Math.round(n.left+C+h),Math.round(n.top+A+m)),new te(Math.round(n.left+C),Math.round(n.top+A+m))];default:return[new te(Math.round(y.left),Math.round(y.top)),new te(Math.round(y.left+y.width),Math.round(y.top)),new te(Math.round(y.left+y.width),Math.round(y.height+y.top)),new te(Math.round(y.left),Math.round(y.height+y.top))]}},yy="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",Ou="Hidden Text",my=function(){function v(e){this._data={},this._document=e}return v.prototype.parseMetrics=function(e,t){var n=this._document.createElement("div"),y=this._document.createElement("img"),C=this._document.createElement("span"),A=this._document.body;n.style.visibility="hidden",n.style.fontFamily=e,n.style.fontSize=t,n.style.margin="0",n.style.padding="0",n.style.whiteSpace="nowrap",A.appendChild(n),y.src=yy,y.width=1,y.height=1,y.style.margin="0",y.style.padding="0",y.style.verticalAlign="baseline",C.style.fontFamily=e,C.style.fontSize=t,C.style.margin="0",C.style.padding="0",C.appendChild(this._document.createTextNode(Ou)),n.appendChild(C),n.appendChild(y);var h=y.offsetTop-C.offsetTop+2;n.removeChild(C),n.appendChild(this._document.createTextNode(Ou)),n.style.lineHeight="normal",y.style.verticalAlign="super";var m=y.offsetTop-n.offsetTop+2;return A.removeChild(n),{baseline:h,middle:m}},v.prototype.getMetrics=function(e,t){var n=e+" "+t;return typeof this._data[n]>"u"&&(this._data[n]=this.parseMetrics(e,t)),this._data[n]},v}(),Mu=function(){function v(e,t){this.context=e,this.options=t}return v}(),wy=1e4,By=function(v){Xe(e,v);function e(t,n){var y=v.call(this,t,n)||this;return y._activeEffects=[],y.canvas=n.canvas?n.canvas:document.createElement("canvas"),y.ctx=y.canvas.getContext("2d"),n.canvas||(y.canvas.width=Math.floor(n.width*n.scale),y.canvas.height=Math.floor(n.height*n.scale),y.canvas.style.width=n.width+"px",y.canvas.style.height=n.height+"px"),y.fontMetrics=new my(document),y.ctx.scale(y.options.scale,y.options.scale),y.ctx.translate(-n.x,-n.y),y.ctx.textBaseline="bottom",y._activeEffects=[],y.context.logger.debug("Canvas renderer initialized ("+n.width+"x"+n.height+") with scale "+n.scale),y}return e.prototype.applyEffects=function(t){for(var n=this;this._activeEffects.length;)this.popEffect();t.forEach(function(y){return n.applyEffect(y)})},e.prototype.applyEffect=function(t){this.ctx.save(),ay(t)&&(this.ctx.globalAlpha=t.opacity),sy(t)&&(this.ctx.translate(t.offsetX,t.offsetY),this.ctx.transform(t.matrix[0],t.matrix[1],t.matrix[2],t.matrix[3],t.matrix[4],t.matrix[5]),this.ctx.translate(-t.offsetX,-t.offsetY)),Su(t)&&(this.path(t.path),this.ctx.clip()),this._activeEffects.push(t)},e.prototype.popEffect=function(){this._activeEffects.pop(),this.ctx.restore()},e.prototype.renderStack=function(t){return De(this,void 0,void 0,function(){var n;return Pe(this,function(y){switch(y.label){case 0:return n=t.element.container.styles,n.isVisible()?[4,this.renderStackContent(t)]:[3,2];case 1:y.sent(),y.label=2;case 2:return[2]}})})},e.prototype.renderNode=function(t){return De(this,void 0,void 0,function(){return Pe(this,function(n){switch(n.label){case 0:if(Se(t.container.flags,16))debugger;return t.container.styles.isVisible()?[4,this.renderNodeBackgroundAndBorders(t)]:[3,3];case 1:return n.sent(),[4,this.renderNodeContent(t)];case 2:n.sent(),n.label=3;case 3:return[2]}})})},e.prototype.renderTextWithLetterSpacing=function(t,n,y){var C=this;if(n===0)this.ctx.fillText(t.text,t.bounds.left,t.bounds.top+y);else{var A=yo(t.text);A.reduce(function(h,m){return C.ctx.fillText(m,h,t.bounds.top+y),h+C.ctx.measureText(m).width},t.bounds.left)}},e.prototype.createFontStyle=function(t){var n=t.fontVariant.filter(function(A){return A==="normal"||A==="small-caps"}).join(""),y=Fy(t.fontFamily).join(", "),C=vr(t.fontSize)?""+t.fontSize.number+t.fontSize.unit:t.fontSize.number+"px";return[[t.fontStyle,n,t.fontWeight,C,y].join(" "),y,C]},e.prototype.renderTextNode=function(t,n){return De(this,void 0,void 0,function(){var y,C,A,h,m,g,w,p,u=this;return Pe(this,function(f){return y=this.createFontStyle(n),C=y[0],A=y[1],h=y[2],this.ctx.font=C,this.ctx.direction=n.direction===1?"rtl":"ltr",this.ctx.textAlign="left",this.ctx.textBaseline="alphabetic",m=this.fontMetrics.getMetrics(A,h),g=m.baseline,w=m.middle,p=n.paintOrder,t.textBounds.forEach(function(c){p.forEach(function(a){switch(a){case 0:u.ctx.fillStyle=Qe(n.color),u.renderTextWithLetterSpacing(c,n.letterSpacing,g);var i=n.textShadow;i.length&&c.text.trim().length&&(i.slice(0).reverse().forEach(function(s){u.ctx.shadowColor=Qe(s.color),u.ctx.shadowOffsetX=s.offsetX.number*u.options.scale,u.ctx.shadowOffsetY=s.offsetY.number*u.options.scale,u.ctx.shadowBlur=s.blur.number,u.renderTextWithLetterSpacing(c,n.letterSpacing,g)}),u.ctx.shadowColor="",u.ctx.shadowOffsetX=0,u.ctx.shadowOffsetY=0,u.ctx.shadowBlur=0),n.textDecorationLine.length&&(u.ctx.fillStyle=Qe(n.textDecorationColor||n.color),n.textDecorationLine.forEach(function(s){switch(s){case 1:u.ctx.fillRect(c.bounds.left,Math.round(c.bounds.top+g),c.bounds.width,1);break;case 2:u.ctx.fillRect(c.bounds.left,Math.round(c.bounds.top),c.bounds.width,1);break;case 3:u.ctx.fillRect(c.bounds.left,Math.ceil(c.bounds.top+w),c.bounds.width,1);break}}));break;case 1:n.webkitTextStrokeWidth&&c.text.trim().length&&(u.ctx.strokeStyle=Qe(n.webkitTextStrokeColor),u.ctx.lineWidth=n.webkitTextStrokeWidth,u.ctx.lineJoin=window.chrome?"miter":"round",u.ctx.strokeText(c.text,c.bounds.left,c.bounds.top+g)),u.ctx.strokeStyle="",u.ctx.lineWidth=0,u.ctx.lineJoin="miter";break}})}),[2]})})},e.prototype.renderReplacedElement=function(t,n,y){if(y&&t.intrinsicWidth>0&&t.intrinsicHeight>0){var C=Wn(t),A=Vn(n);this.path(A),this.ctx.save(),this.ctx.clip(),this.ctx.drawImage(y,0,0,t.intrinsicWidth,t.intrinsicHeight,C.left,C.top,C.width,C.height),this.ctx.restore()}},e.prototype.renderNodeContent=function(t){return De(this,void 0,void 0,function(){var n,y,C,A,h,m,r,r,g,w,p,u,l,f,c,d,a,i,s,r,o,l,d;return Pe(this,function(B){switch(B.label){case 0:this.applyEffects(t.getEffects(4)),n=t.container,y=t.curves,C=n.styles,A=0,h=n.textNodes,B.label=1;case 1:return A<h.length?(m=h[A],[4,this.renderTextNode(m,C)]):[3,4];case 2:B.sent(),B.label=3;case 3:return A++,[3,1];case 4:if(!(n instanceof ql))return[3,8];B.label=5;case 5:return B.trys.push([5,7,,8]),[4,this.context.cache.match(n.src)];case 6:return r=B.sent(),this.renderReplacedElement(n,y,r),[3,8];case 7:return B.sent(),this.context.logger.error("Error loading image "+n.src),[3,8];case 8:if(n instanceof eu&&this.renderReplacedElement(n,y,n.canvas),!(n instanceof tu))return[3,12];B.label=9;case 9:return B.trys.push([9,11,,12]),[4,this.context.cache.match(n.svg)];case 10:return r=B.sent(),this.renderReplacedElement(n,y,r),[3,12];case 11:return B.sent(),this.context.logger.error("Error loading svg "+n.svg.substring(0,255)),[3,12];case 12:return n instanceof ou&&n.tree?(g=new e(this.context,{scale:this.options.scale,backgroundColor:n.backgroundColor,x:0,y:0,width:n.width,height:n.height}),[4,g.render(n.tree)]):[3,14];case 13:w=B.sent(),n.width&&n.height&&this.ctx.drawImage(w,0,0,n.width,n.height,n.bounds.left,n.bounds.top,n.bounds.width,n.bounds.height),B.label=14;case 14:if(n instanceof wo&&(p=Math.min(n.bounds.width,n.bounds.height),n.type===Mn?n.checked&&(this.ctx.save(),this.path([new te(n.bounds.left+p*.39363,n.bounds.top+p*.79),new te(n.bounds.left+p*.16,n.bounds.top+p*.5549),new te(n.bounds.left+p*.27347,n.bounds.top+p*.44071),new te(n.bounds.left+p*.39694,n.bounds.top+p*.5649),new te(n.bounds.left+p*.72983,n.bounds.top+p*.23),new te(n.bounds.left+p*.84,n.bounds.top+p*.34085),new te(n.bounds.left+p*.39363,n.bounds.top+p*.79)]),this.ctx.fillStyle=Qe(Au),this.ctx.fill(),this.ctx.restore()):n.type===Hn&&n.checked&&(this.ctx.save(),this.ctx.beginPath(),this.ctx.arc(n.bounds.left+p/2,n.bounds.top+p/2,p/4,0,Math.PI*2,!0),this.ctx.fillStyle=Qe(Au),this.ctx.fill(),this.ctx.restore())),Cy(n)&&n.value.length){switch(u=this.createFontStyle(C),l=u[0],f=u[1],c=this.fontMetrics.getMetrics(l,f).baseline,this.ctx.font=l,this.ctx.fillStyle=Qe(C.color),this.ctx.textBaseline="alphabetic",this.ctx.textAlign=_y(n.styles.textAlign),d=Wn(n),a=0,n.styles.textAlign){case 1:a+=d.width/2;break;case 2:a+=d.width;break}i=d.add(a,0,0,-d.height/2+1),this.ctx.save(),this.path([new te(d.left,d.top),new te(d.left+d.width,d.top),new te(d.left+d.width,d.top+d.height),new te(d.left,d.top+d.height)]),this.ctx.clip(),this.renderTextWithLetterSpacing(new Cr(n.value,i),C.letterSpacing,c),this.ctx.restore(),this.ctx.textBaseline="alphabetic",this.ctx.textAlign="left"}if(!Se(n.styles.display,2048))return[3,20];if(n.styles.listStyleImage===null)return[3,19];if(s=n.styles.listStyleImage,s.type!==0)return[3,18];r=void 0,o=s.url,B.label=15;case 15:return B.trys.push([15,17,,18]),[4,this.context.cache.match(o)];case 16:return r=B.sent(),this.ctx.drawImage(r,n.bounds.left-(r.width+10),n.bounds.top),[3,18];case 17:return B.sent(),this.context.logger.error("Error loading list-style-image "+o),[3,18];case 18:return[3,20];case 19:t.listValue&&n.styles.listStyleType!==-1&&(l=this.createFontStyle(C)[0],this.ctx.font=l,this.ctx.fillStyle=Qe(C.color),this.ctx.textBaseline="middle",this.ctx.textAlign="right",d=new at(n.bounds.left,n.bounds.top+ge(n.styles.paddingTop,n.bounds.width),n.bounds.width,Ol(C.lineHeight,C.fontSize.number)/2+1),this.renderTextWithLetterSpacing(new Cr(t.listValue,d),C.letterSpacing,Ol(C.lineHeight,C.fontSize.number)/2+2),this.ctx.textBaseline="bottom",this.ctx.textAlign="left"),B.label=20;case 20:return[2]}})})},e.prototype.renderStackContent=function(t){return De(this,void 0,void 0,function(){var n,y,s,C,A,s,h,m,s,g,w,s,p,u,s,f,c,s,a,i,s;return Pe(this,function(r){switch(r.label){case 0:if(Se(t.element.container.flags,16))debugger;return[4,this.renderNodeBackgroundAndBorders(t.element)];case 1:r.sent(),n=0,y=t.negativeZIndex,r.label=2;case 2:return n<y.length?(s=y[n],[4,this.renderStack(s)]):[3,5];case 3:r.sent(),r.label=4;case 4:return n++,[3,2];case 5:return[4,this.renderNodeContent(t.element)];case 6:r.sent(),C=0,A=t.nonInlineLevel,r.label=7;case 7:return C<A.length?(s=A[C],[4,this.renderNode(s)]):[3,10];case 8:r.sent(),r.label=9;case 9:return C++,[3,7];case 10:h=0,m=t.nonPositionedFloats,r.label=11;case 11:return h<m.length?(s=m[h],[4,this.renderStack(s)]):[3,14];case 12:r.sent(),r.label=13;case 13:return h++,[3,11];case 14:g=0,w=t.nonPositionedInlineLevel,r.label=15;case 15:return g<w.length?(s=w[g],[4,this.renderStack(s)]):[3,18];case 16:r.sent(),r.label=17;case 17:return g++,[3,15];case 18:p=0,u=t.inlineLevel,r.label=19;case 19:return p<u.length?(s=u[p],[4,this.renderNode(s)]):[3,22];case 20:r.sent(),r.label=21;case 21:return p++,[3,19];case 22:f=0,c=t.zeroOrAutoZIndexOrTransformedOrOpacity,r.label=23;case 23:return f<c.length?(s=c[f],[4,this.renderStack(s)]):[3,26];case 24:r.sent(),r.label=25;case 25:return f++,[3,23];case 26:a=0,i=t.positiveZIndex,r.label=27;case 27:return a<i.length?(s=i[a],[4,this.renderStack(s)]):[3,30];case 28:r.sent(),r.label=29;case 29:return a++,[3,27];case 30:return[2]}})})},e.prototype.mask=function(t){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(t.slice(0).reverse()),this.ctx.closePath()},e.prototype.path=function(t){this.ctx.beginPath(),this.formatPath(t),this.ctx.closePath()},e.prototype.formatPath=function(t){var n=this;t.forEach(function(y,C){var A=We(y)?y.start:y;C===0?n.ctx.moveTo(A.x,A.y):n.ctx.lineTo(A.x,A.y),We(y)&&n.ctx.bezierCurveTo(y.startControl.x,y.startControl.y,y.endControl.x,y.endControl.y,y.end.x,y.end.y)})},e.prototype.renderRepeat=function(t,n,y,C){this.path(t),this.ctx.fillStyle=n,this.ctx.translate(y,C),this.ctx.fill(),this.ctx.translate(-y,-C)},e.prototype.resizeImage=function(t,n,y){var C;if(t.width===n&&t.height===y)return t;var A=(C=this.canvas.ownerDocument)!==null&&C!==void 0?C:document,h=A.createElement("canvas");h.width=Math.max(1,n),h.height=Math.max(1,y);var m=h.getContext("2d");return m.drawImage(t,0,0,t.width,t.height,0,0,n,y),h},e.prototype.renderBackgroundImage=function(t){return De(this,void 0,void 0,function(){var n,y,C,A,h,m;return Pe(this,function(g){switch(g.label){case 0:n=t.styles.backgroundImage.length-1,y=function(w){var p,u,f,F,I,M,T,Q,b,c,F,I,M,T,Q,a,i,s,r,o,l,d,B,_,b,E,F,S,U,T,Q,P,I,M,K,W,L,O,H,k,G,R;return Pe(this,function(D){switch(D.label){case 0:if(w.type!==0)return[3,5];p=void 0,u=w.url,D.label=1;case 1:return D.trys.push([1,3,,4]),[4,C.context.cache.match(u)];case 2:return p=D.sent(),[3,4];case 3:return D.sent(),C.context.logger.error("Error loading background-image "+u),[3,4];case 4:return p&&(f=Io(t,n,[p.width,p.height,p.width/p.height]),F=f[0],I=f[1],M=f[2],T=f[3],Q=f[4],b=C.ctx.createPattern(C.resizeImage(p,T,Q),"repeat"),C.renderRepeat(F,b,I,M)),[3,6];case 5:sp(w)?(c=Io(t,n,[null,null,null]),F=c[0],I=c[1],M=c[2],T=c[3],Q=c[4],a=rp(w.angle,T,Q),i=a[0],s=a[1],r=a[2],o=a[3],l=a[4],d=document.createElement("canvas"),d.width=T,d.height=Q,B=d.getContext("2d"),_=B.createLinearGradient(s,o,r,l),bl(w.stops,i).forEach(function(N){return _.addColorStop(N.stop,Qe(N.color))}),B.fillStyle=_,B.fillRect(0,0,T,Q),T>0&&Q>0&&(b=C.ctx.createPattern(d,"repeat"),C.renderRepeat(F,b,I,M))):ap(w)&&(E=Io(t,n,[null,null,null]),F=E[0],S=E[1],U=E[2],T=E[3],Q=E[4],P=w.position.length===0?[ro]:w.position,I=ge(P[0],T),M=ge(P[P.length-1],Q),K=Ap(w,I,M,T,Q),W=K[0],L=K[1],W>0&&L>0&&(O=C.ctx.createRadialGradient(S+I,U+M,0,S+I,U+M,W),bl(w.stops,W*2).forEach(function(N){return O.addColorStop(N.stop,Qe(N.color))}),C.path(F),C.ctx.fillStyle=O,W!==L?(H=t.bounds.left+.5*t.bounds.width,k=t.bounds.top+.5*t.bounds.height,G=L/W,R=1/G,C.ctx.save(),C.ctx.translate(H,k),C.ctx.transform(1,0,0,G,0,0),C.ctx.translate(-H,-k),C.ctx.fillRect(S,R*(U-k)+k,T,Q*R),C.ctx.restore()):C.ctx.fill())),D.label=6;case 6:return n--,[2]}})},C=this,A=0,h=t.styles.backgroundImage.slice(0).reverse(),g.label=1;case 1:return A<h.length?(m=h[A],[5,y(m)]):[3,4];case 2:g.sent(),g.label=3;case 3:return A++,[3,1];case 4:return[2]}})})},e.prototype.renderSolidBorder=function(t,n,y){return De(this,void 0,void 0,function(){return Pe(this,function(C){return this.path(Pu(y,n)),this.ctx.fillStyle=Qe(t),this.ctx.fill(),[2]})})},e.prototype.renderDoubleBorder=function(t,n,y,C){return De(this,void 0,void 0,function(){var A,h;return Pe(this,function(m){switch(m.label){case 0:return n<3?[4,this.renderSolidBorder(t,y,C)]:[3,2];case 1:return m.sent(),[2];case 2:return A=uy(C,y),this.path(A),this.ctx.fillStyle=Qe(t),this.ctx.fill(),h=dy(C,y),this.path(h),this.ctx.fill(),[2]}})})},e.prototype.renderNodeBackgroundAndBorders=function(t){return De(this,void 0,void 0,function(){var n,y,C,A,h,m,g,w,p=this;return Pe(this,function(u){switch(u.label){case 0:return this.applyEffects(t.getEffects(2)),n=t.container.styles,y=!vt(n.backgroundColor)||n.backgroundImage.length,C=[{style:n.borderTopStyle,color:n.borderTopColor,width:n.borderTopWidth},{style:n.borderRightStyle,color:n.borderRightColor,width:n.borderRightWidth},{style:n.borderBottomStyle,color:n.borderBottomColor,width:n.borderBottomWidth},{style:n.borderLeftStyle,color:n.borderLeftColor,width:n.borderLeftWidth}],A=by(Zt(n.backgroundClip,0),t.curves),y||n.boxShadow.length?(this.ctx.save(),this.path(A),this.ctx.clip(),vt(n.backgroundColor)||(this.ctx.fillStyle=Qe(n.backgroundColor),this.ctx.fill()),[4,this.renderBackgroundImage(t.container)]):[3,2];case 1:u.sent(),this.ctx.restore(),n.boxShadow.slice(0).reverse().forEach(function(f){p.ctx.save();var c=Nn(t.curves),a=f.inset?0:wy,i=cy(c,-a+(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?(p.path(c),p.ctx.clip(),p.mask(i)):(p.mask(c),p.ctx.clip(),p.path(i)),p.ctx.shadowOffsetX=f.offsetX.number+a,p.ctx.shadowOffsetY=f.offsetY.number,p.ctx.shadowColor=Qe(f.color),p.ctx.shadowBlur=f.blur.number,p.ctx.fillStyle=f.inset?Qe(f.color):"rgba(0,0,0,1)",p.ctx.fill(),p.ctx.restore()}),u.label=2;case 2:h=0,m=0,g=C,u.label=3;case 3:return m<g.length?(w=g[m],w.style!==0&&!vt(w.color)&&w.width>0?w.style!==2?[3,5]:[4,this.renderDashedDottedBorder(w.color,w.width,h,t.curves,2)]:[3,11]):[3,13];case 4:return u.sent(),[3,11];case 5:return w.style!==3?[3,7]:[4,this.renderDashedDottedBorder(w.color,w.width,h,t.curves,3)];case 6:return u.sent(),[3,11];case 7:return w.style!==4?[3,9]:[4,this.renderDoubleBorder(w.color,w.width,h,t.curves)];case 8:return u.sent(),[3,11];case 9:return[4,this.renderSolidBorder(w.color,h,t.curves)];case 10:u.sent(),u.label=11;case 11:h++,u.label=12;case 12:return m++,[3,3];case 13:return[2]}})})},e.prototype.renderDashedDottedBorder=function(t,n,y,C,A){return De(this,void 0,void 0,function(){var h,m,g,w,p,u,f,c,a,i,s,r,o,l,d,B,d,B;return Pe(this,function(_){return this.ctx.save(),h=fy(C,y),m=Pu(C,y),A===2&&(this.path(m),this.ctx.clip()),We(m[0])?(g=m[0].start.x,w=m[0].start.y):(g=m[0].x,w=m[0].y),We(m[1])?(p=m[1].end.x,u=m[1].end.y):(p=m[1].x,u=m[1].y),y===0||y===2?f=Math.abs(g-p):f=Math.abs(w-u),this.ctx.beginPath(),A===3?this.formatPath(h):this.formatPath(m.slice(0,2)),c=n<3?n*3:n*2,a=n<3?n*2:n,A===3&&(c=n,a=n),i=!0,f<=c*2?i=!1:f<=c*2+a?(s=f/(2*c+a),c*=s,a*=s):(r=Math.floor((f+a)/(c+a)),o=(f-r*c)/(r-1),l=(f-(r+1)*c)/r,a=l<=0||Math.abs(a-o)<Math.abs(a-l)?o:l),i&&(A===3?this.ctx.setLineDash([0,c+a]):this.ctx.setLineDash([c,a])),A===3?(this.ctx.lineCap="round",this.ctx.lineWidth=n):this.ctx.lineWidth=n*2+1.1,this.ctx.strokeStyle=Qe(t),this.ctx.stroke(),this.ctx.setLineDash([]),A===2&&(We(m[0])&&(d=m[3],B=m[0],this.ctx.beginPath(),this.formatPath([new te(d.end.x,d.end.y),new te(B.start.x,B.start.y)]),this.ctx.stroke()),We(m[1])&&(d=m[1],B=m[2],this.ctx.beginPath(),this.formatPath([new te(d.end.x,d.end.y),new te(B.start.x,B.start.y)]),this.ctx.stroke())),this.ctx.restore(),[2]})})},e.prototype.render=function(t){return De(this,void 0,void 0,function(){var n;return Pe(this,function(y){switch(y.label){case 0:return this.options.backgroundColor&&(this.ctx.fillStyle=Qe(this.options.backgroundColor),this.ctx.fillRect(this.options.x,this.options.y,this.options.width,this.options.height)),n=ly(t),[4,this.renderStack(n)];case 1:return y.sent(),this.applyEffects([]),[2,this.canvas]}})})},e}(Mu),Cy=function(v){return v instanceof iu||v instanceof nu?!0:v instanceof wo&&v.type!==Hn&&v.type!==Mn},by=function(v,e){switch(v){case 0:return Nn(e);case 2:return ny(e);case 1:default:return Vn(e)}},_y=function(v){switch(v){case 1:return"center";case 2:return"right";case 0:default:return"left"}},Ey=["-apple-system","system-ui"],Fy=function(v){return/iPhone OS 15_(0|1)/.test(window.navigator.userAgent)?v.filter(function(e){return Ey.indexOf(e)===-1}):v},Sy=function(v){Xe(e,v);function e(t,n){var y=v.call(this,t,n)||this;return y.canvas=n.canvas?n.canvas:document.createElement("canvas"),y.ctx=y.canvas.getContext("2d"),y.options=n,y.canvas.width=Math.floor(n.width*n.scale),y.canvas.height=Math.floor(n.height*n.scale),y.canvas.style.width=n.width+"px",y.canvas.style.height=n.height+"px",y.ctx.scale(y.options.scale,y.options.scale),y.ctx.translate(-n.x,-n.y),y.context.logger.debug("EXPERIMENTAL ForeignObject renderer initialized ("+n.width+"x"+n.height+" at "+n.x+","+n.y+") with scale "+n.scale),y}return e.prototype.render=function(t){return De(this,void 0,void 0,function(){var n,y;return Pe(this,function(C){switch(C.label){case 0:return n=vo(this.options.width*this.options.scale,this.options.height*this.options.scale,this.options.scale,this.options.scale,t),[4,Qy(n)];case 1:return y=C.sent(),this.options.backgroundColor&&(this.ctx.fillStyle=Qe(this.options.backgroundColor),this.ctx.fillRect(0,0,this.options.width*this.options.scale,this.options.height*this.options.scale)),this.ctx.drawImage(y,-this.options.x*this.options.scale,-this.options.y*this.options.scale),[2,this.canvas]}})})},e}(Mu),Qy=function(v){return new Promise(function(e,t){var n=new Image;n.onload=function(){e(n)},n.onerror=t,n.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(v))})},Uy=function(){function v(e){var t=e.id,n=e.enabled;this.id=t,this.enabled=n,this.start=Date.now()}return v.prototype.debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.enabled&&(typeof window<"u"&&window.console&&typeof console.debug=="function"?console.debug.apply(console,en([this.id,this.getTime()+"ms"],e)):this.info.apply(this,e))},v.prototype.getTime=function(){return Date.now()-this.start},v.prototype.info=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.enabled&&typeof window<"u"&&window.console&&typeof console.info=="function"&&console.info.apply(console,en([this.id,this.getTime()+"ms"],e))},v.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.enabled&&(typeof window<"u"&&window.console&&typeof console.warn=="function"?console.warn.apply(console,en([this.id,this.getTime()+"ms"],e)):this.info.apply(this,e))},v.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.enabled&&(typeof window<"u"&&window.console&&typeof console.error=="function"?console.error.apply(console,en([this.id,this.getTime()+"ms"],e)):this.info.apply(this,e))},v.instances={},v}(),Ty=function(){function v(e,t){var n;this.windowBounds=t,this.instanceName="#"+v.instanceCount++,this.logger=new Uy({id:this.instanceName,enabled:e.logging}),this.cache=(n=e.cache)!==null&&n!==void 0?n:new Yv(this,e)}return v.instanceCount=1,v}(),Iy=function(v,e){return e===void 0&&(e={}),Py(v,e)};typeof window<"u"&&Fu.setContext(window);var Py=function(v,e){return De(void 0,void 0,void 0,function(){var t,n,y,C,A,h,m,g,w,p,u,f,c,a,i,s,r,o,l,d,_,B,_,b,E,F,S,U,T,Q,P,I,M,K,W,L,O,H,k,G;return Pe(this,function(R){switch(R.label){case 0:if(!v||typeof v!="object")return[2,Promise.reject("Invalid element provided as first argument")];if(t=v.ownerDocument,!t)throw new Error("Element is not attached to a Document");if(n=t.defaultView,!n)throw new Error("Document is not attached to a Window");return y={allowTaint:(b=e.allowTaint)!==null&&b!==void 0?b:!1,imageTimeout:(E=e.imageTimeout)!==null&&E!==void 0?E:15e3,proxy:e.proxy,useCORS:(F=e.useCORS)!==null&&F!==void 0?F:!1},C=Mi({logging:(S=e.logging)!==null&&S!==void 0?S:!0,cache:e.cache},y),A={windowWidth:(U=e.windowWidth)!==null&&U!==void 0?U:n.innerWidth,windowHeight:(T=e.windowHeight)!==null&&T!==void 0?T:n.innerHeight,scrollX:(Q=e.scrollX)!==null&&Q!==void 0?Q:n.pageXOffset,scrollY:(P=e.scrollY)!==null&&P!==void 0?P:n.pageYOffset},h=new at(A.scrollX,A.scrollY,A.windowWidth,A.windowHeight),m=new Ty(C,h),g=(I=e.foreignObjectRendering)!==null&&I!==void 0?I:!1,w={allowTaint:(M=e.allowTaint)!==null&&M!==void 0?M:!1,onclone:e.onclone,ignoreElements:e.ignoreElements,inlineImages:g,copyStyles:g},m.logger.debug("Starting document clone with size "+h.width+"x"+h.height+" scrolled to "+-h.left+","+-h.top),p=new _u(m,v,w),u=p.clonedReferenceElement,u?[4,p.toIFrame(t,h)]:[2,Promise.reject("Unable to find element in cloned iframe")];case 1:return f=R.sent(),c=Co(u)||xv(u)?cf(u.ownerDocument):tn(m,u),a=c.width,i=c.height,s=c.left,r=c.top,o=xy(m,u,e.backgroundColor),l={canvas:e.canvas,backgroundColor:o,scale:(W=(K=e.scale)!==null&&K!==void 0?K:n.devicePixelRatio)!==null&&W!==void 0?W:1,x:((L=e.x)!==null&&L!==void 0?L:0)+s,y:((O=e.y)!==null&&O!==void 0?O:0)+r,width:(H=e.width)!==null&&H!==void 0?H:Math.ceil(a),height:(k=e.height)!==null&&k!==void 0?k:Math.ceil(i)},g?(m.logger.debug("Document cloned, using foreign object rendering"),_=new Sy(m,l),[4,_.render(u)]):[3,3];case 2:return d=R.sent(),[3,5];case 3:return m.logger.debug("Document cloned, element located at "+s+","+r+" with size "+a+"x"+i+" using computed rendering"),m.logger.debug("Starting DOM parsing"),B=au(m,u),o===B.styles.backgroundColor&&(B.styles.backgroundColor=lt.TRANSPARENT),m.logger.debug("Starting renderer for element at "+l.x+","+l.y+" with size "+l.width+"x"+l.height),_=new By(m,l),[4,_.render(B)];case 4:d=R.sent(),R.label=5;case 5:return(!((G=e.removeContainer)!==null&&G!==void 0)||G)&&(_u.destroy(f)||m.logger.error("Cannot detach cloned iframe as it is not in the DOM anymore")),m.logger.debug("Finished rendering"),[2,d]}})})},xy=function(v,e,t){var n=e.ownerDocument,y=n.documentElement?mr(v,getComputedStyle(n.documentElement).backgroundColor):lt.TRANSPARENT,C=n.body?mr(v,getComputedStyle(n.body).backgroundColor):lt.TRANSPARENT,A=typeof t=="string"?mr(v,t):t===null?lt.TRANSPARENT:4294967295;return e===n.documentElement?vt(y)?vt(C)?A:C:y:A};const Xr=class Xr extends j.EngineObject{constructor(t,n){super(t,n);z(this,"_imageLabel",this.dv(new j.ESImageLabel(`${this.sceneObject.id}_ESImageLabel`)));z(this,"_hasClassDivAndPos",{});const y=n.viewer;if(!y){console.warn("viewer is undefined!");return}t.mainClass=this._imageLabel;const C=this._imageLabel;n.add(C),this.d(()=>n.delete(C));{const A=()=>{if(!y)return;if(!t.instanceClass)throw new Error("!sceneObject.instanceClass");const g=document.createElement("div"),w=this.dv(new t.instanceClass(g,t,n))._container;if(w.style.opacity=t.opacity.toString()??j.ESGeoDiv.defaults.opacity,w.style.position="fixed",w.style.zIndex="-1",w.style.top="0px",!document.body.contains(w)){document.body.appendChild(w);let u=w?w.querySelectorAll("*[class]"):[];for(let f=0;f<u.length;f++){const c=u[f];var p=c.getBoundingClientRect();this._hasClassDivAndPos[c.className]=[c.offsetLeft,c.offsetTop,c.offsetLeft+p.width,c.offsetTop+p.height]}}Iy(w,{backgroundColor:null,allowTaint:!0,useCORS:!0,width:w.offsetWidth,height:w.offsetHeight,scale:1}).then(u=>{document.body.contains(w)&&document.body.removeChild(w),C.url=u.toDataURL(),C.show=t.show}).catch(()=>{document.body.contains(w)&&document.body.removeChild(w)})},h=()=>{try{t.instanceClass?A():(C.url="",C.show=!1)}catch(g){console.error(g)}};h();const m=this.dv(V.createNextAnimateFrameEvent(t.instanceClassChanged,t.opacityChanged));this.d(m.don(h))}{const A=()=>{C.show=t.show};C.show=!1,this.ad(t.showChanged.don(A))}this.d(V.track([C,"anchor"],[t,"anchor"])),this.d(V.bind([C,"position"],[t,"position"])),this.d(V.bind([C,"rotation"],[t,"rotation"])),this.d(V.bind([C,"flyToParam"],[t,"flyToParam"])),this.d(V.bind([C,"flyInParam"],[t,"flyInParam"])),this.d(V.bind([C,"allowPicking"],[t,"allowPicking"])),this.d(V.bind([C,"scale"],[t,"scale"])),this.d(V.track([C,"minVisibleDistance"],[t,"minVisibleDistance"])),this.d(V.track([C,"maxVisibleDistance"],[t,"maxVisibleDistance"])),this.ad(t.automaticLandingEvent.don(()=>{C.automaticLanding()})),this.d(C.pickedEvent.don(A=>{(t.allowPicking??!1)&&t.pickedEvent.emit(A)})),this.d(n.widgetEvent.don(A=>{if(A.objId!==this._imageLabel.id)return;const{type:h,add:m}=A;if(h==="leftClick"){const g=Object.keys(this._hasClassDivAndPos);for(let w=0;w<g.length;w++){const p=g[w];let u=this._hasClassDivAndPos[p];if(m&&m.mouseRelativePos&&m.mouseRelativePos[0]>=u[0]&&m.mouseRelativePos[0]<=u[2]&&m.mouseRelativePos[1]>=u[1]&&m.mouseRelativePos[1]<=u[3]){m.className=p;break}}}t.widgetEvent.emit({type:h,add:m})})),this.d(t.calcFlyToParamEvent.don(()=>{kt(y,C.id)})),this.d(t.calcFlyInParamEvent.don(()=>{const A=n.getCurrentCameraInfo();if(!A)return;const{position:h,rotation:m}=A;t.flyInParam={position:h,rotation:m,flyDuration:1}})),this.d(t.smoothMoveEvent.don((A,h)=>{YA(y,C.id,A,h)})),this.d(t.smoothMoveWithRotationEvent.don((A,h,m)=>{zA(y,C.id,A,h,m)})),this.d(t.smoothMoveOnGroundEvent.don((A,h,m,g)=>{JA(y,C.id,A,h,g,m)})),this.d(t.smoothMoveWithRotationOnGroundEvent.don((A,h,m,g,w)=>{XA(y,C.id,A,h,m,g,w)})),this.d(t.flyToEvent.don((A,h)=>{C.flyTo(A)})),this.d(t.flyInEvent.don(A=>{C.flyIn(A)}))}};z(Xr,"type",Xr.register("ESUeViewer",j.ESGeoDiv.type,Xr));let Po=Xr;const Yr=class Yr extends Le{constructor(e,t){super(e,t);const n=t.viewer;if(!n){console.warn("viewer is undefined!");return}this.d(e.flyToFeatureIndexEvent.don((y,C)=>{n.callUeFunc({f:"flyToFeatureIndex",p:{id:e.id,index:y,duration:C}})})),this.d(e.flyToFeatureEvent.don((y,C,A)=>{n.callUeFunc({f:"flyToFeature",p:{id:e.id,key:y,value:C,duration:A}})}))}};z(Yr,"type",Yr.register("ESUeViewer",j.ESGeoJson.type,Yr));let xo=Yr;const $r=class $r extends Re{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}}};z($r,"type",$r.register("ESUeViewer",j.ESGeoLineString.type,$r));let Jn=$r;const Zr=class Zr extends Re{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}}};z(Zr,"type",Zr.register("ESUeViewer",j.ESGeoRectangle.type,Zr));let Oo=Zr;const qr=class qr extends Ne{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}}};z(qr,"type",qr.register("ESUeViewer",j.ESGeoWater.type,qr));let Mo=qr;const Pt=class Pt extends de{constructor(e,t){super(e,t);const n=t.viewer;if(!n){console.warn("viewer is undefined!");return}this.d(e.setNodePositionEvent.don((y,C)=>{Va(n,e.id,y,C)})),this.d(e.setNodeRotationEvent.don((y,C)=>{Ga(n,e.id,y,C)})),this.d(e.setNodeScaleEvent.don((y,C)=>{ja(n,e.id,y,C)}))}};z(Pt,"forceUeUpdateProps",[...de.forceUeUpdateProps,"url"]),z(Pt,"propValFuncs",{...de.propValFuncs,url:e=>typeof e=="string"?j.ESSceneObject.context.getStrFromEnv(j.rpToap(e)):(e.url=j.ESSceneObject.context.getStrFromEnv(j.rpToap(e.url)),e),czmMaximumScale:null,czmMinimumPixelSize:null,czmNativeScale:null,czmColor:null}),z(Pt,"type",Pt.register("ESUeViewer",j.ESGltfModel.type,Pt));let Ho=Pt;const eA=class eA extends Re{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}}};z(eA,"type",eA.register("ESUeViewer",j.ESHeightMeasurement.type,eA));let Lo=eA;const tA=class tA extends de{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}const y=async(A,h,m,g)=>{const{viewer:w}=A;if(!w){console.error("AIMoveTo: ueViewer.viewer is undefined");return}const p=await w.callUeFunc({f:"AIMoveTo",p:{id:h,Destination:m,Time:g}});return p.error&&console.error("AIMoveTo:",p.error),p};this.d(e.aiMoveToEvent.don((A,h)=>{y(t,e.id,A,h)}));const C=async(A,h)=>{const{viewer:m}=A;if(!m){console.error("StopAIMove: ueViewer.viewer is undefined");return}const g=await m.callUeFunc({f:"StopAIMove",p:{id:h}});return g.error&&console.error("StopAIMove:",g.error),g};this.d(e.stopAIMoveEvent.don(()=>{C(t,e.id)}))}};z(tA,"type",tA.register("ESUeViewer",j.ESHuman.type,tA));let Ro=tA;const xt=class xt extends Ze{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}e.anchor=[.5,1]}};z(xt,"type",xt.register("ESUeViewer",j.ESImageLabel.type,xt)),z(xt,"forceUeUpdateProps",[...Ze.forceUeUpdateProps,"url"]),z(xt,"propValFuncs",{...Ze.propValFuncs,url:e=>typeof e=="string"?j.ESSceneObject.context.getStrFromEnv(j.rpToap(e)):(e.url=j.ESSceneObject.context.getStrFromEnv(j.rpToap(e.url)),e)});let Do=xt;const rA=class rA extends de{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}}};z(rA,"type",rA.register("ESUeViewer",j.ESLevelRuntimeModel.type,rA));let ko=rA;const AA=class AA extends $A{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}}};z(AA,"type",AA.register("ESUeViewer",j.ESLocalCircle.type,AA));let Ko=AA;const nA=class nA extends Le{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}}};z(nA,"type",nA.register("ESUeViewer",j.ESLocalPolygonZ.type,nA));let No=nA;const iA=class iA extends $A{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}}};z(iA,"type",iA.register("ESUeViewer",j.ESLocalRectangle.type,iA));let Vo=iA;const oA=class oA extends de{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}}};z(oA,"type",oA.register("ESUeViewer",j.ESLocalSkyBox.type,oA));let Go=oA;const sA=class sA extends de{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}}};z(sA,"type",sA.register("ESUeViewer",j.ESLocationMeasurement.type,sA));let jo=sA;const aA=class aA extends Re{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}}};z(aA,"type",aA.register("ESUeViewer",j.ESPipeFence.type,aA));let Wo=aA;const cA=class cA extends Jn{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}}};z(cA,"type",cA.register("ESUeViewer",j.ESPipeline.type,cA));let zo=cA;const lA=class lA extends ZA{constructor(e,t){super(e,t);const n=t.viewer;if(!n){console.warn("viewer is undefined!");return}this.d(e.highlightFeatureEvent.don(y=>{const C=typeof y=="number"?y.toString():y;Da(n,e.id,C)})),this.d(e.highlightFeatureAndFlyToEvent.don((y,C,A,h)=>{const m=typeof y=="number"?y.toString():y;ka(n,e.id,m,h??1)})),this.d(e.setLayerVisibleEvent.don((y,C)=>{let A="";typeof C!="string"?A=JSON.stringify(C):A=C,Ka(n,e.id,A)})),this.d(e.setLayerColorEvent.don((y,C)=>{let A="";typeof C!="string"?A=JSON.stringify(C):A=C,Na(n,e.id,A)}))}};z(lA,"type",lA.register("ESUeViewer",j.ESPipeserTileset.type,lA));let Jo=lA;const uA=class uA extends Ne{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}}};z(uA,"type",uA.register("ESUeViewer",j.ESPit.type,uA));let Xo=uA;const dA=class dA extends Ze{constructor(e,t){super(e,t);const n=t.viewer;if(!n){console.warn("viewer is undefined!");return}this.ad(e.getInitialStyleEvent.don(async()=>{try{const y=await n.callUeFunc({f:"GetInitialStyle",p:{id:e.id}});y.error!=""&&console.error("getInitialStyleEvent:",y.error),e.initialStyle.value=structuredClone(y.re)}catch(y){console.error("getInitialStyleEvent:",y),e.initialStyle.value=void 0}}))}};z(dA,"type",dA.register("ESUeViewer",j.ESPoi2D.type,dA));let Yo=dA;const fA=class fA extends de{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}}};z(fA,"type",fA.register("ESUeViewer",j.ESPoi3D.type,fA));let $o=fA;const Ot=class Ot extends Le{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}}};z(Ot,"type",Ot.register("ESUeViewer",j.ESPoiTileset.type,Ot)),z(Ot,"forceUeUpdateProps",[...Le.forceUeUpdateProps,"url"]),z(Ot,"propValFuncs",{...Le.propValFuncs,url:e=>typeof e=="string"?j.ESSceneObject.context.getStrFromEnv(e):(e.url=j.ESSceneObject.context.getStrFromEnv(e.url),e)});let Zo=Ot;const hA=class hA extends Re{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}}};z(hA,"type",hA.register("ESUeViewer",j.ESPolygonFence.type,hA));let qo=hA;const pA=class pA extends Ne{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}}};z(pA,"type",pA.register("ESUeViewer",j.ESPolygonFlattenedPlane.type,pA));let es=pA;const gA=class gA extends Ne{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}}};z(gA,"type",gA.register("ESUeViewer",j.ESPolygonWithHole.type,gA));let ts=gA;const vA=class vA extends _t{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}this.d(()=>{e.ids=[]}),this.d(e.highlightInner3DtilesetEvent.don(y=>{y.highlight=!0})),this.d(e.removeHighlightInner3DtilesetEvent.don(y=>{y.highlight=!1}));{const y=h=>{h=h.toLocaleLowerCase();let m=[255,255,255,1];if(h.startsWith("#")){if(h.length===4){let g=parseInt(h[1]+h[1],16),w=parseInt(h[2]+h[2],16),p=parseInt(h[3]+h[3],16);m=[g,w,p,1]}else if(h.length===7){let g=parseInt(h.substring(1,3),16),w=parseInt(h.substring(3,5),16),p=parseInt(h.substring(5,7),16);m=[g,w,p,1]}}else if(h.startsWith("rgba")){let g=h.match(/^rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d.]+)\s*\)$/);if(g){let w=parseInt(g[1]),p=parseInt(g[2]),u=parseInt(g[3]),f=parseFloat(g[4]);m=[w,p,u,f]}}else if(h.startsWith("rgb")){let g=h.match(/^rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/);if(g){let w=parseInt(g[1]),p=parseInt(g[2]),u=parseInt(g[3]);m=[w,p,u,1]}}else console.error("color类型只能为#rrggbb、#rgb、rgba(r,g,b,a)、rgb(r,g,b)");return[m[0]/255,m[1]/255,m[2]/255,m[3]]},C=()=>{const h=e.layerConfig;if(!h)return;const m=[];h.forEach(g=>{m.push({condition:[{field:"layer",op:"==",value:g.layer},{field:"dataset",op:"==",value:g.dataset}],color:y(g.value.color??"rgb(255,255,255)"),show:g.value.visible})}),e.setFeatureStyle(m)};C();const A=this.dv(V.createNextAnimateFrameEvent(e.layerConfigChanged));this.d(A.don(()=>{C()}))}}};z(vA,"type",vA.register("ESUeViewer",j.ESRtsTileset.type,vA));let rs=vA;const yA=class yA extends Le{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}this.d(e.addTreesEvent.don(y=>{j.addTreesCallFunc(t,e.id,y)})),this.d(e.removeAllTreesEvent.don(()=>{j.removeAllTreesCallFunc(t,e.id)})),this.d(e.updateTreeParamsEvent.don(y=>{j.updateTreeParamsCallFunc(t,e.id,y)})),this.d(e.cutDownTreesEvent.don((y,C)=>{j.cutDownTreesCallFunc(t,e.id,y,C)})),this.d(e.growthSimulationEvent.don((y,C,A)=>{j.growthSimulationCallFunc(t,e.id,y,C,A)}))}};z(yA,"type",yA.register("ESUeViewer",j.ESSeparateFoliage.type,yA));let As=yA;const mA=class mA extends de{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}}};z(mA,"type",mA.register("ESUeViewer",j.ESSubmergingAnalysis.type,mA));let ns=mA;const wA=class wA extends Ne{constructor(e,t){super(e,t);const n=t.viewer;if(!n){console.warn("viewer is undefined!");return}this.d(e.startEvent.don(()=>{n.callUeFunc({f:"Start",p:{id:e.id}})})),this.d(e.stopEvent.don(()=>{n.callUeFunc({f:"Stop",p:{id:e.id}})}))}};z(wA,"type",wA.register("ESUeViewer",j.ESSunshineAnalysis.type,wA));let is=wA;const BA=class BA extends Ne{constructor(e,t){super(e,t);const n=t.viewer;if(!n){console.warn("viewer is undefined!");return}this.d(e.startEvent.don(()=>{n.callUeFunc({f:"Start",p:{id:e.id}})}))}};z(BA,"type",BA.register("ESUeViewer",j.ESSurfaceAreaMeasurement.type,BA));let os=BA;const CA=class CA extends Ze{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}}};z(CA,"type",CA.register("ESUeViewer",j.ESTextLabel.type,CA));let ss=CA;const qt=class qt extends Ze{constructor(e,t){super(e,t);const n=t.viewer;if(!n){console.warn("viewer is undefined!");return}this.d(e.callFunctionEvent.don((y,C)=>{ui(n,e.id,y,C)}))}};z(qt,"type",qt.register("ESUeViewer",j.ESUEWidget.type,qt)),z(qt,"propValFuncs",{...Ze.propValFuncs,info:e=>JSON.stringify(e??{})});let as=qt;const Hu=v=>{switch(v){case 0:return"成功绑定";case 1:return"解绑之前的内容,成功绑定";case 2:return"未搜索到ActorTag,无法绑定";case 3:return"搜索到ActorTag但对应的Actor不是场景原有的,而是新建的,无法绑定";case 4:return"搜索到ActorTag对应的Actor是地形或3DTileset,无法绑定";default:return"未知错误"}},Oy=v=>{switch(v){case 0:return"创建成功";case 1:return"未找到对应的资源,无法创建";case 2:return"Id与场景中现有的ActorTag重复,创建后可能出现问题,创建失败";default:return"未知错误"}},bA=class bA extends j.EngineObject{constructor(e,t){super(e,t);const n=t.viewer;if(!n){console.warn(`${e.id} UeESUnrealActor viewer is undefined!`);return}this.d(()=>{ci(n,e.id)});const y=async()=>{g()||await n.callUeFunc({f:"update",p:{id:e.id,name:e.name,show:e.show,rotation:e.rotation,flyToParam:e.flyToParam??j.ESVisualObject.defaults.flyToParam,flyInParam:e.flyInParam??j.ESVisualObject.defaults.flyInParam,highlight:e.highlight,collision:e.collision,scale:e.scale,minVisibleDistance:e.minVisibleDistance,maxVisibleDistance:e.maxVisibleDistance}})},C=this.dv(V.createNextAnimateFrameEvent(e.showChanged,e.nameChanged,e.rotationChanged,e.flyToParamChanged,e.flyInParamChanged,e.highlightChanged,e.collisionChanged,e.scaleChanged,e.minVisibleDistanceChanged,e.maxVisibleDistanceChanged));this.d(C.don(y)),this.d(e.flushEvent.don(()=>C.flush()));let A,h;const m=async()=>{g()||(await n.callUeFunc({f:"update",p:{id:e.id,position:e.position}}),(t.debug??!1)&&console.log(`updatePostion:${e.position},actorTag:${e.actorTag},actorClass:${e.actorClass}`))},g=()=>!A&&!h?(console.warn(`${e.id} 未绑定ActorTag或未创建ActorClass!`),!0):!1,w=async()=>{const{id:u}=e,f=await t.unBindActorByID(u);f&&f.error!==""&&console.warn(`${e.id} UeESUnrealActor UnBindActorByID: ${f.error}`),A=void 0;const c=await n.callUeFunc({f:"destroy",p:{id:u}});if(c&&c.error!==""){console.warn(`${e.id} UeESUnrealActor DestroyActorByID: ${c.error}`);return}h=void 0},p=this.dv(V.react({type:"ActorClass",actorClass:"default"}));{const u=this.dv(V.createNextAnimateFrameEvent(e.actorClassChanged,e.actorTagChanged)),f=async()=>{e.actorTag!==""?p.value={type:"ActorTag",actorTag:e.actorTag}:p.value={type:"ActorClass",actorClass:e.actorClass===""?"default":e.actorClass}};f(),this.d(u.don(f)),this.d(e.flushEvent.don(()=>u.flush()))}{const u=this.dv(V.createProcessingFromAsyncFunc(async c=>{if(await c.promise(w()),p.value.type==="ActorTag"){const{actorTag:a}=p.value;await c.promise(w());try{e.lastActorStatus="null";const i=await c.promise(t.bindActorByTag(e.id,a));if(!i)return;if(i.error!==""){console.warn(`${e.id} UeESUnrealActor BindActorByTag:${a},${i.error}`);return}if(i.re.type===0)e.lastActorStatus="bound",A=a;else if(i.re.type===1)e.lastActorStatus="bound",A=a,console.warn(`${e.id} UeESUnrealActor BindActorByTag:${a},${Hu(i.re.type)}`);else{A=void 0,console.warn(`${e.id} UeESUnrealActor BindActorByTag error:${a}, ${Hu(i.re.type)}`);return}}catch(i){console.warn(`${e.id} UeESUnrealActor BindActorByTag catch error:${a}, ${i}`);return}}else if(p.value.type==="ActorClass"){const{actorClass:a}=p.value;try{const i=await c.promise(t.createActorByClass(e.id,a));if(!i)return;if(i.error!==""){console.warn(`${e.id} UeESUnrealActor CreateActorByClass error :${a}, ${i.error}`);return}if(i.re.type===0)e.lastActorStatus="created",h=a;else{console.warn(`${e.id} UeESUnrealActor CreateActorByClass error type :${a},${Oy(i.re.type)}`);return}}catch(i){console.warn(`${e.id} UeESUnrealActor CreateActorByClass error catch :${a}, ${JSON.stringify(i)}`);return}}await c.promise(y()),await c.promise(m())})),f=async()=>{u.restart()};f(),this.d(p.changed.don(f))}this.d(e.positionChanged.don(m)),this.d(e.callFunctionEvent.don((u,f)=>{g()||ui(n,e.id,u,f)})),this.d(e.smoothMoveEvent.don((u,f)=>{g()||YA(n,e.id,u,f)})),this.d(e.smoothMoveWithRotationEvent.don((u,f,c)=>{g()||zA(n,e.id,u,f,c)})),this.d(e.smoothMoveOnGroundEvent.don((u,f,c,a)=>{g()||JA(n,e.id,u,f,a,c)})),this.d(e.smoothMoveWithRotationOnGroundEvent.don((u,f,c,a,i)=>{g()||XA(n,e.id,u,f,c,a,i)})),this.d(e.automaticLandingEvent.don(u=>{if(g())return;const f=[e.position[0],e.position[1]];t.getHeightByLonLat(e.position[0],e.position[1],"Visibility").then(c=>{c!==null&&(e.position=[...f,c],e.collision=u)})})),this.d(e.flyToEvent.don(async(u,f)=>{if(g())return;const c=await Dt(n,e.id,u);let a="over";c===void 0?a="error":c.endType===0?a="over":c.endType===1&&(a="cancelled"),e.flyOverEvent.emit(f,a,t)})),this.d(e.calcFlyToParamEvent.don(()=>{g()||kt(n,e.id)})),this.d(e.calcFlyInParamEvent.don(async()=>{if(!t.actived)return;const u=await t.getCurrentCameraInfo();if(!u)return;const{position:f,rotation:c}=u;e.flyInParam={position:f,rotation:c,flyDuration:1}})),this.d(t.propChanged.don(u=>{g()||u.objId===e.id&&Object.keys(u.props).forEach(f=>{const c=u.props[f]===null?void 0:u.props[f];e[f]=c})}))}};z(bA,"type",bA.register("ESUeViewer",j.ESUnrealActor.type,bA));let cs=bA;const _A=class _A extends de{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}}};z(_A,"type",_A.register("ESUeViewer",j.ESVideoFusion.type,_A));let ls=_A;const EA=class EA extends de{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}}};z(EA,"type",EA.register("ESUeViewer",j.ESViewShed.type,EA));let us=EA;const FA=class FA extends Re{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is underfined!");return}}};z(FA,"type",FA.register("ESUeViewer",j.ESVisibilityAnalysis.type,FA));let ds=FA;const SA=class SA extends Ne{constructor(e,t){super(e,t);const n=t.viewer;if(!n){console.warn("viewer is undefined!");return}this.d(e.startEvent.don(()=>{n.callUeFunc({f:"Start",p:{id:e.id}})})),this.d(e.clearEvent.don(()=>{n.callUeFunc({f:"Clear",p:{id:e.id}})}))}};z(SA,"type",SA.register("ESUeViewer",j.ESVolumeMeasurement.type,SA));let fs=SA;const er=class er extends Ze{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}}};z(er,"type",er.register("ESUeViewer",j.ESWidget.type,er)),z(er,"propValFuncs",{...Ze.propValFuncs,info:e=>JSON.stringify(e??{})});let hs=er;const QA=class QA extends j.EngineObject{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}e.poi.actorTag=e.human.id,e.poi.positionOffset=[0,0,e.poiOffsetHeight-.8],this.d(e.poiOffsetHeightChanged.don(()=>{e.poi.positionOffset=[0,0,e.poiOffsetHeight-.8]})),this.d(()=>{e.poi.actorTag=""})}};z(QA,"type",QA.register("ESUeViewer",j.ESHumanPoi.type,QA));let ps=QA;j.ESSceneObject.context.getStrFromEnv(j.ESNavigator.defaults.imgUrl);const UA=class UA extends j.EngineObject{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}const y=this.disposeVar(new j.ESCustomDiv);t.add(y),this.dispose(()=>t.delete(y)),this.dispose(V.track([y,"show"],[e,"show"])),y.instanceClass=class extends V.Destroyable{constructor(A,h,m){super(),this._subContainer=A;const g=document.createElement("div");this._subContainer.appendChild(g),this.dispose(()=>this._subContainer.removeChild(g));{const u=async()=>{const f=await t.getCurrentCameraInfo(),c=f==null?void 0:f.position,i=[...f==null?void 0:f.rotation];i[0]=360,t.flyIn(c,i)};g.addEventListener("click",u),g.style.cursor="pointer",this.dispose(()=>g.removeEventListener("click",u))}{const u=()=>{g.style.width=`${e.cssSize?e.cssSize:j.ESNavigator.defaults.cssSize}px`,g.style.height=`${e.cssSize?e.cssSize:j.ESNavigator.defaults.cssSize}px`};u(),e.dispose(e.cssSizeChanged.disposableOn(u))}g.style.position="fixed";{const u=()=>{g.style.top=`${e.cssPosition?e.cssPosition[0]:j.ESNavigator.defaults.cssPosition[0]}px`,g.style.right=`${e.cssPosition?e.cssPosition[1]:j.ESNavigator.defaults.cssPosition[1]}px`};u(),e.dispose(e.cssPositionChanged.disposableOn(u))}g.style.transition=" right 0.4s linear",g.style.cursor="pointer";const w=document.createElement("div");g.appendChild(w),this.dispose(()=>g.removeChild(w)),w.style.width="100%",w.style.height="100%",w.style.position="relative";const p=document.createElement("img");w.appendChild(p),this.dispose(()=>w.removeChild(p)),p.style.width="100%",p.style.height="100%",p.style.border="none";{const u=()=>p.src=e.imgUrl;u(),e.dispose(e.imgUrlChanged.disposableOn(u))}{const u=()=>{const i=-t.getCurrentCameraInfo().rotation[0];p.style.transform=`rotate(${i}deg)`};let f;const c=async()=>{u(),e.show?(g.style.display="block",f=setInterval(()=>{u()},1e3)):(g.style.display="none",clearInterval(f))};this.dispose(e.showChanged.disposableOn(c)),c(),this.dispose(()=>clearInterval(f))}p.style.transformOrigin="50% 50%"}}}};z(UA,"type",UA.register("ESUeViewer",j.ESNavigator.type,UA));let gs=UA;const Mt=class Mt extends Re{constructor(e,t){super(e,t);const n=t.viewer;if(!n){console.warn("viewer is undefined!");return}{const y=()=>{let C=e.materialMode==="blue"?"multipleArrows":e.materialMode==="purple"?"singleArrow":e.materialMode;n.callUeFunc({f:"update",p:{id:e.id,materialMode:C}})};this.dispose(e.materialModeChanged.disposableOn(y)),this.dispose(e.createdEvent.disposableOn(y))}}};z(Mt,"type",Mt.register("ESUeViewer",j.ESPath.type,Mt)),z(Mt,"forceUeUpdateProps",[...Re.forceUeUpdateProps]),z(Mt,"propValFuncs",{...Re.propValFuncs,materialMode:null});let vs=Mt;async function My(v){navigator.clipboard.writeText(v).then(function(){console.log("复制成功")},function(e){console.log("复制失败")})}const TA=class TA extends j.EngineObject{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}const y=this.disposeVar(new j.ESCustomDiv);t.add(y),this.dispose(()=>t.delete(y)),y.instanceClass=class extends V.Destroyable{constructor(A,h,m){if(super(),this._subContainer=A,!m||!(m instanceof st))return;const g=document.createElement("div");this._subContainer.appendChild(g),this.dispose(()=>this._subContainer.removeChild(g)),g.style.width="100%",g.style.position="absolute",g.style.height=`${j.ESViewerStatusBar.defaults.height}px`,g.style.left="0",g.style.bottom="0",g.style.color="#fff",g.style.padding="0 20px 0 0",g.style.boxSizing="border-box",g.style.lineHeight=`${j.ESViewerStatusBar.defaults.height}px`,g.style.zIndex="100",g.style.alignContent="center",g.style.justifyContent="space-between";const w=document.createElement("span");g.appendChild(w),this.dispose(()=>g.removeChild(w));const p=document.createElement("span");w.appendChild(p),this.dispose(()=>w.removeChild(p));const u=document.createElement("span");w.appendChild(u),u.addEventListener("dblclick",function(){let c=u.innerHTML;c.startsWith("鼠标位置")&&(c=c.slice(5)),My(c)}),u.style.cursor="pointer",this.dispose(()=>w.removeChild(u));const f=document.createElement("span");g.appendChild(f),this.dispose(()=>g.removeChild(f));{const c=()=>{g.style.height=(e.height??j.ESViewerStatusBar.defaults.height)+"px",g.style.lineHeight=(e.height??j.ESViewerStatusBar.defaults.height)+"px"};this.dispose(e.heightChanged.disposableOn(c)),c()}{const c=()=>{g.style.fontSize=(e.fontSize??j.ESViewerStatusBar.defaults.fontSize)+"px"};this.dispose(e.fontSizeChanged.disposableOn(c)),c()}{const c=()=>{e.bgColor?g.style.background=`rgba(${e.bgColor[0]*255},${e.bgColor[1]*255},${e.bgColor[2]*255},${e.bgColor[3]})`:g.style.background=`rgba(${j.ESViewerStatusBar.defaults.bgColor[0]},${j.ESViewerStatusBar.defaults.bgColor[1]},${j.ESViewerStatusBar.defaults.bgColor[2]},${j.ESViewerStatusBar.defaults.bgColor[3]})`};this.dispose(e.bgColorChanged.disposableOn(c)),c()}m.getVersion().then(c=>{c&&(f.innerText=`Ue 版本 : ${c[0]} `)}).catch(c=>{console.log(c)});{const c=()=>{let s="",r="";s+=`帧率:${m.getFPS().toFixed(0)}FPS`,p.innerText=s;const o=t.getCurrentCameraInfo();s+=` 经度: ${o.position[0].toFixed(5)}° 纬度: ${o.position[1].toFixed(5)}° 高度: ${o.position[2].toFixed(2)}米 偏航角: ${o.rotation[0].toFixed(2)}° 俯仰角: ${o.rotation[1].toFixed(2)}° 翻滚角:${o.rotation[2].toFixed(2)}° `,p.innerText=s,t.pick().then(l=>{if(l){const{pickResult:d}=l;if(d&&d.position){const{position:B}=d;r+=`鼠标位置:${B[0].toFixed(5)}° ${B[1].toFixed(5)}° ${B[2].toFixed(2)}m`}else r+="暂时无法获取鼠标位置...";u.innerText=r}}).catch(l=>{console.log(l)})};let a;const i=async()=>{c(),e.show?(g.style.display="flex",a=setInterval(()=>{c()},1e3)):(g.style.display="none",clearInterval(a))};this.dispose(e.showChanged.disposableOn(i)),i(),this.dispose(()=>clearInterval(a))}}}}};z(TA,"type",TA.register("ESUeViewer",j.ESViewerStatusBar.type,TA));let ys=TA;const IA=class IA extends de{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}}};z(IA,"type",IA.register("ESUeViewer",j.ESGaussianSplatting.type,IA));let ms=IA;const PA=class PA extends _t{constructor(t,n){super(t,n);z(this,"_es3DTileset",this.dv(new j.ES3DTileset(`${this.sceneObject.id}_ES3DTileset`)));if(!n.viewer){console.warn("viewer is undefined!");return}t.mainClass=this._es3DTileset;{const C=this._es3DTileset;n.add(C),this.dispose(()=>n.delete(C)),this.d(V.track([C,"allowPicking"],[t,"allowPicking"])),this.d(V.track([C,"collision"],[t,"collision"])),this.d(V.bind([C,"flyToParam"],[t,"flyToParam"])),this.d(V.bind([C,"flyToParam"],[t,"flyToParam"])),this.d(V.track([C,"url"],[t,"url"])),this.d(V.track([C,"actorTag"],[t,"actorTag"])),this.d(V.track([C,"materialMode"],[t,"materialMode"])),this.d(V.track([C,"highlight"],[t,"highlight"])),this.d(V.track([C,"maximumScreenSpaceError"],[t,"maximumScreenSpaceError"])),this.d(V.track([C,"highlightID"],[t,"highlightID"])),this.d(V.track([C,"highlightColor"],[t,"highlightColor"])),this.d(V.bind([C,"offset"],[t,"offset"])),this.d(V.bind([C,"rotation"],[t,"rotation"])),this.d(V.track([C,"czmImageBasedLightingFactor"],[t,"czmImageBasedLightingFactor"])),this.d(V.track([C,"czmLuminanceAtZenith"],[t,"czmLuminanceAtZenith"])),this.d(V.track([C,"czmMaximumMemoryUsage"],[t,"czmMaximumMemoryUsage"])),this.d(V.track([C,"czmClassificationType"],[t,"czmClassificationType"])),this.d(V.track([C,"czmStyleJson"],[t,"czmStyleJson"])),this.d(V.track([C,"czmBackFaceCulling"],[t,"czmBackFaceCulling"])),this.d(V.track([C,"czmDebugShowBoundingVolume"],[t,"czmDebugShowBoundingVolume"])),this.d(V.track([C,"czmDebugShowContentBoundingVolume"],[t,"czmDebugShowContentBoundingVolume"])),this.d(V.track([C,"colorBlendMode"],[t,"colorBlendMode"])),this.d(V.track([C,"cacheBytes"],[t,"cacheBytes"])),this.d(V.track([C,"clippingPlaneEnabled"],[t,"clippingPlaneEnabled"])),this.d(V.track([C,"unionClippingRegions"],[t,"unionClippingRegions"])),this.d(V.track([C,"clippingPlaneEdgeColor"],[t,"clippingPlaneEdgeColor"])),this.d(V.track([C,"clippingPlaneEdgeWidth"],[t,"clippingPlaneEdgeWidth"])),this.d(V.track([C,"materialParams"],[t,"materialParams"])),this.d(V.bind([C,"supportEdit"],[t,"supportEdit"])),this.d(V.bind([C,"clippingPlanesId"],[t,"clippingPlanesId"])),this.d(V.bind([C,"clippingPlaneIds"],[t,"clippingPlaneIds"])),this.d(V.bind([C,"flattenedPlaneId"],[t,"flattenedPlaneId"])),this.d(V.bind([C,"flattenedPlaneEnabled"],[t,"flattenedPlaneEnabled"])),this.d(V.bind([C,"clippingPlaneId"],[t,"clippingPlaneId"])),this.d(V.bind([C,"excavateId"],[t,"excavateId"]))}{const C=this._es3DTileset;this.d(t.refreshTilesetEvent.don(()=>{C.refreshTileset()})),this.d(t.highlightFeatureEvent.don((...A)=>{C.highlightFeature(...A)})),this.d(t.highlightFeatureAndFlyToEvent.don((...A)=>{C.highlightFeatureAndFlyTo(...A)})),this.d(t.setFeatureColorEvent.don((...A)=>{C.setFeatureColor(...A)})),this.d(t.setFeatureVisableEvent.don((...A)=>{C.setFeatureVisable(...A)})),this.d(t.resetFeatureStyleEvent.don((...A)=>{C.resetFeatureStyle(...A)})),this.d(t.flyInEvent.don((...A)=>{C.flyIn(A[0])})),this.d(t.flyToEvent.don((...A)=>{C.flyTo(A[0])})),this.d(t.calcFlyToParamEvent.don((...A)=>{C.calcFlyToParam(...A)})),this.d(t.calcFlyInParamEvent.don((...A)=>{C.calcFlyInParam(...A)}))}{const C=this._es3DTileset;this.d(C.tilesetReady.don(A=>{t.tilesetReady.emit(A)})),this.d(C.pickedEvent.don(A=>{t.pickedEvent.emit(new j.SceneObjectPickedInfo(t,A.childPickedInfo))}))}{const C=()=>{this.es3DTileset.show=t.show};C(),this.d(t.showChanged.don(()=>{C()}))}}get es3DTileset(){return this._es3DTileset}};z(PA,"type",PA.register("ESUeViewer",j.ESRtsFeatureEditing.type,PA));let ws=PA;const xA=class xA extends _t{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}}};z(xA,"type",xA.register("ESUeViewer",j.ESMsTileset.type,xA));let Bs=xA;const OA=class OA extends Ne{constructor(e,t){super(e,t);const n=t.viewer;if(!n){console.warn("viewer is undefined!");return}const y=()=>{n.callUeFunc({f:"update",p:{id:e.id,height:e.height??j.ESGeoExtrudedPolygon.defaults.height,extrudedHeight:e.extrudedHeight??j.ESGeoExtrudedPolygon.defaults.extrudedHeight,perPositionHeight:e.perPositionHeight??j.ESGeoExtrudedPolygon.defaults.perPositionHeight}})},C=this.disposeVar(V.createNextAnimateFrameEvent(e.heightChanged,e.extrudedHeightChanged,e.perPositionHeightChanged));this.dispose(C.disposableOn(y)),this.dispose(e.createdEvent.disposableOn(y))}};z(OA,"type",OA.register("ESUeViewer",j.ESGeoExtrudedPolygon.type,OA));let Cs=OA;const MA=class MA extends de{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}}};z(MA,"type",MA.register("ESUeViewer",j.ESStaticMesh.type,MA));let bs=MA;J.copyright=void 0;try{const v="@u-gis/ue",e="3.0.7-beta.1",t="2025-05-21T10:39:13.000Z",n="北京西部世界科技有限公司",y="地球可视化实验室 (EarthSDK&CesiumLab) https://www.bjxbsj.cn",C="117e212fa2bb7ff08f74ad36621c968d0c66a151",h=((Date.now()-1747823953e3)/36e5).toFixed(1),m=`%c🌏 ${v}%c ${e}.${C.slice(0,8)}.${t} (距今${h}个小时)
329
- %c${y?y+`
330
- `:""}当前网站正在使用${v},此软件版权归${n}所有
331
- `;J.copyright=Object.freeze({get owner(){return"北京西部世界科技有限公司"},get ownerlink(){return OWNERLINK_},get gituri(){return GITURI_&&GITURI_.replace("${commitId}","117e212fa2bb7ff08f74ad36621c968d0c66a151")},get info(){return m},get date(){return"2025-05-21T10:39:13.000Z"},get author(){return"suplyang"},get version(){return"3.0.7-beta.1"},get name(){return"@u-gis/ue"},get commitId(){return"117e212fa2bb7ff08f74ad36621c968d0c66a151"},print(g=!1){!g&&window._xe2_no_copy_print||console.info(this.info,`
332
- font-size: 18px;
333
- font-weight: 1000;
334
- line-height: 1;
335
- color: rgb(0, 120, 215);
336
- padding-top: 20px;
337
- padding-bottom: 10px;
338
- `,`
339
- font-size: 10px;
340
- font-weight: 1000;
341
- color: rgb(0, 120, 215);
342
- `,`
343
- font-size: 10px;
344
- line-height: 1.5;
345
- color: rgb(0, 120, 215);
346
- padding-bottom: 2px;
347
- padding-left: 35px;
348
- `)}}),window.g_XE3CopyRights=window.g_XE3CopyRights||{},window.g_XE3CopyRights[v]=J.copyright,window.g_earthsdk_copyright_print=window.g_earthsdk_copyright_print??!0,window.g_earthsdk_copyright_print&&J.copyright.print()}catch{}return J.ESUeViewer=st,J.HighlightFeatureAndFlyToCallFunc=ka,J.HighlightFeatureCallFunc=Da,J.SetLayerColorCallFunc=Na,J.SetLayerVisibleCallFunc=Ka,J.UeCloudViewerBase=nr,J.UeES3DTileset=ZA,J.UeESAlarm=pi,J.UeESApertureEffect=gi,J.UeESAreaMeasurement=vi,J.UeESBlastParticleSystem=yi,J.UeESBoxClipping=mi,J.UeESCameraView=wi,J.UeESCameraVisibleRange=Bi,J.UeESCar=Ci,J.UeESClassification=bi,J.UeESClippingPlane=_i,J.UeESDataMesh=Ei,J.UeESDatasmithRuntimeModel=Fi,J.UeESDirectionMeasurement=Si,J.UeESDistanceMeasurement=Qi,J.UeESDynamicWater=Ui,J.UeESEntityCluster=Ti,J.UeESExcavate=Ii,J.UeESFireParticleSystem=Pi,J.UeESForestTileset=xi,J.UeESGaussianSplatting=ms,J.UeESGeoDiv=Po,J.UeESGeoExtrudedPolygon=Cs,J.UeESGeoJson=xo,J.UeESGeoLineString=Jn,J.UeESGeoPolygon=Ne,J.UeESGeoRectangle=Oo,J.UeESGeoVector=Re,J.UeESGeoWater=Mo,J.UeESGltfModel=Ho,J.UeESHeightMeasurement=Lo,J.UeESHuman=Ro,J.UeESHumanPoi=ps,J.UeESImageLabel=Do,J.UeESImageryLayer=fi,J.UeESLabel=Ze,J.UeESLevelRuntimeModel=ko,J.UeESLocalCircle=Ko,J.UeESLocalPolygon=qA,J.UeESLocalPolygonZ=No,J.UeESLocalRectangle=Vo,J.UeESLocalSkyBox=Go,J.UeESLocalVector=di,J.UeESLocalVector2D=$A,J.UeESLocationMeasurement=jo,J.UeESMsTileset=Bs,J.UeESNavigator=gs,J.UeESObjectWithLocation=de,J.UeESPath=vs,J.UeESPipeFence=Wo,J.UeESPipeline=zo,J.UeESPipeserTileset=Jo,J.UeESPit=Xo,J.UeESPoi2D=Yo,J.UeESPoi3D=$o,J.UeESPoiTileset=Zo,J.UeESPolygonFence=qo,J.UeESPolygonFlattenedPlane=es,J.UeESPolygonWithHole=ts,J.UeESRtsFeatureEditing=ws,J.UeESRtsTileset=rs,J.UeESSceneObject=_t,J.UeESSeparateFoliage=As,J.UeESStaticMesh=bs,J.UeESSubmergingAnalysis=ns,J.UeESSunshineAnalysis=is,J.UeESSurfaceAreaMeasurement=os,J.UeESTerrainLayer=hi,J.UeESTextLabel=ss,J.UeESUEWidget=as,J.UeESUnrealActor=cs,J.UeESVideoFusion=ls,J.UeESViewShed=us,J.UeESViewerStatusBar=ys,J.UeESVisibilityAnalysis=ds,J.UeESVisualObject=Le,J.UeESVolumeMeasurement=fs,J.UeESWidget=hs,J.UePickedInfo=Vd,J.bind3DTilesetByTagCallFunc=pc,J.bindActorByTagCallFunc=lc,J.bindImageryByTagCallFunc=yc,J.calcFlyToParamCallFunc=kt,J.callFunctionCallFunc=ui,J.captureCallFunc=Za,J.changeNavigationModeCallFunc=ot,J.createActorByClassCallFunc=hc,J.destroyCallFunc=ci,J.flyInCallFunc=Ar,J.flyInDefaultCameraCallFunc=Oa,J.flyToCallFunc=Dt,J.generateMemReportCallFunc=Ra,J.getAllSocketNamesByActorTagCallFunc=rc,J.getBoundSphereCallFunc=nc,J.getBoundSphereWithChildrenCallFunc=ic,J.getCameraRelativeHeightCallFunc=Cc,J.getFillMaterialParamInfoCallFunc=sc,J.getGlobalPropertyCallFunc=ac,J.getHeightByLonLatCallFunc=Ya,J.getHeightByLonLatsCallFunc=$a,J.getIdByComponentNameAndHitItemCallFunc=Bc,J.getLonLatAltToScreenPositionCallFunc=ec,J.getObjectByInfoCallFunc=cc,J.getStatusCallFunc=Fc,J.getStrokeMaterialParamInfoCallFunc=oc,J.getTilesetMaterialIDListCallFunc=Tc,J.getVersionCallFunc=Ac,J.highlightActorByTagCallFunc=_c,J.mountPakFiles=La,J.moveObjectsCallFunc=Uc,J.partialCaptureCallFunc=qa,J.pickCallFunc=Ja,J.pickPositionCallFunc=Xa,J.quitCallFunc=za,J.refreshTilesetCallFunc=xa,J.resetWithCurrentCameraCallFunc=li,J.restoreOriginalSceneCallFunc=uc,J.saveStringToFileCallFunc=bc,J.sendCustomMessageCallFunc=Ec,J.setGlobalPropertyCallFunc=Wa,J.setNodePositionCallFunc=Va,J.setNodeRotationCallFunc=Ga,J.setNodeScaleCallFunc=ja,J.smoothMoveCallFunc=YA,J.smoothMoveOnGroundCallFunc=JA,J.smoothMoveWithRotationCallFunc=zA,J.smoothMoveWithRotationOnGroundCallFunc=XA,J.startEditingCallFunc=Sc,J.startVoiceCallFunc=Ma,J.stopEditingCallFunc=Qc,J.stopVoiceCallFunc=Ha,J.uePositionToLonLatAltCallFunc=tc,J.unBind3DTilesetByIdCallFunc=vc,J.unBind3DTilesetByTagCallFunc=gc,J.unBindActorByIDCallFunc=dc,J.unBindActorByTagCallFunc=fc,J.unBindImageryByIdCallFunc=wc,J.unBindImageryByTagCallFunc=mc,Object.defineProperty(J,Symbol.toStringTag,{value:"Module"}),J}({},EarthSDK3);
328
+ .`+So+zv+Eu)},Xv=function(v,e){var t=v.ownerDocument;if(t){var n=t.createElement("style");n.textContent=e,v.appendChild(n)}},Fu=function(){function v(){}return v.getOrigin=function(e){var t=v._link;return t?(t.href=e,t.href=t.href,t.protocol+t.hostname+t.port):"about:blank"},v.isSameOrigin=function(e){return v.getOrigin(e)===v._origin},v.setContext=function(e){v._link=e.document.createElement("a"),v._origin=v.getOrigin(e.location.href)},v._origin="about:blank",v}(),Yv=function(){function v(e,t){this.context=e,this._options=t,this._cache={}}return v.prototype.addImage=function(e){var t=Promise.resolve();return this.has(e)||(Uo(e)||ey(e))&&(this._cache[e]=this.loadImage(e)).catch(function(){}),t},v.prototype.match=function(e){return this._cache[e]},v.prototype.loadImage=function(e){return De(this,void 0,void 0,function(){var t,n,y,C,A=this;return Pe(this,function(h){switch(h.label){case 0:return t=Fu.isSameOrigin(e),n=!Qo(e)&&this._options.useCORS===!0&&Ie.SUPPORT_CORS_IMAGES&&!t,y=!Qo(e)&&!t&&!Uo(e)&&typeof this._options.proxy=="string"&&Ie.SUPPORT_CORS_XHR&&!n,!t&&this._options.allowTaint===!1&&!Qo(e)&&!Uo(e)&&!y&&!n?[2]:(C=e,y?[4,this.proxy(C)]:[3,2]);case 1:C=h.sent(),h.label=2;case 2:return this.context.logger.debug("Added image "+e.substring(0,256)),[4,new Promise(function(m,g){var w=new Image;w.onload=function(){return m(w)},w.onerror=g,(ty(C)||n)&&(w.crossOrigin="anonymous"),w.src=C,w.complete===!0&&setTimeout(function(){return m(w)},500),A._options.imageTimeout>0&&setTimeout(function(){return g("Timed out ("+A._options.imageTimeout+"ms) loading image")},A._options.imageTimeout)})];case 3:return[2,h.sent()]}})})},v.prototype.has=function(e){return typeof this._cache[e]<"u"},v.prototype.keys=function(){return Promise.resolve(Object.keys(this._cache))},v.prototype.proxy=function(e){var t=this,n=this._options.proxy;if(!n)throw new Error("No proxy defined");var y=e.substring(0,256);return new Promise(function(C,A){var h=Ie.SUPPORT_RESPONSE_TYPE?"blob":"text",m=new XMLHttpRequest;m.onload=function(){if(m.status===200)if(h==="text")C(m.response);else{var p=new FileReader;p.addEventListener("load",function(){return C(p.result)},!1),p.addEventListener("error",function(u){return A(u)},!1),p.readAsDataURL(m.response)}else A("Failed to proxy resource "+y+" with status code "+m.status)},m.onerror=A;var g=n.indexOf("?")>-1?"&":"?";if(m.open("GET",""+n+g+"url="+encodeURIComponent(e)+"&responseType="+h),h!=="text"&&m instanceof XMLHttpRequest&&(m.responseType=h),t._options.imageTimeout){var w=t._options.imageTimeout;m.timeout=w,m.ontimeout=function(){return A("Timed out ("+w+"ms) proxying "+y)}}m.send()})},v}(),$v=/^data:image\/svg\+xml/i,Zv=/^data:image\/.*;base64,/i,qv=/^data:image\/.*/i,ey=function(v){return Ie.SUPPORT_SVG_DRAWING||!ry(v)},Qo=function(v){return qv.test(v)},ty=function(v){return Zv.test(v)},Uo=function(v){return v.substr(0,4)==="blob"},ry=function(v){return v.substr(-3).toLowerCase()==="svg"||$v.test(v)},te=function(){function v(e,t){this.type=0,this.x=e,this.y=t}return v.prototype.add=function(e,t){return new v(this.x+e,this.y+t)},v}(),Yt=function(v,e,t){return new te(v.x+(e.x-v.x)*t,v.y+(e.y-v.y)*t)},Kn=function(){function v(e,t,n,y){this.type=1,this.start=e,this.startControl=t,this.endControl=n,this.end=y}return v.prototype.subdivide=function(e,t){var n=Yt(this.start,this.startControl,e),y=Yt(this.startControl,this.endControl,e),C=Yt(this.endControl,this.end,e),A=Yt(n,y,e),h=Yt(y,C,e),m=Yt(A,h,e);return t?new v(this.start,n,A,m):new v(m,h,C,this.end)},v.prototype.add=function(e,t){return new v(this.start.add(e,t),this.startControl.add(e,t),this.endControl.add(e,t),this.end.add(e,t))},v.prototype.reverse=function(){return new v(this.end,this.endControl,this.startControl,this.start)},v}(),We=function(v){return v.type===1},Ay=function(){function v(e){var t=e.styles,n=e.bounds,y=yr(t.borderTopLeftRadius,n.width,n.height),C=y[0],A=y[1],h=yr(t.borderTopRightRadius,n.width,n.height),m=h[0],g=h[1],w=yr(t.borderBottomRightRadius,n.width,n.height),p=w[0],u=w[1],f=yr(t.borderBottomLeftRadius,n.width,n.height),c=f[0],a=f[1],i=[];i.push((C+m)/n.width),i.push((c+p)/n.width),i.push((A+a)/n.height),i.push((g+u)/n.height);var s=Math.max.apply(Math,i);s>1&&(C/=s,A/=s,m/=s,g/=s,p/=s,u/=s,c/=s,a/=s);var r=n.width-m,o=n.height-u,l=n.width-p,d=n.height-a,B=t.borderTopWidth,_=t.borderRightWidth,b=t.borderBottomWidth,E=t.borderLeftWidth,F=ge(t.paddingTop,e.bounds.width),S=ge(t.paddingRight,e.bounds.width),U=ge(t.paddingBottom,e.bounds.width),T=ge(t.paddingLeft,e.bounds.width);this.topLeftBorderDoubleOuterBox=C>0||A>0?ve(n.left+E/3,n.top+B/3,C-E/3,A-B/3,le.TOP_LEFT):new te(n.left+E/3,n.top+B/3),this.topRightBorderDoubleOuterBox=C>0||A>0?ve(n.left+r,n.top+B/3,m-_/3,g-B/3,le.TOP_RIGHT):new te(n.left+n.width-_/3,n.top+B/3),this.bottomRightBorderDoubleOuterBox=p>0||u>0?ve(n.left+l,n.top+o,p-_/3,u-b/3,le.BOTTOM_RIGHT):new te(n.left+n.width-_/3,n.top+n.height-b/3),this.bottomLeftBorderDoubleOuterBox=c>0||a>0?ve(n.left+E/3,n.top+d,c-E/3,a-b/3,le.BOTTOM_LEFT):new te(n.left+E/3,n.top+n.height-b/3),this.topLeftBorderDoubleInnerBox=C>0||A>0?ve(n.left+E*2/3,n.top+B*2/3,C-E*2/3,A-B*2/3,le.TOP_LEFT):new te(n.left+E*2/3,n.top+B*2/3),this.topRightBorderDoubleInnerBox=C>0||A>0?ve(n.left+r,n.top+B*2/3,m-_*2/3,g-B*2/3,le.TOP_RIGHT):new te(n.left+n.width-_*2/3,n.top+B*2/3),this.bottomRightBorderDoubleInnerBox=p>0||u>0?ve(n.left+l,n.top+o,p-_*2/3,u-b*2/3,le.BOTTOM_RIGHT):new te(n.left+n.width-_*2/3,n.top+n.height-b*2/3),this.bottomLeftBorderDoubleInnerBox=c>0||a>0?ve(n.left+E*2/3,n.top+d,c-E*2/3,a-b*2/3,le.BOTTOM_LEFT):new te(n.left+E*2/3,n.top+n.height-b*2/3),this.topLeftBorderStroke=C>0||A>0?ve(n.left+E/2,n.top+B/2,C-E/2,A-B/2,le.TOP_LEFT):new te(n.left+E/2,n.top+B/2),this.topRightBorderStroke=C>0||A>0?ve(n.left+r,n.top+B/2,m-_/2,g-B/2,le.TOP_RIGHT):new te(n.left+n.width-_/2,n.top+B/2),this.bottomRightBorderStroke=p>0||u>0?ve(n.left+l,n.top+o,p-_/2,u-b/2,le.BOTTOM_RIGHT):new te(n.left+n.width-_/2,n.top+n.height-b/2),this.bottomLeftBorderStroke=c>0||a>0?ve(n.left+E/2,n.top+d,c-E/2,a-b/2,le.BOTTOM_LEFT):new te(n.left+E/2,n.top+n.height-b/2),this.topLeftBorderBox=C>0||A>0?ve(n.left,n.top,C,A,le.TOP_LEFT):new te(n.left,n.top),this.topRightBorderBox=m>0||g>0?ve(n.left+r,n.top,m,g,le.TOP_RIGHT):new te(n.left+n.width,n.top),this.bottomRightBorderBox=p>0||u>0?ve(n.left+l,n.top+o,p,u,le.BOTTOM_RIGHT):new te(n.left+n.width,n.top+n.height),this.bottomLeftBorderBox=c>0||a>0?ve(n.left,n.top+d,c,a,le.BOTTOM_LEFT):new te(n.left,n.top+n.height),this.topLeftPaddingBox=C>0||A>0?ve(n.left+E,n.top+B,Math.max(0,C-E),Math.max(0,A-B),le.TOP_LEFT):new te(n.left+E,n.top+B),this.topRightPaddingBox=m>0||g>0?ve(n.left+Math.min(r,n.width-_),n.top+B,r>n.width+_?0:Math.max(0,m-_),Math.max(0,g-B),le.TOP_RIGHT):new te(n.left+n.width-_,n.top+B),this.bottomRightPaddingBox=p>0||u>0?ve(n.left+Math.min(l,n.width-E),n.top+Math.min(o,n.height-b),Math.max(0,p-_),Math.max(0,u-b),le.BOTTOM_RIGHT):new te(n.left+n.width-_,n.top+n.height-b),this.bottomLeftPaddingBox=c>0||a>0?ve(n.left+E,n.top+Math.min(d,n.height-b),Math.max(0,c-E),Math.max(0,a-b),le.BOTTOM_LEFT):new te(n.left+E,n.top+n.height-b),this.topLeftContentBox=C>0||A>0?ve(n.left+E+T,n.top+B+F,Math.max(0,C-(E+T)),Math.max(0,A-(B+F)),le.TOP_LEFT):new te(n.left+E+T,n.top+B+F),this.topRightContentBox=m>0||g>0?ve(n.left+Math.min(r,n.width+E+T),n.top+B+F,r>n.width+E+T?0:m-E+T,g-(B+F),le.TOP_RIGHT):new te(n.left+n.width-(_+S),n.top+B+F),this.bottomRightContentBox=p>0||u>0?ve(n.left+Math.min(l,n.width-(E+T)),n.top+Math.min(o,n.height+B+F),Math.max(0,p-(_+S)),u-(b+U),le.BOTTOM_RIGHT):new te(n.left+n.width-(_+S),n.top+n.height-(b+U)),this.bottomLeftContentBox=c>0||a>0?ve(n.left+E+T,n.top+d,Math.max(0,c-(E+T)),a-(b+U),le.BOTTOM_LEFT):new te(n.left+E+T,n.top+n.height-(b+U))}return v}(),le;(function(v){v[v.TOP_LEFT=0]="TOP_LEFT",v[v.TOP_RIGHT=1]="TOP_RIGHT",v[v.BOTTOM_RIGHT=2]="BOTTOM_RIGHT",v[v.BOTTOM_LEFT=3]="BOTTOM_LEFT"})(le||(le={}));var ve=function(v,e,t,n,y){var C=4*((Math.sqrt(2)-1)/3),A=t*C,h=n*C,m=v+t,g=e+n;switch(y){case le.TOP_LEFT:return new Kn(new te(v,g),new te(v,g-h),new te(m-A,e),new te(m,e));case le.TOP_RIGHT:return new Kn(new te(v,e),new te(v+A,e),new te(m,g-h),new te(m,g));case le.BOTTOM_RIGHT:return new Kn(new te(m,e),new te(m,e+h),new te(v+A,g),new te(v,g));case le.BOTTOM_LEFT:default:return new Kn(new te(m,g),new te(m-A,g),new te(v,e+h),new te(v,e))}},Nn=function(v){return[v.topLeftBorderBox,v.topRightBorderBox,v.bottomRightBorderBox,v.bottomLeftBorderBox]},ny=function(v){return[v.topLeftContentBox,v.topRightContentBox,v.bottomRightContentBox,v.bottomLeftContentBox]},Vn=function(v){return[v.topLeftPaddingBox,v.topRightPaddingBox,v.bottomRightPaddingBox,v.bottomLeftPaddingBox]},iy=function(){function v(e,t,n){this.offsetX=e,this.offsetY=t,this.matrix=n,this.type=0,this.target=6}return v}(),Gn=function(){function v(e,t){this.path=e,this.target=t,this.type=1}return v}(),oy=function(){function v(e){this.opacity=e,this.type=2,this.target=6}return v}(),sy=function(v){return v.type===0},Su=function(v){return v.type===1},ay=function(v){return v.type===2},Qu=function(v,e){return v.length===e.length?v.some(function(t,n){return t===e[n]}):!1},cy=function(v,e,t,n,y){return v.map(function(C,A){switch(A){case 0:return C.add(e,t);case 1:return C.add(e+n,t);case 2:return C.add(e+n,t+y);case 3:return C.add(e,t+y)}return C})},Uu=function(){function v(e){this.element=e,this.inlineLevel=[],this.nonInlineLevel=[],this.negativeZIndex=[],this.zeroOrAutoZIndexOrTransformedOrOpacity=[],this.positiveZIndex=[],this.nonPositionedFloats=[],this.nonPositionedInlineLevel=[]}return v}(),Tu=function(){function v(e,t){if(this.container=e,this.parent=t,this.effects=[],this.curves=new Ay(this.container),this.container.styles.opacity<1&&this.effects.push(new oy(this.container.styles.opacity)),this.container.styles.transform!==null){var n=this.container.bounds.left+this.container.styles.transformOrigin[0].number,y=this.container.bounds.top+this.container.styles.transformOrigin[1].number,C=this.container.styles.transform;this.effects.push(new iy(n,y,C))}if(this.container.styles.overflowX!==0){var A=Nn(this.curves),h=Vn(this.curves);Qu(A,h)?this.effects.push(new Gn(A,6)):(this.effects.push(new Gn(A,2)),this.effects.push(new Gn(h,4)))}}return v.prototype.getEffects=function(e){for(var t=[2,3].indexOf(this.container.styles.position)===-1,n=this.parent,y=this.effects.slice(0);n;){var C=n.effects.filter(function(m){return!Su(m)});if(t||n.container.styles.position!==0||!n.parent){if(y.unshift.apply(y,C),t=[2,3].indexOf(n.container.styles.position)===-1,n.container.styles.overflowX!==0){var A=Nn(n.curves),h=Vn(n.curves);Qu(A,h)||y.unshift(new Gn(h,6))}}else y.unshift.apply(y,C);n=n.parent}return y.filter(function(m){return Se(m.target,e)})},v}(),To=function(v,e,t,n){v.container.elements.forEach(function(y){var C=Se(y.flags,4),A=Se(y.flags,2),h=new Tu(y,v);Se(y.styles.display,2048)&&n.push(h);var m=Se(y.flags,8)?[]:n;if(C||A){var g=C||y.styles.isPositioned()?t:e,w=new Uu(h);if(y.styles.isPositioned()||y.styles.opacity<1||y.styles.isTransformed()){var p=y.styles.zIndex.order;if(p<0){var u=0;g.negativeZIndex.some(function(c,a){return p>c.element.container.styles.zIndex.order?(u=a,!1):u>0}),g.negativeZIndex.splice(u,0,w)}else if(p>0){var f=0;g.positiveZIndex.some(function(c,a){return p>=c.element.container.styles.zIndex.order?(f=a+1,!1):f>0}),g.positiveZIndex.splice(f,0,w)}else g.zeroOrAutoZIndexOrTransformedOrOpacity.push(w)}else y.styles.isFloating()?g.nonPositionedFloats.push(w):g.nonPositionedInlineLevel.push(w);To(h,w,C?w:t,m)}else y.styles.isInlineLevel()?e.inlineLevel.push(h):e.nonInlineLevel.push(h),To(h,e,t,m);Se(y.flags,8)&&Iu(y,m)})},Iu=function(v,e){for(var t=v instanceof mo?v.start:1,n=v instanceof mo?v.reversed:!1,y=0;y<e.length;y++){var C=e[y];C.container instanceof ru&&typeof C.container.value=="number"&&C.container.value!==0&&(t=C.container.value),C.listValue=_r(t,C.container.styles.listStyleType,!0),t+=n?-1:1}},ly=function(v){var e=new Tu(v,null),t=new Uu(e),n=[];return To(e,t,t,n),Iu(e.container,n),t},Pu=function(v,e){switch(e){case 0:return ze(v.topLeftBorderBox,v.topLeftPaddingBox,v.topRightBorderBox,v.topRightPaddingBox);case 1:return ze(v.topRightBorderBox,v.topRightPaddingBox,v.bottomRightBorderBox,v.bottomRightPaddingBox);case 2:return ze(v.bottomRightBorderBox,v.bottomRightPaddingBox,v.bottomLeftBorderBox,v.bottomLeftPaddingBox);case 3:default:return ze(v.bottomLeftBorderBox,v.bottomLeftPaddingBox,v.topLeftBorderBox,v.topLeftPaddingBox)}},uy=function(v,e){switch(e){case 0:return ze(v.topLeftBorderBox,v.topLeftBorderDoubleOuterBox,v.topRightBorderBox,v.topRightBorderDoubleOuterBox);case 1:return ze(v.topRightBorderBox,v.topRightBorderDoubleOuterBox,v.bottomRightBorderBox,v.bottomRightBorderDoubleOuterBox);case 2:return ze(v.bottomRightBorderBox,v.bottomRightBorderDoubleOuterBox,v.bottomLeftBorderBox,v.bottomLeftBorderDoubleOuterBox);case 3:default:return ze(v.bottomLeftBorderBox,v.bottomLeftBorderDoubleOuterBox,v.topLeftBorderBox,v.topLeftBorderDoubleOuterBox)}},dy=function(v,e){switch(e){case 0:return ze(v.topLeftBorderDoubleInnerBox,v.topLeftPaddingBox,v.topRightBorderDoubleInnerBox,v.topRightPaddingBox);case 1:return ze(v.topRightBorderDoubleInnerBox,v.topRightPaddingBox,v.bottomRightBorderDoubleInnerBox,v.bottomRightPaddingBox);case 2:return ze(v.bottomRightBorderDoubleInnerBox,v.bottomRightPaddingBox,v.bottomLeftBorderDoubleInnerBox,v.bottomLeftPaddingBox);case 3:default:return ze(v.bottomLeftBorderDoubleInnerBox,v.bottomLeftPaddingBox,v.topLeftBorderDoubleInnerBox,v.topLeftPaddingBox)}},fy=function(v,e){switch(e){case 0:return jn(v.topLeftBorderStroke,v.topRightBorderStroke);case 1:return jn(v.topRightBorderStroke,v.bottomRightBorderStroke);case 2:return jn(v.bottomRightBorderStroke,v.bottomLeftBorderStroke);case 3:default:return jn(v.bottomLeftBorderStroke,v.topLeftBorderStroke)}},jn=function(v,e){var t=[];return We(v)?t.push(v.subdivide(.5,!1)):t.push(v),We(e)?t.push(e.subdivide(.5,!0)):t.push(e),t},ze=function(v,e,t,n){var y=[];return We(v)?y.push(v.subdivide(.5,!1)):y.push(v),We(t)?y.push(t.subdivide(.5,!0)):y.push(t),We(n)?y.push(n.subdivide(.5,!0).reverse()):y.push(n),We(e)?y.push(e.subdivide(.5,!1).reverse()):y.push(e),y},xu=function(v){var e=v.bounds,t=v.styles;return e.add(t.borderLeftWidth,t.borderTopWidth,-(t.borderRightWidth+t.borderLeftWidth),-(t.borderTopWidth+t.borderBottomWidth))},Wn=function(v){var e=v.styles,t=v.bounds,n=ge(e.paddingLeft,t.width),y=ge(e.paddingRight,t.width),C=ge(e.paddingTop,t.width),A=ge(e.paddingBottom,t.width);return t.add(n+e.borderLeftWidth,C+e.borderTopWidth,-(e.borderRightWidth+e.borderLeftWidth+n+y),-(e.borderTopWidth+e.borderBottomWidth+C+A))},hy=function(v,e){return v===0?e.bounds:v===2?Wn(e):xu(e)},py=function(v,e){return v===0?e.bounds:v===2?Wn(e):xu(e)},Io=function(v,e,t){var n=hy(Zt(v.styles.backgroundOrigin,e),v),y=py(Zt(v.styles.backgroundClip,e),v),C=gy(Zt(v.styles.backgroundSize,e),t,n),A=C[0],h=C[1],m=yr(Zt(v.styles.backgroundPosition,e),n.width-A,n.height-h),g=vy(Zt(v.styles.backgroundRepeat,e),m,C,n,y),w=Math.round(n.left+m[0]),p=Math.round(n.top+m[1]);return[g,w,p,A,h]},$t=function(v){return fe(v)&&v.value===Wt.AUTO},zn=function(v){return typeof v=="number"},gy=function(v,e,t){var n=e[0],y=e[1],C=e[2],A=v[0],h=v[1];if(!A)return[0,0];if(Fe(A)&&h&&Fe(h))return[ge(A,t.width),ge(h,t.height)];var m=zn(C);if(fe(A)&&(A.value===Wt.CONTAIN||A.value===Wt.COVER)){if(zn(C)){var g=t.width/t.height;return g<C!=(A.value===Wt.COVER)?[t.width,t.width/C]:[t.height*C,t.height]}return[t.width,t.height]}var w=zn(n),p=zn(y),u=w||p;if($t(A)&&(!h||$t(h))){if(w&&p)return[n,y];if(!m&&!u)return[t.width,t.height];if(u&&m){var f=w?n:y*C,c=p?y:n/C;return[f,c]}var a=w?n:t.width,i=p?y:t.height;return[a,i]}if(m){var s=0,r=0;return Fe(A)?s=ge(A,t.width):Fe(h)&&(r=ge(h,t.height)),$t(A)?s=r*C:(!h||$t(h))&&(r=s/C),[s,r]}var o=null,l=null;if(Fe(A)?o=ge(A,t.width):h&&Fe(h)&&(l=ge(h,t.height)),o!==null&&(!h||$t(h))&&(l=w&&p?o/n*y:t.height),l!==null&&$t(A)&&(o=w&&p?l/y*n:t.width),o!==null&&l!==null)return[o,l];throw new Error("Unable to calculate background-size for element")},Zt=function(v,e){var t=v[e];return typeof t>"u"?v[0]:t},vy=function(v,e,t,n,y){var C=e[0],A=e[1],h=t[0],m=t[1];switch(v){case 2:return[new te(Math.round(n.left),Math.round(n.top+A)),new te(Math.round(n.left+n.width),Math.round(n.top+A)),new te(Math.round(n.left+n.width),Math.round(m+n.top+A)),new te(Math.round(n.left),Math.round(m+n.top+A))];case 3:return[new te(Math.round(n.left+C),Math.round(n.top)),new te(Math.round(n.left+C+h),Math.round(n.top)),new te(Math.round(n.left+C+h),Math.round(n.height+n.top)),new te(Math.round(n.left+C),Math.round(n.height+n.top))];case 1:return[new te(Math.round(n.left+C),Math.round(n.top+A)),new te(Math.round(n.left+C+h),Math.round(n.top+A)),new te(Math.round(n.left+C+h),Math.round(n.top+A+m)),new te(Math.round(n.left+C),Math.round(n.top+A+m))];default:return[new te(Math.round(y.left),Math.round(y.top)),new te(Math.round(y.left+y.width),Math.round(y.top)),new te(Math.round(y.left+y.width),Math.round(y.height+y.top)),new te(Math.round(y.left),Math.round(y.height+y.top))]}},yy="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",Ou="Hidden Text",my=function(){function v(e){this._data={},this._document=e}return v.prototype.parseMetrics=function(e,t){var n=this._document.createElement("div"),y=this._document.createElement("img"),C=this._document.createElement("span"),A=this._document.body;n.style.visibility="hidden",n.style.fontFamily=e,n.style.fontSize=t,n.style.margin="0",n.style.padding="0",n.style.whiteSpace="nowrap",A.appendChild(n),y.src=yy,y.width=1,y.height=1,y.style.margin="0",y.style.padding="0",y.style.verticalAlign="baseline",C.style.fontFamily=e,C.style.fontSize=t,C.style.margin="0",C.style.padding="0",C.appendChild(this._document.createTextNode(Ou)),n.appendChild(C),n.appendChild(y);var h=y.offsetTop-C.offsetTop+2;n.removeChild(C),n.appendChild(this._document.createTextNode(Ou)),n.style.lineHeight="normal",y.style.verticalAlign="super";var m=y.offsetTop-n.offsetTop+2;return A.removeChild(n),{baseline:h,middle:m}},v.prototype.getMetrics=function(e,t){var n=e+" "+t;return typeof this._data[n]>"u"&&(this._data[n]=this.parseMetrics(e,t)),this._data[n]},v}(),Mu=function(){function v(e,t){this.context=e,this.options=t}return v}(),wy=1e4,By=function(v){Xe(e,v);function e(t,n){var y=v.call(this,t,n)||this;return y._activeEffects=[],y.canvas=n.canvas?n.canvas:document.createElement("canvas"),y.ctx=y.canvas.getContext("2d"),n.canvas||(y.canvas.width=Math.floor(n.width*n.scale),y.canvas.height=Math.floor(n.height*n.scale),y.canvas.style.width=n.width+"px",y.canvas.style.height=n.height+"px"),y.fontMetrics=new my(document),y.ctx.scale(y.options.scale,y.options.scale),y.ctx.translate(-n.x,-n.y),y.ctx.textBaseline="bottom",y._activeEffects=[],y.context.logger.debug("Canvas renderer initialized ("+n.width+"x"+n.height+") with scale "+n.scale),y}return e.prototype.applyEffects=function(t){for(var n=this;this._activeEffects.length;)this.popEffect();t.forEach(function(y){return n.applyEffect(y)})},e.prototype.applyEffect=function(t){this.ctx.save(),ay(t)&&(this.ctx.globalAlpha=t.opacity),sy(t)&&(this.ctx.translate(t.offsetX,t.offsetY),this.ctx.transform(t.matrix[0],t.matrix[1],t.matrix[2],t.matrix[3],t.matrix[4],t.matrix[5]),this.ctx.translate(-t.offsetX,-t.offsetY)),Su(t)&&(this.path(t.path),this.ctx.clip()),this._activeEffects.push(t)},e.prototype.popEffect=function(){this._activeEffects.pop(),this.ctx.restore()},e.prototype.renderStack=function(t){return De(this,void 0,void 0,function(){var n;return Pe(this,function(y){switch(y.label){case 0:return n=t.element.container.styles,n.isVisible()?[4,this.renderStackContent(t)]:[3,2];case 1:y.sent(),y.label=2;case 2:return[2]}})})},e.prototype.renderNode=function(t){return De(this,void 0,void 0,function(){return Pe(this,function(n){switch(n.label){case 0:if(Se(t.container.flags,16))debugger;return t.container.styles.isVisible()?[4,this.renderNodeBackgroundAndBorders(t)]:[3,3];case 1:return n.sent(),[4,this.renderNodeContent(t)];case 2:n.sent(),n.label=3;case 3:return[2]}})})},e.prototype.renderTextWithLetterSpacing=function(t,n,y){var C=this;if(n===0)this.ctx.fillText(t.text,t.bounds.left,t.bounds.top+y);else{var A=yo(t.text);A.reduce(function(h,m){return C.ctx.fillText(m,h,t.bounds.top+y),h+C.ctx.measureText(m).width},t.bounds.left)}},e.prototype.createFontStyle=function(t){var n=t.fontVariant.filter(function(A){return A==="normal"||A==="small-caps"}).join(""),y=Fy(t.fontFamily).join(", "),C=vr(t.fontSize)?""+t.fontSize.number+t.fontSize.unit:t.fontSize.number+"px";return[[t.fontStyle,n,t.fontWeight,C,y].join(" "),y,C]},e.prototype.renderTextNode=function(t,n){return De(this,void 0,void 0,function(){var y,C,A,h,m,g,w,p,u=this;return Pe(this,function(f){return y=this.createFontStyle(n),C=y[0],A=y[1],h=y[2],this.ctx.font=C,this.ctx.direction=n.direction===1?"rtl":"ltr",this.ctx.textAlign="left",this.ctx.textBaseline="alphabetic",m=this.fontMetrics.getMetrics(A,h),g=m.baseline,w=m.middle,p=n.paintOrder,t.textBounds.forEach(function(c){p.forEach(function(a){switch(a){case 0:u.ctx.fillStyle=Qe(n.color),u.renderTextWithLetterSpacing(c,n.letterSpacing,g);var i=n.textShadow;i.length&&c.text.trim().length&&(i.slice(0).reverse().forEach(function(s){u.ctx.shadowColor=Qe(s.color),u.ctx.shadowOffsetX=s.offsetX.number*u.options.scale,u.ctx.shadowOffsetY=s.offsetY.number*u.options.scale,u.ctx.shadowBlur=s.blur.number,u.renderTextWithLetterSpacing(c,n.letterSpacing,g)}),u.ctx.shadowColor="",u.ctx.shadowOffsetX=0,u.ctx.shadowOffsetY=0,u.ctx.shadowBlur=0),n.textDecorationLine.length&&(u.ctx.fillStyle=Qe(n.textDecorationColor||n.color),n.textDecorationLine.forEach(function(s){switch(s){case 1:u.ctx.fillRect(c.bounds.left,Math.round(c.bounds.top+g),c.bounds.width,1);break;case 2:u.ctx.fillRect(c.bounds.left,Math.round(c.bounds.top),c.bounds.width,1);break;case 3:u.ctx.fillRect(c.bounds.left,Math.ceil(c.bounds.top+w),c.bounds.width,1);break}}));break;case 1:n.webkitTextStrokeWidth&&c.text.trim().length&&(u.ctx.strokeStyle=Qe(n.webkitTextStrokeColor),u.ctx.lineWidth=n.webkitTextStrokeWidth,u.ctx.lineJoin=window.chrome?"miter":"round",u.ctx.strokeText(c.text,c.bounds.left,c.bounds.top+g)),u.ctx.strokeStyle="",u.ctx.lineWidth=0,u.ctx.lineJoin="miter";break}})}),[2]})})},e.prototype.renderReplacedElement=function(t,n,y){if(y&&t.intrinsicWidth>0&&t.intrinsicHeight>0){var C=Wn(t),A=Vn(n);this.path(A),this.ctx.save(),this.ctx.clip(),this.ctx.drawImage(y,0,0,t.intrinsicWidth,t.intrinsicHeight,C.left,C.top,C.width,C.height),this.ctx.restore()}},e.prototype.renderNodeContent=function(t){return De(this,void 0,void 0,function(){var n,y,C,A,h,m,r,r,g,w,p,u,l,f,c,d,a,i,s,r,o,l,d;return Pe(this,function(B){switch(B.label){case 0:this.applyEffects(t.getEffects(4)),n=t.container,y=t.curves,C=n.styles,A=0,h=n.textNodes,B.label=1;case 1:return A<h.length?(m=h[A],[4,this.renderTextNode(m,C)]):[3,4];case 2:B.sent(),B.label=3;case 3:return A++,[3,1];case 4:if(!(n instanceof ql))return[3,8];B.label=5;case 5:return B.trys.push([5,7,,8]),[4,this.context.cache.match(n.src)];case 6:return r=B.sent(),this.renderReplacedElement(n,y,r),[3,8];case 7:return B.sent(),this.context.logger.error("Error loading image "+n.src),[3,8];case 8:if(n instanceof eu&&this.renderReplacedElement(n,y,n.canvas),!(n instanceof tu))return[3,12];B.label=9;case 9:return B.trys.push([9,11,,12]),[4,this.context.cache.match(n.svg)];case 10:return r=B.sent(),this.renderReplacedElement(n,y,r),[3,12];case 11:return B.sent(),this.context.logger.error("Error loading svg "+n.svg.substring(0,255)),[3,12];case 12:return n instanceof ou&&n.tree?(g=new e(this.context,{scale:this.options.scale,backgroundColor:n.backgroundColor,x:0,y:0,width:n.width,height:n.height}),[4,g.render(n.tree)]):[3,14];case 13:w=B.sent(),n.width&&n.height&&this.ctx.drawImage(w,0,0,n.width,n.height,n.bounds.left,n.bounds.top,n.bounds.width,n.bounds.height),B.label=14;case 14:if(n instanceof wo&&(p=Math.min(n.bounds.width,n.bounds.height),n.type===Mn?n.checked&&(this.ctx.save(),this.path([new te(n.bounds.left+p*.39363,n.bounds.top+p*.79),new te(n.bounds.left+p*.16,n.bounds.top+p*.5549),new te(n.bounds.left+p*.27347,n.bounds.top+p*.44071),new te(n.bounds.left+p*.39694,n.bounds.top+p*.5649),new te(n.bounds.left+p*.72983,n.bounds.top+p*.23),new te(n.bounds.left+p*.84,n.bounds.top+p*.34085),new te(n.bounds.left+p*.39363,n.bounds.top+p*.79)]),this.ctx.fillStyle=Qe(Au),this.ctx.fill(),this.ctx.restore()):n.type===Hn&&n.checked&&(this.ctx.save(),this.ctx.beginPath(),this.ctx.arc(n.bounds.left+p/2,n.bounds.top+p/2,p/4,0,Math.PI*2,!0),this.ctx.fillStyle=Qe(Au),this.ctx.fill(),this.ctx.restore())),Cy(n)&&n.value.length){switch(u=this.createFontStyle(C),l=u[0],f=u[1],c=this.fontMetrics.getMetrics(l,f).baseline,this.ctx.font=l,this.ctx.fillStyle=Qe(C.color),this.ctx.textBaseline="alphabetic",this.ctx.textAlign=_y(n.styles.textAlign),d=Wn(n),a=0,n.styles.textAlign){case 1:a+=d.width/2;break;case 2:a+=d.width;break}i=d.add(a,0,0,-d.height/2+1),this.ctx.save(),this.path([new te(d.left,d.top),new te(d.left+d.width,d.top),new te(d.left+d.width,d.top+d.height),new te(d.left,d.top+d.height)]),this.ctx.clip(),this.renderTextWithLetterSpacing(new Cr(n.value,i),C.letterSpacing,c),this.ctx.restore(),this.ctx.textBaseline="alphabetic",this.ctx.textAlign="left"}if(!Se(n.styles.display,2048))return[3,20];if(n.styles.listStyleImage===null)return[3,19];if(s=n.styles.listStyleImage,s.type!==0)return[3,18];r=void 0,o=s.url,B.label=15;case 15:return B.trys.push([15,17,,18]),[4,this.context.cache.match(o)];case 16:return r=B.sent(),this.ctx.drawImage(r,n.bounds.left-(r.width+10),n.bounds.top),[3,18];case 17:return B.sent(),this.context.logger.error("Error loading list-style-image "+o),[3,18];case 18:return[3,20];case 19:t.listValue&&n.styles.listStyleType!==-1&&(l=this.createFontStyle(C)[0],this.ctx.font=l,this.ctx.fillStyle=Qe(C.color),this.ctx.textBaseline="middle",this.ctx.textAlign="right",d=new at(n.bounds.left,n.bounds.top+ge(n.styles.paddingTop,n.bounds.width),n.bounds.width,Ol(C.lineHeight,C.fontSize.number)/2+1),this.renderTextWithLetterSpacing(new Cr(t.listValue,d),C.letterSpacing,Ol(C.lineHeight,C.fontSize.number)/2+2),this.ctx.textBaseline="bottom",this.ctx.textAlign="left"),B.label=20;case 20:return[2]}})})},e.prototype.renderStackContent=function(t){return De(this,void 0,void 0,function(){var n,y,s,C,A,s,h,m,s,g,w,s,p,u,s,f,c,s,a,i,s;return Pe(this,function(r){switch(r.label){case 0:if(Se(t.element.container.flags,16))debugger;return[4,this.renderNodeBackgroundAndBorders(t.element)];case 1:r.sent(),n=0,y=t.negativeZIndex,r.label=2;case 2:return n<y.length?(s=y[n],[4,this.renderStack(s)]):[3,5];case 3:r.sent(),r.label=4;case 4:return n++,[3,2];case 5:return[4,this.renderNodeContent(t.element)];case 6:r.sent(),C=0,A=t.nonInlineLevel,r.label=7;case 7:return C<A.length?(s=A[C],[4,this.renderNode(s)]):[3,10];case 8:r.sent(),r.label=9;case 9:return C++,[3,7];case 10:h=0,m=t.nonPositionedFloats,r.label=11;case 11:return h<m.length?(s=m[h],[4,this.renderStack(s)]):[3,14];case 12:r.sent(),r.label=13;case 13:return h++,[3,11];case 14:g=0,w=t.nonPositionedInlineLevel,r.label=15;case 15:return g<w.length?(s=w[g],[4,this.renderStack(s)]):[3,18];case 16:r.sent(),r.label=17;case 17:return g++,[3,15];case 18:p=0,u=t.inlineLevel,r.label=19;case 19:return p<u.length?(s=u[p],[4,this.renderNode(s)]):[3,22];case 20:r.sent(),r.label=21;case 21:return p++,[3,19];case 22:f=0,c=t.zeroOrAutoZIndexOrTransformedOrOpacity,r.label=23;case 23:return f<c.length?(s=c[f],[4,this.renderStack(s)]):[3,26];case 24:r.sent(),r.label=25;case 25:return f++,[3,23];case 26:a=0,i=t.positiveZIndex,r.label=27;case 27:return a<i.length?(s=i[a],[4,this.renderStack(s)]):[3,30];case 28:r.sent(),r.label=29;case 29:return a++,[3,27];case 30:return[2]}})})},e.prototype.mask=function(t){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(t.slice(0).reverse()),this.ctx.closePath()},e.prototype.path=function(t){this.ctx.beginPath(),this.formatPath(t),this.ctx.closePath()},e.prototype.formatPath=function(t){var n=this;t.forEach(function(y,C){var A=We(y)?y.start:y;C===0?n.ctx.moveTo(A.x,A.y):n.ctx.lineTo(A.x,A.y),We(y)&&n.ctx.bezierCurveTo(y.startControl.x,y.startControl.y,y.endControl.x,y.endControl.y,y.end.x,y.end.y)})},e.prototype.renderRepeat=function(t,n,y,C){this.path(t),this.ctx.fillStyle=n,this.ctx.translate(y,C),this.ctx.fill(),this.ctx.translate(-y,-C)},e.prototype.resizeImage=function(t,n,y){var C;if(t.width===n&&t.height===y)return t;var A=(C=this.canvas.ownerDocument)!==null&&C!==void 0?C:document,h=A.createElement("canvas");h.width=Math.max(1,n),h.height=Math.max(1,y);var m=h.getContext("2d");return m.drawImage(t,0,0,t.width,t.height,0,0,n,y),h},e.prototype.renderBackgroundImage=function(t){return De(this,void 0,void 0,function(){var n,y,C,A,h,m;return Pe(this,function(g){switch(g.label){case 0:n=t.styles.backgroundImage.length-1,y=function(w){var p,u,f,F,I,M,T,Q,b,c,F,I,M,T,Q,a,i,s,r,o,l,d,B,_,b,E,F,S,U,T,Q,P,I,M,K,W,L,O,H,k,G,R;return Pe(this,function(D){switch(D.label){case 0:if(w.type!==0)return[3,5];p=void 0,u=w.url,D.label=1;case 1:return D.trys.push([1,3,,4]),[4,C.context.cache.match(u)];case 2:return p=D.sent(),[3,4];case 3:return D.sent(),C.context.logger.error("Error loading background-image "+u),[3,4];case 4:return p&&(f=Io(t,n,[p.width,p.height,p.width/p.height]),F=f[0],I=f[1],M=f[2],T=f[3],Q=f[4],b=C.ctx.createPattern(C.resizeImage(p,T,Q),"repeat"),C.renderRepeat(F,b,I,M)),[3,6];case 5:sp(w)?(c=Io(t,n,[null,null,null]),F=c[0],I=c[1],M=c[2],T=c[3],Q=c[4],a=rp(w.angle,T,Q),i=a[0],s=a[1],r=a[2],o=a[3],l=a[4],d=document.createElement("canvas"),d.width=T,d.height=Q,B=d.getContext("2d"),_=B.createLinearGradient(s,o,r,l),bl(w.stops,i).forEach(function(N){return _.addColorStop(N.stop,Qe(N.color))}),B.fillStyle=_,B.fillRect(0,0,T,Q),T>0&&Q>0&&(b=C.ctx.createPattern(d,"repeat"),C.renderRepeat(F,b,I,M))):ap(w)&&(E=Io(t,n,[null,null,null]),F=E[0],S=E[1],U=E[2],T=E[3],Q=E[4],P=w.position.length===0?[ro]:w.position,I=ge(P[0],T),M=ge(P[P.length-1],Q),K=Ap(w,I,M,T,Q),W=K[0],L=K[1],W>0&&L>0&&(O=C.ctx.createRadialGradient(S+I,U+M,0,S+I,U+M,W),bl(w.stops,W*2).forEach(function(N){return O.addColorStop(N.stop,Qe(N.color))}),C.path(F),C.ctx.fillStyle=O,W!==L?(H=t.bounds.left+.5*t.bounds.width,k=t.bounds.top+.5*t.bounds.height,G=L/W,R=1/G,C.ctx.save(),C.ctx.translate(H,k),C.ctx.transform(1,0,0,G,0,0),C.ctx.translate(-H,-k),C.ctx.fillRect(S,R*(U-k)+k,T,Q*R),C.ctx.restore()):C.ctx.fill())),D.label=6;case 6:return n--,[2]}})},C=this,A=0,h=t.styles.backgroundImage.slice(0).reverse(),g.label=1;case 1:return A<h.length?(m=h[A],[5,y(m)]):[3,4];case 2:g.sent(),g.label=3;case 3:return A++,[3,1];case 4:return[2]}})})},e.prototype.renderSolidBorder=function(t,n,y){return De(this,void 0,void 0,function(){return Pe(this,function(C){return this.path(Pu(y,n)),this.ctx.fillStyle=Qe(t),this.ctx.fill(),[2]})})},e.prototype.renderDoubleBorder=function(t,n,y,C){return De(this,void 0,void 0,function(){var A,h;return Pe(this,function(m){switch(m.label){case 0:return n<3?[4,this.renderSolidBorder(t,y,C)]:[3,2];case 1:return m.sent(),[2];case 2:return A=uy(C,y),this.path(A),this.ctx.fillStyle=Qe(t),this.ctx.fill(),h=dy(C,y),this.path(h),this.ctx.fill(),[2]}})})},e.prototype.renderNodeBackgroundAndBorders=function(t){return De(this,void 0,void 0,function(){var n,y,C,A,h,m,g,w,p=this;return Pe(this,function(u){switch(u.label){case 0:return this.applyEffects(t.getEffects(2)),n=t.container.styles,y=!vt(n.backgroundColor)||n.backgroundImage.length,C=[{style:n.borderTopStyle,color:n.borderTopColor,width:n.borderTopWidth},{style:n.borderRightStyle,color:n.borderRightColor,width:n.borderRightWidth},{style:n.borderBottomStyle,color:n.borderBottomColor,width:n.borderBottomWidth},{style:n.borderLeftStyle,color:n.borderLeftColor,width:n.borderLeftWidth}],A=by(Zt(n.backgroundClip,0),t.curves),y||n.boxShadow.length?(this.ctx.save(),this.path(A),this.ctx.clip(),vt(n.backgroundColor)||(this.ctx.fillStyle=Qe(n.backgroundColor),this.ctx.fill()),[4,this.renderBackgroundImage(t.container)]):[3,2];case 1:u.sent(),this.ctx.restore(),n.boxShadow.slice(0).reverse().forEach(function(f){p.ctx.save();var c=Nn(t.curves),a=f.inset?0:wy,i=cy(c,-a+(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?(p.path(c),p.ctx.clip(),p.mask(i)):(p.mask(c),p.ctx.clip(),p.path(i)),p.ctx.shadowOffsetX=f.offsetX.number+a,p.ctx.shadowOffsetY=f.offsetY.number,p.ctx.shadowColor=Qe(f.color),p.ctx.shadowBlur=f.blur.number,p.ctx.fillStyle=f.inset?Qe(f.color):"rgba(0,0,0,1)",p.ctx.fill(),p.ctx.restore()}),u.label=2;case 2:h=0,m=0,g=C,u.label=3;case 3:return m<g.length?(w=g[m],w.style!==0&&!vt(w.color)&&w.width>0?w.style!==2?[3,5]:[4,this.renderDashedDottedBorder(w.color,w.width,h,t.curves,2)]:[3,11]):[3,13];case 4:return u.sent(),[3,11];case 5:return w.style!==3?[3,7]:[4,this.renderDashedDottedBorder(w.color,w.width,h,t.curves,3)];case 6:return u.sent(),[3,11];case 7:return w.style!==4?[3,9]:[4,this.renderDoubleBorder(w.color,w.width,h,t.curves)];case 8:return u.sent(),[3,11];case 9:return[4,this.renderSolidBorder(w.color,h,t.curves)];case 10:u.sent(),u.label=11;case 11:h++,u.label=12;case 12:return m++,[3,3];case 13:return[2]}})})},e.prototype.renderDashedDottedBorder=function(t,n,y,C,A){return De(this,void 0,void 0,function(){var h,m,g,w,p,u,f,c,a,i,s,r,o,l,d,B,d,B;return Pe(this,function(_){return this.ctx.save(),h=fy(C,y),m=Pu(C,y),A===2&&(this.path(m),this.ctx.clip()),We(m[0])?(g=m[0].start.x,w=m[0].start.y):(g=m[0].x,w=m[0].y),We(m[1])?(p=m[1].end.x,u=m[1].end.y):(p=m[1].x,u=m[1].y),y===0||y===2?f=Math.abs(g-p):f=Math.abs(w-u),this.ctx.beginPath(),A===3?this.formatPath(h):this.formatPath(m.slice(0,2)),c=n<3?n*3:n*2,a=n<3?n*2:n,A===3&&(c=n,a=n),i=!0,f<=c*2?i=!1:f<=c*2+a?(s=f/(2*c+a),c*=s,a*=s):(r=Math.floor((f+a)/(c+a)),o=(f-r*c)/(r-1),l=(f-(r+1)*c)/r,a=l<=0||Math.abs(a-o)<Math.abs(a-l)?o:l),i&&(A===3?this.ctx.setLineDash([0,c+a]):this.ctx.setLineDash([c,a])),A===3?(this.ctx.lineCap="round",this.ctx.lineWidth=n):this.ctx.lineWidth=n*2+1.1,this.ctx.strokeStyle=Qe(t),this.ctx.stroke(),this.ctx.setLineDash([]),A===2&&(We(m[0])&&(d=m[3],B=m[0],this.ctx.beginPath(),this.formatPath([new te(d.end.x,d.end.y),new te(B.start.x,B.start.y)]),this.ctx.stroke()),We(m[1])&&(d=m[1],B=m[2],this.ctx.beginPath(),this.formatPath([new te(d.end.x,d.end.y),new te(B.start.x,B.start.y)]),this.ctx.stroke())),this.ctx.restore(),[2]})})},e.prototype.render=function(t){return De(this,void 0,void 0,function(){var n;return Pe(this,function(y){switch(y.label){case 0:return this.options.backgroundColor&&(this.ctx.fillStyle=Qe(this.options.backgroundColor),this.ctx.fillRect(this.options.x,this.options.y,this.options.width,this.options.height)),n=ly(t),[4,this.renderStack(n)];case 1:return y.sent(),this.applyEffects([]),[2,this.canvas]}})})},e}(Mu),Cy=function(v){return v instanceof iu||v instanceof nu?!0:v instanceof wo&&v.type!==Hn&&v.type!==Mn},by=function(v,e){switch(v){case 0:return Nn(e);case 2:return ny(e);case 1:default:return Vn(e)}},_y=function(v){switch(v){case 1:return"center";case 2:return"right";case 0:default:return"left"}},Ey=["-apple-system","system-ui"],Fy=function(v){return/iPhone OS 15_(0|1)/.test(window.navigator.userAgent)?v.filter(function(e){return Ey.indexOf(e)===-1}):v},Sy=function(v){Xe(e,v);function e(t,n){var y=v.call(this,t,n)||this;return y.canvas=n.canvas?n.canvas:document.createElement("canvas"),y.ctx=y.canvas.getContext("2d"),y.options=n,y.canvas.width=Math.floor(n.width*n.scale),y.canvas.height=Math.floor(n.height*n.scale),y.canvas.style.width=n.width+"px",y.canvas.style.height=n.height+"px",y.ctx.scale(y.options.scale,y.options.scale),y.ctx.translate(-n.x,-n.y),y.context.logger.debug("EXPERIMENTAL ForeignObject renderer initialized ("+n.width+"x"+n.height+" at "+n.x+","+n.y+") with scale "+n.scale),y}return e.prototype.render=function(t){return De(this,void 0,void 0,function(){var n,y;return Pe(this,function(C){switch(C.label){case 0:return n=vo(this.options.width*this.options.scale,this.options.height*this.options.scale,this.options.scale,this.options.scale,t),[4,Qy(n)];case 1:return y=C.sent(),this.options.backgroundColor&&(this.ctx.fillStyle=Qe(this.options.backgroundColor),this.ctx.fillRect(0,0,this.options.width*this.options.scale,this.options.height*this.options.scale)),this.ctx.drawImage(y,-this.options.x*this.options.scale,-this.options.y*this.options.scale),[2,this.canvas]}})})},e}(Mu),Qy=function(v){return new Promise(function(e,t){var n=new Image;n.onload=function(){e(n)},n.onerror=t,n.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(v))})},Uy=function(){function v(e){var t=e.id,n=e.enabled;this.id=t,this.enabled=n,this.start=Date.now()}return v.prototype.debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.enabled&&(typeof window<"u"&&window.console&&typeof console.debug=="function"?console.debug.apply(console,en([this.id,this.getTime()+"ms"],e)):this.info.apply(this,e))},v.prototype.getTime=function(){return Date.now()-this.start},v.prototype.info=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.enabled&&typeof window<"u"&&window.console&&typeof console.info=="function"&&console.info.apply(console,en([this.id,this.getTime()+"ms"],e))},v.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.enabled&&(typeof window<"u"&&window.console&&typeof console.warn=="function"?console.warn.apply(console,en([this.id,this.getTime()+"ms"],e)):this.info.apply(this,e))},v.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.enabled&&(typeof window<"u"&&window.console&&typeof console.error=="function"?console.error.apply(console,en([this.id,this.getTime()+"ms"],e)):this.info.apply(this,e))},v.instances={},v}(),Ty=function(){function v(e,t){var n;this.windowBounds=t,this.instanceName="#"+v.instanceCount++,this.logger=new Uy({id:this.instanceName,enabled:e.logging}),this.cache=(n=e.cache)!==null&&n!==void 0?n:new Yv(this,e)}return v.instanceCount=1,v}(),Iy=function(v,e){return e===void 0&&(e={}),Py(v,e)};typeof window<"u"&&Fu.setContext(window);var Py=function(v,e){return De(void 0,void 0,void 0,function(){var t,n,y,C,A,h,m,g,w,p,u,f,c,a,i,s,r,o,l,d,_,B,_,b,E,F,S,U,T,Q,P,I,M,K,W,L,O,H,k,G;return Pe(this,function(R){switch(R.label){case 0:if(!v||typeof v!="object")return[2,Promise.reject("Invalid element provided as first argument")];if(t=v.ownerDocument,!t)throw new Error("Element is not attached to a Document");if(n=t.defaultView,!n)throw new Error("Document is not attached to a Window");return y={allowTaint:(b=e.allowTaint)!==null&&b!==void 0?b:!1,imageTimeout:(E=e.imageTimeout)!==null&&E!==void 0?E:15e3,proxy:e.proxy,useCORS:(F=e.useCORS)!==null&&F!==void 0?F:!1},C=Mi({logging:(S=e.logging)!==null&&S!==void 0?S:!0,cache:e.cache},y),A={windowWidth:(U=e.windowWidth)!==null&&U!==void 0?U:n.innerWidth,windowHeight:(T=e.windowHeight)!==null&&T!==void 0?T:n.innerHeight,scrollX:(Q=e.scrollX)!==null&&Q!==void 0?Q:n.pageXOffset,scrollY:(P=e.scrollY)!==null&&P!==void 0?P:n.pageYOffset},h=new at(A.scrollX,A.scrollY,A.windowWidth,A.windowHeight),m=new Ty(C,h),g=(I=e.foreignObjectRendering)!==null&&I!==void 0?I:!1,w={allowTaint:(M=e.allowTaint)!==null&&M!==void 0?M:!1,onclone:e.onclone,ignoreElements:e.ignoreElements,inlineImages:g,copyStyles:g},m.logger.debug("Starting document clone with size "+h.width+"x"+h.height+" scrolled to "+-h.left+","+-h.top),p=new _u(m,v,w),u=p.clonedReferenceElement,u?[4,p.toIFrame(t,h)]:[2,Promise.reject("Unable to find element in cloned iframe")];case 1:return f=R.sent(),c=Co(u)||xv(u)?cf(u.ownerDocument):tn(m,u),a=c.width,i=c.height,s=c.left,r=c.top,o=xy(m,u,e.backgroundColor),l={canvas:e.canvas,backgroundColor:o,scale:(W=(K=e.scale)!==null&&K!==void 0?K:n.devicePixelRatio)!==null&&W!==void 0?W:1,x:((L=e.x)!==null&&L!==void 0?L:0)+s,y:((O=e.y)!==null&&O!==void 0?O:0)+r,width:(H=e.width)!==null&&H!==void 0?H:Math.ceil(a),height:(k=e.height)!==null&&k!==void 0?k:Math.ceil(i)},g?(m.logger.debug("Document cloned, using foreign object rendering"),_=new Sy(m,l),[4,_.render(u)]):[3,3];case 2:return d=R.sent(),[3,5];case 3:return m.logger.debug("Document cloned, element located at "+s+","+r+" with size "+a+"x"+i+" using computed rendering"),m.logger.debug("Starting DOM parsing"),B=au(m,u),o===B.styles.backgroundColor&&(B.styles.backgroundColor=lt.TRANSPARENT),m.logger.debug("Starting renderer for element at "+l.x+","+l.y+" with size "+l.width+"x"+l.height),_=new By(m,l),[4,_.render(B)];case 4:d=R.sent(),R.label=5;case 5:return(!((G=e.removeContainer)!==null&&G!==void 0)||G)&&(_u.destroy(f)||m.logger.error("Cannot detach cloned iframe as it is not in the DOM anymore")),m.logger.debug("Finished rendering"),[2,d]}})})},xy=function(v,e,t){var n=e.ownerDocument,y=n.documentElement?mr(v,getComputedStyle(n.documentElement).backgroundColor):lt.TRANSPARENT,C=n.body?mr(v,getComputedStyle(n.body).backgroundColor):lt.TRANSPARENT,A=typeof t=="string"?mr(v,t):t===null?lt.TRANSPARENT:4294967295;return e===n.documentElement?vt(y)?vt(C)?A:C:y:A};const Xr=class Xr extends j.EngineObject{constructor(t,n){super(t,n);z(this,"_imageLabel",this.dv(new j.ESImageLabel(`${this.sceneObject.id}_ESImageLabel`)));z(this,"_hasClassDivAndPos",{});const y=n.viewer;if(!y){console.warn("viewer is undefined!");return}t.mainClass=this._imageLabel;const C=this._imageLabel;n.add(C),this.d(()=>n.delete(C));{const A=()=>{if(!y)return;if(!t.instanceClass)throw new Error("!sceneObject.instanceClass");const g=document.createElement("div"),w=this.dv(new t.instanceClass(g,t,n))._container;if(w.style.opacity=t.opacity.toString()??j.ESGeoDiv.defaults.opacity,w.style.position="fixed",w.style.zIndex="-1",w.style.top="0px",!document.body.contains(w)){document.body.appendChild(w);let u=w?w.querySelectorAll("*[class]"):[];for(let f=0;f<u.length;f++){const c=u[f];var p=c.getBoundingClientRect();this._hasClassDivAndPos[c.className]=[c.offsetLeft,c.offsetTop,c.offsetLeft+p.width,c.offsetTop+p.height]}}Iy(w,{backgroundColor:null,allowTaint:!0,useCORS:!0,width:w.offsetWidth,height:w.offsetHeight,scale:1}).then(u=>{document.body.contains(w)&&document.body.removeChild(w),C.url=u.toDataURL(),C.show=t.show}).catch(()=>{document.body.contains(w)&&document.body.removeChild(w)})},h=()=>{try{t.instanceClass?A():(C.url="",C.show=!1)}catch(g){console.error(g)}};h();const m=this.dv(V.createNextAnimateFrameEvent(t.instanceClassChanged,t.opacityChanged));this.d(m.don(h))}{const A=()=>{C.show=t.show};C.show=!1,this.ad(t.showChanged.don(A))}this.d(V.track([C,"anchor"],[t,"anchor"])),this.d(V.bind([C,"position"],[t,"position"])),this.d(V.bind([C,"rotation"],[t,"rotation"])),this.d(V.bind([C,"flyToParam"],[t,"flyToParam"])),this.d(V.bind([C,"flyInParam"],[t,"flyInParam"])),this.d(V.bind([C,"allowPicking"],[t,"allowPicking"])),this.d(V.bind([C,"scale"],[t,"scale"])),this.d(V.track([C,"minVisibleDistance"],[t,"minVisibleDistance"])),this.d(V.track([C,"maxVisibleDistance"],[t,"maxVisibleDistance"])),this.ad(t.automaticLandingEvent.don(()=>{C.automaticLanding()})),this.d(C.pickedEvent.don(A=>{(t.allowPicking??!1)&&t.pickedEvent.emit(A)})),this.d(n.widgetEvent.don(A=>{if(A.objId!==this._imageLabel.id)return;const{type:h,add:m}=A;if(h==="leftClick"){const g=Object.keys(this._hasClassDivAndPos);for(let w=0;w<g.length;w++){const p=g[w];let u=this._hasClassDivAndPos[p];if(m&&m.mouseRelativePos&&m.mouseRelativePos[0]>=u[0]&&m.mouseRelativePos[0]<=u[2]&&m.mouseRelativePos[1]>=u[1]&&m.mouseRelativePos[1]<=u[3]){m.className=p;break}}}t.widgetEvent.emit({type:h,add:m})})),this.d(t.calcFlyToParamEvent.don(()=>{kt(y,C.id)})),this.d(t.calcFlyInParamEvent.don(()=>{const A=n.getCurrentCameraInfo();if(!A)return;const{position:h,rotation:m}=A;t.flyInParam={position:h,rotation:m,flyDuration:1}})),this.d(t.smoothMoveEvent.don((A,h)=>{YA(y,C.id,A,h)})),this.d(t.smoothMoveWithRotationEvent.don((A,h,m)=>{zA(y,C.id,A,h,m)})),this.d(t.smoothMoveOnGroundEvent.don((A,h,m,g)=>{JA(y,C.id,A,h,g,m)})),this.d(t.smoothMoveWithRotationOnGroundEvent.don((A,h,m,g,w)=>{XA(y,C.id,A,h,m,g,w)})),this.d(t.flyToEvent.don((A,h)=>{C.flyTo(A)})),this.d(t.flyInEvent.don(A=>{C.flyIn(A)}))}};z(Xr,"type",Xr.register("ESUeViewer",j.ESGeoDiv.type,Xr));let Po=Xr;const Yr=class Yr extends Le{constructor(e,t){super(e,t);const n=t.viewer;if(!n){console.warn("viewer is undefined!");return}this.d(e.flyToFeatureIndexEvent.don((y,C)=>{n.callUeFunc({f:"flyToFeatureIndex",p:{id:e.id,index:y,duration:C}})})),this.d(e.flyToFeatureEvent.don((y,C,A)=>{n.callUeFunc({f:"flyToFeature",p:{id:e.id,key:y,value:C,duration:A}})}))}};z(Yr,"type",Yr.register("ESUeViewer",j.ESGeoJson.type,Yr));let xo=Yr;const $r=class $r extends Re{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}}};z($r,"type",$r.register("ESUeViewer",j.ESGeoLineString.type,$r));let Jn=$r;const Zr=class Zr extends Re{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}}};z(Zr,"type",Zr.register("ESUeViewer",j.ESGeoRectangle.type,Zr));let Oo=Zr;const qr=class qr extends Ne{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}}};z(qr,"type",qr.register("ESUeViewer",j.ESGeoWater.type,qr));let Mo=qr;const Pt=class Pt extends de{constructor(e,t){super(e,t);const n=t.viewer;if(!n){console.warn("viewer is undefined!");return}this.d(e.setNodePositionEvent.don((y,C)=>{Va(n,e.id,y,C)})),this.d(e.setNodeRotationEvent.don((y,C)=>{Ga(n,e.id,y,C)})),this.d(e.setNodeScaleEvent.don((y,C)=>{ja(n,e.id,y,C)}))}};z(Pt,"forceUeUpdateProps",[...de.forceUeUpdateProps,"url"]),z(Pt,"propValFuncs",{...de.propValFuncs,url:e=>typeof e=="string"?j.ESSceneObject.context.getStrFromEnv(j.rpToap(e)):(e.url=j.ESSceneObject.context.getStrFromEnv(j.rpToap(e.url)),e),czmMaximumScale:null,czmMinimumPixelSize:null,czmNativeScale:null,czmColor:null}),z(Pt,"type",Pt.register("ESUeViewer",j.ESGltfModel.type,Pt));let Ho=Pt;const eA=class eA extends Re{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}}};z(eA,"type",eA.register("ESUeViewer",j.ESHeightMeasurement.type,eA));let Lo=eA;const tA=class tA extends de{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}const y=async(A,h,m,g)=>{const{viewer:w}=A;if(!w){console.error("AIMoveTo: ueViewer.viewer is undefined");return}const p=await w.callUeFunc({f:"AIMoveTo",p:{id:h,Destination:m,Time:g}});return p.error&&console.error("AIMoveTo:",p.error),p};this.d(e.aiMoveToEvent.don((A,h)=>{y(t,e.id,A,h)}));const C=async(A,h)=>{const{viewer:m}=A;if(!m){console.error("StopAIMove: ueViewer.viewer is undefined");return}const g=await m.callUeFunc({f:"StopAIMove",p:{id:h}});return g.error&&console.error("StopAIMove:",g.error),g};this.d(e.stopAIMoveEvent.don(()=>{C(t,e.id)}))}};z(tA,"type",tA.register("ESUeViewer",j.ESHuman.type,tA));let Ro=tA;const xt=class xt extends Ze{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}e.anchor=[.5,1]}};z(xt,"type",xt.register("ESUeViewer",j.ESImageLabel.type,xt)),z(xt,"forceUeUpdateProps",[...Ze.forceUeUpdateProps,"url"]),z(xt,"propValFuncs",{...Ze.propValFuncs,url:e=>typeof e=="string"?j.ESSceneObject.context.getStrFromEnv(j.rpToap(e)):(e.url=j.ESSceneObject.context.getStrFromEnv(j.rpToap(e.url)),e)});let Do=xt;const rA=class rA extends de{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}}};z(rA,"type",rA.register("ESUeViewer",j.ESLevelRuntimeModel.type,rA));let ko=rA;const AA=class AA extends $A{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}}};z(AA,"type",AA.register("ESUeViewer",j.ESLocalCircle.type,AA));let Ko=AA;const nA=class nA extends Le{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}}};z(nA,"type",nA.register("ESUeViewer",j.ESLocalPolygonZ.type,nA));let No=nA;const iA=class iA extends $A{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}}};z(iA,"type",iA.register("ESUeViewer",j.ESLocalRectangle.type,iA));let Vo=iA;const oA=class oA extends de{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}}};z(oA,"type",oA.register("ESUeViewer",j.ESLocalSkyBox.type,oA));let Go=oA;const sA=class sA extends de{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}}};z(sA,"type",sA.register("ESUeViewer",j.ESLocationMeasurement.type,sA));let jo=sA;const aA=class aA extends Re{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}}};z(aA,"type",aA.register("ESUeViewer",j.ESPipeFence.type,aA));let Wo=aA;const cA=class cA extends Jn{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}}};z(cA,"type",cA.register("ESUeViewer",j.ESPipeline.type,cA));let zo=cA;const lA=class lA extends ZA{constructor(e,t){super(e,t);const n=t.viewer;if(!n){console.warn("viewer is undefined!");return}this.d(e.highlightFeatureEvent.don(y=>{const C=typeof y=="number"?y.toString():y;Da(n,e.id,C)})),this.d(e.highlightFeatureAndFlyToEvent.don((y,C,A,h)=>{const m=typeof y=="number"?y.toString():y;ka(n,e.id,m,h??1)})),this.d(e.setLayerVisibleEvent.don((y,C)=>{let A="";typeof C!="string"?A=JSON.stringify(C):A=C,Ka(n,e.id,A)})),this.d(e.setLayerColorEvent.don((y,C)=>{let A="";typeof C!="string"?A=JSON.stringify(C):A=C,Na(n,e.id,A)}))}};z(lA,"type",lA.register("ESUeViewer",j.ESPipeserTileset.type,lA));let Jo=lA;const uA=class uA extends Ne{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}}};z(uA,"type",uA.register("ESUeViewer",j.ESPit.type,uA));let Xo=uA;const dA=class dA extends Ze{constructor(e,t){super(e,t);const n=t.viewer;if(!n){console.warn("viewer is undefined!");return}this.ad(e.getInitialStyleEvent.don(async()=>{try{const y=await n.callUeFunc({f:"GetInitialStyle",p:{id:e.id}});y.error!=""&&console.error("getInitialStyleEvent:",y.error),e.initialStyle.value=structuredClone(y.re)}catch(y){console.error("getInitialStyleEvent:",y),e.initialStyle.value=void 0}}))}};z(dA,"type",dA.register("ESUeViewer",j.ESPoi2D.type,dA));let Yo=dA;const fA=class fA extends de{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}}};z(fA,"type",fA.register("ESUeViewer",j.ESPoi3D.type,fA));let $o=fA;const Ot=class Ot extends Le{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}}};z(Ot,"type",Ot.register("ESUeViewer",j.ESPoiTileset.type,Ot)),z(Ot,"forceUeUpdateProps",[...Le.forceUeUpdateProps,"url"]),z(Ot,"propValFuncs",{...Le.propValFuncs,url:e=>typeof e=="string"?j.ESSceneObject.context.getStrFromEnv(e):(e.url=j.ESSceneObject.context.getStrFromEnv(e.url),e)});let Zo=Ot;const hA=class hA extends Re{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}}};z(hA,"type",hA.register("ESUeViewer",j.ESPolygonFence.type,hA));let qo=hA;const pA=class pA extends Ne{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}}};z(pA,"type",pA.register("ESUeViewer",j.ESPolygonFlattenedPlane.type,pA));let es=pA;const gA=class gA extends Ne{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}}};z(gA,"type",gA.register("ESUeViewer",j.ESPolygonWithHole.type,gA));let ts=gA;const vA=class vA extends _t{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}this.d(()=>{e.ids=[]}),this.d(e.highlightInner3DtilesetEvent.don(y=>{y.highlight=!0})),this.d(e.removeHighlightInner3DtilesetEvent.don(y=>{y.highlight=!1}));{const y=h=>{h=h.toLocaleLowerCase();let m=[255,255,255,1];if(h.startsWith("#")){if(h.length===4){let g=parseInt(h[1]+h[1],16),w=parseInt(h[2]+h[2],16),p=parseInt(h[3]+h[3],16);m=[g,w,p,1]}else if(h.length===7){let g=parseInt(h.substring(1,3),16),w=parseInt(h.substring(3,5),16),p=parseInt(h.substring(5,7),16);m=[g,w,p,1]}}else if(h.startsWith("rgba")){let g=h.match(/^rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d.]+)\s*\)$/);if(g){let w=parseInt(g[1]),p=parseInt(g[2]),u=parseInt(g[3]),f=parseFloat(g[4]);m=[w,p,u,f]}}else if(h.startsWith("rgb")){let g=h.match(/^rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/);if(g){let w=parseInt(g[1]),p=parseInt(g[2]),u=parseInt(g[3]);m=[w,p,u,1]}}else console.error("color类型只能为#rrggbb、#rgb、rgba(r,g,b,a)、rgb(r,g,b)");return[m[0]/255,m[1]/255,m[2]/255,m[3]]},C=()=>{const h=e.layerConfig;if(!h)return;const m=[];h.forEach(g=>{m.push({condition:[{field:"layer",op:"==",value:g.layer},{field:"dataset",op:"==",value:g.dataset}],color:y(g.value.color??"rgb(255,255,255)"),show:g.value.visible})}),e.setFeatureStyle(m)};C();const A=this.dv(V.createNextAnimateFrameEvent(e.layerConfigChanged));this.d(A.don(()=>{C()}))}}};z(vA,"type",vA.register("ESUeViewer",j.ESRtsTileset.type,vA));let rs=vA;const yA=class yA extends Le{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}this.d(e.addTreesEvent.don(y=>{j.addTreesCallFunc(t,e.id,y)})),this.d(e.removeAllTreesEvent.don(()=>{j.removeAllTreesCallFunc(t,e.id)})),this.d(e.updateTreeParamsEvent.don(y=>{j.updateTreeParamsCallFunc(t,e.id,y)})),this.d(e.cutDownTreesEvent.don((y,C)=>{j.cutDownTreesCallFunc(t,e.id,y,C)})),this.d(e.growthSimulationEvent.don((y,C,A)=>{j.growthSimulationCallFunc(t,e.id,y,C,A)}))}};z(yA,"type",yA.register("ESUeViewer",j.ESSeparateFoliage.type,yA));let As=yA;const mA=class mA extends de{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}}};z(mA,"type",mA.register("ESUeViewer",j.ESSubmergingAnalysis.type,mA));let ns=mA;const wA=class wA extends Ne{constructor(e,t){super(e,t);const n=t.viewer;if(!n){console.warn("viewer is undefined!");return}this.d(e.startEvent.don(()=>{n.callUeFunc({f:"Start",p:{id:e.id}})})),this.d(e.stopEvent.don(()=>{n.callUeFunc({f:"Stop",p:{id:e.id}})}))}};z(wA,"type",wA.register("ESUeViewer",j.ESSunshineAnalysis.type,wA));let is=wA;const BA=class BA extends Ne{constructor(e,t){super(e,t);const n=t.viewer;if(!n){console.warn("viewer is undefined!");return}this.d(e.startEvent.don(()=>{n.callUeFunc({f:"Start",p:{id:e.id}})}))}};z(BA,"type",BA.register("ESUeViewer",j.ESSurfaceAreaMeasurement.type,BA));let os=BA;const CA=class CA extends Ze{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}}};z(CA,"type",CA.register("ESUeViewer",j.ESTextLabel.type,CA));let ss=CA;const qt=class qt extends Ze{constructor(e,t){super(e,t);const n=t.viewer;if(!n){console.warn("viewer is undefined!");return}this.d(e.callFunctionEvent.don((y,C)=>{ui(n,e.id,y,C)}))}};z(qt,"type",qt.register("ESUeViewer",j.ESUEWidget.type,qt)),z(qt,"propValFuncs",{...Ze.propValFuncs,info:e=>JSON.stringify(e??{})});let as=qt;const Hu=v=>{switch(v){case 0:return"成功绑定";case 1:return"解绑之前的内容,成功绑定";case 2:return"未搜索到ActorTag,无法绑定";case 3:return"搜索到ActorTag但对应的Actor不是场景原有的,而是新建的,无法绑定";case 4:return"搜索到ActorTag对应的Actor是地形或3DTileset,无法绑定";default:return"未知错误"}},Oy=v=>{switch(v){case 0:return"创建成功";case 1:return"未找到对应的资源,无法创建";case 2:return"Id与场景中现有的ActorTag重复,创建后可能出现问题,创建失败";default:return"未知错误"}},bA=class bA extends j.EngineObject{constructor(e,t){super(e,t);const n=t.viewer;if(!n){console.warn(`${e.id} UeESUnrealActor viewer is undefined!`);return}this.d(()=>{ci(n,e.id)});const y=async()=>{g()||await n.callUeFunc({f:"update",p:{id:e.id,name:e.name,show:e.show,rotation:e.rotation,flyToParam:e.flyToParam??j.ESVisualObject.defaults.flyToParam,flyInParam:e.flyInParam??j.ESVisualObject.defaults.flyInParam,highlight:e.highlight,collision:e.collision,scale:e.scale,minVisibleDistance:e.minVisibleDistance,maxVisibleDistance:e.maxVisibleDistance}})},C=this.dv(V.createNextAnimateFrameEvent(e.showChanged,e.nameChanged,e.rotationChanged,e.flyToParamChanged,e.flyInParamChanged,e.highlightChanged,e.collisionChanged,e.scaleChanged,e.minVisibleDistanceChanged,e.maxVisibleDistanceChanged));this.d(C.don(y)),this.d(e.flushEvent.don(()=>C.flush()));let A,h;const m=async()=>{g()||(await n.callUeFunc({f:"update",p:{id:e.id,position:e.position}}),(t.debug??!1)&&console.log(`updatePostion:${e.position},actorTag:${e.actorTag},actorClass:${e.actorClass}`))},g=()=>!A&&!h?(console.warn(`${e.id} 未绑定ActorTag或未创建ActorClass!`),!0):!1,w=async()=>{const{id:u}=e,f=await t.unBindActorByID(u);f&&f.error!==""&&console.warn(`${e.id} UeESUnrealActor UnBindActorByID: ${f.error}`),A=void 0;const c=await n.callUeFunc({f:"destroy",p:{id:u}});if(c&&c.error!==""){console.warn(`${e.id} UeESUnrealActor DestroyActorByID: ${c.error}`);return}h=void 0},p=this.dv(V.react({type:"ActorClass",actorClass:"default"}));{const u=this.dv(V.createNextAnimateFrameEvent(e.actorClassChanged,e.actorTagChanged)),f=async()=>{e.actorTag!==""?p.value={type:"ActorTag",actorTag:e.actorTag}:p.value={type:"ActorClass",actorClass:e.actorClass===""?"default":e.actorClass}};f(),this.d(u.don(f)),this.d(e.flushEvent.don(()=>u.flush()))}{const u=this.dv(V.createProcessingFromAsyncFunc(async c=>{if(await c.promise(w()),p.value.type==="ActorTag"){const{actorTag:a}=p.value;await c.promise(w());try{e.lastActorStatus="null";const i=await c.promise(t.bindActorByTag(e.id,a));if(!i)return;if(i.error!==""){console.warn(`${e.id} UeESUnrealActor BindActorByTag:${a},${i.error}`);return}if(i.re.type===0)e.lastActorStatus="bound",A=a;else if(i.re.type===1)e.lastActorStatus="bound",A=a,console.warn(`${e.id} UeESUnrealActor BindActorByTag:${a},${Hu(i.re.type)}`);else{A=void 0,console.warn(`${e.id} UeESUnrealActor BindActorByTag error:${a}, ${Hu(i.re.type)}`);return}}catch(i){console.warn(`${e.id} UeESUnrealActor BindActorByTag catch error:${a}, ${i}`);return}}else if(p.value.type==="ActorClass"){const{actorClass:a}=p.value;try{const i=await c.promise(t.createActorByClass(e.id,a));if(!i)return;if(i.error!==""){console.warn(`${e.id} UeESUnrealActor CreateActorByClass error :${a}, ${i.error}`);return}if(i.re.type===0)e.lastActorStatus="created",h=a;else{console.warn(`${e.id} UeESUnrealActor CreateActorByClass error type :${a},${Oy(i.re.type)}`);return}}catch(i){console.warn(`${e.id} UeESUnrealActor CreateActorByClass error catch :${a}, ${JSON.stringify(i)}`);return}}await c.promise(y()),await c.promise(m())})),f=async()=>{u.restart()};f(),this.d(p.changed.don(f))}this.d(e.positionChanged.don(m)),this.d(e.callFunctionEvent.don((u,f)=>{g()||ui(n,e.id,u,f)})),this.d(e.smoothMoveEvent.don((u,f)=>{g()||YA(n,e.id,u,f)})),this.d(e.smoothMoveWithRotationEvent.don((u,f,c)=>{g()||zA(n,e.id,u,f,c)})),this.d(e.smoothMoveOnGroundEvent.don((u,f,c,a)=>{g()||JA(n,e.id,u,f,a,c)})),this.d(e.smoothMoveWithRotationOnGroundEvent.don((u,f,c,a,i)=>{g()||XA(n,e.id,u,f,c,a,i)})),this.d(e.automaticLandingEvent.don(u=>{if(g())return;const f=[e.position[0],e.position[1]];t.getHeightByLonLat(e.position[0],e.position[1],"Visibility").then(c=>{c!==null&&(e.position=[...f,c],e.collision=u)})})),this.d(e.flyToEvent.don(async(u,f)=>{if(g())return;const c=await Dt(n,e.id,u);let a="over";c===void 0?a="error":c.endType===0?a="over":c.endType===1&&(a="cancelled"),e.flyOverEvent.emit(f,a,t)})),this.d(e.calcFlyToParamEvent.don(()=>{g()||kt(n,e.id)})),this.d(e.calcFlyInParamEvent.don(async()=>{if(!t.actived)return;const u=await t.getCurrentCameraInfo();if(!u)return;const{position:f,rotation:c}=u;e.flyInParam={position:f,rotation:c,flyDuration:1}})),this.d(t.propChanged.don(u=>{g()||u.objId===e.id&&Object.keys(u.props).forEach(f=>{const c=u.props[f]===null?void 0:u.props[f];e[f]=c})}))}};z(bA,"type",bA.register("ESUeViewer",j.ESUnrealActor.type,bA));let cs=bA;const _A=class _A extends de{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}}};z(_A,"type",_A.register("ESUeViewer",j.ESVideoFusion.type,_A));let ls=_A;const EA=class EA extends de{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}}};z(EA,"type",EA.register("ESUeViewer",j.ESViewShed.type,EA));let us=EA;const FA=class FA extends Re{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is underfined!");return}}};z(FA,"type",FA.register("ESUeViewer",j.ESVisibilityAnalysis.type,FA));let ds=FA;const SA=class SA extends Ne{constructor(e,t){super(e,t);const n=t.viewer;if(!n){console.warn("viewer is undefined!");return}this.d(e.startEvent.don(()=>{n.callUeFunc({f:"Start",p:{id:e.id}})})),this.d(e.clearEvent.don(()=>{n.callUeFunc({f:"Clear",p:{id:e.id}})}))}};z(SA,"type",SA.register("ESUeViewer",j.ESVolumeMeasurement.type,SA));let fs=SA;const er=class er extends Ze{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}}};z(er,"type",er.register("ESUeViewer",j.ESWidget.type,er)),z(er,"propValFuncs",{...Ze.propValFuncs,info:e=>JSON.stringify(e??{})});let hs=er;const QA=class QA extends j.EngineObject{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}e.poi.actorTag=e.human.id,e.poi.positionOffset=[0,0,e.poiOffsetHeight-.8],this.d(e.poiOffsetHeightChanged.don(()=>{e.poi.positionOffset=[0,0,e.poiOffsetHeight-.8]})),this.d(()=>{e.poi.actorTag=""})}};z(QA,"type",QA.register("ESUeViewer",j.ESHumanPoi.type,QA));let ps=QA;j.ESSceneObject.context.getStrFromEnv(j.ESNavigator.defaults.imgUrl);const UA=class UA extends j.EngineObject{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}const y=this.disposeVar(new j.ESCustomDiv);t.add(y),this.dispose(()=>t.delete(y)),this.dispose(V.track([y,"show"],[e,"show"])),y.instanceClass=class extends V.Destroyable{constructor(A,h,m){super(),this._subContainer=A;const g=document.createElement("div");this._subContainer.appendChild(g),this.dispose(()=>this._subContainer.removeChild(g));{const u=async()=>{const f=await t.getCurrentCameraInfo(),c=f==null?void 0:f.position,i=[...f==null?void 0:f.rotation];i[0]=360,t.flyIn(c,i)};g.addEventListener("click",u),g.style.cursor="pointer",this.dispose(()=>g.removeEventListener("click",u))}{const u=()=>{g.style.width=`${e.cssSize?e.cssSize:j.ESNavigator.defaults.cssSize}px`,g.style.height=`${e.cssSize?e.cssSize:j.ESNavigator.defaults.cssSize}px`};u(),e.dispose(e.cssSizeChanged.disposableOn(u))}g.style.position="fixed";{const u=()=>{g.style.top=`${e.cssPosition?e.cssPosition[0]:j.ESNavigator.defaults.cssPosition[0]}px`,g.style.right=`${e.cssPosition?e.cssPosition[1]:j.ESNavigator.defaults.cssPosition[1]}px`};u(),e.dispose(e.cssPositionChanged.disposableOn(u))}g.style.transition=" right 0.4s linear",g.style.cursor="pointer";const w=document.createElement("div");g.appendChild(w),this.dispose(()=>g.removeChild(w)),w.style.width="100%",w.style.height="100%",w.style.position="relative";const p=document.createElement("img");w.appendChild(p),this.dispose(()=>w.removeChild(p)),p.style.width="100%",p.style.height="100%",p.style.border="none";{const u=()=>p.src=e.imgUrl;u(),e.dispose(e.imgUrlChanged.disposableOn(u))}{const u=()=>{const i=-t.getCurrentCameraInfo().rotation[0];p.style.transform=`rotate(${i}deg)`};let f;const c=async()=>{u(),e.show?(g.style.display="block",f=setInterval(()=>{u()},1e3)):(g.style.display="none",clearInterval(f))};this.dispose(e.showChanged.disposableOn(c)),c(),this.dispose(()=>clearInterval(f))}p.style.transformOrigin="50% 50%"}}}};z(UA,"type",UA.register("ESUeViewer",j.ESNavigator.type,UA));let gs=UA;const Mt=class Mt extends Re{constructor(e,t){super(e,t);const n=t.viewer;if(!n){console.warn("viewer is undefined!");return}{const y=()=>{let C=e.materialMode==="blue"?"multipleArrows":e.materialMode==="purple"?"singleArrow":e.materialMode;n.callUeFunc({f:"update",p:{id:e.id,materialMode:C}})};this.dispose(e.materialModeChanged.disposableOn(y)),this.dispose(e.createdEvent.disposableOn(y))}}};z(Mt,"type",Mt.register("ESUeViewer",j.ESPath.type,Mt)),z(Mt,"forceUeUpdateProps",[...Re.forceUeUpdateProps]),z(Mt,"propValFuncs",{...Re.propValFuncs,materialMode:null});let vs=Mt;async function My(v){navigator.clipboard.writeText(v).then(function(){console.log("复制成功")},function(e){console.log("复制失败")})}const TA=class TA extends j.EngineObject{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}const y=this.disposeVar(new j.ESCustomDiv);t.add(y),this.dispose(()=>t.delete(y)),y.instanceClass=class extends V.Destroyable{constructor(A,h,m){if(super(),this._subContainer=A,!m||!(m instanceof st))return;const g=document.createElement("div");this._subContainer.appendChild(g),this.dispose(()=>this._subContainer.removeChild(g)),g.style.width="100%",g.style.position="absolute",g.style.height=`${j.ESViewerStatusBar.defaults.height}px`,g.style.left="0",g.style.bottom="0",g.style.color="#fff",g.style.padding="0 20px 0 0",g.style.boxSizing="border-box",g.style.lineHeight=`${j.ESViewerStatusBar.defaults.height}px`,g.style.zIndex="100",g.style.alignContent="center",g.style.justifyContent="space-between";const w=document.createElement("span");g.appendChild(w),this.dispose(()=>g.removeChild(w));const p=document.createElement("span");w.appendChild(p),this.dispose(()=>w.removeChild(p));const u=document.createElement("span");w.appendChild(u),u.addEventListener("dblclick",function(){let c=u.innerHTML;c.startsWith("鼠标位置")&&(c=c.slice(5)),My(c)}),u.style.cursor="pointer",this.dispose(()=>w.removeChild(u));const f=document.createElement("span");g.appendChild(f),this.dispose(()=>g.removeChild(f));{const c=()=>{g.style.height=(e.height??j.ESViewerStatusBar.defaults.height)+"px",g.style.lineHeight=(e.height??j.ESViewerStatusBar.defaults.height)+"px"};this.dispose(e.heightChanged.disposableOn(c)),c()}{const c=()=>{g.style.fontSize=(e.fontSize??j.ESViewerStatusBar.defaults.fontSize)+"px"};this.dispose(e.fontSizeChanged.disposableOn(c)),c()}{const c=()=>{e.bgColor?g.style.background=`rgba(${e.bgColor[0]*255},${e.bgColor[1]*255},${e.bgColor[2]*255},${e.bgColor[3]})`:g.style.background=`rgba(${j.ESViewerStatusBar.defaults.bgColor[0]},${j.ESViewerStatusBar.defaults.bgColor[1]},${j.ESViewerStatusBar.defaults.bgColor[2]},${j.ESViewerStatusBar.defaults.bgColor[3]})`};this.dispose(e.bgColorChanged.disposableOn(c)),c()}m.getVersion().then(c=>{c&&(f.innerText=`Ue 版本 : ${c[0]} `)}).catch(c=>{console.log(c)});{const c=()=>{let s="",r="";s+=`帧率:${m.getFPS().toFixed(0)}FPS`,p.innerText=s;const o=t.getCurrentCameraInfo();s+=` 经度: ${o.position[0].toFixed(5)}° 纬度: ${o.position[1].toFixed(5)}° 高度: ${o.position[2].toFixed(2)}米 偏航角: ${o.rotation[0].toFixed(2)}° 俯仰角: ${o.rotation[1].toFixed(2)}° 翻滚角:${o.rotation[2].toFixed(2)}° `,p.innerText=s,t.pick().then(l=>{if(l){const{pickResult:d}=l;if(d&&d.position){const{position:B}=d;r+=`鼠标位置:${B[0].toFixed(5)}° ${B[1].toFixed(5)}° ${B[2].toFixed(2)}m`}else r+="暂时无法获取鼠标位置...";u.innerText=r}}).catch(l=>{console.log(l)})};let a;const i=async()=>{c(),e.show?(g.style.display="flex",a=setInterval(()=>{c()},1e3)):(g.style.display="none",clearInterval(a))};this.dispose(e.showChanged.disposableOn(i)),i(),this.dispose(()=>clearInterval(a))}}}}};z(TA,"type",TA.register("ESUeViewer",j.ESViewerStatusBar.type,TA));let ys=TA;const IA=class IA extends de{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}}};z(IA,"type",IA.register("ESUeViewer",j.ESGaussianSplatting.type,IA));let ms=IA;const PA=class PA extends _t{constructor(t,n){super(t,n);z(this,"_es3DTileset",this.dv(new j.ES3DTileset(`${this.sceneObject.id}_ES3DTileset`)));if(!n.viewer){console.warn("viewer is undefined!");return}t.mainClass=this._es3DTileset;{const C=this._es3DTileset;n.add(C),this.dispose(()=>n.delete(C)),this.d(V.track([C,"allowPicking"],[t,"allowPicking"])),this.d(V.track([C,"collision"],[t,"collision"])),this.d(V.bind([C,"flyToParam"],[t,"flyToParam"])),this.d(V.bind([C,"flyToParam"],[t,"flyToParam"])),this.d(V.track([C,"url"],[t,"url"])),this.d(V.track([C,"actorTag"],[t,"actorTag"])),this.d(V.track([C,"materialMode"],[t,"materialMode"])),this.d(V.track([C,"highlight"],[t,"highlight"])),this.d(V.track([C,"maximumScreenSpaceError"],[t,"maximumScreenSpaceError"])),this.d(V.track([C,"highlightID"],[t,"highlightID"])),this.d(V.track([C,"highlightColor"],[t,"highlightColor"])),this.d(V.bind([C,"offset"],[t,"offset"])),this.d(V.bind([C,"rotation"],[t,"rotation"])),this.d(V.track([C,"czmImageBasedLightingFactor"],[t,"czmImageBasedLightingFactor"])),this.d(V.track([C,"czmLuminanceAtZenith"],[t,"czmLuminanceAtZenith"])),this.d(V.track([C,"czmMaximumMemoryUsage"],[t,"czmMaximumMemoryUsage"])),this.d(V.track([C,"czmClassificationType"],[t,"czmClassificationType"])),this.d(V.track([C,"czmStyleJson"],[t,"czmStyleJson"])),this.d(V.track([C,"czmBackFaceCulling"],[t,"czmBackFaceCulling"])),this.d(V.track([C,"czmDebugShowBoundingVolume"],[t,"czmDebugShowBoundingVolume"])),this.d(V.track([C,"czmDebugShowContentBoundingVolume"],[t,"czmDebugShowContentBoundingVolume"])),this.d(V.track([C,"colorBlendMode"],[t,"colorBlendMode"])),this.d(V.track([C,"cacheBytes"],[t,"cacheBytes"])),this.d(V.track([C,"clippingPlaneEnabled"],[t,"clippingPlaneEnabled"])),this.d(V.track([C,"unionClippingRegions"],[t,"unionClippingRegions"])),this.d(V.track([C,"clippingPlaneEdgeColor"],[t,"clippingPlaneEdgeColor"])),this.d(V.track([C,"clippingPlaneEdgeWidth"],[t,"clippingPlaneEdgeWidth"])),this.d(V.track([C,"materialParams"],[t,"materialParams"])),this.d(V.bind([C,"supportEdit"],[t,"supportEdit"])),this.d(V.bind([C,"clippingPlanesId"],[t,"clippingPlanesId"])),this.d(V.bind([C,"clippingPlaneIds"],[t,"clippingPlaneIds"])),this.d(V.bind([C,"flattenedPlaneId"],[t,"flattenedPlaneId"])),this.d(V.bind([C,"flattenedPlaneEnabled"],[t,"flattenedPlaneEnabled"])),this.d(V.bind([C,"clippingPlaneId"],[t,"clippingPlaneId"])),this.d(V.bind([C,"excavateId"],[t,"excavateId"]))}{const C=this._es3DTileset;this.d(t.refreshTilesetEvent.don(()=>{C.refreshTileset()})),this.d(t.highlightFeatureEvent.don((...A)=>{C.highlightFeature(...A)})),this.d(t.highlightFeatureAndFlyToEvent.don((...A)=>{C.highlightFeatureAndFlyTo(...A)})),this.d(t.setFeatureColorEvent.don((...A)=>{C.setFeatureColor(...A)})),this.d(t.setFeatureVisableEvent.don((...A)=>{C.setFeatureVisable(...A)})),this.d(t.resetFeatureStyleEvent.don((...A)=>{C.resetFeatureStyle(...A)})),this.d(t.flyInEvent.don((...A)=>{C.flyIn(A[0])})),this.d(t.flyToEvent.don((...A)=>{C.flyTo(A[0])})),this.d(t.calcFlyToParamEvent.don((...A)=>{C.calcFlyToParam(...A)})),this.d(t.calcFlyInParamEvent.don((...A)=>{C.calcFlyInParam(...A)}))}{const C=this._es3DTileset;this.d(C.tilesetReady.don(A=>{t.tilesetReady.emit(A)})),this.d(C.pickedEvent.don(A=>{t.pickedEvent.emit(new j.SceneObjectPickedInfo(t,A.childPickedInfo))}))}{const C=()=>{this.es3DTileset.show=t.show};C(),this.d(t.showChanged.don(()=>{C()}))}}get es3DTileset(){return this._es3DTileset}};z(PA,"type",PA.register("ESUeViewer",j.ESRtsFeatureEditing.type,PA));let ws=PA;const xA=class xA extends _t{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}}};z(xA,"type",xA.register("ESUeViewer",j.ESMsTileset.type,xA));let Bs=xA;const OA=class OA extends Ne{constructor(e,t){super(e,t);const n=t.viewer;if(!n){console.warn("viewer is undefined!");return}const y=()=>{n.callUeFunc({f:"update",p:{id:e.id,height:e.height??j.ESGeoExtrudedPolygon.defaults.height,extrudedHeight:e.extrudedHeight??j.ESGeoExtrudedPolygon.defaults.extrudedHeight,perPositionHeight:e.perPositionHeight??j.ESGeoExtrudedPolygon.defaults.perPositionHeight}})},C=this.disposeVar(V.createNextAnimateFrameEvent(e.heightChanged,e.extrudedHeightChanged,e.perPositionHeightChanged));this.dispose(C.disposableOn(y)),this.dispose(e.createdEvent.disposableOn(y))}};z(OA,"type",OA.register("ESUeViewer",j.ESGeoExtrudedPolygon.type,OA));let Cs=OA;const MA=class MA extends de{constructor(e,t){if(super(e,t),!t.viewer){console.warn("viewer is undefined!");return}}};z(MA,"type",MA.register("ESUeViewer",j.ESStaticMesh.type,MA));let bs=MA;return J.ESUeViewer=st,J.HighlightFeatureAndFlyToCallFunc=ka,J.HighlightFeatureCallFunc=Da,J.SetLayerColorCallFunc=Na,J.SetLayerVisibleCallFunc=Ka,J.UeCloudViewerBase=nr,J.UeES3DTileset=ZA,J.UeESAlarm=pi,J.UeESApertureEffect=gi,J.UeESAreaMeasurement=vi,J.UeESBlastParticleSystem=yi,J.UeESBoxClipping=mi,J.UeESCameraView=wi,J.UeESCameraVisibleRange=Bi,J.UeESCar=Ci,J.UeESClassification=bi,J.UeESClippingPlane=_i,J.UeESDataMesh=Ei,J.UeESDatasmithRuntimeModel=Fi,J.UeESDirectionMeasurement=Si,J.UeESDistanceMeasurement=Qi,J.UeESDynamicWater=Ui,J.UeESEntityCluster=Ti,J.UeESExcavate=Ii,J.UeESFireParticleSystem=Pi,J.UeESForestTileset=xi,J.UeESGaussianSplatting=ms,J.UeESGeoDiv=Po,J.UeESGeoExtrudedPolygon=Cs,J.UeESGeoJson=xo,J.UeESGeoLineString=Jn,J.UeESGeoPolygon=Ne,J.UeESGeoRectangle=Oo,J.UeESGeoVector=Re,J.UeESGeoWater=Mo,J.UeESGltfModel=Ho,J.UeESHeightMeasurement=Lo,J.UeESHuman=Ro,J.UeESHumanPoi=ps,J.UeESImageLabel=Do,J.UeESImageryLayer=fi,J.UeESLabel=Ze,J.UeESLevelRuntimeModel=ko,J.UeESLocalCircle=Ko,J.UeESLocalPolygon=qA,J.UeESLocalPolygonZ=No,J.UeESLocalRectangle=Vo,J.UeESLocalSkyBox=Go,J.UeESLocalVector=di,J.UeESLocalVector2D=$A,J.UeESLocationMeasurement=jo,J.UeESMsTileset=Bs,J.UeESNavigator=gs,J.UeESObjectWithLocation=de,J.UeESPath=vs,J.UeESPipeFence=Wo,J.UeESPipeline=zo,J.UeESPipeserTileset=Jo,J.UeESPit=Xo,J.UeESPoi2D=Yo,J.UeESPoi3D=$o,J.UeESPoiTileset=Zo,J.UeESPolygonFence=qo,J.UeESPolygonFlattenedPlane=es,J.UeESPolygonWithHole=ts,J.UeESRtsFeatureEditing=ws,J.UeESRtsTileset=rs,J.UeESSceneObject=_t,J.UeESSeparateFoliage=As,J.UeESStaticMesh=bs,J.UeESSubmergingAnalysis=ns,J.UeESSunshineAnalysis=is,J.UeESSurfaceAreaMeasurement=os,J.UeESTerrainLayer=hi,J.UeESTextLabel=ss,J.UeESUEWidget=as,J.UeESUnrealActor=cs,J.UeESVideoFusion=ls,J.UeESViewShed=us,J.UeESViewerStatusBar=ys,J.UeESVisibilityAnalysis=ds,J.UeESVisualObject=Le,J.UeESVolumeMeasurement=fs,J.UeESWidget=hs,J.UePickedInfo=Vd,J.bind3DTilesetByTagCallFunc=pc,J.bindActorByTagCallFunc=lc,J.bindImageryByTagCallFunc=yc,J.calcFlyToParamCallFunc=kt,J.callFunctionCallFunc=ui,J.captureCallFunc=Za,J.changeNavigationModeCallFunc=ot,J.createActorByClassCallFunc=hc,J.destroyCallFunc=ci,J.flyInCallFunc=Ar,J.flyInDefaultCameraCallFunc=Oa,J.flyToCallFunc=Dt,J.generateMemReportCallFunc=Ra,J.getAllSocketNamesByActorTagCallFunc=rc,J.getBoundSphereCallFunc=nc,J.getBoundSphereWithChildrenCallFunc=ic,J.getCameraRelativeHeightCallFunc=Cc,J.getFillMaterialParamInfoCallFunc=sc,J.getGlobalPropertyCallFunc=ac,J.getHeightByLonLatCallFunc=Ya,J.getHeightByLonLatsCallFunc=$a,J.getIdByComponentNameAndHitItemCallFunc=Bc,J.getLonLatAltToScreenPositionCallFunc=ec,J.getObjectByInfoCallFunc=cc,J.getStatusCallFunc=Fc,J.getStrokeMaterialParamInfoCallFunc=oc,J.getTilesetMaterialIDListCallFunc=Tc,J.getVersionCallFunc=Ac,J.highlightActorByTagCallFunc=_c,J.mountPakFiles=La,J.moveObjectsCallFunc=Uc,J.partialCaptureCallFunc=qa,J.pickCallFunc=Ja,J.pickPositionCallFunc=Xa,J.quitCallFunc=za,J.refreshTilesetCallFunc=xa,J.resetWithCurrentCameraCallFunc=li,J.restoreOriginalSceneCallFunc=uc,J.saveStringToFileCallFunc=bc,J.sendCustomMessageCallFunc=Ec,J.setGlobalPropertyCallFunc=Wa,J.setNodePositionCallFunc=Va,J.setNodeRotationCallFunc=Ga,J.setNodeScaleCallFunc=ja,J.smoothMoveCallFunc=YA,J.smoothMoveOnGroundCallFunc=JA,J.smoothMoveWithRotationCallFunc=zA,J.smoothMoveWithRotationOnGroundCallFunc=XA,J.startEditingCallFunc=Sc,J.startVoiceCallFunc=Ma,J.stopEditingCallFunc=Qc,J.stopVoiceCallFunc=Ha,J.uePositionToLonLatAltCallFunc=tc,J.unBind3DTilesetByIdCallFunc=vc,J.unBind3DTilesetByTagCallFunc=gc,J.unBindActorByIDCallFunc=dc,J.unBindActorByTagCallFunc=fc,J.unBindImageryByIdCallFunc=wc,J.unBindImageryByTagCallFunc=mc,Object.defineProperty(J,Symbol.toStringTag,{value:"Module"}),J}({},EarthSDK3);